Hello,

>Synopsis:      mpd terminates upon updating the database on i386
>Category:      audio/mpd
>Environment:
        System      : OpenBSD 6.2
        Details     : OpenBSD 6.2 (GENERIC) #2: Sun Dec 10 20:46:13 CET
2017
[email protected]:/usr/src/sys/arch/i386/compile/GENERIC

        Architecture: OpenBSD.i386
        Machine     : i386

>Description:

Some days ago, I wanted to reuse an old thin-client[1] as a
network-equipped audio-book player, but mpd seems to crash upon
updating the database. My device is a mid-range revision of these
devices, having a 800 MHz VIA C7 and 1GB RAM.

The installation is fairly generic, basically an updated stable 6.2,
using openup. I've installed these[2] packages and configured my locale
in .profile.

[1] http://www.parkytowers.me.uk/thin/wyse/vx0/index.shtml
[2] vim, python 2 and 3, mpd, links+ and samba. 

The version of mpd is from 6.2 stable packages: 0.20.10

mpd exists in the following way:

$ mpd --no-daemon --verbose --stdout 
config_file: loading file /etc/mpd.conf
libsamplerate: libsamplerate converter 'Fastest Sinc Interpolator'
vorbis: Xiph.Org libVorbis 1.3.5
opus: libopus 1.2.1
sndfile: libsndfile-1.0.27
simple_db: reading DB
exception: Database corrupted
curl: version 7.55.1
curl: with LibreSSL/2.6.3
update: spawned thread for update job id 1
state_file: Loading state file /daten/.mpd/mpdstate
update: starting
terminating with uncaught exception of type std::__1::system_error:
Failed to open /daten/musik/openbsd/.mpdignore: No such file or
directory Abort trap

I've investigated a bit and it seems that if mpd encounters any (sub-)
directory without a ".mpdignore" file, it exits. The file can be empty,
but it has to be there.  If I create it manually, this directory is
searched and files can be played.

When mpd exists, the client says, that the server has closed the
connection and is not timed out. If I copy the database from another
machine, the files play fine until an update is performed.

What did I do to circumvent the problem (not in chronological order)?

- build the package from ports, using binary dependencies
- modified port (updated to 0.20.15), binary dependencies
- tried the openbsd-snapshot (update) from Jan. 01 (binary package)
- different audio codecs (mp3 / opus)
- running mpd as root to eliminate permission problems
- chmod to 777
- different client (ncmpc / mpc)
- enable / disable symlink behavior in mpd.conf
- enable / disable usage of metadata in mpd.conf
- recreating the setup (i386) in VBOX to eliminate flakey hardware

Out of blank despair I recreated the original setup as a amd64 machine
in VBOX and to my surprise everything worked like a charm. 

I specifically looked for .mpdignore files and found none. I suspected
that mpd creates these files itself, but it didn't. I can't seem to
recall ever encountering them in 11 years of using mpd, however mostly
on Linux.

I did produce a ktrace file, but I didn't want to include a 1.3
megabyte file without asking.

>How-To-Repeat:

Install mpd and then update the database. If no database is present,
you might have to create an empty database file. A simple "touch
mpd.db" will suffice.


>Fix:

Temporary fix: put a empty .mpdignore file in every single directory
Permanent fix: no idea

dmesg:
OpenBSD 6.2 (GENERIC) #2: Sun Dec 10 20:46:13 CET 2017
    [email protected]:/usr/src/sys/arch/i386/compile/GENERIC
cpu0: VIA Esther processor 800MHz ("CentaurHauls" 686-class) 801 MHz
cpu0: 
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,CMOV,PAT,CFLUSH,ACPI,MMX,FXSR,SSE,SSE2,TM,PBE,NXE,SSE3,EST,TM2
real mem  = 1006059520 (959MB)
avail mem = 972754944 (927MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: date 07/16/09, BIOS32 rev. 0 @ 0xf9360, SMBIOS rev. 2.3 @ 
0xf0800 (28 entries)
bios0: vendor VIA Technologies, INC. version "Rev: 1.19" date 07/16/2009
bios0: WYSE V CLASS L
acpi0 at bios0: rev 0
acpi0: sleep states S0 S1 S4 S5
acpi0: tables DSDT FACP APIC
acpi0: wakeup devices SLPB(S5) PCI0(S5) USB3(S3) USB4(S3) USB5(S3) USB6(S3) 
USB7(S3) LAN0(S5) AC97(S5)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: RNG AES AES-CTR SHA1 SHA256 RSA
cpu0: apic clock running at 100MHz
ioapic0 at mainbus0: apid 2 pa 0xfec00000, version 3, 24 pins
acpiprt0 at acpi0: bus 0 (PCI0)
acpicpu0 at acpi0: C1(@1 halt!), PSS
acpibtn0 at acpi0: PWRB
acpibtn1 at acpi0: SLPB
"PNP0400" at acpi0 not configured
bios0: ROM list: 0xc0000/0xe000 0xd0000/0x8000! 0xd8000/0x2000
cpu0: Enhanced SpeedStep 801 MHz: speeds: 800, 400 MHz
pci0 at mainbus0 bus 0: configuration mode 1 (bios)
pchb0 at pci0 dev 0 function 0 "VIA CN700 Host" rev 0x00
viaagp0 at pchb0: v3
agp0 at viaagp0: aperture at 0xe8000000, size 0x10000000
pchb1 at pci0 dev 0 function 1 "VIA CN700 Host" rev 0x00
pchb2 at pci0 dev 0 function 2 "VIA CN700 Host" rev 0x00
pchb3 at pci0 dev 0 function 3 "VIA PT890 Host" rev 0x00
pchb4 at pci0 dev 0 function 4 "VIA CN700 Host" rev 0x00
pchb5 at pci0 dev 0 function 7 "VIA CN700 Host" rev 0x00
ppb0 at pci0 dev 1 function 0 "VIA VT8377 AGP" rev 0x00
pci1 at ppb0 bus 1
vga1 at pci1 dev 0 function 0 "VIA S3 Unichrome PRO IGP" rev 0x01
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
cbb0 at pci0 dev 10 function 0 "Ricoh 5C475 CardBus" rev 0x81: apic 2 int 17
vr0 at pci0 dev 11 function 0 "VIA RhineII-2" rev 0x8d: apic 2 int 19, address 
00:80:64:60:1c:43
ukphy0 at vr0 phy 1: Generic IEEE 802.3u media interface, rev. 13: OUI 
0x004063, model 0x0034
pciide0 at pci0 dev 15 function 0 "VIA VT82C571 IDE" rev 0x06: ATA133, channel 
0 configured to compatibility, channel 1 configured to compatibility
wd0 at pciide0 channel 0 drive 0: <HTS424040M9AT00>
wd0: 16-sector PIO, LBA48, 38154MB, 78140160 sectors
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 5
pciide0: channel 1 disabled (no drives)
uhci0 at pci0 dev 16 function 0 "VIA VT83C572 USB" rev 0x81: apic 2 int 21
uhci1 at pci0 dev 16 function 1 "VIA VT83C572 USB" rev 0x81: apic 2 int 21
uhci2 at pci0 dev 16 function 2 "VIA VT83C572 USB" rev 0x81: apic 2 int 21
uhci3 at pci0 dev 16 function 3 "VIA VT83C572 USB" rev 0x81: apic 2 int 21
ehci0 at pci0 dev 16 function 4 "VIA VT6202 USB" rev 0x86: apic 2 int 21
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 configuration 1 interface 0 "VIA EHCI root hub" rev 2.00/1.00 
addr 1
viapm0 at pci0 dev 17 function 0 "VIA VT8237 ISA" rev 0x00: SMI
iic0 at viapm0
spdmem0 at iic0 addr 0x50: 1GB DDR2 SDRAM non-parity PC2-5300CL5 SO-DIMM
auvia0 at pci0 dev 17 function 5 "VIA VT8233 AC97" rev 0x60: apic 2 int 22
ac97: codec id 0x56494123 (VIA Technologies <23>)
ac97: codec features 18 bit DAC, 18 bit ADC, No 3D Stereo
audio0 at auvia0
cardslot0 at cbb0 slot 0 flags 0
cardbus0 at cardslot0: bus 2 device 0 cacheline 0x0, lattimer 0x20
pcmcia0 at cardslot0
usb1 at uhci0: USB revision 1.0
uhub1 at usb1 configuration 1 interface 0 "VIA UHCI root hub" rev 1.00/1.00 
addr 1
usb2 at uhci1: USB revision 1.0
uhub2 at usb2 configuration 1 interface 0 "VIA UHCI root hub" rev 1.00/1.00 
addr 1
usb3 at uhci2: USB revision 1.0
uhub3 at usb3 configuration 1 interface 0 "VIA UHCI root hub" rev 1.00/1.00 
addr 1
usb4 at uhci3: USB revision 1.0
uhub4 at usb4 configuration 1 interface 0 "VIA UHCI root hub" rev 1.00/1.00 
addr 1
isa0 at mainbus0
isadma0 at isa0
com1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo
pckbc0 at isa0 port 0x60/5 irq 1 irq 12
pckbd0 at pckbc0 (kbd slot)
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
lpt0 at isa0 port 0x378/4 irq 7
viasio0 at isa0 port 0x2e/2: VT1211 rev 0x02, HM, WDG not activated
npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
urtwn0 at uhub0 port 1 configuration 1 interface 0 "802.11n USB WLAN" rev 
2.00/2.00 addr 2
urtwn0: MAC/BB RTL8192CU, RF 6052 2T2R, address f4:f2:6d:08:21:db
umass0 at uhub0 port 8 configuration 1 interface 0 "VIA Technologies Inc. USB 
2.0 Card Reader" rev 2.00/0.04 addr 3
umass0: using SCSI over Bulk-Only
scsibus1 at umass0: 2 targets, initiator 0
sd0 at scsibus1 targ 1 lun 0: <VIA-P, VT6205-DevH, 4.22> SCSI2 0/direct 
removable serial.040d6205000000000001
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
scsibus3 at softraid0: 256 targets
root on wd0a (b424d9b7518265aa.a) swap on wd0b dump on wd0b
wd0a: aborted command, interface CRC error reading fsbn 128 of 128-143 (wd0 bn 
192; cn 0 tn 3 sn 3), retrying
wd0: transfer error, downgrading to Ultra-DMA mode 4
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 4
wd0a: aborted command, interface CRC error reading fsbn 128 of 128-143 (wd0 bn 
192; cn 0 tn 3 sn 3), retrying
wd0: soft error (corrected)
wd0: transfer error, downgrading to Ultra-DMA mode 3
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 3
wd0a: aborted command, interface CRC error writing fsbn 63857664 of 
63857664-63857695 (wd0 bn 63857728; cn 3974 tn 244 sn 46), retrying
wd0: soft error (corrected)

usbdevs:
Controller /dev/usb0:
addr 1: high speed, self powered, config 1, EHCI root hub(0x0000), VIA(0x1106), 
rev 1.00
 port 1 addr 2: high speed, power 500 mA, config 1, USB WLAN(0x8178), 
802.11n(0x0bda), rev 2.00, iSerialNumber 00e04c000001
 port 2 powered
 port 3 powered
 port 4 powered
 port 5 powered
 port 6 powered
 port 7 powered
 port 8 addr 3: high speed, power 500 mA, config 1, USB 2.0 Card 
Reader(0x6205), VIA Technologies Inc.(0x040d), rev 0.04, iSerialNumber 
000000000001
Controller /dev/usb1:
addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), VIA(0x1106), 
rev 1.00
 port 1 powered
 port 2 powered
Controller /dev/usb2:
addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), VIA(0x1106), 
rev 1.00
 port 1 powered
 port 2 powered
Controller /dev/usb3:
addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), VIA(0x1106), 
rev 1.00
 port 1 powered
 port 2 powered
Controller /dev/usb4:
addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), VIA(0x1106), 
rev 1.00
 port 1 powered
 port 2 powered

-- 
greetings,

Florian Viehweger

Reply via email to