Re: panic after ifioctl/if_clone_destroy

From: Roman Bogorodskiy <novel_at_freebsd.org>
Date: Sat, 11 Aug 2018 19:30:53 +0400
  Hans Petter Selasky wrote:

> On 8/11/18 9:44 AM, Roman Bogorodskiy wrote:
> >    Hans Petter Selasky wrote:
> > 
> >> On 08/06/18 21:43, Matthew Macy wrote:
> >>> The struct thread is typesafe. The problem is that the link is no longer
> >>> typesafe now that it’s not part of the thread. Thanks for pointing this
> >>> out. I’ll commit a fix later today.
> >>>
> >>
> >> Is there a patch yet?
> >>
> >> --HPS
> >>
> > 
> > This was committed in:
> > 
> > https://svnweb.freebsd.org/changeset/base/337525
> > 
> > However, I've just updated to r337595, and it still panics. Not sure if
> > that's related to the original issue though:
> > 
> > (kgdb) #0  doadump (textdump=0) at pcpu.h:230
> > #1  0xffffffff8043ddfb in db_dump (dummy=<value optimized out>,
> >      dummy2=<value optimized out>, dummy3=<value optimized out>,
> >      dummy4=<value optimized out>) at /usr/src/sys/ddb/db_command.c:574
> > #2  0xffffffff8043dbc9 in db_command (cmd_table=<value optimized out>)
> >      at /usr/src/sys/ddb/db_command.c:481
> > #3  0xffffffff8043d944 in db_command_loop ()
> >      at /usr/src/sys/ddb/db_command.c:534
> > #4  0xffffffff80440b6f in db_trap (type=<value optimized out>,
> >      code=<value optimized out>) at /usr/src/sys/ddb/db_main.c:252
> > #5  0xffffffff80bdef83 in kdb_trap (type=9, code=0, tf=<value optimized out>)
> >      at /usr/src/sys/kern/subr_kdb.c:693
> > #6  0xffffffff8107aee1 in trap_fatal (frame=0xfffffe00760dc8a0, eva=0)
> >      at /usr/src/sys/amd64/amd64/trap.c:906
> > #7  0xffffffff8107a3bd in trap (frame=0xfffffe00760dc8a0) at counter.h:87
> > #8  0xffffffff81054d05 in calltrap ()
> >      at /usr/src/sys/amd64/amd64/exception.S:232
> > #9  0xffffffff80ded513 in inp_gcmoptions (ctx=0xfffff80003079f20)
> >      at epoch_private.h:188
> > #10 0xffffffff80bd9cba in epoch_call_task (arg=<value optimized out>)
> >      at /usr/src/sys/kern/subr_epoch.c:507
> > #11 0xffffffff80bdd0a9 in gtaskqueue_run_locked (queue=0xfffff800035be900)
> >      at /usr/src/sys/kern/subr_gtaskqueue.c:332
> > #12 0xffffffff80bdce28 in gtaskqueue_thread_loop (arg=<value optimized out>)
> >      at /usr/src/sys/kern/subr_gtaskqueue.c:507
> > #13 0xffffffff80b530c4 in fork_exit (
> >      callout=0xffffffff80bdcda0 <gtaskqueue_thread_loop>,
> >      arg=0xfffffe00061a4038, frame=0xfffffe00760dcac0)
> >      at /usr/src/sys/kern/kern_fork.c:1057
> > #14 0xffffffff81055cde in fork_trampoline ()
> >      at /usr/src/sys/amd64/amd64/exception.S:990
> > #15 0x0000000000000000 in ?? ()
> > Current language:  auto; currently minimal
> > (kgdb)
> > 
> > Full core.txt is here: https://people.freebsd.org/~novel/misc/core.20180811.txt
> > 
> > Roman Bogorodskiy
> > 
> 
> What is the full panic message? Are you loading // unloading any network 
> modules?
> 
> --HPS

Fatal trap 9: general protection fault while in kernel mode
cpuid = 2; apic id = 04
instruction pointer	= 0x20:0xffffffff80ded513
stack pointer	        = 0x28:0xfffffe00760dc960
frame pointer	        = 0x28:0xfffffe00760dc9a0
code segment		= base 0x0, limit 0xfffff, type 0x1b
			= DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags	= interrupt enabled, resume, IOPL = 0
current process		= 0 (softirq_2)

(more details in
https://people.freebsd.org/~novel/misc/core.20180811.txt)

Panic happens right after boot. I do have:

if_tap_load="YES"
if_bridge_load="YES"

in /boot/loader.conf.

Just as before, panic happens after creating/renaming bridge and tap
interfaces. Last few lines before panic (as could be seen in
core.20180811.txt linked above):

bridge0: Ethernet address: 02:af:41:48:c7:00
bridge0: changing name to 'virbr0'
tap0: Ethernet address: 00:bd:95:08:f7:00
tap0: link state changed to UP
tap0: changing name to 'virbr0-nic'
virbr0-nic: promiscuous mode enabled
virbr0: link state changed to UP
virbr0-nic: link state changed to DOWN
virbr0: link state changed to DOWN
bridge0: Ethernet address: 02:af:41:48:c7:00
bridge0: changing name to 'virbr-hostnet'
tap0: Ethernet address: 00:bd:e5:0b:f7:00
tap0: link state changed to UP
tap0: changing name to 'virbr-honet-nic'
virbr-honet-nic: promiscuous mode enabled
virbr-hostnet: link state changed to UP

Roman Bogorodskiy

Received on Sat Aug 11 2018 - 13:31:03 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:17 UTC