-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Crash after winpthread update #8094
Comments
can you confirm that downgrading to http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-libwinpthread-git-9.0.0.6118.ea40a87a-1-any.pkg.tar.zst fixes it? |
Yes, I confirm that reverting to this previous version does fix the crash. |
Any minimal sample code to reproduce this issue? If I see the git history winpthread was not changed between those two commits. |
Unfortunately, the crash is inside a quite large library and the gdb stack is not very helpful, so, it doesn't seem easy to develop a minimal sample code that reproduces this crash... |
Yes, the two versions of |
The only change in that interval seems this one: mingw-w64/mingw-w64@84c950b |
That's before ea40a87a commit. |
That commit affects i686-w64-mingw32 only. |
yeah, I'm going to revert all those later edit: done in d08f61e |
I am happy to test any intermediate version if that helps. |
So the backports were useless ? ouch guess i got fooled as well. |
Not useless. The specific commit mentioned only affected i686. However the other commit(s) addressed an issue with registers saved on the stack for SEH getting corrupted, as I understand it. Apparently it had some adverse impacts on setjmp. |
what about now? |
aye i was seing a lot of segfaults and pointed lazka at the last backport which atleast fixed the segfaults for me but i guess it only went that well for me because i use an sjlj build. |
Im actually using the build with all 3 backport patches and no problems here so far. |
was winpthread built with the last backport, or before that was applied? It could be that it would have benefitted from that fix also |
i built it after all 3 patches where applied no problems so far with winpthreads. but i guess you ment to hear from the bug reporter ? |
The issue has been fixed. I can compile and run correctly again after new updates from MSYS2. |
It was build without the last backport (you can look at the .BUILDINFO file in each package for which versions were current at that time). Is it worth re-trying, or should we just wait for an official release? Anyway, thanks for testing @omichel, glad we could pin down the cause. |
aye i was wondering to since it works here with all 3 patches applied :) |
There is a call to |
well what we need to know is if you updated mingw-w64-gcc in the last days before you built winpthread as the last patch was just recently added and fixed a segfault caused by the other backports :) |
the patch in question is this one 0202-backport-357c435.patch it was added this week so it is rather recent. |
guess we will have to do a ci build and then check it out ourself, not sure but would RaiseException() not also crash on a build with sjlj exceptions ?. |
在 2021-03-11 06:53, Ralph Engels 写道:
guess we will have to do a ci build and then check it out ourself, not sure but would
RaiseException() not also crash on a build with sjlj exceptions ?.
I presume it wouldn't, because no SEH handler would be generated.
…--
Best regards,
Liu Hao
|
hmm guess at most we can do some testing to see if it also happens with all 3 patches in place then. |
Looks youre right according to https://docs.microsoft.com/en-us/windows/win32/api/errhandlingapi/nf-errhandlingapi-raiseexception is SEH only. |
and the particular case of setting thread name using RaiseException is a 'hack' to communicate with an attached debugger. it shouldn't be invoked if there is not a debugger attached, and there's a vectored exception handler registered to catch it just in case. |
Was there any way to reproduce this? The gcc 10.3 update is pending which contains one of the reverted commits and I'd like to check if that problem still exists. |
You can either compile Webots from the sources or replace to |
ok, thanks! |
So I rebuilt winpthread 9.0.0.6158 with gcc 10.3.0 and tested Webots nightly, it crash at start-up just as described Will revert the commit in 0202-backport-357c435.patch to see if the problem persists. |
Here's my test results Revert 0202-backport-357c435.patch only → still crash Edit: Realized 0202 is a fix on top of 0201 and previous comments suggest that when the initial crash happens, 0202 is not applied, so the first testcase is useless.
|
This commit reverts gcc-mirror/gcc@357c435 and gcc-mirror/gcc@49a714e Reference: msys2#8094
Since this is a crash in |
Thanks. Good to have a minimal reproducer at least. |
A tentative fix was posted in the gcc bug, maybe someone can check if it solves this problem here as well. |
Thanks. I'll try to test the patch. |
@omichel I have three variants of libwinpthread-1.dll: mingw-w64-winpthreads-tests.zip Could you give them a quick run? I kinda failed to figure out where the Windows version is for your nightly build. |
Thank you. I just tested and here are the results:
|
perfect, that confirms the cause and the fix. |
Since the update to mingw-w64-x86_64-libwinpthread-git-9.0.0.6128.07922837-1 / mingw-w64-x86_64-winpthreads-git-9.0.0.6128.07922837-1, my app is crashing with the following gdb stack:
The text was updated successfully, but these errors were encountered: