HTTP.jl icon indicating copy to clipboard operation
HTTP.jl copied to clipboard

[BREAKING] HTTP.jl 2.0: Overhaul internals by switching to use aws-crt libraries

Open quinnj opened this issue 1 year ago • 2 comments

This isn't quite ready to merge yet, but starting the PR to get CI running and document what there is left to do:

[ ] Incorporate @IanButterworth's recent precompile work [ ] Update documentation: manual and all inline docs; also write up a 1.X -> 2.0 migration guide [ ] Update upstream AWS CRT libraries and fix anything required in our wrappers

quinnj avatar Jan 05 '25 04:01 quinnj

Made some progress here, but blocked on 2 issues I need to dig into:

  • There's an occasional segfault from an unhandled C callback BoundsError; it's when we try to write to the temporary Base.BufferStream and it seems like the code should correctly resize the underlying IOBuffer of the BufferStream, but it doesn't for some reason and then we get a BoundsError; I'm actively investigating this now to try to find out if it's an actual bug in Base.BufferStream/IOBuffer, or how we're using BufferStream (pretty vanilla, but maybe?)
  • There's an sporadic test failure where providing an IOBuffer as a response body seems to sometimes duplicate part of the body writing. Possibly related to the first issue.

quinnj avatar Jan 30 '25 17:01 quinnj

Ok, turns out the segfault is due to Base.BufferStream readavailable not being threadsafe, there's a PR to fix here: https://github.com/JuliaLang/julia/pull/57211. I'll add a compat shim here until that's fully fixed/released. I can confirm that the same root cause was causing both issues mentioned above.

quinnj avatar Jan 31 '25 00:01 quinnj