NetBSD Problem Report #53259

From www@NetBSD.org  Thu May  3 23:44:45 2018
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 0EDD97A180
	for <gnats-bugs@gnats.NetBSD.org>; Thu,  3 May 2018 23:44:45 +0000 (UTC)
Message-Id: <20180503234443.DE9487A214@mollari.NetBSD.org>
Date: Thu,  3 May 2018 23:44:43 +0000 (UTC)
From: n54@gmx.com
Reply-To: n54@gmx.com
To: gnats-bugs@NetBSD.org
Subject: opera causes kernel panic
X-Send-Pr-Version: www-1.0

>Number:         53259
>Category:       kern
>Synopsis:       opera causes kernel panic
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    kern-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu May 03 23:45:00 +0000 2018
>Closed-Date:    Tue Jun 26 01:54:52 +0000 2018
>Last-Modified:  Tue Jun 26 01:54:52 +0000 2018
>Originator:     Kamil Rytarowski
>Release:        NetBSD/amd64 8.99.14
>Organization:
TNF
>Environment:
NetBSD chieftec 8.99.14 NetBSD 8.99.14 (GENERIC) #36: Tue May  1 18:02:53 CEST 2018  root@chieftec:/public/netbsd-root/sys/arch/amd64/compile/GENERIC amd64
>Description:
opera-12.16         Standards-compliant graphical Web browser

An attempt to run opera causes kernel panic always.
>How-To-Repeat:
[  107.864737] WARNING: SPL NOT LOWERED ON SYSCALL 0 6 EXIT 6 5
[  107.864737] panic: assert_sleepable: pserialize caller=0xffffffff809e038e
[  107.864737] cpu0: Begin traceback...
[  107.864737] vpanic() at netbsd:vpanic+0x19a
[  107.864737] snprintf() at netbsd:snprintf
[  107.864737] assert_sleepable() at netbsd:assert_sleepable+0xc3
[  107.864737] kauth_cred_free() at netbsd:kauth_cred_free+0x2f
[  107.864737] soclose() at netbsd:soclose+0x206
[  107.874725] soo_close() at netbsd:soo_close+0x1a
[  107.874725] closef() at netbsd:closef+0x79
[  107.874725] fd_close() at netbsd:fd_close+0x623
[  107.874725] sys_close() at netbsd:sys_close+0x20
[  107.874725] linux_syscall() at netbsd:linux_syscall+0xc1
[  107.874725] cpu0: End traceback...
[  107.874725] fatal breakpoint trap in supervisor mode
[  107.874725] trap type 1 code 0 rip 0xffffffff8021eb75 cs 0x8 rflags 0x202 cr2 0x1ce8648 ilevel 0 rsp 0xffff80013fb0cd80
[  107.874725] curlwp 0xffffe403f7fe40e0 pid 609.609 lowest kstack 0xffff80013fb092c0

[  107.874725] dumping to dev 20,0 (offset=193655, size=4170097):
[  107.874725] dump device not ready
>Fix:
N/A

>Release-Note:

>Audit-Trail:
From: Ryota Ozaki <ozaki-r@netbsd.org>
To: Kamil Rytarowski <n54@gmx.com>
Cc: kern-bug-people@netbsd.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org, 
	"gnats-bugs@NetBSD.org" <gnats-bugs@netbsd.org>
