Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Feb 2016 02:33:11 +0000 (UTC)
From:      Greg Quinlan <gwq_uk@yahoo.com>
To:        Hans Petter Selasky <hps@selasky.org>,  "freebsd-current@freebsd.org" <freebsd-current@freebsd.org>
Subject:   Re: Open Sound System - OSS "soundon" command causes KERNEL PANIC FreeBSD-11
Message-ID:  <693932216.4173309.1455503591733.JavaMail.yahoo@mail.yahoo.com>
In-Reply-To: <56BEE187.80702@selasky.org>
References:  <56BEE187.80702@selasky.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Thanks.=20

I am not going to use OSS anymore...=C2=A0=20

I am going to stick to stick with a custom kernel

device sounddevice snd_hda=C2=A0From: Hans Petter Selasky <hps@selasky.org>
 To: Greg Quinlan <gwq_uk@yahoo.com>; "freebsd-current@freebsd.org" <freebs=
d-current@freebsd.org>=20
 Sent: Saturday, 13 February 2016, 18:55
 Subject: Re: Open Sound System - OSS "soundon" command causes KERNEL PANIC=
 FreeBSD-11
  =20
On 02/12/16 01:04, Greg Quinlan wrote:
> Spoke too soon...
>
> I applied the patch (kern_module.diff - which was successful)
>
> # cd /usr/src# patch <kern_module.diffHmm...=C2=A0 Looks like a unified d=
iff to me...
> The text leading up to this was:
> --------------------------
> |Index: sys/kern/kern_module.c
> |=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> |--- sys/kern/kern_module.c=C2=A0 =C2=A0 (revision 295464)
> |+++ sys/kern/kern_module.c=C2=A0 =C2=A0 (working copy)
> --------------------------
> Patching file sys/kern/kern_module.c using Plan A...
> Hunk #1 succeeded at 214.
> done
> # make buildkernel:
> # make installkernel:
> # shutdown -r now
> Logged in and ran# soundon
> No panic!!
>
> Thought the problem was fixed ... unfortunately, I assumed that the conte=
nts of /usr/local/lib/oss/etc/installed_drivers still contained
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 oss_hdaudio #Intel High Definition Audi=
o (CPT)
> but somehow the file was empty
> I ran
>=C2=A0 =C2=A0 =C2=A0 # ossdetect=C2=A0 =C2=A0 # soundon
>
> Another KERNEL PANIC...=C2=A0 this time it scrolled off the screen. I tri=
ed setting this (below) in /etc/rc.conf but there is nothing in /var/crash
>
> [entries in /etc/rc.conf]
>=C2=A0 =C2=A0 =C2=A0 dumpdev=3D"AUTO"
>=C2=A0 =C2=A0 =C2=A0 dumpdir=3D"/var/crash"
> I need help to recover the backtrace, please?
>
> Thanks
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 From: Greg Quinlan <gwq_uk@yahoo.com>
> To: Hans Petter Selasky <hps@selasky.org>; "freebsd-current@freebsd.org" =
<freebsd-current@freebsd.org>
>=C2=A0 Sent: Thursday, 11 February 2016, 22:19
>=C2=A0 Subject: Re: Open Sound System - OSS "soundon" command causes KERNE=
L PANIC FreeBSD-11
>
> Well done!!
> Fixed. Thanks!
>
>
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 From: Hans Petter Selasky <hps@selasky.org>
>=C2=A0 To: Greg Quinlan <gwq_uk@yahoo.com>; "freebsd-current@freebsd.org" =
<freebsd-current@freebsd.org>
>=C2=A0 Sent: Thursday, 11 February 2016, 17:54
>=C2=A0 Subject: Re: Open Sound System - OSS "soundon" command causes KERNE=
L PANIC FreeBSD-11
>
> On 02/11/16 03:02, Greg Quinlan wrote:
>> Hi HPS,
>> Note: Does not happen on FreeBSD 10.1-Stable!
>>
>
> Yes, that's because WITNESS is off in 10.x by default.
>
> Does the attached patch solve your problem?
>
> --HPS

Hi,

It might be that audio/oss is not compatible with 11-current if it=20
crashes like that.

--HPS

