tsunghanliu / adsb-box.snap

a snap to build a ADS-B receiver station
28 stars 4 forks source link

fr24feed not longer working since a last update(s) ?! #65

Open dreamworks opened 7 months ago

dreamworks commented 7 months ago

I noticed that the fr24feed is no longer working after the last update.. The change must be happened the last couple of days/weeks. Anything else is working (all other feeders and collecters).. No clue what this "terminate called after throwing an instance of 'std::system_error'" means or where it comes from. Any help very much appreciated!!

Output of snap logs -n all adsb-box.fr24feed

2024-01-04T20:28:06+01:00 systemd[1]: Started Service for snap application adsb-box.fr24feed. 2024-01-04T20:28:11+01:00 adsb-box.fr24feed[1077]: terminate called after throwing an instance of 'std::system_error' 2024-01-04T20:28:11+01:00 adsb-box.fr24feed[1077]: what(): Operation not permitted 2024-01-04T20:28:11+01:00 systemd[1]: snap.adsb-box.fr24feed.service: main process exited, code=exited, status=134/n/a 2024-01-04T20:28:11+01:00 adsb-box.fr24feed[1077]: /snap/adsb-box/835/bin/fr24feed: line 89: 2126 Aborted $BIN "${A RGS[@]}" 2024-01-04T20:28:11+01:00 systemd[1]: Unit snap.adsb-box.fr24feed.service entered failed state. 2024-01-04T20:28:11+01:00 systemd[1]: snap.adsb-box.fr24feed.service failed.

tsunghanliu commented 7 months ago

Hi,

The logs said what(): Operation not permitted, so it could be the operation was blocked. Could you please share the output of sudo dmesg -T | grep adsb-box and snap changes? Thank you.

dreamworks commented 7 months ago

Hi Robert,

happy new year from Germany and many thx for your quick response! The snap is running on an VM-Ubuntu, if you provide me your ssh public key I can provide you access to remotely.

Output as follow, nothing unusual from my point of view (I tried the connect yesterday as we had those issues about a year ago – no changes)

@. ~]# dmesg -T | grep adsb-box @. ~]# snap changes ID Status Spawn Ready Summary 163 Done yesterday at 19:26 CET yesterday at 19:26 CET Running service command 164 Done yesterday at 20:31 CET yesterday at 20:31 CET Running service command 165 Done yesterday at 20:31 CET yesterday at 20:31 CET Running service command 166 Done yesterday at 21:24 CET yesterday at 21:24 CET Refresh all snaps: no updates 167 Done yesterday at 21:40 CET yesterday at 21:40 CET Connect adsb-box:raw-usb to core:raw-usb 168 Done yesterday at 21:40 CET yesterday at 21:40 CET Connect adsb-box:process-control to core:process-control 169 Done yesterday at 21:40 CET yesterday at 21:40 CET Connect adsb-box:system-observe to core:system-observe 170 Done yesterday at 21:40 CET yesterday at 21:40 CET Connect adsb-box:network-observe to core:network-observe 171 Done yesterday at 21:40 CET yesterday at 21:40 CET Connect adsb-box:hardware-observe to core:hardware-observe 172 Done yesterday at 21:40 CET yesterday at 21:40 CET Connect adsb-box:mount-observe to core:mount-observe 173 Done yesterday at 21:40 CET yesterday at 21:40 CET Running service command

Von: Tsunghan (Robert) Liu @.> Gesendet: Freitag, 5. Januar 2024 03:50 An: tsunghanliu/adsb-box.snap @.> Cc: Michael Schoen @.>; Author @.> Betreff: Re: [tsunghanliu/adsb-box.snap] fr24feed not longer working since a last update(s) ?! (Issue #65)

Hi,

The logs said what(): Operation not permitted, so it could be the operation was blocked. Could you please share the output of sudo dmesg -T | grep adsb-box and snap changes? Thank you.

— Reply to this email directly, view it on GitHubhttps://github.com/tsunghanliu/adsb-box.snap/issues/65#issuecomment-1878050739, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AADJRZBFX6UGV4MUHL2UOQDYM5S3VAVCNFSM6AAAAABBNPNHBGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZYGA2TANZTHE. You are receiving this because you authored the thread.Message ID: @.**@.>>

tsunghanliu commented 7 months ago

hmm, the log doesn't show anything wrong. Cloud you please run snap connections adsb-box? Which Ubuntu version are you using? Please restart the fr24feed service and capture the logs again.

$ sudo snap restart adsb-box.fr24feed
(wait a few seconds, 20 maybe)
$ sudo snap logs -n all adsb-box.fr24feed
$ sudo dmesg -T | grep adsb-box

BTW, my SSH keys can be found at https://launchpad.net/~robertliu/+sshkeys , but I'd like to debug via comments first. ;)

dreamworks commented 7 months ago

Hi Robert,

see logs below.. I see no error message besides that std::system_error which I have no clue where this comes from.. FR24 Feeder/Decoder itself seems to be working. I added the ssh key to the vm – as it’s in my honey-pot lab I can certainly connect it, but would also prefer to not archive the ip on github 😊

Best regards & Many thx for your support!

.\ichael

======================================== @. bin]# pwd /snap/adsb-box/835/usr/bin @. bin]# ./fr24feed -h libcommon read_config failed - /etc/fr24feed.ini


| || |() | | | | | | / \ / | | | | | _ | | | | _ | | ' / /' / /| | | _| | || | / _ || ' \ | || '|/ | / _ | / _` || '| / / / /| | | | | || || (| || | | || | | | | (| || (| || (| || | ./ /__\ | _| |||| _, ||| || _||| _,| _,| _,||| __/ |/ _/ | |/ [main][i]FR24 Feeder/Decoder [main][i]Version: 1.0.44-0/generic [main][i]Built on Nov 6 2023 12:51:50 (T202311061248/Linux/static_amd64) [main][i]Running on: "centos"="7" [main][i]Local IP(s): 192.168.50.34,fe80::60ba:1cdb:4d8b:7f7 [main][i]Copyright 2012-2023 Flightradar24 AB [main][i]https://www.flightradar24.com [main][i]DNS mode: PING

FR24 Feeder/Decoder usage: ./fr24feed --fr24key=0123456789ABCDEF| Start feeding process manually ./fr24feed --signup | Sign up and configure ./fr24feed --reconfigure | Change configuration ./fr24feed --version | Show binary version number error | Local time: 2024-01-05 11:23:57 +0100 error | GMT+0 time: 2024-01-05 10:23:57 +0100 error | Your machine should be set as GMT+0 time zone! warning | Time zone is not set to GMT+0 @.*** bin]#

================================

@. ~]# cat /etc/centos-release CentOS Linux release 7.9.2009 (Core) @. ~]# yum update Geladene Plugins: fastestmirror Loading mirror speeds from cached hostfile

dreamworks commented 7 months ago

And the output of snap connections adsb-box

localhost:/root # snap connections adsb-box Interface Plug Slot Notes hardware-observe adsb-box:hardware-observe :hardware-observe manual mount-observe adsb-box:mount-observe :mount-observe manual network adsb-box:network :network - network-bind adsb-box:network-bind :network-bind - network-observe adsb-box:network-observe :network-observe manual process-control adsb-box:process-control :process-control manual raw-usb adsb-box:raw-usb :raw-usb manual system-observe adsb-box:system-observe :system-observe manual localhost:/root #

Von: Tsunghan (Robert) Liu @.> Gesendet: Freitag, 5. Januar 2024 11:09 An: tsunghanliu/adsb-box.snap @.> Cc: Michael Schoen @.>; Author @.> Betreff: Re: [tsunghanliu/adsb-box.snap] fr24feed not longer working since a last update(s) ?! (Issue #65)

hmm, the log doesn't show anything wrong. Cloud you please run snap connections adsb-box? Which Ubuntu version are you using? Please restart the fr24feed service and capture the logs again.

$ sudo snap restart adsb-box.fr24feed

(wait a few seconds, 20 maybe)

$ sudo snap logs -n all adsb-box.fr24feed

$ sudo dmesg -T | grep adsb-box

BTW, my SSH keys can be found at https://launchpad.net/~robertliu/+sshkeys , but I'd like to debug via comments first. ;)

— Reply to this email directly, view it on GitHubhttps://github.com/tsunghanliu/adsb-box.snap/issues/65#issuecomment-1878422919, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AADJRZFSMLBDLMEE4LFVCBDYM7GK3AVCNFSM6AAAAABBNPNHBGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZYGQZDEOJRHE. You are receiving this because you authored the thread.Message ID: @.**@.>>

tsunghanliu commented 7 months ago

Hi Michael,

Unfortunately, from your logs, I don't see useful information. Also, the dmesg was trimmed, so I cannot find any snap errors. Could you please run sudo journalctl -b? It would provide more logs including kernel, snapd and the snap.

I published updates on Dec. 23 and today. Besides the snap part, did your system have any update recently?

You can also try the follow steps to debug:

  1. revert the snap and see if the issue is related to the snap.
    
    $ snap list --all adsb-box
    $ sudo snap revert adsb-box --revision=[an old revision]

after test, use the command to update the snap to the latest revision

$ sudo snap refresh adsb-box --stable


2. run the fr24feed inside the snap to see if it provides more log

$ sudo snap run --shell adsb-box.fr24feed $ cd $SNAP $ TZ=GMT usr/bin/fr24feed --monitor-file=/tmp/fr24feed.txt --write-pid=$SNAP_DATA/fr24feed/fr24feed.pid


(I never run the commands on CentOS and am not sure if they work)
dreamworks commented 7 months ago

Hi,

something seems to be broken in the snap environment for the fr24feed binary – see logs below.. I am not into snap .. not sure why env could be responsible or what else happens, but the binary does (not/no longer) work within the snap environment

localhost:/root # snap run --shell adsb-box.fr24feed localhost:/root # cd $SNAP localhost:/snap/adsb-box/839 # usr/bin/fr24feed terminate called after throwing an instance of 'std::system_error' what(): Operation not permitted Aborted localhost:/snap/adsb-box/839 # env SHELL=/bin/bash SNAP_REVISION=839 HISTCONTROL=ignoredups SNAP_REAL_HOME=/root SNAP_USER_COMMON=/root/snap/adsb-box/common HISTSIZE=1000 HOSTNAME=localhost.localdomain SNAP_INSTANCE_KEY= EDITOR=joe PWD=/snap/adsb-box/839 LOGNAME=root TEMPDIR=/tmp SNAP_CONTEXT=STs5WZd1oAzH7jNBHBB8JQsJ2uN_wwAXjMpBzeT-ZG2Sei-0UPbU HOME=/root/snap/adsb-box/839 LANG=de_DE.UTF-8 LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:.tar=01;31:.tgz=01;31:.arc=01;31:.arj=01;31:.taz=01;31:.lha=01;31:.lz4=01;31:.lzh=01;31:.lzma=01;31:.tlz=01;31:.txz=01;31:.tzo=01;31:.t7z=01;31:.zip=01;31:.z=01;31:.Z=01;31:.dz=01;31:.gz=01;31:.lrz=01;31:.lz=01;31:.lzo=01;31:.xz=01;31:.bz2=01;31:.bz=01;31:.tbz=01;31:.tbz2=01;31:.tz=01;31:.deb=01;31:.rpm=01;31:.jar=01;31:.war=01;31:.ear=01;31:.sar=01;31:.rar=01;31:.alz=01;31:.ace=01;31:.zoo=01;31:.cpio=01;31:.7z=01;31:.rz=01;31:.cab=01;31:.jpg=01;35:.jpeg=01;35:.gif=01;35:.bmp=01;35:.pbm=01;35:.pgm=01;35:.ppm=01;35:.tga=01;35:.xbm=01;35:.xpm=01;35:.tif=01;35:.tiff=01;35:.png=01;35:.svg=01;35:.svgz=01;35:.mng=01;35:.pcx=01;35:.mov=01;35:.mpg=01;35:.mpeg=01;35:.m2v=01;35:.mkv=01;35:.webm=01;35:.ogm=01;35:.mp4=01;35:.m4v=01;35:.mp4v=01;35:.vob=01;35:.qt=01;35:.nuv=01;35:.wmv=01;35:.asf=01;35:.rm=01;35:.rmvb=01;35:.flc=01;35:.avi=01;35:.fli=01;35:.flv=01;35:.gl=01;35:.dl=01;35:.xcf=01;35:.xwd=01;35:.yuv=01;35:.cgm=01;35:.emf=01;35:.axv=01;35:.anx=01;35:.ogv=01;35:.ogx=01;35:.aac=01;36:.au=01;36:.flac=01;36:.mid=01;36:.midi=01;36:.mka=01;36:.mp3=01;36:.mpc=01;36:.ogg=01;36:.ra=01;36:.wav=01;36:.axa=01;36:.oga=01;36:.spx=01;36:*.xspf=01;36: EXINIT=set ruler showmatch showmode tabstop=4 shiftwidth=4 expandtab ignorecase SNAP_ARCH=amd64 SNAP_INSTANCE_NAME=adsb-box SNAP_USER_DATA=/root/snap/adsb-box/839 TMPDIR=/tmp PROMPT_COMMAND=PS1=if test "$UID" = 0 ; then \ echo "\h:\pwd -P` # " ; \ else echo "\u@\h:`pwd -P` > " ; \ fi ` SSH_CONNECTION=192.168.200.120 55952 192.168.50.34 22 SNAP_REEXEC= TERM=xterm LESSOPEN=||/usr/bin/lesspipe.sh %s USER=root SNAP=/snap/adsb-box/839 SNAP_COMMON=/var/snap/adsb-box/common VISUAL=joe SNAP_VERSION=v1.7.0 SHLVL=2 SNAP_LIBRARY_PATH=/var/lib/snapd/lib/gl:/var/lib/snapd/lib/gl32:/var/lib/snapd/void SNAP_COOKIE=STs5WZd1oAzH7jNBHBB8JQsJ2uN_wwAXjMpBzeT-ZG2Sei-0UPbU SNAP_DATA=/var/snap/adsb-box/839 LD_LIBRARY_PATH=/var/lib/snapd/lib/gl:/var/lib/snapd/lib/gl32:/var/lib/snapd/void:/snap/adsb-box/839/lib:/snap/adsb-box/839/usr/lib:/snap/adsb-box/839/lib/x86_64-linux-gnu:/snap/adsb-box/839/usr/lib/x86_64-linux-gnu XDG_RUNTIME_DIR=/run/user/0/snap.adsb-box PS2=> PS1=\h:/snap/adsb-box/839 # SSH_CLIENT=192.168.200.120 55952 22 TMOUT=3600 SNAP_NAME=adsb-box XDG_DATA_DIRS=/usr/local/share:/usr/share:/var/lib/snapd/desktop PATH=/snap/adsb-box/839/usr/sbin:/snap/adsb-box/839/usr/bin:/snap/adsb-box/839/sbin:/snap/adsb-box/839/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games MAIL=/var/spool/mail/root SSHTTY=/dev/pts/1 OLDPWD=/root =/usr/bin/env localhost:/snap/adsb-box/839 # exit localhost:/root # cd /snap/adsb-box/839/ localhost:/var/lib/snapd/snap/adsb-box/839 # usr/bin/fr24feed -v libcommon read_config failed - /etc/fr24feed.ini


