Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
dreamworks opened this issue Jan 4, 2024 · 11 comments
Open

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

dreamworks opened this issue Jan 4, 2024 · 11 comments

Comments

@dreamworks
Copy link

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
Copy link
Owner

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
Copy link
Author

dreamworks commented Jan 5, 2024 via email

@tsunghanliu
Copy link
Owner

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
Copy link
Author

dreamworks commented Jan 5, 2024 via email

@dreamworks
Copy link
Author

dreamworks commented Jan 5, 2024 via email

@tsunghanliu
Copy link
Owner

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)

@dreamworks
Copy link
Author

dreamworks commented Jan 5, 2024 via email

@tsunghanliu
Copy link
Owner

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
Copy link
Author

dreamworks commented Jan 8, 2024 via email

@tsunghanliu
Copy link
Owner

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
Copy link
Author

dreamworks commented Jan 9, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants