auto-pi-lot / autopilot

Distributed behavioral experiments
https://docs.auto-pi-lot.com
Mozilla Public License 2.0
92 stars 24 forks source link

jack failure #154

Closed mikewehr closed 2 years ago

mikewehr commented 2 years ago

pi@raspberrypi:~ $ sudo reboot Connection to 192.168.0.197 closed by remote host. Connection to 192.168.0.197 closed. wehr@wehrterminal2:~$ ssh pi@192.168.0.197 pi@192.168.0.197's password: Linux raspberrypi 5.10.63-v7+ #1496 SMP Wed Dec 1 15:58:11 GMT 2021 armv7l

The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Fri Feb 18 23:06:14 2022 from 192.168.0.147 pi@raspberrypi:~ $ ps -aux USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 1 16.4 0.8 15144 7644 ? Ss 23:06 0:05 /sbin/init root 2 0.0 0.0 0 0 ? S 23:06 0:00 [kthreadd] root 3 0.0 0.0 0 0 ? I< 23:06 0:00 [rcu_gp] root 4 0.0 0.0 0 0 ? I< 23:06 0:00 [rcu_par_gp] root 5 0.0 0.0 0 0 ? I 23:06 0:00 [kworker/0:0-events_long] root 6 0.0 0.0 0 0 ? I< 23:06 0:00 [kworker/0:0H-kblockd] root 7 0.1 0.0 0 0 ? R 23:06 0:00 [kworker/u8:0-brcmf_wq/mmc1:0001:1] root 8 0.0 0.0 0 0 ? I< 23:06 0:00 [mm_percpu_wq] root 9 0.0 0.0 0 0 ? S 23:06 0:00 [rcu_tasksrude] root 10 0.0 0.0 0 0 ? S 23:06 0:00 [rcu_tasks_trace] root 11 0.2 0.0 0 0 ? S 23:06 0:00 [ksoftirqd/0] root 12 0.2 0.0 0 0 ? I 23:06 0:00 [rcu_sched] root 13 0.0 0.0 0 0 ? S 23:06 0:00 [migration/0] root 14 0.0 0.0 0 0 ? S 23:06 0:00 [cpuhp/0] root 15 0.0 0.0 0 0 ? S 23:06 0:00 [cpuhp/1] root 16 0.0 0.0 0 0 ? S 23:06 0:00 [migration/1] root 17 0.1 0.0 0 0 ? S 23:06 0:00 [ksoftirqd/1] root 18 0.0 0.0 0 0 ? I 23:06 0:00 [kworker/1:0-events_long] root 19 0.0 0.0 0 0 ? I< 23:06 0:00 [kworker/1:0H-events_highpri] root 20 0.0 0.0 0 0 ? S 23:06 0:00 [cpuhp/2] root 21 0.0 0.0 0 0 ? S 23:06 0:00 [migration/2] root 22 0.1 0.0 0 0 ? S 23:06 0:00 [ksoftirqd/2] root 23 0.0 0.0 0 0 ? I 23:06 0:00 [kworker/2:0-cgroup_destroy] root 24 0.0 0.0 0 0 ? I< 23:06 0:00 [kworker/2:0H-kblockd] root 25 0.0 0.0 0 0 ? S 23:06 0:00 [cpuhp/3] root 26 0.0 0.0 0 0 ? S 23:06 0:00 [migration/3] root 27 0.3 0.0 0 0 ? S 23:06 0:00 [ksoftirqd/3] root 28 0.0 0.0 0 0 ? I 23:06 0:00 [kworker/3:0-events] root 29 0.0 0.0 0 0 ? I< 23:06 0:00 [kworker/3:0H-kblockd] root 30 0.0 0.0 0 0 ? S 23:06 0:00 [kdevtmpfs] root 31 0.0 0.0 0 0 ? I< 23:06 0:00 [netns] root 32 0.0 0.0 0 0 ? I 23:06 0:00 [kworker/0:1-rcu_gp] root 33 0.0 0.0 0 0 ? I 23:06 0:00 [kworker/1:1-events_long] root 34 0.0 0.0 0 0 ? S 23:06 0:00 [kauditd] root 35 0.2 0.0 0 0 ? I 23:06 0:00 [kworker/0:2-events] root 36 0.0 0.0 0 0 ? S 23:06 0:00 [khungtaskd] root 37 0.0 0.0 0 0 ? S 23:06 0:00 [oom_reaper] root 38 0.0 0.0 0 0 ? I< 23:06 0:00 [writeback] root 39 0.0 0.0 0 0 ? S 23:06 0:00 [kcompactd0] root 57 0.0 0.0 0 0 ? I< 23:06 0:00 [kblockd] root 58 0.0 0.0 0 0 ? I< 23:06 0:00 [blkcg_punt_bio] root 59 0.0 0.0 0 0 ? S 23:06 0:00 [watchdogd] root 60 0.0 0.0 0 0 ? I 23:06 0:00 [kworker/2:1-events] root 61 0.0 0.0 0 0 ? I< 23:06 0:00 [kworker/1:1H-kblockd] root 62 0.0 0.0 0 0 ? I< 23:06 0:00 [rpciod] root 63 0.0 0.0 0 0 ? I< 23:06 0:00 [kworker/u9:0-hci0] root 64 0.0 0.0 0 0 ? I< 23:06 0:00 [xprtiod] root 65 0.0 0.0 0 0 ? S 23:06 0:00 [kswapd0] root 66 0.0 0.0 0 0 ? I< 23:06 0:00 [nfsiod] root 67 0.3 0.0 0 0 ? I 23:06 0:00 [kworker/3:1-events] root 68 0.4 0.0 0 0 ? I 23:06 0:00 [kworker/1:2-events] root 69 0.0 0.0 0 0 ? I< 23:06 0:00 [iscsi_eh] root 70 0.0 0.0 0 0 ? I< 23:06 0:00 [iscsi_destroy] root 71 0.0 0.0 0 0 ? I< 23:06 0:00 [dwc_otg] root 72 0.0 0.0 0 0 ? I< 23:06 0:00 [DWC Notificatio] root 73 0.0 0.0 0 0 ? S< 23:06 0:00 [vchiq-slot/0] root 74 0.0 0.0 0 0 ? S< 23:06 0:00 [vchiq-recy/0] root 75 0.0 0.0 0 0 ? S< 23:06 0:00 [vchiq-sync/0] root 76 0.0 0.0 0 0 ? I< 23:06 0:00 [zswap-shrink] root 77 0.0 0.0 0 0 ? I 23:06 0:00 [kworker/0:3-events_long] root 78 0.0 0.0 0 0 ? I 23:06 0:00 [kworker/0:4-rcu_gp] root 79 0.5 0.0 0 0 ? I 23:06 0:00 [kworker/0:5-events] root 80 1.0 0.0 0 0 ? I 23:06 0:00 [kworker/0:6-events] root 81 0.0 0.0 0 0 ? I 23:06 0:00 [kworker/0:7-events] root 82 0.0 0.0 0 0 ? I< 23:06 0:00 [mmc_complete] root 83 0.8 0.0 0 0 ? I< 23:06 0:00 [kworker/0:1H-mmc_complete] root 84 0.2 0.0 0 0 ? I< 23:06 0:00 [kworker/2:1H-kblockd] root 85 0.0 0.0 0 0 ? S 23:06 0:00 [jbd2/mmcblk0p2-] root 86 0.0 0.0 0 0 ? I< 23:06 0:00 [ext4-rsv-conver] root 87 0.4 0.0 0 0 ? I< 23:06 0:00 [kworker/3:1H-kblockd] root 88 0.0 0.0 0 0 ? I< 23:06 0:00 [kworker/3:2H] root 89 0.1 0.0 0 0 ? I 23:06 0:00 [kworker/u8:1-events_unbound] root 91 0.0 0.0 0 0 ? I< 23:06 0:00 [ipv6_addrconf] root 92 0.0 0.0 0 0 ? I 23:06 0:00 [kworker/3:2-ipv6_addrconf] root 106 0.4 0.0 0 0 ? I< 23:06 0:00 [kworker/1:2H-kblockd] root 108 0.0 0.0 0 0 ? I< 23:06 0:00 [kworker/0:2H] root 109 0.0 0.0 0 0 ? I< 23:06 0:00 [kworker/2:2H] root 123 1.9 0.7 18592 6264 ? Ss 23:06 0:00 /lib/systemd/systemd-journald root 138 0.1 0.2 17288 2612 ? Ss 23:06 0:00 /lib/systemd/systemd-fsckd root 139 0.8 0.0 0 0 ? I 23:06 0:00 [kworker/2:2-events] root 149 0.0 0.0 0 0 ? I 23:06 0:00 [kworker/u8:2] root 151 3.7 0.4 18096 3860 ? Ss 23:06 0:01 /lib/systemd/systemd-udevd root 166 0.0 0.0 0 0 ? S 23:06 0:00 [vchiq-keep/0] root 167 0.0 0.0 0 0 ? S< 23:06 0:00 [SMIO] root 186 0.0 0.0 0 0 ? I< 23:06 0:00 [mmal-vchiq] root 192 0.0 0.0 0 0 ? I< 23:06 0:00 [mmal-vchiq] root 199 0.0 0.0 0 0 ? I< 23:06 0:00 [mmal-vchiq] root 203 0.0 0.0 0 0 ? I< 23:06 0:00 [mmal-vchiq] root 207 0.0 0.0 0 0 ? I 23:06 0:00 [kworker/1:3-events_long] root 208 0.2 0.0 0 0 ? I 23:06 0:00 [kworker/1:4-events_power_efficient] root 210 0.0 0.0 0 0 ? I 23:06 0:00 [kworker/1:5-rcu_gp] root 211 0.0 0.0 0 0 ? I 23:06 0:00 [kworker/1:6-events] root 212 0.0 0.0 0 0 ? I< 23:06 0:00 [mmal-vchiq] root 260 0.0 0.0 0 0 ? I< 23:06 0:00 [cfg80211] root 272 0.0 0.0 0 0 ? I< 23:06 0:00 [brcmf_wq/mmc1:0] root 274 0.0 0.0 0 0 ? S 23:06 0:00 [brcmf_wdog/mmc1] systemd+ 338 1.4 0.6 22380 5536 ? Ssl 23:06 0:00 /lib/systemd/systemd-timesyncd message+ 371 1.0 0.3 6548 2956 ? Ss 23:06 0:00 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nop root 373 0.2 0.0 27656 80 ? SLsl 23:06 0:00 /usr/sbin/rngd -r /dev/hwrng root 377 0.1 0.4 10708 3760 ? Ss 23:06 0:00 /sbin/wpa_supplicant -u -s -O /run/wpa_supplicant avahi 379 0.2 0.2 5768 2508 ? Ss 23:06 0:00 avahi-daemon: running [raspberrypi.local] root 382 0.0 0.2 7952 2220 ? Ss 23:06 0:00 /usr/sbin/cron -f root 383 0.5 0.6 13008 5460 ? Ss 23:06 0:00 /lib/systemd/systemd-logind root 384 0.1 0.0 3692 696 ? SNs 23:06 0:00 /usr/sbin/alsactl -E HOME=/run/alsa -s -n 19 -c rdaemon root 390 0.4 0.3 25512 2772 ? Ssl 23:06 0:00 /usr/sbin/rsyslogd -n -iNONE nobody 396 0.0 0.2 4320 2040 ? Ss 23:06 0:00 /usr/sbin/thd --triggers /etc/triggerhappy/triggers.d/ --socket avahi 408 0.0 0.0 5768 252 ? S 23:06 0:00 avahi-daemon: chroot helper root 465 0.0 0.3 10968 3476 ? Ss 23:06 0:00 wpa_supplicant -B -c/etc/wpa_supplicant/wpa_supplicant.conf -iw root 473 0.0 0.0 0 0 ? I 23:06 0:00 [kworker/2:3-events] root 478 0.0 0.0 0 0 ? I< 23:06 0:00 [kworker/u9:1-hci0] root 479 0.0 0.0 2140 128 ? S 23:06 0:00 /usr/bin/hciattach /dev/serial1 bcm43xx 921600 noflow - b8:27:e root 480 0.0 0.0 0 0 ? I< 23:06 0:00 [kworker/u9:2-hci0] root 494 0.4 0.3 9536 3376 ? Ss 23:06 0:00 /usr/lib/bluetooth/bluetoothd root 496 1.0 0.2 12704 2616 ? Ss 23:06 0:00 /lib/systemd/systemd-hostnamed root 542 0.0 0.1 2904 1700 ? Ss 23:06 0:00 /sbin/dhcpcd -q -w root 553 0.2 0.6 10692 5392 ? Ss 23:06 0:00 /usr/sbin/sshd -D root 557 0.0 0.1 4308 1360 tty1 Ss+ 23:06 0:00 /sbin/agetty -o -p -- \u --noclear tty1 linux root 558 0.1 0.2 7812 2668 ? Ss 23:06 0:00 /bin/bash /home/pi/autopilot/launch_autopilot.sh root 567 38.0 14.5 269328 130004 ? SLl 23:06 0:06 python3 -m autopilot.core.pilot -f /home/pi/autopilot/prefs.jso root 575 0.3 1.3 51136 12304 ? Sl 23:06 0:00 python3 -m autopilot.core.pilot -f /home/pi/autopilot/prefs.jso root 586 1.7 0.7 12204 6316 ? Ss 23:06 0:00 sshd: pi [priv] root 591 0.2 0.0 0 0 ? Z 23:06 0:00 [sh] root 594 14.0 0.1 13600 1620 ? SLsl 23:06 0:00 /usr/local/bin/pigpiod -t 0 -l -x 1111110000111111111111110000 root 598 0.2 0.0 0 0 ? Z 23:06 0:00 [sh] root 599 30.7 6.8 67412 61284 ? SLsl 23:06 0:01 /usr/local/bin/jackd -P75 -p16 -t2000 -dalsa -dhw:sndrpihifiber pi 601 3.7 0.7 14564 6860 ? Ss 23:06 0:00 /lib/systemd/systemd --user pi 602 0.0 0.1 16684 1680 ? S 23:06 0:00 (sd-pam) pi 615 0.5 0.4 12204 4228 ? R 23:06 0:00 sshd: pi@pts/0 pi 616 5.2 0.4 8496 3660 pts/0 Ss 23:06 0:00 -bash root 632 4.0 6.9 225240 62312 ? SLl 23:06 0:00 python3 -m autopilot.core.pilot -f /home/pi/autopilot/prefs.jso root 636 3.5 6.8 234492 61236 ? Sl 23:06 0:00 python3 -m autopilot.core.pilot -f /home/pi/autopilot/prefs.jso pi 650 0.0 0.2 9792 2500 pts/0 R+ 23:06 0:00 ps -aux pi@raspberrypi:~ $ autopilot jackd(599): Operation not permitted jackd: no process found fatal: not a git repository (or any of the parent directories): .git fatal: not a git repository (or any of the parent directories): .git

