-
Notifications
You must be signed in to change notification settings - Fork 527
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
perl5.38.2 crashes if no locales set while using threads::Queue #22195
Comments
I do not have Ubuntu 24.04; I have Ubuntu 22.04 LTS. So the "vendor perl" (
No crash. I then built a threaded perl at HEAD of blead.
I then ran your program with
No crash. Within the limitations of the kit available to me, I cannot reproduce your crash. Whenever someone reports a crash or other bug to us that has been generating by running Debian's Has this been observed by other users of the Debian build of perl-5.38? |
I can't reproduce this on a fresh 24.04 install. I tried with my default LC_* values too:
|
Thanks @tonycoz for posting your locale settings. I tried to use them and crash disappeared:
So, I reverted my locale settings and got a crash again:
|
Can you try to run it in a debugger and get us a backtrace? (E.g. gdb or Devel::cst) |
Yes, see issue description:
due to this backtrace I even started to look in locales, otherwise it has been a completely unexplainable crash before |
This looks like the kind of issue that requires @khwilliamson 's attention. |
I managed to reproduce this with the system perl, valgrind provides more information:
From this it looks like the initialization of the interpreter that threads::shared creates, uses the main interpreter's locale object as a base to create a new locale (via newlocale()) which frees that locale object. The main thread then (during cleanup) releases its copy of that locale object, producing the crash. |
With debugperl:
I haven't managed to reproduce this yet when built from source (blead and v5.38.2) |
I tried to build
which step did I miss? |
Generally speaking, when working with a particular git checkout (as you are here), we don't bother to install the executable. So we would say:
The |
The issue doesn't reproduce for me on the fresh build from v5.38.2. |
Hi, I can reproduce this on Debian unstable too, although it does seem a bit nondeterministic and doesn't crash on every run of the test script. I haven't had the time to test this yet, but if it's indeed Ubuntu/Debian specific as comments indicate, I expect it's caused by which was a reversion of 7af2d20 due to #21366 / https://bugs.debian.org/1060679 Presumably I should have backported bf38d1c instead. Apologies for the trouble I seem to have caused. I'll try to fix this for Debian unstable/testing soon, but getting a fix into Ubuntu 24.04 is a whole different matter. |
Just a note that this is now tracked on the Debian side as https://bugs.debian.org/1071129 |
Module: threads
Description
If locales are not set perl crashes to segmentation fault
Steps to Reproduce
Backtrace:
Expected behavior
Expected no crash
Perl configuration
The text was updated successfully, but these errors were encountered: