None
closed
nobody
None
2020-02-26
2020-02-15
Anonymous
No

Today I upgraded upmpdcli on my raspberry pi. Now upmpdcli is unable to start.

Below a gdb stack trace and version infos:

root@raspberrypi:~# gdb /usr/bin/upmpdcli
GNU gdb (Raspbian 8.2.1-2) 8.2.1
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "arm-linux-gnueabihf".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/.
Find the GDB manual and other documentation resources online at:
http://www.gnu.org/software/gdb/documentation/.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/bin/upmpdcli...Reading symbols from /usr/lib/debug/.build-id/7d/a456f86a7b396dcd477742a0e66f23272a9133.debug...done.
done.

(gdb) run -c /etc/upmpdcli.conf
Starting program: /usr/bin/upmpdcli -c /etc/upmpdcli.conf
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
[New Thread 0x75f1e220 (LWP 2656)]
[New Thread 0x7571d220 (LWP 2657)]
[New Thread 0x74f1c220 (LWP 2658)]
[New Thread 0x7471b220 (LWP 2659)]
[New Thread 0x73f1a220 (LWP 2660)]
[New Thread 0x73719220 (LWP 2661)]
[New Thread 0x72f18220 (LWP 2662)]

Thread 1 "upmpdcli" received signal SIGSEGV, Segmentation fault.
0x76a1ed08 in UpnpGetIfInfo(char const*) () from /usr/lib/arm-linux-gnueabihf/libnpupnp.so.1
(gdb) bt

0 0x76a1ed08 in UpnpGetIfInfo(char const*) () from /usr/lib/arm-linux-gnueabihf/libnpupnp.so.1

1 0x76a21550 in ?? () from /usr/lib/arm-linux-gnueabihf/libnpupnp.so.1

2 0x76f6bb38 in UPnPP::LibUPnP::LibUPnP (this=0x125b08, serveronly=, hwaddr=0x76ffe970 <_rtld_global_ro>, ifname="", inip="", port=)

at /usr/include/c++/8/bits/basic_string.h:2290

3 0x76f6c830 in UPnPP::LibUPnP::getLibUPnP (serveronly=serveronly@entry=true, hwaddr=0x7effee20, hwaddr@entry=0x7effee18, ifname="", ip="", port=0, port@entry=45632)

at /usr/include/c++/8/bits/basic_string.h:936

4 0x00027d88 in main (argc=, argv=) at /usr/include/c++/8/bits/basic_string.h:936

(gdb) q
A debugging session is active.

    Inferior 1 [process 2653] will be killed.

Quit anyway? (y or n) y
root@raspberrypi:~# dpkg -S /usr/lib/arm-linux-gnueabihf/libnpupnp.so.1
libnpupnp1: /usr/lib/arm-linux-gnueabihf/libnpupnp.so.1
root@raspberrypi:~# apt-cache policy upmpdcli libnpupnp1
upmpdcli:
Installed: 1.4.6-1~ppa1~buster
Candidate: 1.4.6-1~ppa1~buster
Version table:
1.4.6-1~ppa1~buster 500
500 http://www.lesbonscomptes.com/upmpdcli/downloads/raspbian buster/main armhf Packages
100 /var/lib/dpkg/status
libnpupnp1:
Installed: 2.0.1-1~ppa1~buster
Candidate: 2.0.1-1~ppa1~buster
Version table:
2.0.1-1~ppa1~buster 500
500 http://www.lesbonscomptes.com/upmpdcli/downloads/raspbian buster/main armhf Packages
100 /var/lib/dpkg/status
root@raspberrypi:~# cat /etc/debian_version
10.3
root@raspberrypi:~#

