Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Aug 2018 11:30:51 +0200
From:      Marko Zec <zec@fer.hr>
To:        Olivier =?ISO-8859-1?Q?Cochard-Labb=E9?= <olivier@freebsd.org>
Cc:        freebsd-current <freebsd-current@freebsd.org>
Subject:   Re: Loading carp module crash i386 (12-ALPHA2), seems VNET related
Message-ID:  <20180821113051.7d35bc39@x23>
In-Reply-To: <CA%2Bq%2BTcqN-YAXKQuZPQcrjmgABJJ22Pm%2B9-B9%2BZ8LH==0o%2Bg2BA@mail.gmail.com>
References:  <CA%2Bq%2BTcqN-YAXKQuZPQcrjmgABJJ22Pm%2B9-B9%2BZ8LH==0o%2Bg2BA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 20 Aug 2018 16:26:29 +0200
Olivier Cochard-Labb=C3=A9 <olivier@freebsd.org> wrote:

> Just loading carp kernel module is enough to panic it:
>=20
> [root@router]~# uname -a
> FreeBSD router.bsdrp.net 12.0-ALPHA2 FreeBSD 12.0-ALPHA2  r338100M
> i386 [root@router]~# kldload carp
> Fatal trap 12: page fault while in kernel mode

How many vnets were already instantiated at the time of kldloading
carp?  Does the panic ocur with no (non-default) vnets instantiated?

> cpuid =3D 0; apic id =3D 00
> fault virtual address   =3D 0x14de0f4c
> fault code              =3D supervisor write, page not present
> instruction pointer     =3D 0x20:0x1201657c
> stack pointer           =3D 0x28:0x11f3e804
> frame pointer           =3D 0x28:0x11f3e80c
> code segment            =3D base 0x0, limit 0xfffff, type 0x1b
>                         =3D DPL 0, pres 1, def32 1, gran 1
> processor eflags        =3D interrupt enabled, resume, IOPL =3D 0
> current process         =3D 55291 (kldload)
> [ thread pid 55291 tid 100070 ]
> Stopped at      vnet_carpstats_init+0x2c:       movl
> %eax,__stop_set_vnet(%ecx,%esi,1)
>=20
> A backtrace on kgdb gives this output:
>=20
> (kgdb) bt
> #0  __curthread () at ./machine/pcpu.h:226
> #1  doadump (textdump=3D<optimized out>) at
> /usr/local/BSDRP/TESTING/FreeBSD/src/sys/kern/kern_shutdown.c:366
> #2  0x009f69ee in db_dump (dummy=3D302081404, dummy2=3Dfalse, dummy3=3D-1,
> dummy4=3D0x11f3e4fc "") at
> /usr/local/BSDRP/TESTING/FreeBSD/src/sys/ddb/db_command.c:574
> #3  0x009f67c7 in db_command (last_cmdp=3D<optimized out>,
> cmd_table=3D<optimized out>, dopager=3D<optimized out>) at
> /usr/local/BSDRP/TESTING/FreeBSD/src/sys/ddb/db_command.c:481
> #4  0x009f6520 in db_command_loop () at
> /usr/local/BSDRP/TESTING/FreeBSD/src/sys/ddb/db_command.c:534
> #5  0x009f978d in db_trap (type=3D12, code=3D0) at
> /usr/local/BSDRP/TESTING/FreeBSD/src/sys/ddb/db_main.c:252
> #6  0x0113e29e in kdb_trap (type=3D12, code=3D0, tf=3D0x11f3e7c4) at
> /usr/local/BSDRP/TESTING/FreeBSD/src/sys/kern/subr_kdb.c:693
> #7  0x016d593c in trap_fatal (frame=3D0x11f3e7c4, eva=3D<optimized out>)
> at /usr/local/BSDRP/TESTING/FreeBSD/src/sys/i386/i386/trap.c:989
> #8  0x016d5a43 in trap_pfault (frame=3D<optimized out>, usermode=3D0,
> eva=3D350097228) at
> /usr/local/BSDRP/TESTING/FreeBSD/src/sys/i386/i386/trap.c:827
> #9  0x016d508f in trap (frame=3D0x11f3e7c4) at
> /usr/local/BSDRP/TESTING/FreeBSD/src/sys/i386/i386/trap.c:519
> #10 0xffc0315d in ?? ()
> #11 0x11f3e7c4 in ?? ()
> #12 0x0121c7ef in vnet_register_sysinit (arg=3D0x120182cc
> <vnet_carpstats_init_vnet_init>) at
> /usr/local/BSDRP/TESTING/FreeBSD/src/sys/net/vnet.c:500
> #13 0x010c18f0 in linker_file_sysinit (lf=3D<optimized out>) at
> /usr/local/BSDRP/TESTING/FreeBSD/src/sys/kern/kern_linker.c:236
> #14 linker_load_file (filename=3D<optimized out>, result=3D<optimized
> out>)
> out>at /usr/local/BSDRP/TESTING/FreeBSD/src/sys/kern/kern_linker.c:462
> #15 linker_load_module (kldname=3D<optimized out>, modname=3D0x11449c00
> "carp", parent=3D0x0, verinfo=3D0x0, lfpp=3D0x11f3ea6c) at
> /usr/local/BSDRP/TESTING/FreeBSD/src/sys/kern/kern_linker.c:2092
> #16 0x010c30d1 in kern_kldload (td=3D0x1157c380, file=3D0x11449c00 "carp",
> fileid=3D0x11f3ea98) at
> /usr/local/BSDRP/TESTING/FreeBSD/src/sys/kern/kern_linker.c:1071
> #17 0x010c31ee in sys_kldload (td=3D0x1157c380, uap=3D0x1157c604) at
> /usr/local/BSDRP/TESTING/FreeBSD/src/sys/kern/kern_linker.c:1097
> #18 0x016d6217 in syscallenter (td=3D<optimized out>) at
> /usr/local/BSDRP/TESTING/FreeBSD/src/sys/i386/i386/../../kern/subr_syscal=
l.c:135
> #19 syscall (frame=3D0x11f3eba8) at
> /usr/local/BSDRP/TESTING/FreeBSD/src/sys/i386/i386/trap.c:1152
> #20 0xffc033a7 in ?? ()
> #21 0x11f3eba8 in ?? ()
> Backtrace stopped: Cannot access memory at address 0xffbfecec
> (kgdb) frame 12
> #12 0x0121c7ef in vnet_register_sysinit (arg=3D0x120182cc
> <vnet_carpstats_init_vnet_init>) at
> /usr/local/BSDRP/TESTING/FreeBSD/src/sys/net/vnet.c:500
> 500                     vs->func(vs->arg);
>=20
>=20
> Regards,
>=20
> Olivier
> _______________________________________________
> 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"




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