| || |() | | | | | | / \ / | | | | | _ | | | | _ | | ' / /' / /| | | _| | || | / _ || ' \ | || '|/ | / _ | / _` || '| / / / /| | | | | || || (| || | | || | | | | (| || (| || (| || | ./ /__\ | _| |||| _, ||| || _||| _,| _,| _,||| __/ |/ _/ | |/ [main][i]FR24 Feeder/Decoder [main][i]Version: 1.0.44-0/generic [main][i]Built on Nov 6 2023 12:51:50 (T202311061248/Linux/static_amd64) [main][i]Running on: "centos"="7" [main][i]Local IP(s): 192.168.50.34,fe80::60ba:1cdb:4d8b:7f7 [main][i]Copyright 2012-2023 Flightradar24 AB [main][i]https://www.flightradar24.com [main][i]DNS mode: PING

FR24 Feeder/Decoder usage: usr/bin/fr24feed --fr24key=0123456789ABCDEF| Start feeding process manually usr/bin/fr24feed --signup | Sign up and configure usr/bin/fr24feed --reconfigure | Change configuration usr/bin/fr24feed --version | Show binary version number error | Local time: 2024-01-05 18:52:33 +0100 error | GMT+0 time: 2024-01-05 17:52:33 +0100 error | Your machine should be set as GMT+0 time zone! warning | Time zone is not set to GMT+0 localhost:/var/lib/snapd/snap/adsb-box/839 # env HOSTNAME=localhost.localdomain TERM=xterm SHELL=/bin/bash HISTSIZE=1000 SSH_CLIENT=192.168.200.120 55952 22 OLDPWD=/root SSH_TTY=/dev/pts/1 USER=root LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:.tar=01;31:.tgz=01;31:.arc=01;31:.arj=01;31:.taz=01;31:.lha=01;31:.lz4=01;31:.lzh=01;31:.lzma=01;31:.tlz=01;31:.txz=01;31:.tzo=01;31:.t7z=01;31:.zip=01;31:.z=01;31:.Z=01;31:.dz=01;31:.gz=01;31:.lrz=01;31:.lz=01;31:.lzo=01;31:.xz=01;31:.bz2=01;31:.bz=01;31:.tbz=01;31:.tbz2=01;31:.tz=01;31:.deb=01;31:.rpm=01;31:.jar=01;31:.war=01;31:.ear=01;31:.sar=01;31:.rar=01;31:.alz=01;31:.ace=01;31:.zoo=01;31:.cpio=01;31:.7z=01;31:.rz=01;31:.cab=01;31:.jpg=01;35:.jpeg=01;35:.gif=01;35:.bmp=01;35:.pbm=01;35:.pgm=01;35:.ppm=01;35:.tga=01;35:.xbm=01;35:.xpm=01;35:.tif=01;35:.tiff=01;35:.png=01;35:.svg=01;35:.svgz=01;35:.mng=01;35:.pcx=01;35:.mov=01;35:.mpg=01;35:.mpeg=01;35:.m2v=01;35:.mkv=01;35:.webm=01;35:.ogm=01;35:.mp4=01;35:.m4v=01;35:.mp4v=01;35:.vob=01;35:.qt=01;35:.nuv=01;35:.wmv=01;35:.asf=01;35:.rm=01;35:.rmvb=01;35:.flc=01;35:.avi=01;35:.fli=01;35:.flv=01;35:.gl=01;35:.dl=01;35:.xcf=01;35:.xwd=01;35:.yuv=01;35:.cgm=01;35:.emf=01;35:.axv=01;35:.anx=01;35:.ogv=01;35:.ogx=01;35:.aac=01;36:.au=01;36:.flac=01;36:.mid=01;36:.midi=01;36:.mka=01;36:.mp3=01;36:.mpc=01;36:.ogg=01;36:.ra=01;36:.wav=01;36:.axa=01;36:.oga=01;36:.spx=01;36:*.xspf=01;36: TMOUT=3600 MAIL=/var/spool/mail/root PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/var/lib/snapd/snap/bin:/root/bin EXINIT=set ruler showmatch showmode tabstop=4 shiftwidth=4 expandtab ignorecase PWD=/snap/adsb-box/839 EDITOR=joe LANG=de_DE.UTF-8 PS1=\h:/var/lib/snapd/snap/adsb-box/839 # HISTCONTROL=ignoredups PS2=> SHLVL=1 HOME=/root LOGNAME=root VISUAL=joe XDG_DATA_DIRS=/usr/local/share:/usr/share:/var/lib/snapd/desktop SSH_CONNECTION=192.168.200.120 55952 192.168.50.34 22 LESSOPEN=||/usr/bin/lesspipe.sh %s PROMPT_COMMAND=PS1=if test "$UID" = 0 ; then \ echo "\h:\pwd -P` # " ; \ else echo "\u@\h:`pwd -P` > " ; \ fi ` BASH_FUNCwhich()=() { builtin type -p "$@" } =/usr/bin/env localhost:/var/lib/snapd/snap/adsb-box/839 #

