Am 04.05.24 um 13:46 schrieb Bernhard Übelacker:
These end in some boost::asio functions:
   boost::asio::detail::scheduler::concurrency_hint() const at 
/usr/include/boost/asio/detail/scheduler.hpp:142


Forgot to attach how I got there:
  debugging.txt


And for reference the upstream ticket:
  https://github.com/gqrx-sdr/gqrx/issues/1331


[17674.068551] gqrx[3226752]: segfault at f4 ip 00007f5fee944cd6 sp 
00007f5f967f8870 error 4
[17674.068551] gqrx[3226753]: segfault at f4 ip 00007f5fee944cd6 sp 
00007f5f95ff7870 error 4 in libuhd.so.4.6.0[7f5fee721000+a5e000]
[17674.068558]  in libuhd.so.4.6.0[7f5fee721000+a5e000]
[17674.068557] traps: gqrx[3226749] general protection fault ip:7f5fee944cd6 
sp:7f5f977fb7d0 error:0
[17674.068558] gqrx[3226751]: segfault at f4 ip 00007f5fee944cd6 sp 
00007f5f96ff9870 error 4
[17674.068560]  likely on CPU 9 (core 1, socket 0)
[17674.068560]  likely on CPU 10 (core 2, socket 0)
[17674.068563]  in libuhd.so.4.6.0[7f5fee721000+a5e000]
[17674.068562] Code: ec 78 64 48 8b 04 25 28 00 00 00 48 89 44 24 68 31 c0 80 
bf c0 00 00 00 00 0f 85 ed 00 00 00 48 8b 45 30 48 8b 9d d0 00 00 00 <44> 8b b8 
f4 00 00 00 48 85 db 0f 84 3a 01 00 00 48 8b 43 18 48 89
[17674.068563] Code: ec 78 64 48 8b 04 25 28 00 00 00 48 89 44 24 68 31 c0 80 
bf c0 00 00 00 00 0f 85 ed 00 00 00 48 8b 45 30 48 8b 9d d0 00 00 00 <44> 8b b8 
f4 00 00 00 48 85 db 0f 84 3a 01 00 00 48 8b 43 18 48 89
[17674.068564]  in libuhd.so.4.6.0[7f5fee721000+a5e000]
[17674.068569] traps: gqrx[3226745] general protection fault ip:7f5fee944cd6 
sp:7f5fbe7f99d0 error:0
[17674.068571] gqrx[3226754]: segfault at f4 ip 00007f5fee944cd6 sp 
00007f5f957f6870 error 4
[17674.068575]  in libuhd.so.4.6.0[7f5fee721000+a5e000]
[17674.068576]  in libuhd.so.4.6.0[7f5fee721000+a5e000]
[17674.068578]  likely on CPU 12 (core 4, socket 0)
[17674.068580]  likely on CPU 14 (core 6, socket 0)
[17674.068580] Code: ec 78 64 48 8b 04 25 28 00 00 00 48 89 44 24 68 31 c0 80 
bf c0 00 00 00 00 0f 85 ed 00 00 00 48 8b 45 30 48 8b 9d d0 00 00 00 <44> 8b b8 
f4 00 00 00 48 85 db 0f 84 3a 01 00 00 48 8b 43 18 48 89
[17674.068583] Code: ec 78 64 48 8b 04 25 28 00 00 00 48 89 44 24 68 31 c0 80 
bf c0 00 00 00 00 0f 85 ed 00 00 00 48 8b 45 30 48 8b 9d d0 00 00 00 <44> 8b b8 
f4 00 00 00 48 85 db 0f 84 3a 01 00 00 48 8b 43 18 48 89


https://wiki.debian.org/InterpretingKernelOutputAtProcessCrash

error 4  ==  0b00000100:
 *   bit 0 ==    0: no page found
 *   bit 1 ==    0: read access
 *   bit 2 ==    1: user-mode access



echo -n "find /b ..., ..., 0x" && \
echo "ec 78 64 48 8b 04 25 28 00 00 00 48 89 44 24 68 31 c0 80 bf c0 00 00 00 
00 0f 85 ed 00 00 00 48 8b 45 30 48 8b 9d d0 00 00 00 <44> 8b b8 f4 00 00 00 48 
85 db 0f 84 3a 01 00 00 48 8b 43 18 48 89" \
 | sed 's/[<>]//g' | sed 's/ /, 0x/g'



