kern/161887: [vm] [panic] panic at vm_page_wire with FreeBSD 9.0 Beta 3 [regression]

Penta Upa bsdboot at gmail.com
Sun Oct 30 17:20:10 UTC 2011


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

From: Penta Upa <bsdboot at gmail.com>
To: Andriy Gapon <avg at freebsd.org>
Cc: bug-followup at freebsd.org
Subject: Re: kern/161887: [vm] [panic] panic at vm_page_wire with FreeBSD 9.0
 Beta 3 [regression]
Date: Sun, 30 Oct 2011 22:41:46 +0530

 --90e6ba21219b9c283304b087375d
 Content-Type: text/plain; charset=ISO-8859-1
 
 On Sun, Oct 30, 2011 at 10:30 PM, Andriy Gapon <avg at freebsd.org> wrote:
 
 > on 30/10/2011 18:17 Penta Upa said the following:
 > >
 > >
 > > On Sun, Oct 30, 2011 at 4:01 PM, Andriy Gapon <avg at freebsd.org
 > > <mailto:avg at freebsd.org>> wrote:
 > >
 > >
 > >     Do you build your test module as a part of a kernel+modules build or
 > do you
 > >     build it in isolation?  If the latter, then this could be a known
 > obscure
 > >     problem.
 > >
 > > External. For example built in /home/penta/vmtest
 > >
 > >
 > >
 > >     A standalone module build doesn't get some important definitions
 > from kernel
 > >     config (e.g. via  opt_global.h) and can be in a serious disagreement
 > with the
 > >     kernel.  In particular, if a kernel is built with SMP option, but a
 > module build
 > >     doesn't have SMP defined, then they will have different definitions
 > of
 > >     PA_LOCK_COUNT and thus would work on different actual locks when
 > manipulating
 > >     the same page.
 > >
 > > Ok and it seems like they are operating on different locks then.
 > > vm_page_assert() succeeds in the module but immediately fails in
 > vm_page_wire().
 > > But then isn't vm_page_wire/unwire() and exported kernel api (i assumed
 > it is
 > > since there is a man page entry), so shouldn't it succeed irrespective
 > of the
 > > kernel config and irrespective of the location of the build.
 >
 > You described how things should be and I described how they are at the
 > moment.
 >
 >
 >
 Ok :-) Would including any specific header, tweaks to the Makefile make it
 work it for me. My target environment will be release version of FreeBSD on
 amd64. For example 9.0 release  and it would never be a custom built
 kernel.
 
 Or moving the module to /usr/src/sys/modules and building from there be the
 safest way.
 
 Thanks,
 Penta
 
 --90e6ba21219b9c283304b087375d
 Content-Type: text/html; charset=ISO-8859-1
 Content-Transfer-Encoding: quoted-printable
 
 <br><br><div class=3D"gmail_quote">On Sun, Oct 30, 2011 at 10:30 PM, Andriy=
  Gapon <span dir=3D"ltr">&lt;<a href=3D"mailto:avg at freebsd.org">avg at freebsd=
 .org</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"ma=
 rgin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding=
 -left: 1ex;">
 on 30/10/2011 18:17 Penta Upa said the following:<br>
 <div class=3D"im">&gt;<br>
 &gt;<br>
 &gt; On Sun, Oct 30, 2011 at 4:01 PM, Andriy Gapon &lt;<a href=3D"mailto:av=
 g at freebsd.org">avg at freebsd.org</a><br>
 </div><div><div></div><div class=3D"h5">&gt; &lt;mailto:<a href=3D"mailto:a=
 vg at freebsd.org">avg at freebsd.org</a>&gt;&gt; wrote:<br>
 &gt;<br>
 &gt;<br>
 &gt; =A0 =A0 Do you build your test module as a part of a kernel+modules bu=
 ild or do you<br>
 &gt; =A0 =A0 build it in isolation? =A0If the latter, then this could be a =
 known obscure<br>
 &gt; =A0 =A0 problem.<br>
 &gt;<br>
 &gt; External. For example built in /home/penta/vmtest<br>
 &gt;<br>
 &gt;<br>
 &gt;<br>
 &gt; =A0 =A0 A standalone module build doesn&#39;t get some important defin=
 itions from kernel<br>
 &gt; =A0 =A0 config (e.g. via =A0opt_global.h) and can be in a serious disa=
 greement with the<br>
 &gt; =A0 =A0 kernel. =A0In particular, if a kernel is built with SMP option=
 , but a module build<br>
 &gt; =A0 =A0 doesn&#39;t have SMP defined, then they will have different de=
 finitions of<br>
 &gt; =A0 =A0 PA_LOCK_COUNT and thus would work on different actual locks wh=
 en manipulating<br>
 &gt; =A0 =A0 the same page.<br>
 &gt;<br>
 &gt; Ok and it seems like they are operating on different locks then.<br>
 &gt; vm_page_assert() succeeds in the module but immediately fails in vm_pa=
 ge_wire().<br>
 &gt; But then isn&#39;t vm_page_wire/unwire() and exported kernel api (i as=
 sumed it is<br>
 &gt; since there is a man page entry), so shouldn&#39;t it succeed irrespec=
 tive of the<br>
 &gt; kernel config and irrespective of the location of the build.<br>
 <br>
 </div></div>You described how things should be and I described how they are=
  at the moment.<br>
 <font color=3D"#888888"><br>
 <br></font></blockquote><div>=A0</div>Ok :-) Would including any specific h=
 eader, tweaks to the Makefile make it work it for me. My target environment=
  will be release version of FreeBSD on amd64. For example 9.0 release=A0 an=
 d it would never be a custom built kernel.  <br>
 <br>Or moving the module to /usr/src/sys/modules and building from there be=
  the safest way. <br><br>Thanks,<br>Penta<br></div><br>
 
 --90e6ba21219b9c283304b087375d--


More information about the freebsd-bugs mailing list