██╗ ██╗███████╗██╗ ██████╗ ██████╗ ███╗ ███╗███████╗ ████████╗ ██████╗ ██║ ██║██╔════╝██║ ██╔════╝██╔═══██╗████╗ ████║██╔════╝ ╚══██╔══╝██╔═══██╗ ██║ █╗ ██║█████╗ ██║ ██║ ██║ ██║██╔████╔██║█████╗ ██║ ██║ ██║ ██║███╗██║██╔══╝ ██║ ██║ ██║ ██║██║╚██╔╝██║██╔══╝ ██║ ██║ ██║ ╚███╔███╔╝███████╗███████╗╚██████╗╚██████╔╝██║ ╚═╝ ██║███████╗ ██║ ╚██████╔╝ ╚══╝╚══╝ ╚══════╝╚══════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═════╝

█████╗ ██╗ ██╗████████╗ ██████╗ ██████╗ ██╗██╗ ██████╗ ████████╗
██╔══██╗██║ ██║╚══██╔══╝██╔═══██╗██╔══██╗██║██║ ██╔═══██╗╚══██╔══╝
███████║██║ ██║ ██║ ██║ ██║██████╔╝██║██║ ██║ ██║ ██║
██╔══██║██║ ██║ ██║ ██║ ██║██╔═══╝ ██║██║ ██║ ██║ ██║
██║ ██║╚██████╔╝ ██║ ╚██████╔╝██║ ██║███████╗╚██████╔╝ ██║
╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝ ╚═════╝ ╚═╝

