From owner-freebsd-multimedia@FreeBSD.ORG Sun Jul 10 10:13:52 2005 Return-Path: X-Original-To: freebsd-multimedia@freebsd.org Delivered-To: freebsd-multimedia@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AA0DC16A41C for ; Sun, 10 Jul 2005 10:13:52 +0000 (GMT) (envelope-from noackjr@alumni.rice.edu) Received: from smtp109.sbc.mail.mud.yahoo.com (smtp109.sbc.mail.mud.yahoo.com [68.142.198.208]) by mx1.FreeBSD.org (Postfix) with SMTP id 2C06043D45 for ; Sun, 10 Jul 2005 10:13:51 +0000 (GMT) (envelope-from noackjr@alumni.rice.edu) Received: (qmail 77295 invoked from network); 10 Jul 2005 10:13:51 -0000 Received: from unknown (HELO optimator.noacks.org) (noacks@swbell.net@70.240.213.247 with login) by smtp109.sbc.mail.mud.yahoo.com with SMTP; 10 Jul 2005 10:13:51 -0000 Received: from localhost (localhost [127.0.0.1]) by optimator.noacks.org (Postfix) with ESMTP id B9EC3612E; Sun, 10 Jul 2005 05:13:50 -0500 (CDT) Received: from optimator.noacks.org ([127.0.0.1]) by localhost (optimator.noacks.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 07453-04; Sun, 10 Jul 2005 05:13:47 -0500 (CDT) Received: from compgeek.noacks.org (compgeek [192.168.1.10]) by optimator.noacks.org (Postfix) with ESMTP id CD70060EB; Sun, 10 Jul 2005 05:13:47 -0500 (CDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) by compgeek.noacks.org (8.13.4/8.13.4) with ESMTP id j6AADkAX005664; Sun, 10 Jul 2005 05:13:47 -0500 (CDT) (envelope-from noackjr@alumni.rice.edu) Message-ID: <42D0F4D4.10700@alumni.rice.edu> Date: Sun, 10 Jul 2005 05:13:40 -0500 From: Jonathan Noack User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050428) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ariff Abdullah References: <42D02CA9.4080201@alumni.rice.edu> <20050710051523.0a67cd91.skywizard@MyBSD.org.my> In-Reply-To: <20050710051523.0a67cd91.skywizard@MyBSD.org.my> X-Enigmail-Version: 0.91.0.0 OpenPGP: id=991D8195; url=http://www.noacks.org/cert/noackjr.asc Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigB9887BADA41F076C833F1489" X-Virus-Scanned: amavisd-new at noacks.org Cc: freebsd-multimedia@freebsd.org, mat@cnd.mcgill.ca Subject: Re: Massive sound changes / fix (24/32bit pcm support, new sampling rate converter, various fixes) X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: noackjr@alumni.rice.edu List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jul 2005 10:13:52 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigB9887BADA41F076C833F1489 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 07/09/05 16:15, Ariff Abdullah wrote: > There are few LORs (during boot) with this much integrated es137x > (which I do believe false positives). Perhaps you can reproduce > it by enabling WITNESS? > > http://staff.mybsd.org.my/skywizard/FreeBSD/sound/LOR/es137x_lor.txt > (This is slightly outdated, some of it have bean dealt with) The eschan_setdir method is called with the channel lock held. We get the LOR when we grab the es lock in eschan_setdir. Looking through the code, eschan_setformat, eschan1370_setspeed, eschan1371_setspeed, eschan_trigger, and eschan_getptr are called with the channel lock held and also grab the es lock. Is there a path where we try to grab the channel lock while holding the es lock? Why yes, there are at least two such paths: eschan_init (sndbuf_alloc -> sndbuf_resize) and eschan_setblocksize (sndbuf_resize). So a deadlock is possible, but it seems unlikely. I'm not sure how to handle this. This is the same basic issue as is present with the via8233 (seen in your LOR directory). I also see this LOR when detaching: lock order reversal 1st 0xc23a2cc0 pcm0 (sound cdev) @ /usr/src/sys/modules/sound/sound/../../../dev/sound/pcm/sound.c:706 2nd 0xc0837760 sndstat (sndstat) @ /usr/src/sys/modules/sound/sound/../../../dev/sound/pcm/sndstat.c:256 KDB: stack backtrace: witness_checkorder(c0837760,9,c08330a8,100,c050c874) at witness_checkorder+0x3af _sx_xlock(c0837760,c08330a8,100,0,c234ca00) at _sx_xlock+0x5c sndstat_unregister(c2376e00,c25f4700,c08331a6,2c2,c2376e00) at sndstat_unregister+0x27 pcm_unregister(c2376e00,c06f75b0,c2376e00,f9771be8,c2376e00) at pcm_unregister+0x112 es_pci_detach(c2376e00,c2333850,c06f75b0,961,c08439c0) at es_pci_detach+0x17 device_detach(c2376e00,c08425f0,c2320640,1,c22fb000) at device_detach+0x8f devclass_delete_driver(c22fb000,c08439c0,0,0,c226edc0) at devclass_delete_driver+0xcb driver_module_handler(c226edc0,1,c08439ac) at driver_module_handler+0xd9 module_unload(c226edc0,0,1fb,c2274d00,3) at module_unload+0x66 linker_file_unload(c2274d00,0,c06c4f26,327,bfbfe890) at linker_file_unload+0x276 kern_kldunload(0,f9771d04,8,421,2) at kern_kldunload+0x8d syscall(3b,3b,3b,3,bfbfedf6) at syscall+0x13b Xint0x80_syscall() at Xint0x80_syscall+0x1f --- syscall (444, FreeBSD ELF32, kldunloadf), eip = 0x280c0e63, esp = 0xbfbfe88c, ebp = 0xbfbfecf8 --- -- Jonathan Noack | noackjr@alumni.rice.edu | OpenPGP: 0x991D8195 --------------enigB9887BADA41F076C833F1489 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (FreeBSD) iD8DBQFC0PTaUFz01pkdgZURArwqAKCPuzQ9s87rZEJ2XIFE7mGPdOABKgCfRLdf RMTq4zmHr6kNKAWao8iO89c= =1+pi -----END PGP SIGNATURE----- --------------enigB9887BADA41F076C833F1489--