# 2024-05-03 trixie/testing amd64 qemu VM

apt dist-upgrade
apt install systemd-coredump xserver-xorg slim jwm xterm gdb pipewire gqrx-sdr 
gqrx-sdr-dbgsym libuhd4.6.0-dbgsym
systemctl start slim




gdb -q 
set width 0
set pagination off
file /usr/bin/gqrx
tb main
run
pipe info target | grep -E "\.text.*libuhd"
find /b 0x00007ffff43274a0, 0x00007ffff4d7ee0a, 0xec, 0x78, 0x64, 0x48, 0x8b, 
0x04, 0x25, 0x28, 0x00, 0x00, 0x00, 0x48, 0x89, 0x44, 0x24, 0x68, 0x31, 0xc0, 
0x80, 0xbf, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x85, 0xed, 0x00, 0x00, 0x00, 
0x48, 0x8b, 0x45, 0x30, 0x48, 0x8b, 0x9d, 0xd0, 0x00, 0x00, 0x00, 0x44, 0x8b, 
0xb8, 0xf4, 0x00, 0x00, 0x00, 0x48, 0x85, 0xdb, 0x0f, 0x84, 0x3a, 0x01, 0x00, 
0x00, 0x48, 0x8b, 0x43, 0x18, 0x48, 0x89
b * (0x7ffff4544cac + 42)
info b
disassemble /r 0x7ffff4544cac, 0x7ffff4544cac + 62



benutzer@debian:~$ gdb -q 
(gdb) set width 0
(gdb) set pagination off
(gdb) file /usr/bin/gqrx
Reading symbols from /usr/bin/gqrx...
Reading symbols from 
/usr/lib/debug/.build-id/99/990c9578178123477597a27d771c5793452e95.debug...
(gdb) tb main
Temporary breakpoint 1 at 0x9b8a0: file ./src/applications/gqrx/main.cpp, line 
49.
(gdb) run
Starting program: /usr/bin/gqrx 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffeea006c0 (LWP 18355)]
[New Thread 0x7fffee0006c0 (LWP 18356)]
[New Thread 0x7fffed6006c0 (LWP 18357)]
[New Thread 0x7fffecc006c0 (LWP 18358)]
[New Thread 0x7fffec2006c0 (LWP 18359)]
[New Thread 0x7fffeb8006c0 (LWP 18360)]
[New Thread 0x7fffeae006c0 (LWP 18361)]
[New Thread 0x7fffea4006c0 (LWP 18362)]
[New Thread 0x7fffe9a006c0 (LWP 18363)]
[New Thread 0x7fffe90006c0 (LWP 18364)]

Thread 1 "gqrx" hit Temporary breakpoint 1, main (argc=1, argv=0x7fffffffe488) 
at ./src/applications/gqrx/main.cpp:49
49      ./src/applications/gqrx/main.cpp: Datei oder Verzeichnis nicht gefunden.
(gdb) pipe info target | grep -E "\.text.*libuhd"
        0x00007ffff43274a0 - 0x00007ffff4d7ee0a is .text in 
/lib/x86_64-linux-gnu/libuhd.so.4.6.0
(gdb) find /b 0x00007ffff43274a0, 0x00007ffff4d7ee0a, 0xec, 0x78, 0x64, 0x48, 
0x8b, 0x04, 0x25, 0x28, 0x00, 0x00, 0x00, 0x48, 0x89, 0x44, 0x24, 0x68, 0x31, 
0xc0, 0x80, 0xbf, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x85, 0xed, 0x00, 0x00, 
0x00, 0x48, 0x8b, 0x45, 0x30, 0x48, 0x8b, 0x9d, 0xd0, 0x00, 0x00, 0x00, 0x44, 
0x8b, 0xb8, 0xf4, 0x00, 0x00, 0x00, 0x48, 0x85, 0xdb, 0x0f, 0x84, 0x3a, 0x01, 
0x00, 0x00, 0x48, 0x8b, 0x43, 0x18, 0x48, 0x89
0x7ffff4544cac 
<_ZN5boost4asio6detail13epoll_reactor19register_descriptorEiRPNS2_16descriptor_stateE+28>
1 pattern found.
(gdb) b * (0x7ffff4544cac + 42)
Breakpoint 2 at 0x7ffff4544cd6: file 
/usr/include/boost/asio/detail/scheduler.hpp, line 142.
(gdb) info b
Num     Type           Disp Enb Address            What
2       breakpoint     keep y   0x00007ffff4544cd6 in 
boost::asio::detail::scheduler::concurrency_hint() const at 
/usr/include/boost/asio/detail/scheduler.hpp:142
(gdb) disassemble /r 0x7ffff4544cac, 0x7ffff4544cac + 62
Dump of assembler code from 0x7ffff4544cac to 0x7ffff4544cea:
   0x00007ffff4544cac 