Von: Tsunghan (Robert) Liu @.> Gesendet: Freitag, 5. Januar 2024 16:41 An: tsunghanliu/adsb-box.snap @.> Cc: Michael Schoen @.>; Author @.> Betreff: Re: [tsunghanliu/adsb-box.snap] fr24feed not longer working since a last update(s) ?! (Issue #65)

Hi Michael,

Unfortunately, from your logs, I don't see useful information. Also, the dmesg was trimmed, so I cannot find any snap errors. Could you please run sudo journalctl -b? It would provide more logs including kernel, snapd and the snap.

I published updates on Dec. 23 and today. Besides the snap part, did your system have any update recently?

You can also try the follow steps to debug:

  1. revert the snap and see if the issue is related to the snap.

$ snap list --all adsb-box

$ sudo snap revert adsb-box --revision=[an old revision]

after test, use the command to update the snap to the latest revision

$ sudo snap refresh adsb-box --stable

  1. run the fr24feed inside the snap to see if it provides more log

$ sudo snap run --shell adsb-box.fr24feed

$ cd $SNAP

$ TZ=GMT usr/bin/fr24feed --monitor-file=/tmp/fr24feed.txt --write-pid=$SNAP_DATA/fr24feed/fr24feed.pid

(I never run the commands on CentOS and am not sure if they work)

— Reply to this email directly, view it on GitHubhttps://github.com/tsunghanliu/adsb-box.snap/issues/65#issuecomment-1878868331, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AADJRZBZQC6RJ2VJOKRM6SLYNANJPAVCNFSM6AAAAABBNPNHBGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZYHA3DQMZTGE. You are receiving this because you authored the thread.Message ID: @.**@.>>

tsunghanliu commented 7 months ago

I used Vagrant with CentOS 7 and ran the snap inside it. Then I found there's a different return code with different confinement (strict vs devmode) when fr24feed is starting a system call.

# strict
[pid  6704] syscall_435(0x7fff1a0f69e0, 0x58, 0xae9a60, 0x8, 0x7fc97bd59640, 0x7fff1a0f6aef) = -1 (errno 1)
[pid  6704] rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
# devmode
[pid 32333] syscall_435(0x7ffca34140a0, 0x58, 0xae9a60, 0x8, 0x7f7050d29640, 0x7ffca34141af) = -1 (errno 38)
[pid 32333] clone(child_stack=0x7f7050d291b0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7f7050d29910, tls=0x7f7050d29640, child_tidptr=0x7f7050d29910) = 32335

Since snapd on CentOS doesn't support fully strict confinement, I'm suspecting that the snap can only run with devmode on CentOS.

[vagrant@localhost ~]$ snap debug confinement
partial
[vagrant@localhost ~]$ snap debug sandbox-features
confinement-options:  classic devmode
dbus:                 mediated-bus-access
kmod:                 mediated-modprobe
mount:                freezer-cgroup-v1 layouts mount-namespace per-snap-persistency per-snap-profiles per-snap-updates per-snap-user-profiles stale-base-invalidation
seccomp:              bpf-actlog bpf-argument-filtering kernel:allow kernel:errno kernel:kill kernel:trace kernel:trap
udev:                 device-cgroup-v1 device-filtering tagging

reference output on my laptop with Ubuntu 20.04

$ snap debug confinement
strict
$ snap debug sandbox-features
apparmor:             kernel:caps kernel:dbus kernel:domain kernel:file kernel:mount kernel:namespaces kernel:network kernel:network_v8 kernel:policy kernel:ptrace kernel:query kernel:rlimit kernel:signal parser:cap-audit-read parser:cap-bpf parser:include-if-exists parser:mqueue parser:qipcrtr-socket parser:snapd-internal parser:unsafe parser:userns parser:xdp policy:default support-level:full
confinement-options:  classic devmode strict
dbus:                 mediated-bus-access
kmod:                 mediated-modprobe
mount:                freezer-cgroup-v1 layouts mount-namespace per-snap-persistency per-snap-profiles per-snap-updates per-snap-user-profiles stale-base-invalidation
seccomp:              bpf-actlog bpf-argument-filtering kernel:allow kernel:errno kernel:kill_process kernel:kill_thread kernel:log kernel:trace kernel:trap kernel:user_notif
udev:                 device-cgroup-v1 device-filtering tagging

Was the snap running correctly on this system before?

dreamworks commented 7 months ago

Hi,

yes – it was running before without any errors. I noticed that something was wrong, because my flightradar business (used my pad) stopped working over x-mas. Then I look into the vm saw everything is running besides the fr24feed.

Anyhow I am not sure, what is the best here, as it’s a VM and I primarly want to have it running. I do not care that much if ubuntu, centos or whatever.. It might be much quicker to jump over to ubuntu (could snap maintain the cfg somehow?) if that’s the quickest solution to have the feeder up and running again.. (I am sitting close to airport munich an feeding is more important than actually bringing that system to live again on CENTOS).. So quickest/easiest path is then preferred.. SSH access still possible, but here pl. mail me directly

As it looks like I completely crashed the system by changing into devmode..

localhost:/root # snap remove adsb-box 2024-01-08T11:03:50+01:00 INFO Waiting for "snap.adsb-box.pfclient.service" to stop. adsb-box removed localhost:/root # snap saved Set Snap Age Version Rev Size Notes 1 adsb-box 18.4s v1.7.0 839 11.0MB auto localhost:/root # snap install --devmode adsb-box adsb-box v1.7.0 from Robert Liu (robertliu) installed localhost:/root # snap restore 1

Now nothing works anymore.. Seems that the “decoder/adsb-box.dump1090.” is not coming up? But again I have no clue how to debug further..

localhost:/ # snap restart adsb-box

localhost:/ # snap logs -n all adsb-box.dump1090 2024-01-08T11:09:20+01:00 systemd[1]: Started Service for snap application adsb-box.dump1090. 2024-01-08T11:13:34+01:00 systemd[1]: Stopping Service for snap application adsb-box.dump1090... 2024-01-08T11:13:34+01:00 systemd[1]: Stopped Service for snap application adsb-box.dump1090.

And here the output of /var/log/messages

Jan 8 11:22:38 localhost adsb-box.pfclient: 2024-01-08 10:22:38.847130 [-] Shutting down workers... Jan 8 11:22:41 localhost adsb-box.openskyd: [WARN] [CFG] Could not traverse path '/etc/openskyd/conf.d': No such file or directory (2) Jan 8 11:22:41 localhost adsb-box.openskyd: [WARN] [MAIN] Could not read all configuration files Jan 8 11:22:41 localhost adsb-box.openskyd: [INFO] [COMP] Initialize STAT Jan 8 11:22:41 localhost adsb-box.openskyd: [INFO] [COMP] Initialize POS Jan 8 11:22:41 localhost adsb-box.openskyd: [INFO] [COMP] Initialize DEVTYPE Jan 8 11:22:41 localhost adsb-box.openskyd: [INFO] [COMP] Initialize NET Jan 8 11:22:41 localhost adsb-box.openskyd: [INFO] [COMP] Initialize TB Jan 8 11:22:41 localhost adsb-box.openskyd: [INFO] [COMP] Initialize SERIAL Jan 8 11:22:41 localhost adsb-box.openskyd: [INFO] [COMP] Initialize BUF Jan 8 11:22:41 localhost adsb-box.openskyd: [INFO] [COMP] Initialize RELAY Jan 8 11:22:41 localhost adsb-box.openskyd: [INFO] [COMP] Initialize RC Jan 8 11:22:41 localhost adsb-box.openskyd: [INFO] [COMP] Initialize FILTER Jan 8 11:22:41 localhost adsb-box.openskyd: [INFO] [COMP] Initialize RECV Jan 8 11:22:41 localhost adsb-box.openskyd: [INFO] [COMP] Start STAT Jan 8 11:22:41 localhost adsb-box.openskyd: [INFO] [COMP] Start POS Jan 8 11:22:41 localhost adsb-box.openskyd: [INFO] [COMP] Start DEVTYPE Jan 8 11:22:41 localhost adsb-box.openskyd: [INFO] [COMP] Start NET Jan 8 11:22:41 localhost adsb-box.openskyd: [INFO] [COMP] Start TB Jan 8 11:22:41 localhost adsb-box.openskyd: [INFO] [COMP] Start SERIAL Jan 8 11:22:41 localhost adsb-box.openskyd: [INFO] [COMP] Start RELAY Jan 8 11:22:41 localhost adsb-box.openskyd: [INFO] [COMP] Start RC Jan 8 11:22:41 localhost adsb-box.openskyd: [INFO] [COMP] Start FILTER Jan 8 11:22:41 localhost adsb-box.openskyd: [INFO] [COMP] Start RECV Jan 8 11:22:41 localhost adsb-box.openskyd: [INFO] [INPUT] Trying to connect to 'localhost': [127.0.0.1]:30005 Jan 8 11:22:41 localhost adsb-box.openskyd: [WARN] [INPUT] Could not connect: Connection refused (111) Jan 8 11:22:41 localhost adsb-box.openskyd: [INFO] [INPUT] Trying to connect to 'localhost': [::1]:30005 Jan 8 11:22:41 localhost adsb-box.openskyd: [WARN] [INPUT] Could not connect: Connection refused (111) Jan 8 11:22:41 localhost adsb-box.openskyd: [WARN] [INPUT] Tried all addresses of 'localhost': could not connect Jan 8 11:22:41 localhost adsb-box.openskyd: [INFO] [NET] Trying to connect to 'collector.opensky-network.org': [194.209.200.41]:10004 Jan 8 11:22:41 localhost adsb-box.openskyd: [INFO] [NET] connected to 'collector.opensky-network.org' Jan 8 11:22:41 localhost adsb-box.openskyd: [INFO] [LOGIN] Sending Device ID 5, Version 2.1.7 Jan 8 11:22:41 localhost adsb-box.openskyd: [INFO] [LOGIN] Sending Serial Number -1408232589 Jan 8 11:22:41 localhost adsb-box.openskyd: [INFO] [GPS] Sending position +48.5420°, +13.2321°, +380.00m Jan 8 11:22:41 localhost adsb-box.openskyd: [INFO] [LOGIN] Sending Username 'dreamworks' Jan 8 11:22:42 localhost adsb-box.openskyd: [INFO] [TB] Setting sync filter: 0 Jan 8 11:22:42 localhost adsb-box.openskyd: [INFO] [TB] Setting ext squitter only filter: 1 Jan 8 11:22:48 localhost adsb-box.pfclient: 2024-01-08 10:22:38.847894 [-] Processing shutdown request... Jan 8 11:22:48 localhost adsb-box.pfclient: 2024-01-08 10:22:38.848018 [-] Echo port is shutting down Jan 8 11:22:48 localhost adsb-box.pfclient: 2024-01-08 10:22:39.15503 [-] MLAT thread is shutting down Jan 8 11:22:48 localhost adsb-box.pfclient: 2024-01-08 10:22:39.57614 [-] NTP thread is shutting down Jan 8 11:22:48 localhost adsb-box.pfclient: 2024-01-08 10:22:39.898375 [-] Data proxy is shutting down Jan 8 11:22:48 localhost adsb-box.pfclient: 2024-01-08 10:22:48.85248 [-] Web server is shutting down Jan 8 11:22:48 localhost systemd: Stopped Service for snap application adsb-box.pfclient. Jan 8 11:22:48 localhost systemd: Started Service for snap application adsb-box.pfclient. Jan 8 11:22:48 localhost systemd: Stopping Service for snap application adsb-box.piaware... Jan 8 11:22:48 localhost systemd: Stopped Service for snap application adsb-box.piaware. Jan 8 11:22:48 localhost systemd: Started Service for snap application adsb-box.piaware. Jan 8 11:22:48 localhost systemd: Stopping Service for snap application adsb-box.graphs-gend... Jan 8 11:22:48 localhost systemd: Stopped Service for snap application adsb-box.graphs-gend. Jan 8 11:22:48 localhost systemd: Started Service for snap application adsb-box.graphs-gend. Jan 8 11:22:51 localhost adsb-box.openskyd: [INFO] [INPUT] Trying to connect to 'localhost': [::1]:30005 Jan 8 11:22:51 localhost adsb-box.openskyd: [WARN] [INPUT] Could not connect: Connection refused (111) Jan 8 11:22:51 localhost adsb-box.openskyd: [INFO] [INPUT] Trying to connect to 'localhost': [127.0.0.1]:30005 Jan 8 11:22:51 localhost adsb-box.openskyd: [WARN] [INPUT] Could not connect: Connection refused (111) Jan 8 11:22:51 localhost adsb-box.openskyd: [WARN] [INPUT] Tried all addresses of 'localhost': could not connect Jan 8 11:23:01 localhost adsb-box.openskyd: [INFO] [INPUT] Trying to connect to 'localhost': [127.0.0.1]:30005 Jan 8 11:23:01 localhost adsb-box.openskyd: [WARN] [INPUT] Could not connect: Connection refused (111)

Von: Tsunghan (Robert) Liu @.> Gesendet: Montag, 8. Januar 2024 10:23 An: tsunghanliu/adsb-box.snap @.> Cc: Michael Schoen @.>; Author @.> Betreff: Re: [tsunghanliu/adsb-box.snap] fr24feed not longer working since a last update(s) ?! (Issue #65)

I used Vagrant with CentOS 7 and ran the snap inside it. Then I found there's a different return code with different confinement (strict vs devmode) when fr24feed is starting a system call.

strict

[pid 6704] syscall_435(0x7fff1a0f69e0, 0x58, 0xae9a60, 0x8, 0x7fc97bd59640, 0x7fff1a0f6aef) = -1 (errno 1)

[pid 6704] rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0

devmode

[pid 32333] syscall_435(0x7ffca34140a0, 0x58, 0xae9a60, 0x8, 0x7f7050d29640, 0x7ffca34141af) = -1 (errno 38)

[pid 32333] clone(child_stack=0x7f7050d291b0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7f7050d29910, tls=0x7f7050d29640, child_tidptr=0x7f7050d29910) = 32335

Since snapd on CentOS doesn't support fully strict confinement, I'm suspecting that the snap can only run with devmode on CentOS.

@.*** ~]$ snap debug confinement

partial

@.*** ~]$ snap debug sandbox-features

