Comments (21)
Looking at the logs, I can tell you there was a long-lived Curl::Multi handle which had never had any Easy handles re-added.
from curb.
Can you try again with 0.5.8.0 ?
from curb.
You know it might be that...
if( r != easy || r == Qnil ) {
rb_raise(rb_eRuntimeError, "Critical:: Unable to remove easy from requests");
}
should really be
if( r != easy && r == Qnil ) {
rb_raise(rb_eRuntimeError, "Critical:: Unable to remove easy from requests");
}
Still thinking about that branch...
from curb.
Actually you know what, that error could be coming from 2 places. I believe curl_multi_flush_easy does not need to remove items from the hash, since it's called within a foreach loop, I wonder if removing items within a ruby foreach is save in the C API... I think we can skip that code since we dereference the Hash following that loop...
from curb.
Can you run your test against my last commit http://github.com/taf2/curb/commit/f97799351f84a8f050d4478e2f94cded5f3f9fb8
from curb.
Running with that change. Will reopen or file a new ticket if I have any other problems, but with that exception gone I might not get it again...
from curb.
Btw, judging from the code, modifying a hash during rb_hash_foreach is not safe.
from curb.
did the change fix your bug?
from curb.
Well, I haven't seen the exception and it's been running for 15 hours. So my guess is it's fixed..
from curb.
Spoke too soon. Just got this error again with 0.5.9.1.
from curb.
can't be the same error what was the message or stack trace?
from curb.
I just got "Critical:: Unable to remove easy from requests" inside a Curl::Mutli perform. Not sure what the C stack was.
from curb.
internally, the multi handle uses the address of that easy handle as a reference within the requests Hash to prevent the ruby GC from collecting any active easy requests... I think if we check for the handle in the add and remove it if found then on handle complete when it's time to remove the request we wont' get that exception raised. Going to work on this a bit today and will let you know when I have a patch for you test again. Thanks !
from curb.
For the time being I changed things to just warn, instead of raising in this condition, it should be fairly safe... e.g. at worst a memory leak...
from curb.
If you make it printf when an easy handle is added and deleted (and why it's being deleted), and still raise the exception when the delete fails, I could you provide you with the log. It's either removing twice or removing something which is never added, right?
I've encountered about 7 of these so far, so a leak wouldn't be so bad I guess, but I'd like to help find/fix the problem.
from curb.
I've reworked a few things in how the multi handle interacts with the easy handle. I'm wondering can you clone from HEAD and check in your environment?
from curb.
Sorry for the delay. Running HEAD now, will report back in a few days.
from curb.
any luck?
from curb.
Well, it's still running and I haven't had any problems. I don't think there have been any crashes, and I haven't seen any memory leaks, but I restart my processes every 24 hours.
Is there anything else I can check to be sure?
from curb.
I think that is good, as I recall I had pretty much removed the code path that could have been causing the issue to begin with... I'm going to close the issue out.
from curb.
Cool.
from curb.
Related Issues (20)
- on_failure receive incorrect argument HOT 1
- README: Change URLs to be to curl.se HOT 1
- New version request HOT 4
- Is CURLOPT_REQUEST_TARGET needed for Request-URI different than Host header? HOT 2
- Library not loaded: @rpath/libgssapi_krb5.2.2.dylib HOT 1
- Hello, I am new into coding, so i was trying to set up environment for ESG-BERT: https://github.com/mukut03/ESG-BERT using pytorch, but i am unable to solve this error on windows using anaconda, the server is running but unhealthy. Error(ESG-BERT) C:\Users\Administrator\anaconda3\envs\ESG-BERT>curl http://localhost:8080/ping { "status": "Unhealthy" }
- [BUG] Segmentation fault with Ruby 2.3 & curb 1.0.1 HOT 1
- LICENSE file contents does not match MIT license in the gemspec file HOT 1
- Gem install fails in windows 10 wsl v1 HOT 1
- Build against curl-impersonate HOT 1
- Investigate Ruby T_DATA warning HOT 1
- Segfault in Multi after upgrading to v1.0.3 HOT 5
- CURLOPT_NOPROXY not supported
- Curl::Err::HostResolutionError on WSL
- how do I `download_byte_limit` with curb
- `test_connection_keepalive(TestCurbCurlMulti)` skipped with Curl 8+ HOT 1
- Cannot edit cookies.
- Error Installing on Ubuntu 20.04.6 LTS
- error running the curb test suite with curl 8.7.1 HOT 5
- Not working with libcurl 8.8 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from curb.