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
app crashes with Fatal Python error: ffi.from_handle() detected that the address passed points to garbage
shortly after starting only on Windows since 20.4.0
#1587
Comments
Fatal Python error: ffi.from_handle() detected that the address passed points to garbage
shortly after starting only on WindowsFatal Python error: ffi.from_handle() detected that the address passed points to garbage
shortly after starting only on Windows since 20.4.0
Can you provide a short, self contained example that reliably crashes? Without being able to reproduce the problem it's very difficult to find and fix. It looks as if a watcher object is still active when it shouldn't be, but beyond that theres not much I can say.
The default event loop is different on Windows and Linux. It would be interesting to know if using the |
@jamadden Ok, I can try to provide a short, self contained example but this is in proprietary application, so it can take me some time to properly extract that. |
I'm facing the exact same issue. Gevent 20.04, Windows 10. Works fine on WSL2 |
from gevent import monkey,pywsgi
monkey.patch_all(thread=False)
from flask import Flask,request
from flask import request, jsonify, json
app = Flask(__name__)
app.config['JSON_AS_ASCII'] = False
@app.route('/helloworld', methods=[ 'POST','GET'])
def hello():
return "hello world"
if __name__ == '__main__':
app.run(host="127.0.0.1",port=5000) when i start flask and request,first time is ok,but second the error happend |
Created the main file. Started testing. Due to bug had to switch over to a linux disto: gevent/gevent#1587
Can confirm the same error on Windows 10 (1909) Latest with python 3.8.1 and gevent 20.5.0 Error output for reference:
|
Fixed in #1602, as best I can tell. |
Description:
Nothing fancy just running an app with Flask, gevent and gevent-websocket (all in their latest versions) and it crashes shortly after running. Sometimes it is nearly instantly, sometimes it takes even several seconds (no longer than a minute though) but it always does exit with error code. Strangely it only happens on Windows - on Linux Ubuntu (through docker) everything is all right. Everything worked OK back on gevent 1.5.0 but this warning (#1564) was written repeatedly.
The text was updated successfully, but these errors were encountered: