Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Troubleshooting
  3. mysgw.service fails with SEGV if ontroller connects

mysgw.service fails with SEGV if ontroller connects

Scheduled Pinned Locked Moved Troubleshooting
8 Posts 5 Posters 1.1k Views 4 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    dirk120
    wrote on last edited by
    #1

    I use a raspberry as Gateway and as controller (FHEM). The gateway config looks like this:

    ./configure --my-transport=rf24  --my-rf24-channel=123 --my-rf24-pa-level=RF24_PA_MAX --my-gateway=serial --my-serial-is-pty --my-serial-port=/dev/ttyMySensorsGateway --my-serial-groupname=dialout
    

    If I try to connect the controller the service fails

    pi@raspberrypi:/tmp $ sudo systemctl status  mysgw.service -l
    ● mysgw.service - MySensors Gateway daemon
       Loaded: loaded (/etc/systemd/system/mysgw.service; enabled)
       Active: failed (Result: signal) since Sun 2019-07-21 21:19:12 CEST; 4min 16s ago
      Process: 5078 ExecStart=/usr/local/bin/mysgw -q (code=killed, signal=SEGV)
     Main PID: 5078 (code=killed, signal=SEGV)
    
    Jul 21 21:18:15 raspberrypi systemd[1]: Started MySensors Gateway daemon.
    Jul 21 21:19:12 raspberrypi systemd[1]: mysgw.service: main process exited, code=killed, status=11/SEGV
    Jul 21 21:19:12 raspberrypi systemd[1]: Unit mysgw.service entered failed state.
    
    

    The log mysgw.log is on debug but no message appears at the time of failure.

    FHEM controller looks like this:
    2019.07.21 21:19:12 3: Opening MyGateway_0 device /dev/ttyMySensorsGateway
    2019.07.21 21:19:12 3: MyGateway_0 device opened
    2019.07.21 21:19:12 3: MYSENSORS: ignoring presentation-msg from unknown radioId 0, childId 255, sensorType 18
    2019.07.21 21:19:12 1: /dev/ttyMySensorsGateway disconnected, waiting to reappear (MyGateway_0)

    Any ideas what to try or how to further debug?

    Thanks,
    Dirk

    mfalkviddM 1 Reply Last reply
    0
    • D dirk120

      I use a raspberry as Gateway and as controller (FHEM). The gateway config looks like this:

      ./configure --my-transport=rf24  --my-rf24-channel=123 --my-rf24-pa-level=RF24_PA_MAX --my-gateway=serial --my-serial-is-pty --my-serial-port=/dev/ttyMySensorsGateway --my-serial-groupname=dialout
      

      If I try to connect the controller the service fails

      pi@raspberrypi:/tmp $ sudo systemctl status  mysgw.service -l
      ● mysgw.service - MySensors Gateway daemon
         Loaded: loaded (/etc/systemd/system/mysgw.service; enabled)
         Active: failed (Result: signal) since Sun 2019-07-21 21:19:12 CEST; 4min 16s ago
        Process: 5078 ExecStart=/usr/local/bin/mysgw -q (code=killed, signal=SEGV)
       Main PID: 5078 (code=killed, signal=SEGV)
      
      Jul 21 21:18:15 raspberrypi systemd[1]: Started MySensors Gateway daemon.
      Jul 21 21:19:12 raspberrypi systemd[1]: mysgw.service: main process exited, code=killed, status=11/SEGV
      Jul 21 21:19:12 raspberrypi systemd[1]: Unit mysgw.service entered failed state.
      
      

      The log mysgw.log is on debug but no message appears at the time of failure.

      FHEM controller looks like this:
      2019.07.21 21:19:12 3: Opening MyGateway_0 device /dev/ttyMySensorsGateway
      2019.07.21 21:19:12 3: MyGateway_0 device opened
      2019.07.21 21:19:12 3: MYSENSORS: ignoring presentation-msg from unknown radioId 0, childId 255, sensorType 18
      2019.07.21 21:19:12 1: /dev/ttyMySensorsGateway disconnected, waiting to reappear (MyGateway_0)

      Any ideas what to try or how to further debug?

      Thanks,
      Dirk

      mfalkviddM Offline
      mfalkviddM Offline
      mfalkvidd
      Mod
      wrote on last edited by
      #2

      @dirk120 try starting the gateway manually (not through systemd) as described on https://www.mysensors.org/build/raspberry#test but start the command with strace, i.e.

      sudo strace ./bin/mysgw
      

      and you should get pretty detailed information on what is going on.

      1 Reply Last reply
      0
      • D Offline
        D Offline
        dirk120
        wrote on last edited by dirk120
        #3

        I started the gateway manually and get this:

        gettimeofday({1563816015, 152499}, NULL) = 0
        gettimeofday({1563816015, 152644}, NULL) = 0
        gettimeofday({1563816015, 152790}, NULL) = 0
        nanosleep({0, 10000000}, NULL)          = 0
        ioctl(5, FIONREAD, [0])                 = 0
        gettimeofday({1563816015, 163378}, NULL) = 0
        gettimeofday({1563816015, 163527}, NULL) = 0
        gettimeofday({1563816015, 163692}, NULL) = 0
        nanosleep({0, 10000000}, NULL)          = 0
        ioctl(5, FIONREAD, [11])                = 0
        read(5, "0", 1)                         = 1
        ioctl(5, FIONREAD, [10])                = 0
        read(5, ";", 1)                         = 1
        ioctl(5, FIONREAD, [9])                 = 0
        read(5, "0", 1)                         = 1
        ioctl(5, FIONREAD, [8])                 = 0
        read(5, ";", 1)                         = 1
        ioctl(5, FIONREAD, [7])                 = 0
        read(5, "3", 1)                         = 1
        ioctl(5, FIONREAD, [6])                 = 0
        read(5, ";", 1)                         = 1
        ioctl(5, FIONREAD, [5])                 = 0
        read(5, "0", 1)                         = 1
        ioctl(5, FIONREAD, [4])                 = 0
        read(5, ";", 1)                         = 1
        ioctl(5, FIONREAD, [3])                 = 0
        read(5, "2", 1)                         = 1
        ioctl(5, FIONREAD, [2])                 = 0
        read(5, ";", 1)                         = 1
        ioctl(5, FIONREAD, [1])                 = 0
        read(5, "\n", 1)                        = 1
        --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0} ---
        +++ killed by SIGSEGV +++
        pi@raspberrypi:~/MySensors $ 
        

        I'm not sure what this means ? Any idea ?

        Thanks,
        Dirk

        1 Reply Last reply
        0
        • D Offline
          D Offline
          dirk120
          wrote on last edited by
          #4

          I solved the problem by a complete deinstall of mysensor and reinstall the master branch version (was dev version before).

          Dirk

          T 1 Reply Last reply
          0
          • D dirk120

            I solved the problem by a complete deinstall of mysensor and reinstall the master branch version (was dev version before).

            Dirk

            T Offline
            T Offline
            tekka
            Admin
            wrote on last edited by
            #5

            @dirk120 what dev version were you on?

            Mark SwiftM 1 Reply Last reply
            0
            • T tekka

              @dirk120 what dev version were you on?

              Mark SwiftM Offline
              Mark SwiftM Offline
              Mark Swift
              wrote on last edited by
              #6

              @tekka I also see this, issue posted on GitHub.

              1 Reply Last reply
              0
              • R Offline
                R Offline
                recipedude
                wrote on last edited by
                #7

                Experiencing the same issue here.

                • GW is on Raspberry Pi with NRF24 for comms, current version from git clone master branch
                • Controller is mycontroller.org on Centos linux
                • One node (Arduinio running battery example sketch)

                Running sudo ./mysgw the output is as follows:

                Sep 05 08:30:39 INFO  Protocol version - 2.3.2-beta
                Sep 05 08:30:39 DEBUG MCO:BGN:INIT GW,CP=RNNGL---,FQ=NA,REL=7,VER=2.3.2-beta
                Sep 05 08:30:39 DEBUG TSF:LRT:OK
                Sep 05 08:30:39 DEBUG TSM:INIT
                Sep 05 08:30:39 DEBUG TSF:WUR:MS=0
                Sep 05 08:30:39 DEBUG TSM:INIT:TSP OK
                Sep 05 08:30:39 DEBUG TSM:INIT:GW MODE
                Sep 05 08:30:39 DEBUG TSM:READY:ID=0,PAR=0,DIS=0
                Sep 05 08:30:39 DEBUG MCO:REG:NOT NEEDED
                Sep 05 08:30:39 DEBUG Listening for connections on �e�~:5003
                Sep 05 08:30:39 DEBUG MCO:BGN:STP
                Sep 05 08:30:39 DEBUG MCO:BGN:INIT OK,TSP=1
                Sep 05 08:30:39 DEBUG TSM:READY:NWD REQ
                Sep 05 08:30:39 DEBUG ?TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK:
                Sep 05 08:31:01 DEBUG TSF:MSG:READ,255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
                Sep 05 08:31:01 DEBUG TSF:MSG:BC
                Sep 05 08:31:01 DEBUG TSF:MSG:FPAR REQ,ID=255
                Sep 05 08:31:01 DEBUG TSF:PNG:SEND,TO=0
                Sep 05 08:31:01 DEBUG TSF:CKU:OK
                Sep 05 08:31:01 DEBUG TSF:MSG:GWL OK
                Sep 05 08:31:01 DEBUG ?TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0
                Sep 05 08:31:03 DEBUG TSF:MSG:READ,255-255-0,s=174,c=3,t=3,pt=0,l=0,sg=0:
                Sep 05 08:31:05 DEBUG TSF:MSG:READ,255-255-0,s=137,c=3,t=3,pt=0,l=0,sg=0:
                Sep 05 08:31:07 DEBUG TSF:MSG:READ,255-255-0,s=100,c=3,t=3,pt=0,l=0,sg=0:
                Sep 05 08:31:09 DEBUG TSF:MSG:READ,255-255-0,s=64,c=3,t=3,pt=0,l=0,sg=0:
                Sep 05 08:31:46 DEBUG New connection from 10.0.0.157
                Sep 05 08:31:46 DEBUG GWT:TSA:C=0,CONNECTED
                Sep 05 08:31:46 DEBUG GWT:RFC:C=0,MSG=0;255;3;0;2;
                Segmentation fault```
                
                Seg fault as soon as the controller connects.
                
                About to try strace.
                1 Reply Last reply
                0
                • R Offline
                  R Offline
                  recipedude
                  wrote on last edited by
                  #8

                  Have added log + strace output to the issue on Github as well: https://github.com/mysensors/MySensors/issues/1342

                  stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3503, ...}) = 0
                  write(4, "Sep 05 09:03:46 DEBUG GWT:RFC:C="..., 51) = 51
                  write(2, "Sep 05 09:03:46 \33[36mDEBUG\33[0m ", 31Sep 05 09:03:46 DEBUG ) = 31
                  write(2, "GWT:RFC:C=0,MSG=0;255;3;0;2;\n", 29GWT:RFC:C=0,MSG=0;255;3;0;2;
                  ) = 29
                  --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=NULL} ---
                  +++ killed by SIGSEGV +++
                  Segmentation fault
                  
                  1 Reply Last reply
                  0

                  Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                  Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                  With your input, this post could be even better 💗

                  Register Login
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  18

                  Online

                  12.0k

                  Users

                  11.2k

                  Topics

                  113.4k

                  Posts


                  Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • MySensors
                  • OpenHardware.io
                  • Categories
                  • Recent
                  • Tags
                  • Popular