FS#67691 - [rxvt-unicode] urxvt segmentation fault (core dumped)
Attached to Project:
Community Packages
Opened by John (graysky) - Sunday, 23 August 2020, 19:28 GMT
Last edited by Antonio Rojas (arojas) - Saturday, 15 May 2021, 17:47 GMT
Opened by John (graysky) - Sunday, 23 August 2020, 19:28 GMT
Last edited by Antonio Rojas (arojas) - Saturday, 15 May 2021, 17:47 GMT
|
Details
I am getting consistent core dumps. Verified on two
different machines. I attach an strace of the below command.
Is this consistent for others as well?
% urxvt --geometry 120x30 -e bash -c "sleep 1s" [1] 164344 segmentation fault (core dumped) urxvt --geometry 120x30 -e bash -c "sleep 1s" |
This task depends upon
glibc-2.32-2
lib32-glibc-2.32-2
The core stack trace reports the crash in rxvt_perl_interp::~rxvt_perl_interp() ()
A workaround which works for me is to disable the perl extensions with the wiki recipe, by adding the following to .Xdefaults:
URxvt.perl-ext:
URxvt.perl-ext-common:
@anthraxx - Please let me know if I need to report upstream.
Stack trace of thread 48784:
#0 0x00007fd345c4a4ed getenv (libc.so.6 + 0x3f4ed)
#1 0x00007fd345e695c6 perl_destruct (libperl.so + 0x735c6)
#2 0x0000563f4916e336 _ZN16rxvt_perl_interpD1Ev (urxvt + 0x4d336)
#3 0x00007fd345c4adb7 __run_exit_handlers (libc.so.6 + 0x3fdb7)
#4 0x00007fd345c4af5e exit (libc.so.6 + 0x3ff5e)
#5 0x00007fd345c33159 __libc_start_main (libc.so.6 + 0x28159)
#6 0x0000563f4914fcfe _start (urxvt + 0x2ecfe)
Workaround with .Xdefaults works for me too, thanks.
FS#67715bug? https://bugs.archlinux.org/task/67715http://cvs.schmorp.de/rxvt-unicode/src/rxvtperl.xs?r1=1.246&r2=1.247
http://cvs.schmorp.de/rxvt-unicode/src/rxvtperl.h?r1=1.28&r2=1.29
This is really odd.
If PERL_DESTRUCT_LEVEL is set and OLDPWD is set then it does not crash.
vicb@emily [ ~ ]$ env | grep OLD
vicb@emily [ ~ ]$ env | grep PERL_DESTRUCT_LEVEL
PERL_DESTRUCT_LEVEL=2
vicb@emily [ ~ ]$ urxvt --geometry 120x30 -e bash -c "sleep 1s"
Segmentation fault (core dumped)
vicb@emily [ ~ ]$ cd
vicb@emily [ ~ ]$ env | grep OLD
OLDPWD=/home/vicb
vicb@emily [ ~ ]$ urxvt --geometry 120x30 -e bash -c "sleep 1s"
vicb@emily [ ~ ]$ unset PERL_DESTRUCT_LEVEL
vicb@emily [ ~ ]$ env | grep OLD
OLDPWD=/home/vicb
vicb@emily [ ~ ]$ urxvt --geometry 120x30 -e bash -c "sleep 1s"
Segmentation fault (core dumped)
vicb@emily [ ~ ]$
one enviroment must be set to avoid segfault
$ man perlrun
find section ENVIROMENT.
for example can set PERL5SHELL that used only on windows and not have effect on linux
PERL5SHELL="blahwindows" urxvt
this run ok
$ export PERL5SHELL="blahwindows"
$ gdb urxvt
(gdb) run
Starting program: /usr/bin/urxvt
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[Detaching after fork from child process 4155]
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff77534ed in getenv () from /usr/lib/libc.so.6
(gdb) bt
#0 0x00007ffff77534ed in getenv () from /usr/lib/libc.so.6
#1 0x00007ffff79725c6 in perl_destruct () from /usr/lib/perl5/5.32/core_perl/CORE/libperl.so
#2 0x00005555555a1336 in rxvt_perl_interp::~rxvt_perl_interp() ()
#3 0x00007ffff7753db7 in __run_exit_handlers () from /usr/lib/libc.so.6
#4 0x00007ffff7753f5e in exit () from /usr/lib/libc.so.6
#5 0x00007ffff773c159 in __libc_start_main () from /usr/lib/libc.so.6
#6 0x0000555555582cfe in _start ()
PERL_DESTRUCT_LEVEL and OLDPWD didn't work for me, too.
- https://bugzilla.redhat.com/show_bug.cgi?id=1894917
- http://lists.schmorp.de/pipermail/rxvt-unicode/2020q2/002583.html
This should fix the issue. We can add the patch the the PKGBUILD.
asp checkout rxvt-unicode
cd rxvt-unicode/repos/community-x86_64
makepkg --nobuild
patch -p1 < /tmp/urxvt.diff
makepkg -i --noextract
kmille@linbox:~ cat /tmp/urxvt.diff
diff --git a/src/rxvt-unicode-9.22/src/rxvtperl.xs b/src/rxvt-unicode-9.22/src/rxvtperl.xs
index 9c75aad..77449e9 100644
--- a/src/rxvt-unicode-9.22/src/rxvtperl.xs
+++ b/src/rxvt-unicode-9.22/src/rxvtperl.xs
@@ -374,12 +374,6 @@ static PerlInterpreter *perl;
rxvt_perl_interp::~rxvt_perl_interp ()
{
- if (perl)
- {
- perl_destruct (perl);
- perl_free (perl);
- PERL_SYS_TERM ();
- }
}
void
Thanks for the quick-fix. I can confirm that it works with my perl extensions.