Bug#949952: tilix does not start on arm64 (maybe libunwind related)

2020-02-05 Thread Birger Schacht
Hi Bernhard,

thanks for taking a look at this!

On 2/1/20 2:27 AM, Bernhard Übelacker wrote:
> Hello Birger Schacht,
> I tried to get some more information from this issue.
> 
> To be sure where your tilix aborts you would need to
> install gdb and at least tilix-dbgsym [1] and
> run it this way:
> 
> gdb -q -ex 'set pagination off' -ex run -ex bt -ex detach -ex quit --args 
> tilix
> 
> Then I guess you see an backtrace like this:

Oke, I did run gdb and what I got was what I've attached as
tilix_gdb.42. I looked at [1] and when I set XDG_CURRENT_DESKTOP to
something, I got the same backtrace you got (tilix_gdb.127). With
TILIX_ID set to something I get tilix_gdb.152

[1] https://sources.debian.org/src/tilix/1.9.3-4/source/app.d/#L42

[...]
> 
> After looking at the source [2] I assume this might not be
> fatal and the program not be aborted.
> 
> You might be able to confirm if this workaround works
> for you too, by starting with this LD_PRELOAD:
> 
> LD_PRELOAD=/lib/aarch64-linux-gnu/libgcc_s.so.1 tilix

Yes, this works!

> This might be related to exceptions in libunwind.so.8.
> There exists a similar ticket which is also related to
> exception handling with the same workaround [3].

Ah, oke, feel free to merge/reassign!

cheers,
Birger
Reading symbols from tilix...
Reading symbols from 
/usr/lib/debug/.build-id/3f/bfebdefceb5e91995f162e69d8c2333e312843.debug...
Starting program: /usr/bin/tilix 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/aarch64-linux-gnu/libthread_db.so.1".

Program received signal SIGABRT, Aborted.
0xf6918b88 in raise () from /lib/aarch64-linux-gnu/libc.so.6
#0  0xf6918b88 in raise () from /lib/aarch64-linux-gnu/libc.so.6
#1  0xf6906ea8 in abort () from /lib/aarch64-linux-gnu/libc.so.6
#2  0xf6b3b544 in _d_throw_exception () from 
/lib/aarch64-linux-gnu/libdruntime-ldc-shared.so.88
#3  0xaac73528 in 
_D3std9exception__T7bailOutHTC9ExceptionZQwFNaNfAyamMAxaZv (line=, msg=..., file=...) at 
/usr/lib/ldc/aarch64-linux-gnu/include/d/std/exception.d:516
#4  _D3std9exception__T7enforceZ__TQmTbZQrFNaNfbLAxaAyamZb (value=, msg=..., file=..., line=) at 
/usr/lib/ldc/aarch64-linux-gnu/include/d/std/exception.d:436
#5  0xf6e42610 in std.process.environment.opIndex(scope const(char)[]) 
() from /lib/aarch64-linux-gnu/libphobos2-ldc-shared.so.88
#6  0xaac27f0c in D main (args=...) at app.d:42
Detaching from program: /usr/bin/tilix, process 2093
[Inferior 1 (process 2093) detached]
Reading symbols from tilix...
Reading symbols from 
/usr/lib/debug/.build-id/3f/bfebdefceb5e91995f162e69d8c2333e312843.debug...
Starting program: /usr/bin/tilix 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/aarch64-linux-gnu/libthread_db.so.1".
[New Thread 0xf1f5d1b0 (LWP 2290)]
[New Thread 0xf175c1b0 (LWP 2291)]
[New Thread 0xf0f411b0 (LWP 2292)]
[New Thread 0xe3ffe1b0 (LWP 2293)]