jackdmp 1.9.20 Copyright 2001-2005 Paul Davis and others. Copyright 2004-2016 Grame. Copyright 2016-2021 Filipe Coelho. jackdmp comes with ABSOLUTELY NO WARRANTY This is free software, and you are welcome to redistribute it under certain conditions; see the file COPYING for details JACK server starting in realtime mode with priority 75 self-connect-mode is "Don't restrict self connect requests" creating alsa driver ... hw:sndrpihifiberry|-|1024|3|192000|0|0|nomon|swmeter|soft-mode|32bit

ATTENTION: The playback device "hw:sndrpihifiberry" is already in use. Please stop the application using it and run JACK again Cannot initialize driver JackServer::Open failed with -1 Failed to open server Cannot connect to server socket err = No such file or directory Cannot connect to server request channel jackdmp 1.9.20 Copyright 2001-2005 Paul Davis and others. Copyright 2004-2016 Grame. Copyright 2016-2021 Filipe Coelho. jackdmp comes with ABSOLUTELY NO WARRANTY This is free software, and you are welcome to redistribute it under certain conditions; see the file COPYING for details JACK server starting in realtime mode with priority 10 self-connect-mode is "Don't restrict self connect requests" Cannot lock down 107350048 byte memory area (Cannot allocate memory) Cannot connect to server socket err = No such file or directory Cannot connect to server request channel Cannot connect to server socket err = No such file or directory Cannot connect to server request channel Cannot connect to server socket err = No such file or directory Cannot connect to server request channel Cannot connect to server socket err = No such file or directory Cannot connect to server request channel Cannot connect to server socket err = No such file or directory Cannot connect to server request channel jack server is not running or cannot be started JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock Traceback (most recent call last): File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "/usr/lib/python3.7/runpy.py", line 85, in _run_code exec(code, run_globals) File "/home/pi/git/autopilot/autopilot/core/pilot.py", line 817, in a = Pilot() File "/home/pi/git/autopilot/autopilot/core/pilot.py", line 181, in init self.init_audio() File "/home/pi/git/autopilot/autopilot/core/pilot.py", line 651, in init_audio self.server = jackclient.JackClient() File "/home/pi/git/autopilot/autopilot/stim/sound/jackclient.py", line 158, in init self.client = jack.Client(self.name) File "/home/pi/.venv/autopilot/lib/python3.7/site-packages/jack.py", line 213, in init raise JackOpenError(name, self._status) jack.JackOpenError: Error initializing "jack_client": <jack.Status 0x11: failure, server_failed> pi@raspberrypi:~ $

sneakers-the-rat commented 2 years ago

looks like there's already an autopilot process running. is the systemd daemon enabled? try sudo systemctl status autopilot or else there is another shell open with it running? in any case the error is that the sound card has already been reserved, presumably by that running jackd process, but this also happens when PulseAudio is running. it also could be a memory issue, as it says it can't lock down the memory it needs. can you do a cat /etc/security/limits.conf ?

mikewehr commented 2 years ago

sudo systemctl stop autopilot sudo systemctl disable autopilot solved this issue for me