_______________________________________________
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"


  
From owner-freebsd-current@freebsd.org  Mon Feb 15 09:08:36 2016
Return-Path: <owner-freebsd-current@freebsd.org>
Delivered-To: freebsd-current@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 32191AA6A2C
 for <freebsd-current@mailman.ysv.freebsd.org>;
 Mon, 15 Feb 2016 09:08:36 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140])
 by mx1.freebsd.org (Postfix) with ESMTP id 51E4A1AC4;
 Mon, 15 Feb 2016 09:08:35 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua
 [212.40.38.100])
 by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id LAA04012;
 Mon, 15 Feb 2016 11:08:32 +0200 (EET) (envelope-from avg@FreeBSD.org)
Received: from localhost ([127.0.0.1])
 by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD))
 id 1aVF8y-000LMO-FA; Mon, 15 Feb 2016 11:08:32 +0200
Subject: Re: Memory modified after free in "MAP ENTRY" zone
 (vm_map_entry_t->read_ahead)
To: alc@FreeBSD.org
References: <56BBAB6E.5050601@FreeBSD.org> <56C08AAA.5050206@FreeBSD.org>
 <CAJUyCcNy19rArmgjzpPZvsDE7Ln4OoMWU+75Q+THdp0T7+DxPg@mail.gmail.com>
Cc: FreeBSD Current <freebsd-current@FreeBSD.org>
From: Andriy Gapon <avg@FreeBSD.org>
X-Enigmail-Draft-Status: N1110
Message-ID: <56C1953F.60604@FreeBSD.org>
Date: Mon, 15 Feb 2016 11:07:11 +0200
User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101
 Thunderbird/38.5.0
MIME-Version: 1.0
In-Reply-To: <CAJUyCcNy19rArmgjzpPZvsDE7Ln4OoMWU+75Q+THdp0T7+DxPg@mail.gmail.com>
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
X-BeenThere: freebsd-current@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: Discussions about the use of FreeBSD-current
 <freebsd-current.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-current>, 
 <mailto:freebsd-current-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-current/>;
List-Post: <mailto:freebsd-current@freebsd.org>
List-Help: <mailto:freebsd-current-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-current>, 
 <mailto:freebsd-current-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 15 Feb 2016 09:08:36 -0000

On 15/02/2016 00:27, Alan Cox wrote:
> 
> On Sun, Feb 14, 2016 at 8:09 AM, Andriy Gapon <avg@freebsd.org
> <mailto:avg@freebsd.org>> wrote:
> 
>     On 10/02/2016 23:28, Andriy Gapon wrote:
>     >
>     > Over a span of approximately 3 weeks I have got two slightly different panics of
>     > the same kind.   The affected system is a several months old amd64 head.
> 
>     I added a small assertion and it got tripped:
[snip]
> 
>     So, it seems that the code allows modification of read_ahead field of an entry
>     without holding a map lock.  I'd guess that that should be mostly harmless as
>     read_ahead value is not critical, but it is still not nice.
> 
> Not intentionally.  The nearby code to the read_ahead assignment expects the map
> to be locked, so I wouldn't categorize this as mostly harmless.
> 
> In general, you shouldn't get to the read_ahead assignment without the map being
> locked, and almost all of the code paths that unlock the map jump to RetryFault
> shortly thereafter, so it's hard to imagine how the map lock wouldn't be
> reacquired.  I speculate that the root cause of your panic is a case where
> vm_pager_get_pages() fails, and in such a case we might loop around, descending
> to the next backing object without reacquiring the map lock.  In other words,
> your above assertion failure is happening on the next iteration after an initial
> vm_pager_get_pages() failure, and we're about to do another vm_pager_get_pages()
> call on a different object.
> 
> In summary, I have no trouble believing that the code that handles a failure by
> vm_pager_get_pages() in vm_fault() is not quite right, and I think that's what's
> biting you.

Alan,

thank you very much for the very insightful analysis.
Indeed, I see that in this case the object chain is default -> swap -> swap.  I
am not sure how such chain was created.  It seems that going default -> swap is
not a problem as the map lock is not dropped in this case.  But going swap ->
swap the way you described (pager error, e.g. the page is just not found) has
exactly the problem that you suggested.

-- 
Andriy Gapon



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?693932216.4173309.1455503591733.JavaMail.yahoo>