Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EOFError Heisenbug #618

Closed
timholy opened this issue Nov 11, 2020 · 4 comments
Closed

EOFError Heisenbug #618

timholy opened this issue Nov 11, 2020 · 4 comments

Comments

@timholy
Copy link
Contributor

timholy commented Nov 11, 2020

Julia 1.x
HTTP.jl 0.8.x
MbedTLS.jl 0.6.x and 1.0.x

I'm sure this is my own fault, but I'm a newbie when it comes to HTTP requests and I'm experiencing a strange Heisenbug when running tests in my not-yet-registered package https://github.com/JuliaHealth/PubChemCrawler.jl. The issue is that whenever I run the tests with HTTP.request(args...; verbose=3) they pass, but when I run without the verbose setting they fail. EDIT: the failure only happens in CI, locally they always pass.

Examples:

The offending line is here (it's systematic), which calls https://github.com/JuliaHealth/PubChemCrawler.jl/blob/6bf9a3226132d0eff5381ce9be196d808af243fd/src/query.jl#L127. I've toggled between verbose=3 and not twice now, and gotten the same result, so I think this is not just bad luck.

It may also be worth pointing out that this service has request limits, see https://juliahealth.org/PubChemCrawler.jl/previews/PR3/#Before-you-start:-be-aware-of-search-limits.

Anyone have any ideas?

@quinnj
Copy link
Member

quinnj commented Nov 12, 2020

So, I cloned the repo and ran the tests several times, but didnt' see any errors; is that expected?

@timholy
Copy link
Contributor Author

timholy commented Nov 12, 2020

Locally, for me it works every time, it just fails on CI. I wonder if it's because so many jobs are running in parallel and that ends up triggering PubChem's limits? But I've tried to add fairly generous delays, without benefit (so far, I could try something like 15s I suppose). The weirdest part, though, is the fact that they work on CI with verbose=3 but not without.

@timholy
Copy link
Contributor Author

timholy commented Nov 16, 2020

I worked around the issue (just so I could register the package) by checking for ENV["CI"] and use verbose=3 when found. But it's a weird phenomenon, so if anyone does figure this out I'd love to know the explanation.

@quinnj
Copy link
Member

quinnj commented May 26, 2022

We've overhauled the request internals and connection pool logic, and there's a proposal to overhaul the debug logging architecture and what verbose controls, so I'm going to close this for now with the idea that the forthcoming 1.0 release should reasonably fix this.

@quinnj quinnj closed this as completed May 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants