-
Notifications
You must be signed in to change notification settings - Fork 23
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
libev throws SystemError at the end of execution #25
Comments
Interesting!
|
So based on some preliminary research, it is likely a Windows-specific thing.
|
I'm thinking the same thing. I tried it on my Ubuntu laptop and it seems to run fine. Windows 7 Info:
I REALLY wish I could send you some repro code... However, its a client project and the client is VERY strict about their code... I'll see if I can get the to let me do this (even though it's against contract). Cloning the repo has the same effect. Odd. |
"Cloning the repo has the same effect. Odd." You mean cloning and running the tests under Windows? |
I wasn't able to reproduce the weird "throws at the end of running" behavior, but I was able to reproduce the stack trace. This seems to be an issue with gevent, something with running select in the main greenlet. The program that reproduces the stack trace:
The output for this program:
|
It would be interesting to see if the problem goes away when you switch to using Stackless. regards -- Chris |
@MichaelAz running that code under Linux I get a "gevent.hub.LoopExit: This operation would block forever" error in Case 1. So I think the issue is just a bad error message on Windows. So its just an issue where blocking with no tasklets/greenlets running raises. I can add in a more graceful and consistent way to handle it in goless (wrap the error). I'm sure the behavior in stackless is the same. |
I agree |
Ok, the backends will now catch 'deadlock' errors and reraise them as something meaningful. However I need to add the behavior to select as well (check if it is the last running tasklet). |
Tried with Stackless... Same error. I'm no expert, so I'm likely not right, but I believe it's the last tasklet. I think it's just hanging somehow and libev throws some unknown error about it. |
Yeah what I think is going on is:
Have you tried what's currently in master? |
Okay, now select will detect a deadlock. There's still the potential for one, but since there's no fast way to get all running greenlets in gevent (like there is in stackless via stackless.runcount), I erred on the side of performance than correctness. Very easy to move the deadlock check into the select loop if needed or if someone comes up with an optimization. Will create an issue to track this. |
@aisola the latest change from @MichaelAz for issue #28 (along with the other work done for deadlock detection) should fix this issue. If this isn't fixed with what's in master, please comment here or open a new ticket. |
I seem to be getting a SystemError at the END of my script. There isn't any error in the output or operation even. Just simply annoying to have a SystemError get thrown at the end.
I'm not completely sure where it stems from, but it could be an error in gevent or even greenlet as well. Is there a fix that I haven't heard about for this?
The text was updated successfully, but these errors were encountered: