gevent / gevent

Coroutine-based concurrency library for Python
http://gevent.org
Other
6.22k stars 937 forks source link

RuntimeError: cannot use from_handle() on NULL pointer #1800

Open 2161478 opened 3 years ago

2161478 commented 3 years ago

Description:

I was doing some requests then have encountered this issue: RuntimeError: cannot user from_handle() on NULL pointer WARNING: gevent: Unhandled error with no watcher

I only get this from time to time so I have a hard time replicating it.

File: "gevent\libuv\loop.ppy", line 46, in python_queue_callback
 def python_queue_callback(self, watcher_ptr, revents):
        watcher_handle = watcher_ptr.data
        the_watcher = self.from_handle(watcher_handle)

        the_watcher.loop._queue_callback(watcher_ptr, revents)

image

GitHubAtomicMan commented 2 years ago

same problem, how to fix it???

jacwalte commented 2 years ago

same problem

cannot seem to track it down

Also, perhaps a different issue, but whatever gevent is doing, is also causing my VSCode debugger to fail with pytest and unittest

It seems that the gevent monkey-patching is being used. Please set an environment variable with: GEVENT_SUPPORT=True to enable gevent support in the debugger.

I have tried patching and setting the "gevent": true in launch.json as well

jacwalte commented 2 years ago

Figured out the second issue - but still having the first

This is very random so I believe it is a racing issue. but some assistance would be helpful :)