Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Sep 2013 12:57:33 +0300
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Pawel Jakub Dawidek <pjd@FreeBSD.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r255219 - in head: contrib/tcpdump lib/libc lib/libc/capability lib/libc/include lib/libc/sys lib/libprocstat sbin/dhclient sbin/hastd sys/amd64/linux32 sys/bsm sys/cddl/compat/opensola...
Message-ID:  <20130905095733.GP41229@kib.kiev.ua>
In-Reply-To: <20130905061923.GA5011@garage.freebsd.pl>
References:  <201309050009.r8509vsE061271@svn.freebsd.org> <20130905024448.GO41229@kib.kiev.ua> <20130905061429.GD1388@garage.freebsd.pl> <20130905061923.GA5011@garage.freebsd.pl>

next in thread | previous in thread | raw e-mail | index | archive | help

--SBikYMzjhZGK9d4p
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Sep 05, 2013 at 08:19:24AM +0200, Pawel Jakub Dawidek wrote:
> On Thu, Sep 05, 2013 at 08:14:29AM +0200, Pawel Jakub Dawidek wrote:
> > On Thu, Sep 05, 2013 at 05:44:48AM +0300, Konstantin Belousov wrote:
> > > On Thu, Sep 05, 2013 at 12:09:57AM +0000, Pawel Jakub Dawidek wrote:
> > > > Author: pjd
> > > > Date: Thu Sep  5 00:09:56 2013
> > > > New Revision: 255219
> > > > URL: http://svnweb.freebsd.org/changeset/base/255219
> > >=20
> > > Shortly after the boot of the updated kernel, I get:
> > >=20
> > > Fatal trap 12: page fault while in kernel mode
> > > cpuid =3D 7; apic id =3D 07
> > > fault virtual address	=3D 0x0
> > > fault code		=3D supervisor read data, page not present
> > > instruction pointer	=3D 0x20:0xffffffff802f685a
> > > stack pointer	        =3D 0x28:0xfffffe0235d50460
> > > frame pointer	        =3D 0x28:0xfffffe0235d504b0
> > > code segment		=3D base 0x0, limit 0xfffff, type 0x1b
> > > 			=3D DPL 0, pres 1, long 1, def32 0, gran 1
> > > processor eflags	=3D interrupt enabled, resume, IOPL =3D 0
> > > current process		=3D 199 (ip6addrctl)
> > > [ thread pid 199 tid 100086 ]
> > > Stopped at      0xffffffff802f685a =3D fget+0x2a: movq    (%rdx),%rax
> > > db> bt
> > > Tracing pid 199 tid 100086 td 0xfffff80005351980
> > > fget() at 0xffffffff802f685a =3D fget+0x2a/frame 0xfffffe0235d504b0
> > > fdesc_lookup() at 0xffffffff80e6d88d =3D fdesc_lookup+0xed/frame 0xff=
fffe0235d50510
> > > VOP_LOOKUP_APV() at 0xffffffff8057b54e =3D VOP_LOOKUP_APV+0x12e/frame=
 0xfffffe0235d50560
> > > lookup() at 0xffffffff803d31b0 =3D lookup+0x5a0/frame 0xfffffe0235d50=
5f0
> > > namei() at 0xffffffff803d2934 =3D namei+0x464/frame 0xfffffe0235d506c0
> > > vn_open_cred() at 0xffffffff803ee78f =3D vn_open_cred+0x27f/frame 0xf=
ffffe0235d50810
> > > kern_openat() at 0xffffffff803e7bfd =3D kern_openat+0x22d/frame 0xfff=
ffe0235d50980
> > > amd64_syscall() at 0xffffffff805387dd =3D amd64_syscall+0x28d/frame 0=
xfffffe0235d50ab0
> > > Xfast_syscall() at 0xffffffff8051f21b =3D Xfast_syscall+0xfb/frame 0x=
fffffe0235d50ab0
> > > --- syscall (5, FreeBSD ELF64, sys_open), rip =3D 0x800942d6a, rsp =
=3D 0x7fffffffcff8, rbp =3D 0x7fffffffd030 ---
> > >=20
> > > (gdb) list *fget+0x2a
> > > 0xffffffff802f685a is in fget (/usr/home/kostik/work/build/bsd/DEV/sr=
c/sys/kern/kern_descrip.c:2385).
> > >=20
> > > I do not have any capsicum-related options in the kernel config.
> >=20
> > Do you have some local changes? Could you try to do full buildkernel?
> > There were two compilation issues when CAPABILITIES option was absent in
> > kernel configuration, so something isn't right is you were able to
> > compile your kernel.
I have local changes, but nothing in kern_descrip.c or VFS, for this branch.
The trace above is from the clean kernel build.  I do able to build the
kernel without CAPABILITIES.

>=20
> Forgot to mention that my test machine can boot fine with kernel
> compiled without the CAPABILITIES option.

If taking a time and actually looking at the backtrace I posted, you would
see that fdescfs is broken.  The _fget() assumes that needrightsp is
always non-NULL, but fget() call from fdesc_lookup() passes NULL spelled
as 0.

Quick look over the sys/ catched at least
sys/kern/vfs_aio.c:2053
sys/cddl/compat/opensolaris/sys/file.h:57
sys/compat/linux/linux_stats.c:148
sys/dev/aacraid/aacraid_linux.c:84
with the same problem.


--SBikYMzjhZGK9d4p
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.21 (FreeBSD)

iQIcBAEBAgAGBQJSKFWMAAoJEJDCuSvBvK1BnvIP/RDE5dTjLas2lhilQMRELkmc
k/wjxi+COFVLUyVLcU90ISwNTWnEaK5krJK+vJTA2jJFwmDKbeRVrkQIrZJvk841
yzt2p4l7u1SxxzLAgl4VQ5HvHmFkR2Lb6I3yM7yy0NLZ01wXRn56W+kOHRDzAnpL
AaHVdvDUisskdr80H7dYmefcfUphVgN7HLTn60U8RcsZNM9gbx2tbfYH/4zC7R43
l7sxKK04cORgiev59RZZhDoXUkyZefz0l/37ffnjbg7cgMYrG4tFTB3LPgQpWEoa
+/GlEJ+2q88DZ+xyDTyjSZo10sQj+A4zEXBQ2oXj07hWA29M9zlrBDhR8TIE2HSQ
rRl5jApitcGrgTXEFMTtyozB1X2qMbQwaAn7A6d0veEJHdjfW+bMEECo4NoBlf4x
CVyrSWj2Z3ZScrTTgtO1tDqrTFmymZLFmyW4bQ5c/AxWWyDdGOgGIV44KEcEN0DG
Hz7v6hbmKmnBSqY+JfhvXaPoY/1J7L4M0hirtNzlo7adXYYPpZOKojif45W4f6hl
eS/EWSY26G8w66zN9dVmB2Sy24ucU6QhFHXEvqWK+KEpJFgTVP3R95bgEC+fMND/
+QY6j9F14Ke4TSDm4pk3MfgVK+jqqII+KKK+AmY6OioYJMUym4gYWXdnUWB9vmd5
h4tVGTUoBMKstjL9rJOl
=57uS
-----END PGP SIGNATURE-----

--SBikYMzjhZGK9d4p--



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