Issue947

Title Kernel panic during boot in usb_add_task
Priority bug Status resolved
Superseder Nosy List mneumann
Assigned To Keywords

Created on 2008-02-12.20:59:18 by mneumann, last changed by hasso.

Messages
msg4713 (view) Author: majeru Date: 2008-05-25.18:40:37
Hello,

I also have a HP 6710b laptop, and when I first got this panic I started hunting
for devices, and I noticed that the crash is triggered only when the bluetooth
adapter is enabled in BIOS and when it is already started at boot time, so I
disabled it from BIOS as a workaround.
I'm going to re-enable it and see if it works.

Thanks for the fix and huge amounts of beer to the one who did it ;)

Regards, 
Cristi
msg4709 (view) Author: mneumann Date: 2008-05-25.17:10:11
This is fixed in revision 1.44 of src/sys/bus/usb/usb.c.
msg4305 (view) Author: nthery Date: 2008-02-13.23:10:02
The exception occurs in TAILQ_INSERT_HEAD(&taskq->tasks, task, next),
more precisely, looking at the macro expansion, in
*(&taskq->tasks)->tqh_last = task.

So it looks like tqh_last is a NULL ptr which presumably means that
the list head has not been initialized yet.

Maybe usb_add_task() is called before usb_create_event_thread() (which
initializes usb_taskq[]).
msg4304 (view) Author: dillon Date: 2008-02-13.20:38:02
:New submission from Michael Neumann <mneumann@ntecs.de>:
:
:I tried my brand new HP Compaq laptop 6710b under DragonFly, but during boo=
:ting
:the installer CD it "throws" a page fault:
:
:  uhub0: 2 ports ...
:  uhub0: <Intel UHCI root hub, ...>
:
:  Fatal trap 12: page fault while in kernel mode
:  fault virtual address =3D 0x0
:  fault code            =3D supervisor write, page not present
:  instruction pointer   =3D 0x8:0xc04a9c5c
:  stack pointer         =3D 0x10:0xc25f8d38
:  frame pointer         =3D 0x10:0xc25f8d48
:  code segment          =3D base 0x0, limit 0xfffff, type 0x1b
:                        =3D DPL 0, pres 1, def32 1, gram 1
:  processor eflags      =3D interrupt enabled, resume, IOPL =3D 0
:  current process       =3D Idle
:  current thread        =3D pri 46 (CRIT)
:
:  kernel: type 12, code=3D2
:  stopped at       usb_add_task+0x4c:    movl     %edi,0(%eax)
:
:
:This happens with the latest snapshot version as of yesterday and also with=
: the
:1=2E10 release.
:
:FreeBSD 7.0-BETA3 silently hangs during boot, while NetBSD 4.0RC_4 works li=
:ke a
:charm (it can even dual-boot windows natively)!=20
:
:There exists a thread on dragonfly.kernel named "Kernel panic during boot in
:usb_add_task" about this issue.

    Can you do a traceback ?  The 'trace' command from the DDB prompt,
    I believe.

					-Matt
					Matthew Dillon 
					<dillon@backplane.com>
msg4303 (view) Author: corecode Date: 2008-02-12.22:08:00
Could we get a backtrace and/or a crashdump?
msg4302 (view) Author: TGEN Date: 2008-02-12.22:01:00
...
>   stopped at       usb_add_task+0x4c:    movl     %edi,0(%eax)

Smells of a null pointer dereference to me.
-- 
         Thomas E. Spanjaard
         tgen@netphreax.net
msg4301 (view) Author: mneumann Date: 2008-02-12.21:00:11
The "bug" disappears if I compile a kernel without USB support.
msg4300 (view) Author: mneumann Date: 2008-02-12.20:59:16
I tried my brand new HP Compaq laptop 6710b under DragonFly, but during booting
the installer CD it "throws" a page fault:

  uhub0: 2 ports ...
  uhub0: <Intel UHCI root hub, ...>

  Fatal trap 12: page fault while in kernel mode
  fault virtual address = 0x0
  fault code            = supervisor write, page not present
  instruction pointer   = 0x8:0xc04a9c5c
  stack pointer         = 0x10:0xc25f8d38
  frame pointer         = 0x10:0xc25f8d48
  code segment          = base 0x0, limit 0xfffff, type 0x1b
                        = DPL 0, pres 1, def32 1, gram 1
  processor eflags      = interrupt enabled, resume, IOPL = 0
  current process       = Idle
  current thread        = pri 46 (CRIT)

  kernel: type 12, code=2
  stopped at       usb_add_task+0x4c:    movl     %edi,0(%eax)


This happens with the latest snapshot version as of yesterday and also with the
1.10 release.

FreeBSD 7.0-BETA3 silently hangs during boot, while NetBSD 4.0RC_4 works like a
charm (it can even dual-boot windows natively)! 

There exists a thread on dragonfly.kernel named "Kernel panic during boot in
usb_add_task" about this issue.
History
Date User Action Args
2008-09-14 18:27:41hassosetstatus: chatting -> resolved
2008-05-25 18:40:38majerusetstatus: resolved -> chatting
messages: + msg4713
2008-05-25 17:10:11mneumannsetstatus: chatting -> resolved
messages: + msg4709
2008-02-13 23:10:09ntherysetmessages: + msg4305
2008-02-13 20:38:06dillonsetmessages: + msg4304
2008-02-12 22:08:00corecodesetmessages: + msg4303
2008-02-12 22:01:00TGENsetmessages: + msg4302
2008-02-12 21:00:12mneumannsetstatus: unread -> chatting
messages: + msg4301
2008-02-12 20:59:18mneumanncreate