Subject: Re: kern/53259: opera causes kernel panic
Date: Mon, 07 May 2018 03:16:47 +0000

 On Fri, May 4, 2018 at 8:45 AM <n54@gmx.com> wrote:

 > >Number:         53259
 > >Category:       kern
 > >Synopsis:       opera causes kernel panic
 > >Confidential:   no
 > >Severity:       critical
 > >Priority:       high
 > >Responsible:    kern-bug-people
 > >State:          open
 > >Class:          sw-bug
 > >Submitter-Id:   net
 > >Arrival-Date:   Thu May 03 23:45:00 +0000 2018
 > >Originator:     Kamil Rytarowski
 > >Release:        NetBSD/amd64 8.99.14
 > >Organization:
 > TNF
 > >Environment:
 > NetBSD chieftec 8.99.14 NetBSD 8.99.14 (GENERIC) #36: Tue May  1 18:02:53
 CEST 2018  root@chieftec:/public/netbsd-root/sys/arch/amd64/compile/GENERIC
 amd64
 > >Description:
 > opera-12.16         Standards-compliant graphical Web browser

 > An attempt to run opera causes kernel panic always.
 > >How-To-Repeat:
 > [  107.864737] WARNING: SPL NOT LOWERED ON SYSCALL 0 6 EXIT 6 5
 > [  107.864737] panic: assert_sleepable: pserialize
 caller=0xffffffff809e038e
 > [  107.864737] cpu0: Begin traceback...
 > [  107.864737] vpanic() at netbsd:vpanic+0x19a
 > [  107.864737] snprintf() at netbsd:snprintf
 > [  107.864737] assert_sleepable() at netbsd:assert_sleepable+0xc3
 > [  107.864737] kauth_cred_free() at netbsd:kauth_cred_free+0x2f
 > [  107.864737] soclose() at netbsd:soclose+0x206
 > [  107.874725] soo_close() at netbsd:soo_close+0x1a
 > [  107.874725] closef() at netbsd:closef+0x79
 > [  107.874725] fd_close() at netbsd:fd_close+0x623
 > [  107.874725] sys_close() at netbsd:sys_close+0x20
 > [  107.874725] linux_syscall() at netbsd:linux_syscall+0xc1
 > [  107.874725] cpu0: End traceback...
 > [  107.874725] fatal breakpoint trap in supervisor mode
 > [  107.874725] trap type 1 code 0 rip 0xffffffff8021eb75 cs 0x8 rflags
 0x202 cr2 0x1ce8648 ilevel 0 rsp 0xffff80013fb0cd80
 > [  107.874725] curlwp 0xffffe403f7fe40e0 pid 609.609 lowest kstack
 0xffff80013fb092c0

 > [  107.874725] dumping to dev 20,0 (offset=193655, size=4170097):
 > [  107.874725] dump device not ready
 > >Fix:
 > N/A

 Could you try the below patch?

 Thanks,
    ozaki-r

 diff --git a/sys/compat/linux/common/linux_socket.c
 b/sys/compat/linux/common/linux_socket.c
 index 7f31512496d..85b0f787243 100644
 --- a/sys/compat/linux/common/linux_socket.c
 +++ b/sys/compat/linux/common/linux_socket.c
 @@ -1183,7 +1183,7 @@ linux_getifconf(struct lwp *l, register_t *retval,
 void *data)
                          ifa_release(ifa, &psref_ifa);
                  }

 -               s = pserialize_read_enter();
 +               KASSERT(pserialize_in_read_section());
                  if_release(ifp, &psref);
          }
          pserialize_read_exit(s);
 diff --git a/sys/compat/linux32/common/linux32_socket.c
 b/sys/compat/linux32/common/linux32_socket.c
 index aa0ef2df4bc..7fd678d0cab 100644
 --- a/sys/compat/linux32/common/linux32_socket.c
 +++ b/sys/compat/linux32/common/linux32_socket.c
 @@ -478,7 +478,7 @@ linux32_getifconf(struct lwp *l, register_t *retval,
 void *data)
                          ifa_release(ifa, &psref_ifa);
                  }

 -               s = pserialize_read_enter();
 +               KASSERT(pserialize_in_read_section());
                  if_release(ifp, &psref);
          }
          pserialize_read_exit(s);

