Menu

#24 Linpac crashes with segmentation fault on start with systems running Glibc 2.24

None
closed
0.25 (1)
2
2020-04-17
2017-03-16
David Ranch
No

New OSes like Debian 9 / Stretch, Debian 10 / Sid, are seeing segmentation fault errors on startup. An debug objects enabled, non-optimized build of Linpac yields a backtrace of:

(gdb) bt

0 0x00007ffff6e2c600 in __write_nocancel () at ../sysdeps/unix/syscall-template.S:84

1 0x000055555555d529 in EventGate::flush_wbuffer (this=0x5555557da380, fd=<optimized out="">) at sources.cc:1047</optimized>

2 0x000055555555e47d in EventGate::handle_event (this=0x5555557da380, ev=...) at sources.cc:1484

3 0x00005555555661f6 in Obj_man::send_all (this=0x55555577d300 <mgr>, ev=...) at event.cc:255</mgr>

4 0x000055555556657b in Obj_man::do_step (this=<optimized out="">) at event.cc:292</optimized>

5 0x0000555555558038 in main (argc=<optimized out="">, argv=0x7fffffffe058) at linpac.cc:449</optimized>

(gdb)

So far, this seems to be a locale related issue on these newest distros running glibc 2.24. Older distros using say Glibc 2.19 don't see this issue with UTF-8 or iso-8859-1.

It's been observed that users can work around this issue in one of three ways:

  1. (recommended) Disable the locale translation feature in the ~/LinPac/macro/init.mac file to read:
    ;;translate %DEF_ENC@0

  2. (not recommended) delete the ~/LinPac/bin/commands file but this significantly impacts Linpac's features

  3. (not recommended) start Linpac without monitoring by starting it with "linpac -m"

--David