confinement-options: classic devmode

dbus: mediated-bus-access

kmod: mediated-modprobe

mount: freezer-cgroup-v1 layouts mount-namespace per-snap-persistency per-snap-profiles per-snap-updates per-snap-user-profiles stale-base-invalidation

seccomp: bpf-actlog bpf-argument-filtering kernel:allow kernel:errno kernel:kill kernel:trace kernel:trap

udev: device-cgroup-v1 device-filtering tagging

reference output on my laptop with Ubuntu 20.04

$ snap debug confinement

strict

$ snap debug sandbox-features

apparmor: kernel:caps kernel:dbus kernel:domain kernel:file kernel:mount kernel:namespaces kernel:network kernel:network_v8 kernel:policy kernel:ptrace kernel:query kernel:rlimit kernel:signal parser:cap-audit-read parser:cap-bpf parser:include-if-exists parser:mqueue parser:qipcrtr-socket parser:snapd-internal parser:unsafe parser:userns parser:xdp policy:default support-level:full

confinement-options: classic devmode strict

dbus: mediated-bus-access

kmod: mediated-modprobe

mount: freezer-cgroup-v1 layouts mount-namespace per-snap-persistency per-snap-profiles per-snap-updates per-snap-user-profiles stale-base-invalidation

seccomp: bpf-actlog bpf-argument-filtering kernel:allow kernel:errno kernel:kill_process kernel:kill_thread kernel:log kernel:trace kernel:trap kernel:user_notif