From: "Ryota Ozaki" <ozaki-r@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/53259 CVS commit: src/sys/compat
Date: Thu, 10 May 2018 01:32:24 +0000

 Module Name:	src
 Committed By:	ozaki-r
 Date:		Thu May 10 01:32:24 UTC 2018

 Modified Files:
 	src/sys/compat/linux/common: linux_socket.c
 	src/sys/compat/linux32/common: linux32_socket.c

 Log Message:
 Fix pserialize enter/exit pairs in linux_getifconf and linux32_getifconf

 Tested by using a small linux program that uses ioctl(SIOCGIFCONF).
 Probably fix PR kern/53259 as well.


 To generate a diff of this commit:
 cvs rdiff -u -r1.141 -r1.142 src/sys/compat/linux/common/linux_socket.c
 cvs rdiff -u -r1.28 -r1.29 src/sys/compat/linux32/common/linux32_socket.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: Kamil Rytarowski <n54@gmx.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/53259: opera causes kernel panic
Date: Fri, 11 May 2018 04:13:22 +0200

 This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
 --Yk0K12CYfELEvg1RVnPkMFyiG0CKtLRjR
 Content-Type: multipart/mixed; boundary="NuTggim65ZkhIVfdYKvXVoGsoNTQNT5vF";
  protected-headers="v1"
 From: Kamil Rytarowski <n54@gmx.com>
 To: gnats-bugs@NetBSD.org
 Message-ID: <e6e5646b-c439-1ea5-0177-53e49cdfd2fc@gmx.com>
 Subject: Re: kern/53259: opera causes kernel panic
 References: <pr-kern-53259@gnats.netbsd.org>
  <20180503234443.DE9487A214@mollari.NetBSD.org>
  <20180507032001.A14257A232@mollari.NetBSD.org>
 In-Reply-To: <20180507032001.A14257A232@mollari.NetBSD.org>

 --NuTggim65ZkhIVfdYKvXVoGsoNTQNT5vF
 Content-Type: text/plain; charset=utf-8
 Content-Language: en-US
 Content-Transfer-Encoding: quoted-printable

 I've tested the committed patch. The panic is gone, but the browser
 seems to be hanging on loading any page and before presenting any content=
 =2E


 --NuTggim65ZkhIVfdYKvXVoGsoNTQNT5vF--

 --Yk0K12CYfELEvg1RVnPkMFyiG0CKtLRjR
 Content-Type: application/pgp-signature; name="signature.asc"
 Content-Description: OpenPGP digital signature
 Content-Disposition: attachment; filename="signature.asc"

 -----BEGIN PGP SIGNATURE-----

 iQJABAEBCAAqFiEELaxVpweEzw+lMDwuS7MI6bAudmwFAlr0/EsMHG41NEBnbXgu
 Y29tAAoJEEuzCOmwLnZsWrYP+gKltAIS3RTyyed+5JXctLiGtSAJkNpqf6m8uZQQ
 cNJvkjSRBRGEFgv6unUzQI9yBAjv2cu2icoOzuNULRarg/r/KvJE2b9/CoGoN0Js
 O2xvMurt1smUh/V7OYUkZz6BEW6I17jeIC8PfActmxEBOPKX/DkhAycDgVbBNt+g
 Fh1ggwW+8ourP1aDAhTwGRxk2TQKKL23RbD/9W/ANgwPu/8J0oNeSWKBuUd+N35T
 W89R1eFLF/c2AhI0mSfgo797/FN5WpHKtvi8fDDaCfYvDLtnUEnYp1DjHJjQtSCE
 J0JvzS04hyFjB1hOd2kl8pMhSDzR6tibXTG0EaItVPNMxwrh8xRzhmyiLr5sLY9H
 pB0sLHvHCs1tX31pxiw0M9aHJ5pP9mTT8+npKdfgviGFaWN+Z1bQCKadoi3eTm/8
 veaWmHpWGSYa+L3gmqxTOx6ov0Ihmguk+BmOazLJEuLgro+Tf9U+f19fnmjXaatt
 selSUQrPCzpjJeiNmjeqcG4rBa3Pcbrzn5f1cfJC1I7OsoxDyVnHwsPcqJyqC7ru
 JUE/ZH3ITNRque3gDoKPUbAuJc4ZQ/B8TvVzTWuTUslIOOWCLqLNgRNORxkDRwpD
 J7gghs2nci8DJuUYsJeUj0klIKjLkI04z/XOlskefpmRAkY/Pw+PcRQO1vaLwBtD
 w6l/
 =1u87
 -----END PGP SIGNATURE-----

 --Yk0K12CYfELEvg1RVnPkMFyiG0CKtLRjR--

