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

SIGSEGV in MixHrtf_SSE when exiting Lugaru (OpenAL 1.17.2 Debian) #146

Closed
akien-mga opened this issue Sep 6, 2017 · 3 comments
Closed

Comments

@akien-mga
Copy link

Lugaru can apparently crash when exiting on Debian (as reported by @pabs3), and the issues seems to happen directly in OpenAL 1.17.2 SSE code:

#0  _mm_store_ps (__A=..., __P=0x7fb8d3019000) at /usr/lib/gcc/x86_64-linux-gnu/6/include/xmmintrin.h:973
#1  SetupCoeffs (Counter=0, IrSize=22022, hrtfparams=<optimized out>, OutCoeffs=0x7fb8d3017770) at ./Alc/mixer_sse.c:87
#2  MixHrtf_SSE (OutBuffer=0x56066a9a2ba0, data=0x56066a99aba0, Counter=0, Offset=752640, OutPos=0, IrSize=22022, hrtfparams=0x0, hrtfstate=0x0, BufferSize=0) at ./Alc/mixer_inc.c:34
#3  0x0000000000000000 in ?? ()

Since I don't see much in the crash log that ties the bug to Lugaru's specific usage of OpenAL, I thought I'd report it directly upstream to get more experienced eyes on the issue.

@akien-mga
Copy link
Author

It looks like we were badly closing the application on Linux, which is now fixed by https://gitlab.com/osslugaru/lugaru/commit/8f8250f231122f66e75fc83506dd51dbce948dd0

Testing is still ongoing to check if it actually solves the SIGSEGV too; feel free to close this issue if you think this was indeed a downstream bug.

@kcat
Copy link
Owner

kcat commented Sep 23, 2017

Ideally there shouldn't be anything an app can do to make OpenAL crash. However, leaving a device open and running when the process exits does put it into a precarious position since there are resources in use and threads running that the lib can't safely do anything about once its process-end callbacks are invoked (some say OpenAL Soft already does more than it should at process end, but I like to be as thorough as I safely can with cleaning up).

I can't say why closing OpenAL caused a problem in the first place, but leaving a device running does put it at the mercy of the system to clean things up correctly, especially if _exit is called rather than exit.

@kcat
Copy link
Owner

kcat commented Apr 4, 2020

Given no further info, I'm assuming this has been dealt with. There's simply not much OpenAL Soft can do if a device is left open and running when the process terminates.

@kcat kcat closed this as completed Apr 4, 2020
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

2 participants