udev: device-cgroup-v1 device-filtering tagging

Was the snap running correctly on this system before?

— Reply to this email directly, view it on GitHubhttps://github.com/tsunghanliu/adsb-box.snap/issues/65#issuecomment-1880634866, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AADJRZDPRJGT4FU6QB7ACRDYNO3H5AVCNFSM6AAAAABBNPNHBGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBQGYZTIOBWGY. You are receiving this because you authored the thread.Message ID: @.**@.>>

tsunghanliu commented 7 months ago

Hi,

Did you run snap connect commands after installing the snap? I put some checking in the script before real starting dump1090/feeders.

sudo snap connect adsb-box:hardware-observe 
sudo snap connect adsb-box:mount-observe 
sudo snap connect adsb-box:process-control 
sudo snap connect adsb-box:raw-usb 
sudo snap connect adsb-box:system-observe 
sudo snap connect adsb-box:network-observe 

Btw, I tried CentOS 9 Stream and it doesn't have the permission issue. For the best snap experience, I'd recommend a Ubuntu LTS release is a better choice than CentOS, because sometimes there are external dependencies that are not controllable by Ubuntu and Snap.

I'm happy to help via SSH if there's any issues with devmode.

dreamworks commented 7 months ago

Hi Robert,

many many thx. I did NOT run the snap connect commands, as I “thought” I only reinstalled the snap and those cmds were not (again) necessary. As stated, I am not into SNAP. After running these commands everything came up right away – also the fr24feed! So we are back in “business”! Thank you VERY much!