From: Ryota Ozaki <ozaki-r@netbsd.org>
To: "gnats-bugs@NetBSD.org" <gnats-bugs@netbsd.org>
Cc: kern-bug-people@netbsd.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org, 
	Kamil Rytarowski <n54@gmx.com>
Subject: Re: kern/53259: opera causes kernel panic
Date: Fri, 11 May 2018 13:43:41 +0900

 On Fri, May 11, 2018 at 11:15 AM Kamil Rytarowski <n54@gmx.com> wrote:

 > The following reply was made to PR kern/53259; it has been noted by GNATS.

 > From: Kamil Rytarowski <n54@gmx.com>
 > To: gnats-bugs@NetBSD.org
 > Cc:
 > Subject: Re: kern/53259: opera causes kernel panic
 > Date: Fri, 11 May 2018 04:13:22 +0200

 >   This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
 >   --Yk0K12CYfELEvg1RVnPkMFyiG0CKtLRjR
 >   Content-Type: multipart/mixed;
 boundary="NuTggim65ZkhIVfdYKvXVoGsoNTQNT5vF";
 >    protected-headers="v1"
 >   From: Kamil Rytarowski <n54@gmx.com>
 >   To: gnats-bugs@NetBSD.org
 >   Message-ID: <e6e5646b-c439-1ea5-0177-53e49cdfd2fc@gmx.com>
 >   Subject: Re: kern/53259: opera causes kernel panic
 >   References: <pr-kern-53259@gnats.netbsd.org>
 >    <20180503234443.DE9487A214@mollari.NetBSD.org>
 >    <20180507032001.A14257A232@mollari.NetBSD.org>
 >   In-Reply-To: <20180507032001.A14257A232@mollari.NetBSD.org>

 >   --NuTggim65ZkhIVfdYKvXVoGsoNTQNT5vF
 >   Content-Type: text/plain; charset=utf-8
 >   Content-Language: en-US
 >   Content-Transfer-Encoding: quoted-printable

 >   I've tested the committed patch. The panic is gone, but the browser
 >   seems to be hanging on loading any page and before presenting any
 content=
 >   =2E

 Thank you for testing. I don't know the cause of the hangup.
 Do you think that's an issue of networking?

    ozaki-r

