Bug 2290636

Summary: [abrt] automake: __freelocale(): perl killed by SIGSEGV
Product: [Fedora] Fedora Reporter: Bojan Jovanovic <bojov>
Component: perlAssignee: Michal Josef Spacek <mspacek>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 40CC: bojov, fberat, fjanus, iarnell, jplesnik, kasal, mmaslano, mspacek, perl-devel, ppisar, praiskup, psabata, rhughes, spotrh
Target Milestone: ---Flags: mspacek: needinfo-
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
URL: https://retrace.fedoraproject.org/faf/reports/bthash/ddb9505f9fb0606e002035d68d9750da29bd79e
Whiteboard: abrt_hash:49be08aaf83a6853b224df3eec41f89c836cff52;VARIANT_ID=;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-05-20 09:03:53 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
File: proc_pid_status
none
File: maps
none
File: limits
none
File: environ
none
File: open_fds
none
File: mountinfo
none
File: os_info
none
File: cpuinfo
none
File: core_backtrace
none
File: exploitable
none
File: dso_list
none
File: backtrace none

Description Bojan Jovanovic 2024-06-05 21:33:30 UTC
Description of problem:
in emacs during pdf-tools-install autoreconf gets SIGSEV 11

Version-Release number of selected component:
automake-1.16.5-16.fc40

Additional info:
reporter:       libreport-2.17.15
type:           CCpp
reason:         perl killed by SIGSEGV
journald_cursor: s=5c6708f59b7d426a8270817335ae44a9;i=306953;b=355fc80f0ed54bb5b76bffda8a152b42;m=4871fc4;t=61a2b254918e6;x=3dff45bd5480dbd0
executable:     /usr/bin/perl
cmdline:        /usr/bin/perl /usr/bin/automake --add-missing --copy --no-force
cgroup:         0::/user.slice/user-1000.slice/user/app.slice/app-emacs-96f07cbe64764bf98be96ff9f9553004.scope
rootdir:        /
uid:            1000
kernel:         6.8.11-300.fc40.x86_64
package:        automake-1.16.5-16.fc40
runlevel:       N 5
backtrace_rating: 4
crash_function: __freelocale
comment:        in emacs during pdf-tools-install autoreconf gets SIGSEV 11

Truncated backtrace:
Thread no. 1 (2 frames)
 #0 __freelocale at freelocale.c:43
 #2 perl_destruct at /usr/src/debug/perl-5.38.2-506.fc40.x86_64/perl.c:1144

Comment 1 Bojan Jovanovic 2024-06-05 21:33:33 UTC
Created attachment 2036469 [details]
File: proc_pid_status

Comment 2 Bojan Jovanovic 2024-06-05 21:33:34 UTC
Created attachment 2036470 [details]
File: maps

Comment 3 Bojan Jovanovic 2024-06-05 21:33:35 UTC
Created attachment 2036471 [details]
File: limits

Comment 4 Bojan Jovanovic 2024-06-05 21:33:37 UTC
Created attachment 2036472 [details]
File: environ

Comment 5 Bojan Jovanovic 2024-06-05 21:33:38 UTC
Created attachment 2036473 [details]
File: open_fds

Comment 6 Bojan Jovanovic 2024-06-05 21:33:40 UTC
Created attachment 2036474 [details]
File: mountinfo

Comment 7 Bojan Jovanovic 2024-06-05 21:33:43 UTC
Created attachment 2036475 [details]
File: os_info

Comment 8 Bojan Jovanovic 2024-06-05 21:33:45 UTC
Created attachment 2036476 [details]
File: cpuinfo

Comment 9 Bojan Jovanovic 2024-06-05 21:33:47 UTC
Created attachment 2036477 [details]
File: core_backtrace

Comment 10 Bojan Jovanovic 2024-06-05 21:33:49 UTC
Created attachment 2036478 [details]
File: exploitable

Comment 11 Bojan Jovanovic 2024-06-05 21:33:50 UTC
Created attachment 2036479 [details]
File: dso_list

Comment 12 Bojan Jovanovic 2024-06-05 21:33:51 UTC
Created attachment 2036480 [details]
File: backtrace

Comment 13 Frédéric Bérat 2024-06-10 07:47:17 UTC
Re-assign to Perl. The crash occurs in the interpreter, automake has nothing to do with it.

Comment 14 Michal Josef Spacek 2024-06-11 11:10:46 UTC
@bojov.ac.rs Hi, how to reproduce this issue? 

