NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/52796: repeated modload panics netbsd-7



>Number:         52796
>Category:       kern
>Synopsis:       repeated modload panics netbsd-7
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Dec 08 23:45:00 +0000 2017
>Originator:     Valery Ushakov
>Release:        NetBSD-7
>Organization:
>Environment:
>Description:

>How-To-Repeat:
There are two related problems with modload on NetBSD-7.

First, modload is confused about modload name vs. modload path.  This
is also still a problem in -8/current, but works in -6.

Consider NetBSD-6:

  nb6# modload nand
  nb6# modload nand
  modload: File exists
  nb6# modload /stand/i386/6.1/modules/nand/nand.kmod 
  modload: File exists

On NetBSD-7 however:

  nb7# modload nand
  nb7# modload nand
  modload: File exists
  nb7# modload /stand/i386/7.1/modules/nand/nand.kmod 
  configure: `nand' driver init failed: 17
  WARNING: module error: modcmd function failed for `nand', error 17
  modload: File exists
  nb7# modload /stand/i386/7.1/modules/nand/nand.kmod 
  uvm_fault(0xc27ed91c, 0x2aae5000, 1) -> 0xe
  fatal page fault in supervisor mode
  trap type 6 code 0 eip c0666c2b cs 8 eflags 10207 cr2 2aae55cc ilevel 0 esp c34b595f
  curlwp 0xc2964aa0 pid 838 lid 1 lowest kstack 0xda8fc2c0
  panic: trap
  cpu0: Begin traceback...
  vpanic(c0de3c6f,da8fdb08,da8fdb84,c097cdf3,c0de3c6f,da8fdb90,da8fdb90,1,da8fc2c0,10207) at netbsd:vpanic+0x121
  snprintf(c0de3c6f,da8fdb90,da8fdb90,1,da8fc2c0,10207,2aae55cc,0,c34b595f,c27e81b0) at netbsd:snprintf
  trap_tss() at netbsd:trap_tss
  --- trap via task gate ---
  c34b5000:
  cpu0: End traceback...

So when you try to load module with pathname, it actually gets loaded
(this is more visible on -8 where you also get complaints from the
linker about duplicate symbols).

[using uatp here as nand seems broken as module]

  nb8# modload uatp
  nb8# modload uatp
  modload: uatp: File exists
  nb8# modload /stand/i386/8.99.9/modules/uatp/uatp.kmod
  kobj_checksyms, 1019: [%M/uatp/uatp.kmod]: linker error: global symbol `uatp_cd' redefined
  kobj_checksyms, 1019: [%M/uatp/uatp.kmod]: linker error: global symbol `uatp_ca' redefined
  modload: /stand/i386/8.99.9/modules/uatp/uatp.kmod: Exec format error
  nb8# modload /stand/i386/8.99.9/modules/uatp/uatp.kmod
  kobj_checksyms, 1019: [%M/uatp/uatp.kmod]: linker error: global symbol `uatp_cd' redefined
  kobj_checksyms, 1019: [%M/uatp/uatp.kmod]: linker error: global symbol `uatp_ca' redefined
  modload: /stand/i386/8.99.9/modules/uatp/uatp.kmod: Exec format error

>Fix:



Home | Main Index | Thread Index | Old Index