Thread 1 "tilix" received signal SIGABRT, Aborted.
0xf6918b88 in raise () from /lib/aarch64-linux-gnu/libc.so.6
#0  0xf6918b88 in raise () from /lib/aarch64-linux-gnu/libc.so.6
#1  0xf6906ea8 in abort () from /lib/aarch64-linux-gnu/libc.so.6
#2  0xf6b3b544 in _d_throw_exception () from 
/lib/aarch64-linux-gnu/libdruntime-ldc-shared.so.88
#3  0xaac73528 in 
_D3std9exception__T7bailOutHTC9ExceptionZQwFNaNfAyamMAxaZv (line=, msg=..., file=...) at 
/usr/lib/ldc/aarch64-linux-gnu/include/d/std/exception.d:516
#4  _D3std9exception__T7enforceZ__TQmTbZQrFNaNfbLAxaAyamZb (value=, msg=..., file=..., line=) at 
/usr/lib/ldc/aarch64-linux-gnu/include/d/std/exception.d:436
#5  0xf6e42610 in std.process.environment.opIndex(scope const(char)[]) 
() from /lib/aarch64-linux-gnu/libphobos2-ldc-shared.so.88
#6  0xaac2874c in D main (args=...) at app.d:127
Detaching from program: /usr/bin/tilix, process 2286
[Inferior 1 (process 2286) detached]
Reading symbols from tilix...
Reading symbols from 
/usr/lib/debug/.build-id/3f/bfebdefceb5e91995f162e69d8c2333e312843.debug...
Starting program: /usr/bin/tilix 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/aarch64-linux-gnu/libthread_db.so.1".
[New Thread 0xf1f5d1b0 (LWP 2368)]
[New Thread 0xf175c1b0 (LWP 2369)]
[New Thread 0xf0f411b0 (LWP 2370)]
[New Thread 0xe3ffe1b0 (LWP 2371)]

Thread 1 "tilix" received signal SIGABRT, Aborted.
0xf6918b88 in raise () from /lib/aarch64-linux-gnu/libc.so.6
#0  0xf6918b88 in raise () from /lib/aarch64-linux-gnu/libc.so.6
#1  0xf6906ea8 in abort () from /lib/aarch64-linux-gnu/libc.so.6
#2  0xf6b3b544 in _d_throw_exception () from 
/lib/aarch64-linux-gnu/libdruntime-ldc-shared.so.88
#3  0xf7a2b8b0 in 
_D3gio8ResourceQj19resourcesLookupDataFAyaEQBp1c5types20GResourceLookupFlagsZC4glib5BytesQg
 () from /lib/aarch64-linux-gnu/libgtkd-3.so.0
#4  0xaac438a8 in 

Bug#949952: tilix does not start on arm64 (maybe libunwind related)

2020-01-31 Thread Bernhard Übelacker
Hello Birger Schacht,
I tried to get some more information from this issue.

To be sure where your tilix aborts you would need to
install gdb and at least tilix-dbgsym [1] and
run it this way:

gdb -q -ex 'set pagination off' -ex run -ex bt -ex detach -ex quit --args 
tilix

Then I guess you see an backtrace like this:

(gdb) bt
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1  0xf690aea8 in __GI_abort () at abort.c:79
#2  0xf6b3f544 in _d_throw_exception () from 
/lib/aarch64-linux-gnu/libdruntime-ldc-shared.so.88
#3  0xaac73528 in 
_D3std9exception__T7bailOutHTC9ExceptionZQwFNaNfAyamMAxaZv (line=, msg=..., file=...) at 
/usr/lib/ldc/aarch64-linux-gnu/include/d/std/exception.d:516
#4  _D3std9exception__T7enforceZ__TQmTbZQrFNaNfbLAxaAyamZb 
(value=, msg=..., file=..., line=) at 
/usr/lib/ldc/aarch64-linux-gnu/include/d/std/exception.d:436
#5  0xf6e44610 in std.process.environment.opIndex(scope 
const(char)[]) () from /lib/aarch64-linux-gnu/libphobos2-ldc-shared.so.88
#6  0xaac2874c in D main (args=...) at app.d:127

After looking at the source [2] I assume this might not be
fatal and the program not be aborted.

