Skip to content
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

Deadlock in SDL SIGINT and SIGTERM handling #1762

Closed
SDLBugzilla opened this issue Feb 10, 2021 · 0 comments
Closed

Deadlock in SDL SIGINT and SIGTERM handling #1762

SDLBugzilla opened this issue Feb 10, 2021 · 0 comments

Comments

@SDLBugzilla
Copy link
Collaborator

This bug report was migrated from our old Bugzilla tracker.

These attachments are available in the static archive:

Reported in version: 2.0.3
Reported for operating system, platform: Linux, x86_64

Comments on the original bug report:

On 2015-02-07 10:20:26 +0000, Magnus Bjerke Vik wrote:

Created attachment 2023
Backtrace for deadlock

Receiving a SIGINT or SIGTERM while already inside malloc routines will cause the program to deadlock.

I've attached a backtrace from a case where the signal is received while freeing some allocated data.

I've also attached a simple program to reproduce the problem. It might have to be run a few times to ensure that the signal is received while in a malloc routine.

I've only tested this on Linux, yet. A simple workaround is to handle the signals yourself and avoid any malloc routines.

On 2015-02-07 10:24:13 +0000, Magnus Bjerke Vik wrote:

Created attachment 2024
Code to reproduce deadlock

You might have to run the program a few times so that the signal is received while in a malloc routine. You can also increase the numAllocs.

On 2015-06-08 05:53:49 +0000, Ryan C. Gordon wrote:

This is fixed now in https://hg.libsdl.org/SDL/rev/fd60d77139fc, thanks!

--ryan.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant