Subject: port-i386/32485: OpenBSD 3.0 boot fails because of Azalia driver
To: None <port-i386-maintainer@netbsd.org, gnats-admin@netbsd.org,>
From: None <stlist@gmail.com>
List: netbsd-bugs
Date: 01/09/2006 16:20:00
>Number:         32485
>Category:       port-i386
>Synopsis:       OpenBSD 3.0 boot fails because of Azalia driver
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-i386-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jan 09 16:20:00 +0000 2006
>Originator:     Samuel Tran
>Release:        NetBSD-3.0
>Organization:
American Museum of Natural History
>Environment:
NetBSD 3.0_STABLE NetBSD 3.0_STABLE (GENERIC_LAPTOP) #0 Thu Jan 5 10:22:12 UTC 2006 build@works.netbsd.org:/home/builds/ab/netbsd-3/i386/2006010500002-obj/home/builds/ab/netbsd-3/src/sys/arch/i386/compile/GENERIC_LAPTOP i386
>Description:
Hardware: LENOVO Thinkpad Z60M
Sound Card: SoundMAX integrated digital HD Audio (Analog Devices)

The installation of NetBSD 3.0 (i386) itself went fine but after the reboot I got the following error message and was stucked in the db prompt:

[snip]
azalia0: playback: max channels=2
uvm_fault(0xc0825720, 0xc1c09000, 0, 1) -> 0xe
kernel: page fault trap, code=0
Stopped in pid 0.1 (swapper) at netbsd:strlcpy+0x1c     movb    0(%edx),%al
db>

A backtrace gave me:
db> bt
strlcpy(c1c1da10,c1c098a0,10,c1c075a0,1) at netbsd:strlcpy+0x1c
azalia_mixer_init(c1be9054,c1be9054,1f,0,c07cdac0) at
netbsd:azalia_mixer_init+0xd72
azalia_codec_init(c1be9054,c0540598,0,0,0) at netbsd:azalia_codec_init+0x26e
azalia_attach_intr(c1be9000,0,2e9c,0,c083cea0) at
netbasd:azalia_attach_intr+0xa5
config_process_deferred(c083f4a4,0,c090df78,c0396ccb,0) at
netbsd:config_process_deferred+0x4c
configure(0,0,0,0,0) at netbsd:configure+0x68
main(0,0,0,0,0) at netbsd:main+0x2d4

I tried the current kernel (ftp://ftp.netbsd.org/pub/NetBSD-daily/netbsd-3/200601050000Z/i386/binary/kernel/netbsd-GENERIC_LAPTOP.gz).
Same problem.

I tried a modified kernel from Stéphane Witzmann. This is just a current kernel with a printf before each strlcpy in azalia_mixer_init, that will help identify which one fails. It will print "AZALIA DEBUG n" with n between 1 and 16. When I boot this kernel I get the following AZALIA DEBUG messages:

AZALIA DEBUG 9
AZALIA DEBUG 10
AZALIA DEBUG 4
AZALIA DEBUG 4
AZALIA DEBUG 4
AZALIA DEBUG 4
AZALIA DEBUG 4
AZALIA DEBUG 4
AZALIA DEBUG 4
AZALIA DEBUG 4
AZALIA DEBUG 5
AZALIA DEBUG 6
AZALIA DEBUG 5
AZALIA DEBUG 6
AZALIA DEBUG 5
AZALIA DEBUG 6
AZALIA DEBUG 5
AZALIA DEBUG 6
AZALIA DEBUG 4
AZALIA DEBUG 4
AZALIA DEBUG 4

When I disable the Azalia driver at boot, the boot is successful.
>How-To-Repeat:
Install NetBSD-3.0 on LENOVO Thinkpad Z60M.
>Fix:
None.