Discussion

  • David Ranch

    David Ranch - 2017-03-17
    • labels: --> 0.25
    • status: open --> pending
    • Group: -->
     
  • Piotr

    Piotr - 2017-08-26
     

    Last edit: Piotr 2017-08-26
  • David Ranch

    David Ranch - 2017-08-26

    Hello Piotr,

    I received a message stating "In line number 181 of file inst\linpac.in replace $ with $@" but the SF report seems to be empty. Anyway, are you seeing an issue. For this stage of the autoconf system, the two options are effectively the same and I'm not seeing any issue.

     
  • David Ranch

    David Ranch - 2017-11-05

    Signifincant issue with AX.25 and Raspbian Stretch

    I have confirmed that with Raspian Stretch, there is some sort of conflict with
    it's newly enabled predictable network interface names. What are those? If you
    run the command "ifconfig" or "ip addr", you will no longer see Ethernet
    interfaces with names like "eth0" but instead, you'll see something like
    "enxb827eb5f05". How's that for catchy? For known reasons to the AX.25 kernel
    maintainers, in the sa_data kernel data structure, both the stock Raspbian AX.25
    .debs and the 3rd party VE7FET ax.25 debs will give errors like the following when
    ANY network interface name is longer than 13 characters:

     SIOCGIFHWADDR: No such device
    

    Programs like beacon will fail to start. Linpac will also crash upon start with

     /usr/bin/linpac: line 181:  9811 Segmentation fault   $PKG_BINDIR/linpac $*
    

    Fortunately, if you disable predictable network interface names, things work fine.

    To do this, do the following steps:

    sudo vi /boot/cmdline.txt
    
    #append the following to the end of the one line in this file
    
       net.ifnames=0 biosdevname=0
    

    Reboot your Raspberry Pi and things will work from there on out. Btw, if Linpac
    crashed on you, your terminal might be screwed up and not working properly.

    To fix that, run the commands:

     stty sane
     rm -f rm /var/lock/LinPac.0
    
     
  • Janusz

    Janusz - 2018-04-02

    Hi
    No mentioned workarounds helped. In my case BBS's beacon causes crash (Line 181...).
    It's a weather station beacon and sign of degrees of Centigrade - seems to be erroneous.

     
  • David Ranch

    David Ranch - 2018-04-03

    Hello Janusz,
    You're saying that the Linux program "beacon" is crashing Linpac? What version of Linpac are you running? I ask because this SF ticket should have been closed out as many fixes went into Linpac 0.25 around this area.

     
  • Janusz

    Janusz - 2018-04-03

    Hello
    No, sorry for not being so strict. I meant RF becon received via radio from local BBS/Node. I built from sources quite recent - version - download on 11.03.2018, so surely 0.25.

     
  • David Ranch

    David Ranch - 2018-04-03

    Hello Janusz,

    It would be very unusual for a remote RF beacon coming into the Linux AX.25 stack and then into Linpac to then crash Linpac. When Linpac is running, issue the command:

    :ver

    to get the version of Linpac. Beyond that, tell us more about your machine.. what linux distribution and version, are you using axlisten for LInpac to show on-frequency traffic or are you using ax25spyd? Which AX.25 lib/apps/tools are you using? The version coming from the base Linux distro, custom built versions from the tip of tree Official AX.25 sources, or the VE7FET sources?

     
  • Janusz

    Janusz - 2018-04-03

    Here you are:
    :ver

    linpac version 0.25 (Compiled on Mar 11 2018)
    Development snapshot 121017-develop
    OS: Linux 4.13.0-37-generic / x86_64
    
    :~$ cat /etc/lsb-release 
    DISTRIB_ID=Ubuntu
    DISTRIB_RELEASE=17.10
    DISTRIB_CODENAME=artful
    DISTRIB_DESCRIPTION="Ubuntu 17.10"
    
    :~$ dpkg -l \*ax25\*
    ii  ax25-apps                              0.0.8-rc4-2build1        amd64                    AX.25 ham radio applications                                                          
    ii  ax25-tools                             0.0.10-rc4-1             amd64                    tools for AX.25 interface configuration                                               
    un  ax25-utils                             <brak>                   <brak>                   (brak dostępnego opisu)                                                               
    ii  ax25-xtools                            0.0.10-rc4-1             amd64                    tools for AX.25 interface configuration -- X11-based                                  
    ii  ax25mail-utils                         0.13-1                   amd64                    hamradio packet utilities for fbb                                                     
    ii  libax25                                0.0.12-rc4-1             amd64                    ax25 library for hamradio applications                                                
    ii  libax25-dev                            0.0.12-rc4-1             amd64                    ax25 library development files     
    

    I don't use axlisten while Linpac is running however axlisten got no problems decoding mentioned symbols. Ax25spyd never tried at home.
    All libraries come from oficial Ubuntu repository.
    My HW: PK96 (in kiss mode) -> RS232/USB converter -> USB -> kissattach.

     
  • Janusz

    Janusz - 2018-05-05

    Hi

    I'd like to ask if there is any workarround.
    It looks even worse that I thought before. Please take a look at output of axlisten. I seperated one message (#766664) from my FBB-BBS where just after it's been listed, LinPac everytime crashes:

    ax0: fm SP9UMX to SR9ZAA ctl I61^ pid=F0(Text) len 9 
    l 766664
    ax0: fm SR9ZAA to SP9UMX ctl I26^ pid=F0(Text) len 241 
    
      Wybor listow   - [*]
    List#  TSLD  Rozm Do     @ BBS   Od    Data/godz Tytul  
    ====== ====  ==== ===== ======= ====== ====/==== =======
    766664 BX    2178 MUSIC @WW     LW1DSE 0414/1519 J. SABINA: G.isqui sin soda (L
    (1) KRABBS:SR9ZAA-8 >
    ax0: fm SP9UMX to SR9ZAA ctl DISC+ 
    ax0: fm SR9ZAA to SP9UMX ctl UA- 
    
    /usr/local/bin/linpac: linia 181:  8792 Naruszenie ochrony pamięci   (zrzut pamięci) $PKG_BINDIR/linpac $*
    

    Sorry - it's in polish but meens - memory violation (core dumped),
    Other bulletins were listed fine.

     
  • David Ranch

    David Ranch - 2018-05-06

    Hello Januz,

    A few ideas:

    1. Can you post the output of:

      ifconfig

    2. How are you installing Linpac? It's important that if you did an upgrade from a previous version, you copy the NEW libary versions over the older ones or you'll see issues like this. If you still see issues, can you provide a backtrace once Linpac coredumps?

    3. In the different window, can you run the "listen" program" from ax25apps to capture an example of a beacon that's crashing Linpac?

    --David

     
  • David Ranch

    David Ranch - 2020-04-17
    • status: pending --> closed
     
  • David Ranch

    David Ranch - 2020-04-17

    Known UTF character encoding issues have already been addressed in the 0.27 release. No additional reponse from Janusz since 5/5/2018 so I'm closing this ticket.

     

Log in to post a comment.

MongoDB Logo MongoDB