File this bug, or not?

2021-01-18 Thread Eric Zylstra
Misc,

I’ve set up a 6 drive RAID-5.  Just for the experience of degrading and 
rebuilding the RAID, I popped a drive out.  Within a few seconds the machine 
kerneled and dropped into ddb.  Is there any chance this would be expected 
considering the machine’s SATA is not hot-swappable?

I’m looking into setting up a serial connection so I can capture the debut 
output (I already have photos of the traces for all 8 CPU, but would like to 
give serial output instead).  I would not file a report if this behavior falls 
into “not great, but expected”.

Thanks,

EZ



Re: File this bug, or not?

2021-01-18 Thread Jordan Geoghegan



On 1/18/21 2:47 PM, Eric Zylstra wrote:
> Misc,
>
> I’ve set up a 6 drive RAID-5.  Just for the experience of degrading and 
> rebuilding the RAID, I popped a drive out.  Within a few seconds the machine 
> kerneled and dropped into ddb.  Is there any chance this would be expected 
> considering the machine’s SATA is not hot-swappable?
>
> I’m looking into setting up a serial connection so I can capture the debut 
> output (I already have photos of the traces for all 8 CPU, but would like to 
> give serial output instead).  I would not file a report if this behavior 
> falls into “not great, but expected”.
>
> Thanks,
>
> EZ
>

Just thought I'd chip in here too FWIW:

I've never successfully hot swapped a drive with OpenBSD before. I have 
hardware that does it fine on Linux, but fails on OpenBSD. I haven't caused the 
kernel to panic when pulling a drive, but the OS fails to detect any newly 
attached SATA or SAS drives. It's certainly caused some frustration when trying 
to rebuild a RAID array on a production machine. Maybe I just have wonky 
hardware, but I've tried this on a number of releases, on several different 
pieces of hardware, on several different arches. I have no solution to offer, 
just thought I'd share my experience with hot swapping drives on OpenBSD.

Regards,

Jordan



Usermod -G failure without error

2021-01-18 Thread Kevin Chadwick
When I run the following commands, the elansyssftp group isn't populated. Yet
using a differently named group seems to work. I seem to have been able to do
so, on two different systems.

useradd -m -s /sbin/nologin -p `cat /etc/ssh/ssh_host_ed25519_key.pub |
/usr/bin/encrypt -b a` admin
groupadd elansyssftp
usermod -G elansyssftp admin

Is this a bug, can anyone reproduce it or clear up my confusion?

Thanks, Kc



pkg_add multiple package install weird output

2021-01-18 Thread Mihai Popescu
Hello,

I use to run pkg_add with multiple package names, something like:

pkg_add -vV gimp libreoffice geeqie audacity inkscape vlc mupdf

I am sure gimp is ahead of vlc in the command line. I saw something strange
in output:
[ ... ]
gimp-2.10.22p1:aalib-1.4p7: 63/78
gimp-2.10.22p1:OpenEXR-2.5.4: 64/78
gimp-2.10.22p1:py3-cairo-1.20.0p0: 65/81
gimp-2.10.22p1:py3-gobject3-3.38.0p1: 66/81
gimp-2.10.22p1:exiv2-0.27.2v0: 67/81
gimp-2.10.22p1:libgexiv2-0.12.1p2: 68/81
gimp-2.10.22p1: 69/81
^ < gimp finish
 [ ... ]