<_ZN5boost4asio6detail13epoll_reactor19register_descriptorEiRPNS2_16descriptor_stateE+28>:
        ec                      in     (%dx),%al
   0x00007ffff4544cad 
<_ZN5boost4asio6detail13epoll_reactor19register_descriptorEiRPNS2_16descriptor_stateE+29>:
        78 64                   js     0x7ffff4544d13 
<_ZN5boost4asio6detail13epoll_reactor19register_descriptorEiRPNS2_16descriptor_stateE+131>
   0x00007ffff4544caf 
<_ZN5boost4asio6detail13epoll_reactor19register_descriptorEiRPNS2_16descriptor_stateE+31>:
        48 8b 04 25 28 00 00 00 mov    0x28,%rax
   0x00007ffff4544cb7 
<_ZN5boost4asio6detail13epoll_reactor19register_descriptorEiRPNS2_16descriptor_stateE+39>:
        48 89 44 24 68          mov    %rax,0x68(%rsp)
   0x00007ffff4544cbc 
<_ZN5boost4asio6detail13epoll_reactor19register_descriptorEiRPNS2_16descriptor_stateE+44>:
        31 c0                   xor    %eax,%eax
   0x00007ffff4544cbe 
<_ZN5boost4asio6detail13epoll_reactor19register_descriptorEiRPNS2_16descriptor_stateE+46>:
        80 bf c0 00 00 00 00    cmpb   $0x0,0xc0(%rdi)
   0x00007ffff4544cc5 
<_ZN5boost4asio6detail13epoll_reactor19register_descriptorEiRPNS2_16descriptor_stateE+53>:
        0f 85 ed 00 00 00       jne    0x7ffff4544db8 
<_ZN5boost4asio6detail13epoll_reactor19register_descriptorEiRPNS2_16descriptor_stateE+296>
   0x00007ffff4544ccb 
<_ZN5boost4asio6detail13epoll_reactor19register_descriptorEiRPNS2_16descriptor_stateE+59>:
        48 8b 45 30             mov    0x30(%rbp),%rax
   0x00007ffff4544ccf 
<_ZN5boost4asio6detail13epoll_reactor19register_descriptorEiRPNS2_16descriptor_stateE+63>:
        48 8b 9d d0 00 00 00    mov    0xd0(%rbp),%rbx
   0x00007ffff4544cd6 
<_ZN5boost4asio6detail13epoll_reactor19register_descriptorEiRPNS2_16descriptor_stateE+70>:
        44 8b b8 f4 00 00 00    mov    0xf4(%rax),%r15d
   0x00007ffff4544cdd 
<_ZN5boost4asio6detail13epoll_reactor19register_descriptorEiRPNS2_16descriptor_stateE+77>:
        48 85 db                test   %rbx,%rbx
   0x00007ffff4544ce0 
<_ZN5boost4asio6detail13epoll_reactor19register_descriptorEiRPNS2_16descriptor_stateE+80>:
        0f 84 3a 01 00 00       je     0x7ffff4544e20 
<_ZN5boost4asio6detail13epoll_reactor19register_descriptorEiRPNS2_16descriptor_stateE+400>
   0x00007ffff4544ce6 
<_ZN5boost4asio6detail13epoll_reactor19register_descriptorEiRPNS2_16descriptor_stateE+86>:
        48 8b 43 18             mov    0x18(%rbx),%rax
End of assembler dump.
(gdb)



https://github.com/gqrx-sdr/gqrx/issues/1331




export DISPLAY=:0
systemctl --user start pipewire
systemctl --user start pipewire-pulse
gqrx

Reply via email to