Bug 194569 - kernel panics while loading vmm(4)
Summary: kernel panics while loading vmm(4)
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: amd64 Any
: --- Affects Some People
Assignee: freebsd-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-24 05:59 UTC by Shuichi KITAGUCHI
Modified: 2014-10-24 05:59 UTC (History)
0 users

See Also:


Attachments
vmm.c.patch (291 bytes, patch)
2014-10-24 05:59 UTC, Shuichi KITAGUCHI
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Shuichi KITAGUCHI 2014-10-24 05:59:05 UTC
Created attachment 148601 [details]
vmm.c.patch

When loading vmm(4), following stack trace is shown and kernel panics.

(kgdb) #0  doadump (textdump=0) at pcpu.h:219
#1  0xffffffff80332b8e in db_dump (dummy=<value optimized out>, dummy2=0,
    dummy3=0, dummy4=0x0) at /data/rhea/usr/src/sys/ddb/db_command.c:533
#2  0xffffffff8033266d in db_command (cmd_table=0x0)
    at /data/rhea/usr/src/sys/ddb/db_command.c:440
#3  0xffffffff803323e4 in db_command_loop ()
    at /data/rhea/usr/src/sys/ddb/db_command.c:493
#4  0xffffffff80334e60 in db_trap (type=<value optimized out>, code=0)
    at /data/rhea/usr/src/sys/ddb/db_main.c:251
#5  0xffffffff806c9111 in kdb_trap (type=12, code=0, tf=<value optimized out>)
    at /data/rhea/usr/src/sys/kern/subr_kdb.c:654
#6  0xffffffff808fd45c in trap_fatal (frame=0xfffffe046bcc2400,
    eva=<value optimized out>)
    at /data/rhea/usr/src/sys/amd64/amd64/trap.c:861
#7  0xffffffff808fd6f6 in trap_pfault (frame=0xfffffe046bcc2400,
    usermode=<value optimized out>)
    at /data/rhea/usr/src/sys/amd64/amd64/trap.c:677
#8  0xffffffff808fce0e in trap (frame=0xfffffe046bcc2400)
    at /data/rhea/usr/src/sys/amd64/amd64/trap.c:426
#9  0xffffffff808e20b2 in calltrap ()
    at /data/rhea/usr/src/sys/amd64/amd64/exception.S:231
#10 0xffffffff807405fb in strlen (str=0x0)
    at /data/rhea/usr/src/sys/libkern/strlen.c:98
#11 0xffffffff8064e8de in freeenv (env=0x0)
    at /data/rhea/usr/src/sys/kern/kern_environment.c:266
#12 0xffffffff816059a8 in vmm_is_pptdev (bus=0, slot=0, func=0)
    at /data/rhea/usr/src/sys/modules/vmm/../../amd64/vmm/vmm.c:1969
#13 0xffffffff8160ca27 in ppt_probe (dev=0xfffff8000765bd00)
    at /data/rhea/usr/src/sys/modules/vmm/../../amd64/vmm/io/ppt.c:128
#14 0xffffffff806be860 in device_probe_child (dev=0xfffff8000765c000,
    child=0xfffff8000765bd00) at device_if.h:108
#15 0xffffffff806bf4c0 in device_probe (dev=0xfffff8000765bd00)
    at /data/rhea/usr/src/sys/kern/subr_bus.c:2763
#16 0xffffffff806bf5ae in device_probe_and_attach (dev=0xfffff8000765bd00)
    at /data/rhea/usr/src/sys/kern/subr_bus.c:2787
#17 0xffffffff804c8a6a in pci_driver_added (dev=0xfffff8000765c000,
    driver=<value optimized out>) at /data/rhea/usr/src/sys/dev/pci/pci.c:3784
#18 0xffffffff806bdb5a in devclass_driver_added (dc=0xfffff800074aaf00,
    driver=0xffffffff816298e0) at bus_if.h:204
#19 0xffffffff806bdabc in devclass_add_driver (dc=0xfffff800074aaf00,
    driver=0xffffffff816298e0, pass=<value optimized out>,
    dcp=<value optimized out>) at /data/rhea/usr/src/sys/kern/subr_bus.c:1138
#20 0xffffffff80676490 in module_register_init (arg=0xffffffff81629958)
    at /data/rhea/usr/src/sys/kern/kern_module.c:123
#21 0xffffffff8066b238 in linker_load_module (kldname=<value optimized out>,
    modname=0xfffff8000bf6e000 "vmm", parent=0x0, verinfo=0x0,
    lfpp=0xfffffe046bcc2a68) at /data/rhea/usr/src/sys/kern/kern_linker.c:224
#22 0xffffffff8066c617 in kern_kldload (td=<value optimized out>,
    file=<value optimized out>, fileid=0xfffffe046bcc2aa4)
    at /data/rhea/usr/src/sys/kern/kern_linker.c:1031
#23 0xffffffff8066c6db in sys_kldload (td=0xfffff80178059000,
    uap=<value optimized out>)
    at /data/rhea/usr/src/sys/kern/kern_linker.c:1057

This panic occurs when "pptdev" kernel environment is not set.
Attached patch fixes this problem, I think.