inkscape-1.0.1p0:aspell-0.60.6.1p10: 151/160
inkscape-1.0.1p0:liberation-fonts-2.00.1p1: 152/160
inkscape-1.0.1p0:potrace-1.16: 153/160
inkscape-1.0.1p0:double-conversion-3.1.5: 154/160
inkscape-1.0.1p0:gcc-libs-8.4.0p1: 155/164
inkscape-1.0.1p0:blas-3.8.0p0: 156/164
inkscape-1.0.1p0:lapack-3.8.0p1: 157/164
inkscape-1.0.1p0:cblas-1.0p7: 158/164
inkscape-1.0.1p0:py3-numpy-1.16.5p1: 159/164
inkscape-1.0.1p0: 160/164
vlc-3.0.11.1p0:libcddb-1.3.2p0: 161/184
vlc-3.0.11.1p0:sdl-1.2.15p10: 162/184
vlc-3.0.11.1p0:libtar-1.2.20: 163/184
vlc-3.0.11.1p0:libnfs-4.0.0: 164/184
vlc-3.0.11.1p0:libebml-1.4.0: 165/184
vlc-3.0.11.1p0:libdvdcss-1.4.2p1: 166/185
vlc-3.0.11.1p0:libdvdread-6.1.1: 167/185
vlc-3.0.11.1p0:dbus-glib-0.110p1v0: 168/189
vlc-3.0.11.1p0:geoclue-0.12.99p9: 169/189
vlc-3.0.11.1p0:libxkbcommon-1.0.3: 170/189
vlc-3.0.11.1p0:pcre2-10.35: 171/189
gimp-2.10.22p1:iodbc-3.52.12p1: 172/189
^
vlc-3.0.11.1p0:qtbase-5.13.2p0: 172/189
vlc-3.0.11.1p0:qtsvg-5.13.2: 173/189
vlc-3.0.11.1p0:libsmb2-3.0.0: 174/189
vlc-3.0.11.1p0:libdvdnav-6.1.0v0: 175/189
vlc-3.0.11.1p0:libplacebo-2.72.2: 176/189
vlc-3.0.11.1p0:qtx11extras-5.13.2: 177/189
vlc-3.0.11.1p0:libdvbpsi-1.3.3: 178/189
vlc-3.0.11.1p0:libb2-0.98.1v0: 179/190
vlc-3.0.11.1p0:libarchive-3.5.1: 180/190
vlc-3.0.11.1p0:sdl-image-1.2.12p4: 181/190
vlc-3.0.11.1p0:libbluray-1.2.1: 182/190
vlc-3.0.11.1p0:libidn-1.36: 183/190
vlc-3.0.11.1p0:protobuf-3.13.0: 184/190
vlc-3.0.11.1p0:taglib-1.11.1p3: 185/190
vlc-3.0.11.1p0:libmatroska-1.6.2: 186/190
vlc-3.0.11.1p0: 187/190
[ ... ]

Long after gimp install finish, there is an entry about gimp in the middle
of vlc install. Is this fine?


Re: sound question

2021-01-18 Thread Alexandre Ratchov
On Mon, Jan 18, 2021 at 12:00:40PM +0100, Peter J. Philipp wrote:
> On Mon, Jan 18, 2021 at 11:29:54AM +0100, Alexandre Ratchov wrote:
> > On Mon, Jan 18, 2021 at 10:16:53AM +0100, Peter J. Philipp wrote:
> > > Hi,
> > > 
> > > I recently switched my desktop workstation to a raspberry pi 4B with 8 GB 
> > > RAM.
> > > Since the sound there doesn't work yet, I got a USB sound card, the make 
> > > of
> > > the sound card is best read from usbdevs -v:
> > > 
> > > addr 08: 0ccd:00b1 TerraTec Electronic GmbH, Aureon 7.1 USB
> > >  full speed, power 500 mA, config 1, rev 0.10
> > >  driver: uaudio0
> > >  driver: ugen0
> > > 
> > > Like the other AUREON card in the usb drivers I put this in usb quirks to 
> > > not
> > > attach as a uhiddev (not sure if that was the right thing to do?).
> > > 
> > > Now to my real question:  mplayer sounds horrible, but iridium sound from 
> > > youtube sounds OK.  There is a lot of static interference when I play with
> > > mplayer.  So what is it doing different than iridium?  I tried messing 
> > > with
> > > audioctl buffer sizes and nblocks but I don't really know what I'm doing 
> > > here,
> > > so I'm writing to the list.  The sound did not improve when I messed with 
> > > the
> > > buffers.
> > > 
> > 
> > Everything looks OK in dmesg. Try to run sndiod in the foreground, ex:
> > 
> > doas sndiod -ddd -a on
> > 
> > and see what happens while mplayer sounds bad. Without stopping
> > mplayer, run audioctl multiple times and see if play.errors or
> > record.errors counters increase continuously.
> > 
> 
> Hmmm this is elusive.  My -current is from December 26th.  When I put the
> sndiod in -ddd -a on mode everything started working well.  Could it be that
> all it needs is a restart after a reboot?  I can crontab that to be 5 minutes 
> after reboot...

The next time it fails, try to stop and start playback to see if this
helps. My bet is that an usb transfer fails (heavy load may cause
this) and the device doesn't recover properly.

> Other than that my sndiod config looks like this in /etc/rc.conf.local:
> 
> sndiod_flags="-f rsnd/0 -f rsnd/1"
> 
> Odd stuff, is the -a on important?  

