SEGV when using an Ethernet_IP_Scanner/Profinet-Master coming from the ETHTOOL syscall

holad
2022-05-18
2024-10-17
  • holad - 2022-05-18

    Runtime: SP17P3 for IDE+Runtime
    OS: Linux 5.16.2-rt19 #3 SMP PREEMPT_RT Tue May 3 12:22:28 CEST 2022 x86_64 x86_64 x86_64 GNU/Linux, Ubuntu 22.04 Server

    Hello!

    I'm having a simple project:

    • Empty PLC code
    • Added an Ethernet + Ethernet_IP_Scanner

    When uploading and executing this application I'm getting an error message:

    Well.. I'm fine having an error message so I can debug the ETHTOOL syscall issue.. but instead the entire runtime dies with a SEGV.

    Thread 30 "ENIPScannerServ" received signal SIGSEGV, Segmentation fault.
    [Switching to Thread 0x7ffff728e640 (LWP 3390)]
    __strlen_avx2 () at ../sysdeps/x86_64/multiarch/strlen-avx2.S:74
    74      ../sysdeps/x86_64/multiarch/strlen-avx2.S: No such file or directory.
    (gdb) bt
    #0  __strlen_avx2 () at ../sysdeps/x86_64/multiarch/strlen-avx2.S:74
    #1  0x00007ffff7e03db1 in __vfprintf_internal (s=s@entry=0x7ffff728d400, format=format@entry=0x55555d9cee68 "GetLinkSettings2(%s): ioctl(%d, SIOCETHTOOL, ...) failed %s", ap=ap@entry=0x7ffff728d588, mode_flags=mode_flags@entry=0) at ./stdio-common/vfprintf-internal.c:1517
    #2  0x00007ffff7e1551a in __vsnprintf_internal (string=0x7ffff7a26520 "GetLinkSettings2(Operation not supported): ioctl(1567047625, SIOCETHTOOL, ...) failed ", maxlen=<optimized out>, format=0x55555d9cee68 "GetLinkSettings2(%s): ioctl(%d, SIOCETHTOOL, ...) failed %s", args=0x7ffff728d588, mode_flags=0)
    

    Same happens to the Profinet Master.

    I'm only able to revive the runtime by removing the PlcLogic directories everywhere.

    How can I fix this?

    Thank you!

     

    Last edit: holad 2022-05-18
  • eschwellinger

    eschwellinger - 2022-05-18

    which driver / networkinterface is on wwan0
    could you do a:
    ip a s
    and give us the result?

     

    Last edit: eschwellinger 2022-05-18
  • holad - 2022-05-18

    Hi!

    This behavior is reproducible on two interface types:

    • VXLAN (ip link add vxlan0 type vxlan ...)
    • wwan0 (in this case case a Quectel RMU500 5G modem using the QMI interface, we did low latency tests to evaluate its fieldbus capabilities)

    Best Regards,
    Holger

     

    Last edit: holad 2022-05-18
  • eschwellinger

    eschwellinger - 2022-05-18

    think you need a real interface to do it - vxlan does not even have a link status , isn't it?

     
  • holad - 2022-05-19

    Here's the result of the ip command. Sorry for the delay.

    # ip a s
    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: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
        link/ether ac:e2:d3:xx:xx:xx brd ff:ff:ff:ff:ff:ff
        altname enp0s31f6
        inet 10.14.7.13/23 metric 100 brd 10.14.7.255 scope global dynamic eno1
           valid_lft 27837sec preferred_lft 27837sec
        inet6 fe80::aee2:d3ff:xxxx:xxxx/64 scope link 
           valid_lft forever preferred_lft forever
    
    3: wwan0: <POINTOPOINT,MULTICAST,NOARP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
        link/none 
        inet 192.168.241.13/24 scope global wwan0
           valid_lft forever preferred_lft forever
    
    4: vxlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue state UNKNOWN group default qlen 1000
        link/ether 7e:6d:54:xx:xx:xx brd ff:ff:ff:ff:ff:ff
        inet 192.168.1.2/24 brd 192.168.1.255 scope global vxlan0
           valid_lft forever preferred_lft forever
        inet6 fe80::c089:c4ff:xxxx:xxxx/64 scope link 
           valid_lft forever preferred_lft forever
    
     

    Last edit: holad 2022-05-19
  • eschwellinger

    eschwellinger - 2022-05-19

    Hi could you do a
    sudo ethtool wwan0
    and
    sudo ethtool vxlan0

     
  • holad - 2022-05-19
    # ethtool wwan0
    Settings for wwan0:
            Current message level: 0x00000007 (7)
                                   drv probe link
            Link detected: yes
    
    # ethtool vxlan0
    Settings for vxlan0:
            Link detected: yes
    
     

Log in to post a comment.