You might be able to confirm if this workaround works
for you too, by starting with this LD_PRELOAD:

LD_PRELOAD=/lib/aarch64-linux-gnu/libgcc_s.so.1 tilix

This might be related to exceptions in libunwind.so.8.
There exists a similar ticket which is also related to
exception handling with the same workaround [3].

Unfortunately there was not yet much response from
libunwind downstream or upstream.

Kind regards,
Bernhard


[1] https://wiki.debian.org/HowToGetABacktrace#Installing_the_debugging_symbols

[2] https://sources.debian.org/src/tilix/1.9.3-4/source/app.d/#L127

[3] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=932499
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=923962
https://github.com/libunwind/libunwind/issues/129

# Bullseye/testing arm64 qemu VM 2020-02-01


apt update
apt dist-upgrade


apt install systemd-coredump psmisc net-tools strace gdb tilix tilix-dbgsym 
libphobos2-ldc-shared88-dbgsym libgtkd-3-0-dbgsym libsecret-1-0 xserver-xephyr 
x11vnc tigervnc-standalone-server xterm openbox


# Even without DISPLAY set
tilix

coredumpctl list
journalctl --no-pager
coredumpctl gdb 2251

set width 0
set pagination off
bt




apt install libsecret-1-0

gdb -q --args tilix




###


$ tilix
dwarfeh(363) fatal error
Aborted (core dumped)


# coredumpctl list
TIMEPID   UID   GID SIG COREFILE  EXE
Sat 2020-02-01 01:05:31 CET2251  1000  1000   6 present   /usr/bin/tilix


Feb 01 01:05:29 debian systemd[1]: Started Process Core Dump (PID 2252/UID 0).
Feb 01 01:05:31 debian systemd-coredump[2253]: Process 2251 (tilix) of user 
1000 dumped core.
   
   Stack trace of thread 2251:
   #0  0x9440db88 raise 
(libc.so.6 + 0x35b88)
   #1  0x943fbea8 abort 
(libc.so.6 + 0x23ea8)
   #2  0x94630544 
_d_throw_exception (libdruntime-ldc-shared.so.88 + 0xbd544)
   #3  0x956b43d0 
_D4gtkd6Loader6Linker11loadLibraryFAyaZv (libgtkd-3.so.0 + 0x9ec3d0)
   #4  0xcb23872c n/a 
(tilix + 0x17b72c)
   #5  0x94638b34 
_D2rt5minfo13rt_moduleCtorUZ14__foreachbody1MFKSQBu19sections_elf_shared3DSOZi 
(libdruntime-ldc-shared.so.88 + 0xc5b34)
   #6  0x94639d8c 
_D2rt19sections_elf_shared3DSO7opApplyFMDFKSQBqQBqQyZiZi 
(libdruntime-ldc-shared.so.88 + 0xc6d8c)
   #7  0x9462f7fc rt_init 
(libdruntime-ldc-shared.so.88 + 0xbc7fc)
   #8  0x9462fd80 
_D2rt6dmain212_d_run_main2UAAamPUQgZiZ6runAllMFZv (libdruntime-ldc-shared.so.88 
+ 0xbcd80)
   #9  0x9462fbb8 
_d_run_main2 (libdruntime-ldc-shared.so.88 + 0xbcbb8)
   #10 0x9462fa5c 
_d_run_main (libdruntime-ldc-shared.so.88 + 0xbca5c)
   #11 0x943fc2ec 
__libc_start_main (libc.so.6 + 0x242ec)
   #12 0xcb2385ec n/a 
(tilix + 0x17b5ec)
   #13 0xcb2385ec n/a 
(tilix + 0x17b5ec)
Feb 01 01:05:31 debian systemd[1]: systemd-coredump@0-2252-0.service: Succeeded.


# coredumpctl gdb 2251
   PID: 2251 (tilix)
   UID: 1000 (benutzer)
   GID: 1000 (benutzer)
Signal: 6 (ABRT)
 Timestamp: Sat