No, "-a on" is only to force sndiod to keep the device open (or exit
if it can't), it's useful for testing to be sure another process
doesn't grab the device.



Re: sound question

2021-01-18 Thread Peter J. Philipp
On Mon, Jan 18, 2021 at 11:29:54AM +0100, Alexandre Ratchov wrote:
> On Mon, Jan 18, 2021 at 10:16:53AM +0100, Peter J. Philipp wrote:
> > Hi,
> > 
> > I recently switched my desktop workstation to a raspberry pi 4B with 8 GB 
> > RAM.
> > Since the sound there doesn't work yet, I got a USB sound card, the make of
> > the sound card is best read from usbdevs -v:
> > 
> > addr 08: 0ccd:00b1 TerraTec Electronic GmbH, Aureon 7.1 USB
> >  full speed, power 500 mA, config 1, rev 0.10
> >  driver: uaudio0
> >  driver: ugen0
> > 
> > Like the other AUREON card in the usb drivers I put this in usb quirks to 
> > not
> > attach as a uhiddev (not sure if that was the right thing to do?).
> > 
> > Now to my real question:  mplayer sounds horrible, but iridium sound from 
> > youtube sounds OK.  There is a lot of static interference when I play with
> > mplayer.  So what is it doing different than iridium?  I tried messing with
> > audioctl buffer sizes and nblocks but I don't really know what I'm doing 
> > here,
> > so I'm writing to the list.  The sound did not improve when I messed with 
> > the
> > buffers.
> > 
> 
> Everything looks OK in dmesg. Try to run sndiod in the foreground, ex:
> 
> doas sndiod -ddd -a on
> 
> and see what happens while mplayer sounds bad. Without stopping
> mplayer, run audioctl multiple times and see if play.errors or
> record.errors counters increase continuously.
> 

Hmmm this is elusive.  My -current is from December 26th.  When I put the
sndiod in -ddd -a on mode everything started working well.  Could it be that
all it needs is a restart after a reboot?  I can crontab that to be 5 minutes 
after reboot...

Other than that my sndiod config looks like this in /etc/rc.conf.local:

sndiod_flags="-f rsnd/0 -f rsnd/1"

Odd stuff, is the -a on important?  

Thank you Alexandre!

Best Regards,

-peter



Re: sound question

2021-01-18 Thread Alexandre Ratchov
On Mon, Jan 18, 2021 at 10:16:53AM +0100, Peter J. Philipp wrote:
> Hi,
> 
> I recently switched my desktop workstation to a raspberry pi 4B with 8 GB RAM.
> Since the sound there doesn't work yet, I got a USB sound card, the make of
> the sound card is best read from usbdevs -v:
> 
> addr 08: 0ccd:00b1 TerraTec Electronic GmbH, Aureon 7.1 USB
>  full speed, power 500 mA, config 1, rev 0.10
>  driver: uaudio0
>  driver: ugen0
> 
> Like the other AUREON card in the usb drivers I put this in usb quirks to not
> attach as a uhiddev (not sure if that was the right thing to do?).
> 
> Now to my real question:  mplayer sounds horrible, but iridium sound from 
> youtube sounds OK.  There is a lot of static interference when I play with
> mplayer.  So what is it doing different than iridium?  I tried messing with
> audioctl buffer sizes and nblocks but I don't really know what I'm doing here,
> so I'm writing to the list.  The sound did not improve when I messed with the
> buffers.
> 

Everything looks OK in dmesg. Try to run sndiod in the foreground, ex:

doas sndiod -ddd -a on

and see what happens while mplayer sounds bad. Without stopping
mplayer, run audioctl multiple times and see if play.errors or
record.errors counters increase continuously.



Re: auto-boot

2021-01-18 Thread Bastien Durel
Le samedi 16 janvier 2021 à 12:49 +0100, Marcus MERIGHI a écrit :
> bast...@durel.org (Bastien Durel), 2021.01.14 (Thu) 18:07 (CET):
> > Le jeudi 14 janvier 2021 à 16:59 +0100, Marcus MERIGHI a écrit :
> > > bast...@durel.org (Bastien Durel), 2021.01.14 (Thu) 16:05 (CET):
> > > > Le jeudi 14 janvier 2021 à 15:47 +0100, Marcus MERIGHI a
> > > > écrit :
> > > > > bast...@durel.org (Bastien Durel), 2021.01.14 (Thu) 10:20
> > > > > (CET):
> > > > > > I have a router connected via a serial port to another
> > > > > > machine
> > > > > > (which
> > > > > > is usually powered off), wich fails to boot until I connect
> > > > > > and
> > > > > > validate the boot> prompt
> > > > > > 
> > > > > > I configured my boot.conf as it follows :
> > > > > > 
> > > > > > # cat
> > > > > > /etc/boot.conf 
> > > > > > 
> > > > > > set timeout 10
> > > > > > set tty com0
> > > > > 
> > > > > I usually have 
> > > > > 
> > > > >     stty com0 115200
> > > > >     set tty com0
> > > > >     set timeout 2
> > > > > 
> > > > > and the machines boot automagically...
> > > > > 
> > > > > Marcus
> > > > > 
> > > > Actually, it looks like the automagic boot depends on the
> > > > status of
> > > > the
> > > > attached computer : when it runs, the router boots
> > > > automagically,
> > > > and
> > > > when it does not, then the boot waits until I press enter
> > > > (after
> > > > booting it, obviously)
> > > 
> > > Ah, I failed on getting what you meant!
> > > 
> > > Emitting wild guesses now... As soon as the boot> prompt receives
> > > input,
> > > it cancels the timout counter (and doesn't auto-boot). Could it
> > > be
> > > that
> > > your non-auto-booting machine receives something that looks like
> > > input
> > > to the boot> prompt? Can you test with the serial cable detached?
> > > 
> > 
> > Done that; that's very strange : the router did not auto-boot, but
> > did
> > as soon as I plugged-in the serial cable in (I left minicom running
> > on
> > the other box) (or maybe after a few seconds, I did not checked in
> > real
> > time)
> 
> so you have ruled out the second box, good!
> 
> Things I'd try... 
> 
>     - any stray empty lines in /etc/boot.conf?
>   I'm not saying these would cause any harm, but I'd try
>     - add the speed setting ("stty com0 115200")
>     - move "set timeout X" to the end
> 
> good luck! and please report back if you solve this puzzle!
> 
> Marcus
> 
Hello,

I set boot.conf to this :

# cat -e /etc/boot.conf 
stty com0 115200$
set tty com0$
set timeout 5$
# 

But the router does not boot without beeing connected to a powered-up
machine :(

-- 
Bastien




sound question

2021-01-18 Thread Peter J. Philipp
Hi,

I recently switched my desktop workstation to a raspberry pi 4B with 8 GB RAM.
Since the sound there doesn't work yet, I got a USB sound card, the make of
the sound card is best read from usbdevs -v:

addr 08: 0ccd:00b1 TerraTec Electronic GmbH, Aureon 7.1 USB
 full speed, power 500 mA, config 1, rev 0.10
 driver: uaudio0
 driver: ugen0

Like the other AUREON card in the usb drivers I put this in usb quirks to not
attach as a uhiddev (not sure if that was the right thing to do?).

Now to my real question:  mplayer sounds horrible, but iridium sound from 
youtube sounds OK.  There is a lot of static interference when I play with
mplayer.  So what is it doing different than iridium?  I tried messing with
audioctl buffer sizes and nblocks but I don't really know what I'm doing here,
so I'm writing to the list.  The sound did not improve when I messed with the
buffers.

Here is the output of mplayer when I play a song:

Playing [censored]
libavformat version 58.45.100 (external)
libavformat file format detected.
[lavf] stream 0: audio (flac), -aid 0
Load subtitles in ./
==
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
libavcodec version 58.91.100 (external)
AUDIO: 44100 Hz, 2 ch, s16le, 0.0 kbit/0.00% (ratio: 0->176400)
Selected audio codec: [ffflac] afm: ffmpeg (FFmpeg FLAC audio)
==
AO: [sndio] 44100Hz 2ch s16le (2 bytes per sample)
Video: no video
Starting playback...
A:   1.3 (01.2) of 164.5 (02:44.5)  1.0% 

Immediately I heard static, at the time this was my audioctl output:

root@neptune# audioctl
name=uaudio0
mode=
pause=1
active=0
nblks=16
blksz=480
rate=48000
encoding=s16le
play.channels=2
play.bytes=0
play.errors=0
record.channels=2
record.bytes=0
record.errors=0

This is my dmesg:

OpenBSD 6.8 (GENERIC.MP) #1: Sun Jan 17 21:19:32 CET 2021
p...@neptune.centroid.eu:/sys/arch/arm64/compile/GENERIC.MP
real mem  = 8378036224 (7989MB)
avail mem = 8088367104 (7713MB)
random: good seed from bootblocks
mainbus0 at root: ACPI
psci0 at mainbus0: PSCI 1.1, SMCCC 1.2
cpu0 at mainbus0 mpidr 0: ARM Cortex-A72 r0p3
cpu0: 48KB 64b/line 3-way L1 PIPT I-cache, 32KB 64b/line 2-way L1 D-cache
cpu0: 1024KB 64b/line 16-way L2 cache
cpu1 at mainbus0 mpidr 1: ARM Cortex-A72 r0p3
cpu1: 48KB 64b/line 3-way L1 PIPT I-cache, 32KB 64b/line 2-way L1 D-cache
cpu1: 1024KB 64b/line 16-way L2 cache
cpu2 at mainbus0 mpidr 2: ARM Cortex-A72 r0p3
cpu2: 48KB 64b/line 3-way L1 PIPT I-cache, 32KB 64b/line 2-way L1 D-cache
cpu2: 1024KB 64b/line 16-way L2 cache
cpu3 at mainbus0 mpidr 3: ARM Cortex-A72 r0p3
cpu3: 48KB 64b/line 3-way L1 PIPT I-cache, 32KB 64b/line 2-way L1 D-cache
cpu3: 1024KB 64b/line 16-way L2 cache
efi0 at mainbus0: UEFI 2.7
efi0: https://github.com/pftf/RPi4 rev 0x1
smbios0 at efi0: SMBIOS 3.3.0
smbios0: vendor https://github.com/pftf/RPi4 version "UEFI Firmware v1.21" date 
11/13/2020
smbios0: Raspberry Pi Foundation Raspberry Pi 4 Model B
apm0 at mainbus0
ampintc0 at mainbus0 nirq 256, ncpu 4 ipi: 0, 1: "interrupt-controller"
agtimer0 at mainbus0: tick rate 54000 KHz
acpi0 at mainbus0: ACPI 6.3
acpi0: sleep states
acpi0: tables DSDT FACP CSRT DBG2 GTDT IORT APIC PPTT BGRT
acpi0: wakeup devices
"BCM2849" at acpi0 not configured
"BCM2835" at acpi0 not configured
"BCM2854" at acpi0 not configured
"ACPI0004" at acpi0 not configured
xhci0 at acpi0 XHC0 addr 0x6/0x1000 irq 175, xHCI 1.0
usb0 at xhci0: USB revision 3.0
uhub0 at usb0 configuration 1 interface 0 "Generic xHCI root hub" rev 3.00/1.00 
addr 1
"ACPI0007" at acpi0 not configured
"ACPI0007" at acpi0 not configured
"ACPI0007" at acpi0 not configured
"ACPI0007" at acpi0 not configured
"ACPI0004" at acpi0 not configured
"BCM2848" at acpi0 not configured
"BCM2850" at acpi0 not configured
"BCM2856" at acpi0 not configured
"BCM2845" at acpi0 not configured
"BCM2841" at acpi0 not configured
"BCM2841" at acpi0 not configured
"BCM2838" at acpi0 not configured
"BCM2839" at acpi0 not configured
"BCM2844" at acpi0 not configured
pluart0 at acpi0 URT0 addr 0xfe201000/0x1000 irq 153
"BCM2836" at acpi0 not configured
"BCM2EA6" at acpi0 not configured
"MSFT8000" at acpi0 not configured
"BCM2847" at acpi0 not configured
"BCM2855" at acpi0 not configured
bse0 at acpi0 ETH0 addr 0xfd58/0x1 irq 189: address dc:a6:32:cc:db:a7
brgphy0 at bse0 phy 1: BCM54210E 10/100/1000baseT PHY, rev. 2
"PNP0C06" at acpi0 not configured
acpitz at acpi0 not configured
simplefb0 at mainbus0: 1920x1080, 32bpp
wsdisplay0 at simplefb0 mux 1: console (std, vt100 emulation)
wsdisplay0: screen 1-5 added (std, vt100 emulation)
uhub1 at uhub0 port 1 configuration 1 interface 0 "VIA Labs USB2.0 Hub" rev 2.10
/4.21 addr 2
uhidev0 at uhub1 port 1 configuration 1 interface 0 "American Power Conversion B
ack-UPS CS 650 FW:817.v9.I USB FW:v9" rev 1.10/0.06 addr 3
uhidev0: iclass 3/0, 98 report ids
upd0 at uh