-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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
Exiting under Windows is strange #11027
Comments
Related: #10098 (comment) |
I believe the |
Thanks for sharing your findings. So the expected behavior would be that it kills all threads but since the pxh shell thread is still waiting for input it also waits for the thread. Maybe that's similar to the waiting for the poll of the named pipe issue that is solved now. |
Since #11177 simulation runs a lot more stable on windows but the shutdown command also hangs so killing the process is the only way left. I started debugging and found that:
|
Aha
I'm currently assuming newlib which Cygwin uses somehow screws up the SIG's in the process of implementing this specification. Maybe I can find a simple workaround. |
So the So in short if I replace
it all runs smooth in my takeoff Ctrl+C test. Now this is only a possible quick hotfix to reestablish functionality for currently blocked users and not something desirable since lockstep works (other than exiting) super well on Windows. I'll follow up with a more detailed explanation of what I tried and I'd really appreciate if I could ask @julianoes some futher questions (he already helped me when we last met). 😇 |
So here's the patch I last described master...MaEtUgR:exiting-experiments with the biggest disadvantage of disabling lockstep which is no solution. I tracked the problem down to this call: In my tests it always returned @julianoes Could it be that something is triggered after the monotonic time in the simulator runs for one second that then starts other threads that lock everything up? |
I just encountered a case on Linux where the first Ctrl+C didn't exit but also got stuck and the second Ctrl+C then then killed it:
It's not one more SIGINT for the simulator the px4 binary processes both as can be seen from the two |
I'm still relying on the hotfix #11305 and Ctrl+C works as expected. Not sure how to track down why the normal way it gets stuck. |
Still a problem |
True, this is related: #11654 It fixed the shutdown command in my tests. |
This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions. |
I find it annoying that I can't easily quit SITL under windows. When I press
Ctrl+C
the signal handlerSIGINT
is called correctly but then it doesn't shutdown cleanly but hands and you need to press eitherEnter
orCtrl+D
. Presumably, the pxh shell is hanging atgetchar
.FYI: @MaEtUgR
The text was updated successfully, but these errors were encountered: