Startup application at Power On

would like to have my application run once power is applied to the Jetson and it has booted up. I do not want to have to login. I have service called bolt.service in /etc/systemd/system as such:

[Unit]
Description=Run Autobolt for warehouse application

[Service]

Path is created with following deployment command

./engine/build/deploy.sh -s -u iam --remote_user iam -p //packages/iam-devices:autoBolt-pkg -d jetpack42 -h 192.168.200.22

ExecStart=/home/iam/deploy/iam/autoBolt-pkg/packages/iam-devices/runBolt.sh
Type=idle
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target

The script that is called simply does the following:

#!/bin/bash
cd /home/iam/deploy/iam/autoBolt-pkg/
./packages/iam-devices/autoBolt

If I ssh into the Jetson and login, I can run systemctl start bolt. This will run the application without any issue. When I power off the device and turn it back on, nothing happens. I login and check the status of the service with systemctl status bolt. I get the following:

bolt.service - Run Autobolt for warehouse application
Loaded: loaded (/etc/systemd/system/bolt.service; disabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2020-01-21 10:25:30 EST; 1min 23s ago
Process: 6218 ExecStart=/home/iam/deploy/iam/autoBolt-pkg/packages/iam-devices/runBolt.sh (code=exited,
Main PID: 6218 (code=exited, status=134)

Jan 21 10:25:30 bolt runBolt.sh[6218]: #01 engine/alice/tools/main(+0x67d80) [0x5594cefd80]
Jan 21 10:25:30 bolt runBolt.sh[6218]: #02 engine/alice/tools/main(+0xd4e50) [0x5594d5ce50]
Jan 21 10:25:30 bolt runBolt.sh[6218]: #03 engine/alice/tools/main(+0xd5158) [0x5594d5d158]
Jan 21 10:25:30 bolt runBolt.sh[6218]: #04 linux-vdso.so.1(__kernel_rt_sigreturn+0) [0x7fade806c0]
Jan 21 10:25:30 bolt runBolt.sh[6218]: #05 /lib/aarch64-linux-gnu/libc.so.6(raise+0xb0) [0x7fad9e74d8]
Jan 21 10:25:30 bolt runBolt.sh[6218]: ===================================================================
Jan 21 10:25:30 bolt runBolt.sh[6218]: Minidump written to: /tmp/80edfbb7-38e0-47b8-fde546a8-2191d0f8.dmp
Jan 21 10:25:30 bolt runBolt.sh[6218]: Aborted (core dumped)
Jan 21 10:25:30 bolt systemd[1]: bolt.service: Main process exited, code=exited, status=134/n/a
Jan 21 10:25:30 bolt systemd[1]: bolt.service: Failed with result ‘exit-code’.

It looks like my application runs, but it immediately crashes. Is there anything else in the start up script I have that I would be missing to cause this? Potentially, something did not load before running the script or I need to start any other processes?

I am running Isaac SDK 2019.2
Thank you,

Jacob, were you able to resolve this? Or is this still an open issue?

This is still an open issue. I changed the TX2 to automatic login and try setting the service to start after networking. I also attempted to place a link to the script in rc.local. The same issue would occur. The application would start and then quickly crash. It seems like it needs to start after login and rc.local seems to just be the last service to run before finally fully starting the desktop.

Hi, Jacob,

Sounds like the application is crashing due to failure of accessing some file. Minidump tool might give some more details. Please refer to the section of “How To Analyze a Crash using Minidump” in the documentation.

That being said, running application as logged-in user might be different from running by a service which might have permission of a different user. You may want to check which user is being used by the service and if that specific user has enough permission.