https://bugs.winehq.org/show_bug.cgi?id=57608
Bug ID: 57608 Summary: Automatically end all processes after a wineserver crash. Product: Wine Version: 10.0-rc3 Hardware: x86-64 OS: Linux Status: NEW Severity: normal Priority: P2 Component: wineserver Assignee: wine-bugs@winehq.org Reporter: bernhardu@mailbox.org Distribution: ---
If a wineserver crash happens all other processes stay hanging in the system.
These processes may have still windows open, which no longer react to user input. And may hold resources until the user reboots or kills the processes.
Would it be possible for them to just end too, when the connection to wineserver disappears?
https://bugs.winehq.org/show_bug.cgi?id=57608
Zeb Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |z.figura12@gmail.com
--- Comment #1 from Zeb Figura z.figura12@gmail.com --- (In reply to Bernhard Übelacker from comment #0)
If a wineserver crash happens all other processes stay hanging in the system.
These processes may have still windows open, which no longer react to user input. And may hold resources until the user reboots or kills the processes.
Would it be possible for them to just end too, when the connection to wineserver disappears?
How? What's going to kill them?
https://bugs.winehq.org/show_bug.cgi?id=57608
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dark.shadow4@web.de
--- Comment #2 from Fabian Maurer dark.shadow4@web.de ---
How? What's going to kill them?
Possibly a watchdog thread that runs for every process, terminating it if wineserver is not available.
https://bugs.winehq.org/show_bug.cgi?id=57608
--- Comment #3 from Bernhard Übelacker bernhardu@mailbox.org --- (In reply to Zeb Figura from comment #1)
(In reply to Bernhard Übelacker from comment #0)
Would it be possible for them to just end too, when the connection to wineserver disappears?
How? What's going to kill them?
Attaching to such a process shows all threads are waiting in a read in wait_select_reply.
The hope was somehow to detect if the other side of the socket is no longer connected, like getting an error like EPIPE from the `read` call by specifying some flag when it gets opened.
In case of wineserver receiving a SIGSEGV it still reaches `do_sigsegv`.
Might it be possible to switch a flag in the shared memory `user_shared_data`, which the regular processes read to detect a crash.
Or would it possible to send a unix signal to the processes in `do_sigsegv`.
Would calling `close` on the socket in `do_sigsegv` help?
https://bugs.winehq.org/show_bug.cgi?id=57608
--- Comment #4 from Bernhard Übelacker bernhardu@mailbox.org --- (In reply to Bernhard Übelacker from comment #3)
Would calling `close` on the socket in `do_sigsegv` help?
More specifically, would calling `shutdown_master_socket` be possible inside `do_sigsegv`? A short test seems to have finished all processes. But it would just cover the case when the signal handler is still callable.
https://bugs.winehq.org/show_bug.cgi?id=57608
--- Comment #5 from Alexandre Julliard julliard@winehq.org --- No, you don't want to do anything upon a crash, you can't trust that the internal data structures are in a sane state. In particular you don't want to risk killing unrelated processes.