From: Kamil Rytarowski <n54@gmx.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/53259: opera causes kernel panic
Date: Fri, 11 May 2018 18:18:13 +0200

 This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
 --tC8r9iGPBCeckKtJC2p1FFgNXJcdUBTKM
 Content-Type: multipart/mixed; boundary="DqbaHzuApinvJku0vmhxat8tod61TArDi";
  protected-headers="v1"
 From: Kamil Rytarowski <n54@gmx.com>
 To: gnats-bugs@NetBSD.org
 Message-ID: <077551b3-aa93-9b6c-c031-d18f97175e73@gmx.com>
 Subject: Re: kern/53259: opera causes kernel panic
 References: <pr-kern-53259@gnats.netbsd.org>
  <20180503234443.DE9487A214@mollari.NetBSD.org>
  <20180511052001.3689A7A26F@mollari.NetBSD.org>
 In-Reply-To: <20180511052001.3689A7A26F@mollari.NetBSD.org>

 --DqbaHzuApinvJku0vmhxat8tod61TArDi
 Content-Type: text/plain; charset=utf-8
 Content-Language: en-US
 Content-Transfer-Encoding: quoted-printable

 On 11.05.2018 07:20, Ryota Ozaki wrote:
 >  Thank you for testing. I don't know the cause of the hangup.
 >  Do you think that's an issue of networking?
 > =20

 I think so.

 Prebuilt Opera is in pkgsrc and can be easily tested.


 --DqbaHzuApinvJku0vmhxat8tod61TArDi--

 --tC8r9iGPBCeckKtJC2p1FFgNXJcdUBTKM
 Content-Type: application/pgp-signature; name="signature.asc"
 Content-Description: OpenPGP digital signature
 Content-Disposition: attachment; filename="signature.asc"

 -----BEGIN PGP SIGNATURE-----

 iQJABAEBCAAqFiEELaxVpweEzw+lMDwuS7MI6bAudmwFAlr1wkUMHG41NEBnbXgu
 Y29tAAoJEEuzCOmwLnZsPxMP/jIKLCU76R0K6tEKDY+meh5egk3ytSrrexcRSBHt
 4+GkryJejujrfSCN+/Fd7iqiMe63Sv3NTRsuNQEWpflOiJwaChlVRC4i0fcqo0o4
 T4M+CQTvkPXRAbNSYMsUyVDy2t24WhTGOMS/evv/ZFxOeg6n06irZaA6PRBTldTp
 RAZh4JgMaW+ug5DJV2rYhXj031ALhPqE9OdlUpKOJ9OXpSSNxR6eniJCsMRP6tWu
 7GcRXvIHXWWNOh2MxIGPDQC9IY9pAT+woKljEQfQespT59tnH2ShBLjR1zVS8qd3
 BMFsFdXaGfy6QewgS74/Jpd5aAQrF5iwoGhlPJmLPbuJgDTER1VoH9/1kV5Qj7RX
 +SMvjvXB17DX3wXPTWKmkbupKuuDPZcYiYUdl7HSZ8gXw/yJ0HPJwxsv/IcNcwP/
 uTs9ZSMDfeSJotMTnkHdSmWM9NnTztVtI4CSk4aqTRYOtR/QE6tmuBG5h/0sZs5m
 Y87xkQdnEKBbwQjX9lETrB/LiaidWesZLXiVAfBdG6vw0iMGRD11GWORwCNDdzuY
 EuMmBiJNgi8Tis7hwI1ZDkhrT/o86c+b71j1ORDJZL1NKnSwhHDmtfhXtScud4Tf
 dpZm9SsdmFsUvCzrFcIQSG/G866aNV+yI4IDNMo4+91iaI609JbJkNge9abTJKe+
 EIzO
 =J5N5
 -----END PGP SIGNATURE-----

 --tC8r9iGPBCeckKtJC2p1FFgNXJcdUBTKM--

From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/53259 CVS commit: [netbsd-8] src/sys/compat
Date: Sat, 12 May 2018 10:29:08 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Sat May 12 10:29:08 UTC 2018

 Modified Files:
 	src/sys/compat/linux/common [netbsd-8]: linux_socket.c
 	src/sys/compat/linux32/common [netbsd-8]: linux32_socket.c

 Log Message:
 Pull up following revision(s) (requested by ozaki-r in ticket #818):

 	sys/compat/linux/common/linux_socket.c: revision 1.142
 	sys/compat/linux32/common/linux32_socket.c: revision 1.29

 Fix pserialize enter/exit pairs in linux_getifconf and linux32_getifconf

 Tested by using a small linux program that uses ioctl(SIOCGIFCONF).
 Probably fix PR kern/53259 as well.


 To generate a diff of this commit:
 cvs rdiff -u -r1.138.6.1 -r1.138.6.2 \
     src/sys/compat/linux/common/linux_socket.c
 cvs rdiff -u -r1.27.6.1 -r1.27.6.2 \
     src/sys/compat/linux32/common/linux32_socket.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->closed
State-Changed-By: ozaki-r@NetBSD.org
State-Changed-When: Tue, 26 Jun 2018 01:54:52 +0000
State-Changed-Why:
The panic fixed.
If the hangup still happens, please open another PR.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.