I completely concur with “Centos 7.x” as dead end. But I only have Centos 7 and Rocky Linux 9 devices here and would prefer to not bring another distro in the game. My plan would be to upgrade the ADBS-VM to Rocky Linux at some point, but so far it was just running, until the last issues arsing around x-mas.

So at this point, let’s just close THIS issue, as it’s working again.. And you might add a note about the devmode for “other/not official supported” (snap-) linux-distros.

Best regards from Germany and manx many thx!

Last but not least: Just out of curiosity. Did you ever looked into adding FLARM into the game/snap? I have a 868 MHZ TTGO here in my box and wonder, if I could put it somewhere in the loop. Any recommendations here from your side (topic: openglidernet and such?)

.\ichael

Von: Tsunghan (Robert) Liu @.> Gesendet: Dienstag, 9. Januar 2024 10:18 An: tsunghanliu/adsb-box.snap @.> Cc: Michael Schoen @.>; Author @.> Betreff: Re: [tsunghanliu/adsb-box.snap] fr24feed not longer working since a last update(s) ?! (Issue #65)

Hi,

Did you run snap connect commands after installing the snap? I put some checking in the script before real starting dump1090/feeders.

sudo snap connect adsb-box:hardware-observe

sudo snap connect adsb-box:mount-observe

sudo snap connect adsb-box:process-control

sudo snap connect adsb-box:raw-usb

sudo snap connect adsb-box:system-observe

sudo snap connect adsb-box:network-observe

Btw, I tried CentOS 9 Stream and it doesn't have the permission issue. For the best snap experience, I'd recommend a Ubuntu LTS release is a better choice than CentOS, because sometimes there are external dependencies that are not controllable by Ubuntu and Snap.

I'm happy to help via SSH if there's any issues with devmode.

— Reply to this email directly, view it on GitHubhttps://github.com/tsunghanliu/adsb-box.snap/issues/65#issuecomment-1882681747, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AADJRZCYI6JTPF65C5NTZFDYNUDLLAVCNFSM6AAAAABBNPNHBGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBSGY4DCNZUG4. You are receiving this because you authored the thread.Message ID: @.**@.>>