1 Reply Latest reply on Sep 28, 2015 1:09 PM by amcelroy

    C++ Program as .service at startup gives SEGV


      Hey everyone,


      I've got a Galileo Gen 2 board with a working Yocto Linux sd card that needs to do the following after boot up:


      1.) Start a NodeJS website

      2.) Start a C++ program


      So far, I've gotten the NodeJS server to run by creating a .service file and having it run nohup after galileo-init.service. That is working well. The C++ program though, argh! The program works as a stand alone when I login and run it through ssh or serial, but when I try to package it in a .service file, I get this message through systemctl status:


      smartprobe.service - Load NodeJS DESI SmartProbe

        Loaded: loaded (/lib/systemd/system/smartprobe.service; enabled)

        Active: failed (Result: signal) since Mon 2001-01-01 00:40:41 UTC; 14 years 8 months ago

        Process: 85 ExecStart=/usr/bin/nohup /SmartProbe/SmartProbe & (code=killed, signal=SEGV)

      Main PID: 85 (code=killed, signal=SEGV)


      I don't understand why this is happening, since the program runs fine in stand alone and not at startup. I've got a log file being written through the program, but it seems to indicate that things are ok. The .service and program have both had chmod +x applied.


      Any help would be really appriciated.




      Just another piece of the puzzle, this error message showed up when doing a reboot through the serial interface:


      [    7.231657] SmartProbe[85]: segfault at 4 ip 4bdabe02 sp bfc85650 error 4 in libmraa.so.0.7.2[4bda3000+15000]

      [FAILED] Failed to start Load NodeJS DESI SmartProbe.