Discussion

  • medoc
    medoc
    2020-02-19

    Thanks for reporting this. And oops, not at home this week. I have no idea of what may be happening, obviously this did not occur while I was testing.

    I should be able to work on this next week.

    This is almost certainly a lib issuee (libnppnp or libupnpp), not an upmpdcli one. upmpdcli can still be built with libupnpp 0.17 and libupnp 1.6 (instead of libupnpp 0.18 and libnpupnp). The tar files are on the download page if you can build from source.
    https://www.lesbonscomptes.com/upmpdcli/downloads.html

     
  • medoc
    medoc
    2020-02-24

    I found an issue which manifested itself by something other than a crash on my machine, but which I think might be the cause of your problem. You can give it a try by replacing the upmpdcli raspbian repository with the following temporary one in the /etc/apt/sources.list.d/upmdcli.list file:

    http://www.lesbonscomptes.com/upmpdcli/downloads/raspbian-ipv6fix/

    Also, if it still crashes after the update, could you please install the libnpupnp1-dbg package ? Hopefully this may give a little more detail in the stack trace (line at which the segv occurs).

     
  • Anonymous
    Anonymous
    2020-02-24

    Unfortunately it still crashes.

    I hope the formatting works better this time...

    pi@raspberrypi:~$ sudo aptitude upgrade 
    Resolving dependencies...                
    The following NEW packages will be installed:
      libnpupnp1{a} libupnpp6{a} 
    The following packages will be REMOVED:
      libupnp6{u} libupnpp5{u} 
    The following packages will be upgraded:
      upmpdcli 
    1 packages upgraded, 2 newly installed, 2 to remove and 0 not upgraded.
    Need to get 368 kB/752 kB of archives. After unpacking 169 kB will be used.
    Do you want to continue? [Y/n/?] v
    
    Versions will be shown.
    
    The following NEW packages will be installed:
      libnpupnp1{a} [2.1.0-1~ppa1~buster]  libupnpp6{a} [0.18.0-2~ppa1~buster]  
    The following packages will be REMOVED:
      libupnp6{u} [1:1.6.25-1]  libupnpp5{u} [0.17.2-1~ppa1~buster]  
    The following packages will be upgraded:
      upmpdcli [1.4.5-1~ppa1~buster -> 1.4.6-1~ppa1~buster]  
    1 packages upgraded, 2 newly installed, 2 to remove and 0 not upgraded.
    Need to get 368 kB/752 kB of archives. After unpacking 169 kB will be used.
    Do you want to continue? [Y/n/?] 
    Get: 1 https://www.lesbonscomptes.com/upmpdcli/downloads/raspbian-ipv6fix buster/main armhf libnpupnp1 armhf 2.1.0-1~ppa1~buster [145 kB]
    Get: 2 https://www.lesbonscomptes.com/upmpdcli/downloads/raspbian-ipv6fix buster/main armhf libupnpp6 armhf 0.18.0-2~ppa1~buster [222 kB]
    Fetched 368 kB in 1s (487 kB/s)     
    Reading changelogs... Done
    Selecting previously unselected package libnpupnp1.
    (Reading database ... 82723 files and directories currently installed.)
    Preparing to unpack .../libnpupnp1_2.1.0-1~ppa1~buster_armhf.deb ...
    Unpacking libnpupnp1 (2.1.0-1~ppa1~buster) ...
    Selecting previously unselected package libupnpp6.
    Preparing to unpack .../libupnpp6_0.18.0-2~ppa1~buster_armhf.deb ...
    Unpacking libupnpp6 (0.18.0-2~ppa1~buster) ...
    Preparing to unpack .../upmpdcli_1.4.6-1~ppa1~buster_armhf.deb ...
    Unpacking upmpdcli (1.4.6-1~ppa1~buster) over (1.4.5-1~ppa1~buster) ...
    (Reading database ... 82732 files and directories currently installed.)
    Removing libupnpp5 (0.17.2-1~ppa1~buster) ...
    Removing libupnp6:armhf (1:1.6.25-1) ...
    Setting up libnpupnp1 (2.1.0-1~ppa1~buster) ...
    Setting up libupnpp6 (0.18.0-2~ppa1~buster) ...
    Setting up upmpdcli (1.4.6-1~ppa1~buster) ...
    
    Configuration file '/etc/upmpdcli.conf'
     ==> Modified (by you or by a script) since installation.
     ==> Package distributor has shipped an updated version.
       What would you like to do about it ?  Your options are:
        Y or I  : install the package maintainer's version
        N or O  : keep your currently-installed version
          D     : show the differences between the versions
          Z     : start a shell to examine the situation
     The default action is to keep your current version.
    *** upmpdcli.conf (Y/I/N/O/D/Z) [default=N] ? 
    Processing triggers for systemd (241-7~deb10u3+rpi1) ...
    Processing triggers for libc-bin (2.28-10+rpi1) ...
    
    Current status: 0 (-1) upgradable, 60861 (-1) new.
    

    (I merged the config about regarding radio stations manually with meld)

    root@raspberrypi:~# sudo aptitude install libnpupnp1-dbg
    The following NEW packages will be installed:
      libnpupnp1-dbg 
    0 packages upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
    Need to get 3,288 kB of archives. After unpacking 3,417 kB will be used.
    Get: 1 https://www.lesbonscomptes.com/upmpdcli/downloads/raspbian-ipv6fix buster/main armhf libnpupnp1-dbg armhf 2.1.0-1~ppa1~buster [3,288 kB]
    Fetched 3,288 kB in 2s (1,821 kB/s)         
    Selecting previously unselected package libnpupnp1-dbg.
    (Reading database ... 82720 files and directories currently installed.)
    Preparing to unpack .../libnpupnp1-dbg_2.1.0-1~ppa1~buster_armhf.deb ...
    Unpacking libnpupnp1-dbg (2.1.0-1~ppa1~buster) ...
    Setting up libnpupnp1-dbg (2.1.0-1~ppa1~buster) ...
    
    root@raspberrypi:~# apt-cache policy upmpdcli libnpupnp1
    upmpdcli:
      Installed: 1.4.6-1~ppa1~buster
      Candidate: 1.4.6-1~ppa1~buster
      Version table:
     *** 1.4.6-1~ppa1~buster 500
        500 http://www.lesbonscomptes.com/upmpdcli/downloads/raspbian-ipv6fix buster/main armhf Packages
        100 /var/lib/dpkg/status
    libnpupnp1:
      Installed: 2.1.0-1~ppa1~buster
      Candidate: 2.1.0-1~ppa1~buster
      Version table:
     *** 2.1.0-1~ppa1~buster 500
        500 http://www.lesbonscomptes.com/upmpdcli/downloads/raspbian-ipv6fix buster/main armhf Packages
        100 /var/lib/dpkg/status
    root@raspberrypi:~# dpkg -S /usr/lib/arm-linux-gnueabihf/libnpupnp.so.2
    libnpupnp1: /usr/lib/arm-linux-gnueabihf/libnpupnp.so.2
    root@raspberrypi:~# gdb /usr/bin/upmpdcli
    GNU gdb (Raspbian 8.2.1-2) 8.2.1
    Copyright (C) 2018 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.
    Type "show copying" and "show warranty" for details.
    This GDB was configured as "arm-linux-gnueabihf".
    Type "show configuration" for configuration details.
    For bug reporting instructions, please see:
    <http://www.gnu.org/software/gdb/bugs/>.
    Find the GDB manual and other documentation resources online at:
        <http://www.gnu.org/software/gdb/documentation/>.
    
    For help, type "help".
    Type "apropos word" to search for commands related to "word"...
    Reading symbols from /usr/bin/upmpdcli...(no debugging symbols found)...done.
    (gdb) run -c /etc/upmpdcli.conf
    Starting program: /usr/bin/upmpdcli -c /etc/upmpdcli.conf
    [Thread debugging using libthread_db enabled]
    Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
    [New Thread 0x75f1c220 (LWP 2060)]
    [New Thread 0x7571b220 (LWP 2061)]
    [New Thread 0x74f1a220 (LWP 2062)]
    [New Thread 0x74719220 (LWP 2063)]
    [New Thread 0x73f18220 (LWP 2064)]
    [New Thread 0x73717220 (LWP 2065)]
    [New Thread 0x72f16220 (LWP 2066)]
    
    Thread 1 "upmpdcli" received signal SIGSEGV, Segmentation fault.
    0x76a1f990 in UpnpGetIfInfo (IfName=IfName@entry=0x119c10 <__stack_chk_guard> "") at src/api/upnpapi.cpp:378
    378 src/api/upnpapi.cpp: No such file or directory.
    (gdb) bt
    #0  0x76a1f990 in UpnpGetIfInfo (IfName=IfName@entry=0x119c10 <__stack_chk_guard> "") at src/api/upnpapi.cpp:378
    #1  0x76a2216c in upnpInitCommonV4V6 (dov6=<optimized out>, HostIP=0x0, ifNameForV6=0x119c10 <__stack_chk_guard> "", DestPort=<optimized out>) at src/api/upnpapi.cpp:692
    #2  0x76f6bb38 in UPnPP::LibUPnP::LibUPnP(bool, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned short) () from /usr/lib/arm-linux-gnueabihf/libupnpp.so.9
    #3  0x76f6c830 in UPnPP::LibUPnP::getLibUPnP(bool, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned short) () from /usr/lib/arm-linux-gnueabihf/libupnpp.so.9
    #4  0x00027d88 in ?? ()
    #5  0x76a6e718 in __libc_start_main () from /lib/arm-linux-gnueabihf/libc.so.6
    #6  0x0002c2c4 in ?? ()
    Backtrace stopped: previous frame identical to this frame (corrupt stack?)
    (gdb) q
    A debugging session is active.
    
        Inferior 1 [process 2057] will be killed.
    
    Quit anyway? (y or n) y
    root@raspberrypi:~#
    

    I noticed the repository URL contains "ipv6fix", therefore I assume you might be interested in (anonymized) information about my network (I have dual-stack ipv4/ipv6 and use a tunnel to my server):

    pi@raspberrypi:~$ ip a
    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
        link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
        inet 127.0.0.1/8 scope host lo
           valid_lft forever preferred_lft forever
        inet6 ::1/128 scope host 
           valid_lft forever preferred_lft forever
    2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
        link/ether b8:27:eb:XX:XX:XX brd ff:ff:ff:ff:ff:ff
        inet 192.168.XXX.XXX/24 brd 192.168.XXX.255 scope global dynamic noprefixroute eth0
           valid_lft 862426sec preferred_lft 754426sec
        inet6 2003:XXXX/64 scope global dynamic mngtmpaddr noprefixroute 
           valid_lft 7178sec preferred_lft 1778sec
        inet6 fe80::XXXX/64 scope link 
           valid_lft forever preferred_lft forever
    3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
        link/ether b8:27:eb:XX:XX:XX brd ff:ff:ff:ff:ff:ff
    4: tun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 100
        link/none 
        inet 10.XXX.XXX.XXX peer 10.XXX.XXX.XXX/32 scope global tun0
           valid_lft forever preferred_lft forever
        inet6 2a01:XXXX/65 scope global 
           valid_lft forever preferred_lft forever
        inet6 fe80:XXXX/64 scope link stable-privacy 
           valid_lft forever preferred_lft forever
    pi@raspberrypi:~$ ip r
    0.0.0.0/1 via 10.XXX.XXX.XXX dev tun0 
    default via 192.168.XXX.1 dev eth0 proto dhcp src 192.168.XXX.XXX metric 202 
    10.XXX.XXX.XXX via 10.XXX.XXX.XXX dev tun0 
    10.XXX.XXX.XXX dev tun0 proto kernel scope link src 10.8.0.14 
    85.10.XXX.XXX via 192.168.XXX.XXX dev eth0 
    128.0.0.0/1 via 10.XXX.XXX.XX dev tun0 
    192.168.XXX.0/24 dev eth0 proto dhcp scope link src 192.168.XXX.XXX metric 202 
    239.0.0.0/8 dev eth0 scope link
    
     
  • medoc
    medoc
    2020-02-25

    Thanks for the updated stack trace. Hopefully the line number pointed me to the right fix.

    I uploaded the new packages to the regular repository (without the -ipv6fix suffix), because I'm reasonably confident that they work better than the old ones. Hopefully I did fix your crash, else we'll investigate further...

     
  • medoc
    medoc
    2020-02-26

    • status: open --> closed
    • milestone: -->
     
  • medoc
    medoc
    2020-02-26

    Thanks for testing ! Closing this.

     

Cancel   Add attachment