Created attachment 218465 [details] A photograph of the error from a few days ago, when my rc.conf was slightly different With rc.conf as outlined at <https://pastebin.com/s9h1fXPX>: - a shared object is not found at init time - I find it necessary to start the service manually (see below) --- root@momh167-gjp4-8570p:~ # date ; uname -v Fri Oct 2 10:41:39 BST 2020 FreeBSD 13.0-CURRENT #66 r366136: Fri Sep 25 18:46:17 BST 2020 root@momh167-gjp4-8570p:/usr/obj/usr/src/amd64.amd64/sys/GENERIC-NODEBUG root@momh167-gjp4-8570p:~ # service virtual_oss start Starting Virtual OSS config dsp ...hw.snd.basename_clone: 1 -> 0 done root@momh167-gjp4-8570p:~ #
What does: pkg info | grep fftw Output?
root@momh167-gjp4-8570p:~ # pkg info | grep fftw fftw3-3.3.8_6 Fast C routines to compute the Discrete Fourier Transform fftw3-float-3.3.8_6 Fast Discrete Fourier Transform (Single Precision C Routines) root@momh167-gjp4-8570p:~ # pkg query '%o %v %R' fftw3 fftw3-float math/fftw3 3.3.8_6 FreeBSD math/fftw3-float 3.3.8_6 FreeBSD root@momh167-gjp4-8570p:~ #
And: ldd `which virtual_oss` --HPS
root@momh167-gjp4-8570p:~ # ldd `which virtual_oss` /usr/local/sbin/virtual_oss: libbluetooth.so.4 => /usr/lib/libbluetooth.so.4 (0x80025e000) libsdp.so.4 => /usr/lib/libsdp.so.4 (0x800266000) libfftw3.so.3 => /usr/local/lib/libfftw3.so.3 (0x80026e000) libcuse.so.1 => /usr/lib/libcuse.so.1 (0x8003f8000) libthr.so.3 => /lib/libthr.so.3 (0x8003ff000) libm.so.5 => /lib/libm.so.5 (0x80042c000) libsamplerate.so.0 => /usr/local/lib/libsamplerate.so.0 (0x80045f000) libc.so.7 => /lib/libc.so.7 (0x8005cc000) root@momh167-gjp4-8570p:~ #
And: ls -l /usr/local/lib/libfftw3.so* Likely you need to re-install virtual_oss either from source or pkg and that will resolve the problem. --HPS
root@momh167-gjp4-8570p:~ # ls -l /usr/local/lib/libfftw3.so* lrwxr-xr-x 1 root wheel 17 Apr 21 02:40 /usr/local/lib/libfftw3.so -> libfftw3.so.3.5.8 lrwxr-xr-x 1 root wheel 17 Apr 21 02:40 /usr/local/lib/libfftw3.so.3 -> libfftw3.so.3.5.8 -rwxr-xr-x 1 root wheel 1602432 Apr 21 02:40 /usr/local/lib/libfftw3.so.3.5.8 root@momh167-gjp4-8570p:~ #
(In reply to Hans Petter Selasky from comment #5) > … Likely you need to re-install virtual_oss … Below, the cached package size mismatch was remarkable. Reinstalled, I'll restart the OS … -- root@momh167-gjp4-8570p:~ # service virtual_oss stop Stopping Virtual OSS config dsp ... done root@momh167-gjp4-8570p:~ # pkg remove virtual_oss Checking integrity... done (0 conflicting) Deinstallation has been requested for the following 2 packages (of 0 packages in the universe): Installed packages to be REMOVED: virtual_oss: 1.2.6_1 virtual_oss_ctl: 1.2.1 Number of packages to be removed: 2 Proceed with deinstalling packages? [y/N]: y [1/2] Deinstalling virtual_oss_ctl-1.2.1... [1/2] Deleting files for virtual_oss_ctl-1.2.1: 100% [2/2] Deinstalling virtual_oss-1.2.6_1... [2/2] Deleting files for virtual_oss-1.2.6_1: 100% root@momh167-gjp4-8570p:~ # pkg install virtual_oss virtual_oss_ctl Updating FreeBSD repository catalogue... FreeBSD repository is up to date. Updating poudriere repository catalogue... poudriere repository is up to date. All repositories are up to date. The following 2 package(s) will be affected (of 0 checked): New packages to be INSTALLED: virtual_oss: 1.2.6_1 [FreeBSD] virtual_oss_ctl: 1.2.1 [FreeBSD] Number of packages to be installed: 2 87 KiB to be downloaded. Proceed with this action? [y/N]: y [1/2] Fetching virtual_oss-1.2.6_1.txz: 100% 51 KiB 52.6kB/s 00:01 pkg: cached package virtual_oss-1.2.6_1: size mismatch, fetching from remote [2/2] Fetching virtual_oss-1.2.6_1.txz: 100% 51 KiB 52.6kB/s 00:01 pkg: cached package virtual_oss-1.2.6_1: size mismatch, cannot continue Consider running 'pkg update -f' root@momh167-gjp4-8570p:~ # pkg update -f Updating FreeBSD repository catalogue... Fetching meta.conf: 100% 163 B 0.2kB/s 00:01 Fetching packagesite.txz: 100% 6 MiB 937.6kB/s 00:07 Processing entries: 100% Fetching provides database: 100% 14 MiB 805.2kB/s 00:18 Extracting database....success FreeBSD repository update completed. 31678 packages processed. Updating poudriere repository catalogue... Fetching meta.conf: 100% 163 B 0.2kB/s 00:01 Fetching packagesite.txz: 100% 2 KiB 1.6kB/s 00:01 Processing entries: 100% The provides database is up-to-date. poudriere repository update completed. 5 packages processed. All repositories are up to date. root@momh167-gjp4-8570p:~ # pkg install virtual_oss virtual_oss_ctl Updating FreeBSD repository catalogue... FreeBSD repository is up to date. Updating poudriere repository catalogue... poudriere repository is up to date. All repositories are up to date. The following 2 package(s) will be affected (of 0 checked): New packages to be INSTALLED: virtual_oss: 1.2.6_1 [FreeBSD] virtual_oss_ctl: 1.2.1 [FreeBSD] Number of packages to be installed: 2 87 KiB to be downloaded. Proceed with this action? [y/N]: y [1/2] Fetching virtual_oss-1.2.6_1.txz: 100% 51 KiB 52.6kB/s 00:01 [2/2] Fetching virtual_oss_ctl-1.2.1.txz: 100% 36 KiB 36.4kB/s 00:01 Checking integrity... done (0 conflicting) [1/2] Installing virtual_oss-1.2.6_1... [1/2] Extracting virtual_oss-1.2.6_1: 100% [2/2] Installing virtual_oss_ctl-1.2.1... [2/2] Extracting virtual_oss_ctl-1.2.1: 100% root@momh167-gjp4-8570p:~ #
When does this happen? When you run using the rc.d or when manually? I think /usr/local/lib is not added to the library search patch when virtual_oss is started. This can be worked around by adding the missing libraries as: env LD_PRELOAD=/usr/local/lib/xxx virtual_oss ... --HPS
(In reply to Hans Petter Selasky from comment #8) rc.d
A commit references this bug: Author: hselasky Date: Sat Oct 3 19:23:23 UTC 2020 New revision: 551339 URL: https://svnweb.freebsd.org/changeset/ports/551339 Log: Add missing LD_PRELOAD= environment variable to the virtual_oss rc.d . PR: 250046 Approved by: pi (implicit) Changes: head/audio/virtual_oss/Makefile head/audio/virtual_oss/files/virtual_oss.in
Try the patch I submitted. --HPS
Thanks, now I get: root@momh167-gjp4-8570p:~ # service virtual_oss start Starting Virtual OSS config dsp ...hw.snd.basename_clone: 0 -> 0 virtual_oss: Could not create CUSE DSP device done root@momh167-gjp4-8570p:~ # service virtual_oss status virtual_oss is not running. root@momh167-gjp4-8570p:~ #
Can you show me you virtual_oss configuration in rc.conf? Also: ls /dev/*dsp* --HPS
And also check that: cuse_load=YES is in your /boot/loader.conf --HPS
root@momh167-gjp4-8570p:~ # ls -l /dev/*dsp* crw-rw-rw- 1 root wheel 0x220 Oct 4 10:28 /dev/dsp0.0 crw-rw-rw- 1 root wheel 0x21a Oct 4 10:16 /dev/dsp0.1 crw-rw-rw- 1 root wheel 0x21d Oct 4 11:20 /dev/dsp1.0 crw-rw-rw- 1 root wheel 0x21c Oct 4 10:35 /dev/dsp1.1 crw-rw-rw- 1 root wheel 0x21f Oct 4 10:28 /dev/dsp2.0 crw-rw-rw- 1 root wheel 0x21e Oct 4 10:16 /dev/dsp2.1 root@momh167-gjp4-8570p:~ # grep cuse /boot/loader.conf cuse_load="YES" root@momh167-gjp4-8570p:~ # grep -v \# /etc/rc.conf rc_debug="NO" rc_info="YES" rc_startmsgs="NO" always_force_depends="NO" kldxref_enable="NO" kldxref_clobber="NO" dmesg_enable="YES" clear_tmp_enable="YES" keymap="uk.kbd" hostname="momh167-gjp4-8570p" linux_enable="YES" zfs_enable="YES" kld_list="fusefs" devfs_system_ruleset="system" dbus_enable="YES" vboxnet_enable="YES" sshd_enable="YES" ntpd_enable="YES" ntpd_sync_on_start="YES" cupsd_enable="YES" powerdxx_enable="YES" kld_list="/boot/modules/drm.ko" hald_enable="YES" sddm_enable="YES" webcamd_enable="YES" webcamd_flags="-H" virtual_oss_enable="YES" sndiod_enable="YES" dumpdev="/dev/ada0p3" dumpdir="/var/crash" savecore_enable="YES" ifconfig_ue0="DHCP" create_args_wlan0="country GB regdomain etsi" wlans_iwn0="wlan0" ifconfig_wlan0="WPA SYNCDHCP" ifconfig_em0="DHCP" root@momh167-gjp4-8570p:~ # ---- From /usr/local/etc/rc.d/virtual_oss name=virtual_oss desc="Virtual OSS device manager" rcvar=${name}_enable start_precmd="${name}_precmd" start_cmd="${name}_start" stop_cmd="${name}_stop" # required_modules="cuse" virtual_oss_default_args="\ -T /dev/sndstat \ -S \ -i 8 \ -C 2 -c 2 \ -r 48000 \ -b 24 \ -s 8.0ms \ -f /dev/dsp1 \ -c 2 \ -d dsp \ -t vdsp.ctl" configs=
And you also have permissions for /dev/cuse ? ls -l /dev/cuse --HPS
Could you invoke the software manually: ktrace virtual_oss \ -T /dev/sndstat \ -S \ -i 8 \ -C 2 -c 2 \ -r 48000 \ -b 24 \ -s 8.0ms \ -f /dev/dsp1 \ -c 2 \ -d dsp \ -t vdsp.ctl Then run: kdump Also check: ps auxw | grep virtual_oss For multiple instances. --HPS
root@momh167-gjp4-8570p:~ # uptime ; ls -l /dev/cuse 1:53PM up 11 mins, 5 users, load averages: 0.38, 0.80, 0.47 crw------- 1 root operator 0x4 Oct 4 13:42 /dev/cuse root@momh167-gjp4-8570p:~ # ps auxw | grep virtual_oss root 115 1.4 0.0 17908 5044 - S<s 13:43 0:04.27 /usr/local/sbin/virtual_oss -B -D /var/run/virtual_oss/dsp.pid -T /dev/sndstat -S -i 8 -C 2 -c 2 -r 48000 -b 24 -s 8.0ms -f /dev/dsp1 -c 2 root 3989 0.0 0.0 13256 2756 3 S+ 13:54 0:00.00 grep virtual_oss root@momh167-gjp4-8570p:~ # service virtual_oss status virtual_oss is not running. root@momh167-gjp4-8570p:~ # service virtual_oss start Starting Virtual OSS config dsp ...hw.snd.basename_clone: 0 -> 0 virtual_oss: Could not create CUSE DSP device done root@momh167-gjp4-8570p:~ # service virtual_oss status virtual_oss is not running. root@momh167-gjp4-8570p:~ # -- kdump to follow …
Created attachment 218512 [details] kdump output
What happens if you do: kilall virtual_oss first? --HPS
root@momh167-gjp4-8570p:~ # grep autoconf /var/log/messages Oct 4 14:19:09 momh167-gjp4-8570p pkg[5967]: autoconf upgraded: 2.13.000227_7 -> 2.69_3 root@momh167-gjp4-8570p:~ # killall virtual_oss root@momh167-gjp4-8570p:~ # service virtual_oss start Starting Virtual OSS config dsp ...hw.snd.basename_clone: 0 -> 0 done root@momh167-gjp4-8570p:~ # service virtual_oss status virtual_oss is not running. root@momh167-gjp4-8570p:~ # service virtual_oss start Starting Virtual OSS config dsp ...hw.snd.basename_clone: 0 -> 0 virtual_oss: Could not create CUSE DSP device done root@momh167-gjp4-8570p:~ # service virtual_oss status virtual_oss is not running. root@momh167-gjp4-8570p:~ # -- Side note: today's upgrade of autoconf took me by surprise.
I'm pretty sure virtual_oss is running. How does your /var/run look? Any write protections here? Does "/var/run/virtual_oss/dsp.pid" exist? --HPS
Created attachment 218530 [details] Screenshot: .pid file present but the service is not running The .pid file is present but e.g. virtual_oss_ctl behaves as if the service is not running; and its status is 'not running'. I'll upgrade to r366424 (built, not yet installed).
The same with r366424 as with r366136. In both cases, forcing a downgrade allows the service to run effectively: pkg upgrade -f -r FreeBSD virtual_oss – still at 1.2.6_1 in the FreeBSD repository at the time of writing. Then, remake changes to two lines: nano /usr/local/etc/rc.d/virtual_oss – restart the service, things become audible and virtual_oss_ctl presents its connection diagram and so on.
Can you try to install virtual_oss from sources /usr/ports ?
Created attachment 218573 [details] Konsole output Not captured in this .txt file: editions to /usr/local/etc/rc.d/virtual_oss (immediately after the installation of 1.2.6_2, the same edition immediately after the downgrade to 1.2.6_1). -- (In reply to Hans Petter Selasky from comment #25) As far as I can tell: the effect of installation from /usr/ports is no different from the effect of installation from my poudriere repository. The .pid file is present but the status of the service is 'not running'. After the downgrade: running.
If you look at the version history of virtual_oss in ports, there hasn't been very many changes, so I find this very strange. Can you extract the two pkg's and do a full diff? --HPS
A commit references this bug: Author: hselasky Date: Tue Oct 6 20:58:10 UTC 2020 New revision: 551596 URL: https://svnweb.freebsd.org/changeset/ports/551596 Log: Fix path for virtual_oss when checking pidfile in rc.d file. PR: 250046 Approved by: pi (implicit) Changes: head/audio/virtual_oss/Makefile head/audio/virtual_oss/files/virtual_oss.in
OK, I think I found it. Sorry for taking so long. Try again with _3 . --HPS
root@momh167-gjp4-8570p:~ # service virtual_oss start /usr/local/etc/rc.d/virtual_oss: DEBUG: checkyesno: virtual_oss_enable is set to YES. /usr/local/etc/rc.d/virtual_oss: DEBUG: run_rc_command: start_precmd: virtual_oss_precmd /usr/local/etc/rc.d/virtual_oss: DEBUG: run_rc_command: doit: virtual_oss_start Starting Virtual OSS config dsp ...hw.snd.basename_clone: 1 -> 0 done root@momh167-gjp4-8570p:~ # service virtual_oss status /usr/local/etc/rc.d/virtual_oss: DEBUG: checkyesno: virtual_oss_enable is set to YES. virtual_oss is not running. root@momh167-gjp4-8570p:~ # pkg info -x virtual_oss virtual_oss-1.2.6_3 virtual_oss_ctl-1.2.1 root@momh167-gjp4-8570p:~ # pkg upgrade -f -r FreeBSD virtual_oss Updating FreeBSD repository catalogue... FreeBSD repository is up to date. All repositories are up to date. The following 1 package(s) will be affected (of 0 checked): Installed packages to be DOWNGRADED: virtual_oss: 1.2.6_3 -> 1.2.6_1 [FreeBSD] Number of packages to be downgraded: 1 51 KiB to be downloaded. Proceed with this action? [y/N]: y [1/1] Fetching virtual_oss-1.2.6_1.txz: 100% 51 KiB 52.7kB/s 00:01 Checking integrity... done (0 conflicting) [1/1] Downgrading virtual_oss from 1.2.6_3 to 1.2.6_1... [1/1] Extracting virtual_oss-1.2.6_1: 100% root@momh167-gjp4-8570p:~ # service virtual_oss status /usr/local/etc/rc.d/virtual_oss: DEBUG: checkyesno: virtual_oss_enable is set to YES. virtual_oss is running as pid 29521. root@momh167-gjp4-8570p:~ # -- Sorry!
Try again with _4 . --HPS
A commit references this bug: Author: hselasky Date: Wed Oct 7 07:10:57 UTC 2020 New revision: 551619 URL: https://svnweb.freebsd.org/changeset/ports/551619 Log: Fix rc.d status command for virtual_oss. PR: 250046 Approved by: pi (implicit) Changes: head/audio/virtual_oss/Makefile head/audio/virtual_oss/files/virtual_oss.in
Success! Incidentally (sorry if I'm overlooking something obvious in a manual page), is there a way for me to avoid the need to manually edit /usr/local/etc/rc.d/virtual_oss after each update to the port? ---- root@momh167-gjp4-8570p:~ # date ; uname -v ; uptime Thu Oct 8 17:54:35 BST 2020 FreeBSD 13.0-CURRENT #67 r366424: Sun Oct 4 19:54:32 BST 2020 root@momh167-gjp4-8570p:/usr/obj/usr/src/amd64.amd64/sys/GENERIC-NODEBUG 5:54PM up 8 mins, 5 users, load averages: 3.15, 1.56, 0.69 root@momh167-gjp4-8570p:~ # service virtual_oss status /usr/local/etc/rc.d/virtual_oss: DEBUG: checkyesno: virtual_oss_enable is set to YES. /usr/local/etc/rc.d/virtual_oss: DEBUG: run_rc_command: doit: virtual_oss_status virtual_oss is running as pid 6411 299. root@momh167-gjp4-8570p:~ # pkg query '%o %v %R' virtual_oss audio/virtual_oss 1.2.6_4 poudriere root@momh167-gjp4-8570p:~ # grep -A 11 'virtual_oss_default_args=' /usr/local/etc/rc.d/virtual_oss virtual_oss_default_args="\ -T /dev/sndstat \ -S \ -i 8 \ -C 2 -c 2 \ -r 48000 \ -b 24 \ -s 8.0ms \ -f /dev/dsp1 \ -c 2 \ -d dsp \ -t vdsp.ctl" root@momh167-gjp4-8570p:~ #
Just put something like this in /etc/rc.conf, and it will work: virtual_oss_dsp="\ -T /dev/sndstat \ -S \ -i 8 \ -C 2 -c 2 \ -r 48000 \ -b 24 \ -s 8.0ms \ -f /dev/dsp3 \ -c 2 \ -d vdsp \ -t dsp.ctl"
Thank you 👍