As I see pdf-tools-install is lisp code (this https://github.com/politza/pdf-tools one?). 
Is it installed from the package or how?

Could you describe the process?

Comment 15 Bojan Jovanovic 2024-06-11 13:41:17 UTC
(In reply to Michal Josef Spacek from comment #14)
> @bojov.ac.rs Hi, how to reproduce this issue? 
> 
> As I see pdf-tools-install is lisp code (this
> https://github.com/politza/pdf-tools one?). 
> Is it installed from the package or how?
> 
> Could you describe the process?

Fedora 40, KDE Plasma 6, emacs from the Fedora repos, doom-emacs, pdf module enabled in the user's init.el file (after enabling the /path/to/doom sinc module).
Since the pdf-tools package (http://github.com/vedang/pdf-tools/ also in the elpa.nongn repo) requires (re)building the epdfifno program then I have to call the M-k pdf-tools-install command.
During command execution, it starts building the epdfinfo program and calls automake.

Epdfinfo is built and working as expected.
Another note, F40 is installed with English language support, and I added Serbian and Serbian Latin keyboards and the glibc-langpack-sr package. I also copied the locale.conf (from the Gnome installation) with the following content :
LANG="en_US.UTF-8"
LC_NUMERIC="sr_RS.UTF-8@latin"
LC_TIME="sr_RS.UTF-8@latin"
LC_MONETARY="sr_RS.UTF-8@latin"
LC_PAPER="sr_RS.UTF-8@latin"
LC_MEASUREMENT="sr_RS.UTF-8@latin"

I suspect this may be a problem due to a bug in the freelocale function?

Comment 16 Michal Josef Spacek 2024-06-11 13:45:12 UTC
@bojov.ac.rs If you think that the problem could be with locales, you could change to en_US and test.
We need to simplify the case.

Comment 18 Bojan Jovanovic 2024-06-12 17:10:28 UTC
(In reply to Michal Josef Spacek from comment #16)
> @bojov.ac.rs If you think that the problem could be with locales, you
> could change to en_US and test.
> We need to simplify the case.

I tried in the following configurations:
Fedora 40 workstation - from locale.conf:
- LANG="en_US.UTF-8" only.
- custom locale.conf
LANG="en_US.UTF-8"
LC_NUMERIC="sr_RS.UTF-8@latin"
LC_TIME="sr_RS.UTF-8@latin"
LC_MONETARI="sr_RS.UTF-8@latin"
LC_PAPER="sr_RS.UTF-8@latin"
LC_MEASUREMENT="sr_RS.UTF-8@latin"

Fedora 40 KDE Plasma 6 - with locale.conf:
- LANG="en_US.UTF-8" only.

autoreconf (called from pdf-tools-install) works as expected - no sigsev 11

It not works in KDE Plasma 6 with a custom locale.conf.

Note: locale.conf is customized with "Region & Language" from System Settings in both environments.
I also noticed that the Gnome environment settings are applied system-wide, while in KDE the same settings are applied per user.

Comment 19 Michal Josef Spacek 2024-06-13 11:12:18 UTC
Reproducer without emacs on Fedora 40:

 sudo localectl set-locale LANG="en_US.UTF-8" LC_NUMERIC="sr_RS.UTF-8@latin" LC_TIME="sr_RS.UTF-8@latin" LC_MONETARY="sr_RS.UTF-8@latin" LC_PAPER="sr_RS.UTF-8@latin" LC_MEASUREMENT="sr_RS.UTF-8@latin"
 git clone https://github.com/vedang/pdf-tools.git
 cd pdf-tools/server
 automake --add-missing --copy --force-missing

Result:

 Segmentation fault (core dumped)

Comment 20 Michal Josef Spacek 2024-06-13 11:31:32 UTC
@bojov.ac.rs I added the link to the Perl issue, which is known. The root cause is »LC_ALL=«.

Comment 21 Michal Josef Spacek 2024-06-13 18:43:23 UTC
The simple reproducer is (from Perl issue):

 $ cat crash.pl
 #!/usr/bin/perl

 require threads;
 require Thread::Queue;

 $ export LC_ALL=
 $ perl crash.pl && echo OK
 Segmentation fault (core dumped)
 $ export LC_ALL=en_US.UTF-8
 $ perl crash.pl && echo OK
 OK

Comment 22 Michal Josef Spacek 2024-06-13 18:49:24 UTC
Hm,
 export LC_ALL= 
isn't enough. 

 sudo localectl set-locale LANG="en_US.UTF-8" LC_NUMERIC="sr_RS.UTF-8@latin" LC_TIME="sr_RS.UTF-8@latin" LC_MONETARY="sr_RS.UTF-8@latin" LC_PAPER="sr_RS.UTF-8@latin" LC_MEASUREMENT="sr_RS.UTF-8@latin"
is enough.

Comment 23 Michal Josef Spacek 2024-06-27 10:54:23 UTC
I tested this issue in Fedora 40 and Fedora Rawhide in mock. In f40 is present, in rawhide is not present.

Comment 24 Aoife Moloney 2025-04-25 10:56:27 UTC
This message is a reminder that Fedora Linux 40 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 40 on 2025-05-13.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '40'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 40 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 25 Aoife Moloney 2025-05-20 09:03:53 UTC
Fedora Linux 40 entered end-of-life (EOL) status on 2025-05-13.

Fedora Linux 40 is no longer maintained, which means that it
will not receive any further security or bug fix updates. As a result we
are closing this bug.

If you can reproduce this bug against a currently maintained version of Fedora Linux
please feel free to reopen this bug against that version. Note that the version
field may be hidden. Click the "Show advanced fields" button if you do not see
the version field.

If you are unable to reopen this bug, please file a new report against an
active release.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 26 Michal Josef Spacek 2025-05-22 12:05:56 UTC
The issue is not present in Fedora 41.