Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Oct 2000 17:41:22 +0100
From:      Vadim Belman <voland@lflat.org>
To:        freebsd-hackers@freebsd.org
Subject:   ulpt is broken.
Message-ID:  <20001029174122.A31674@lflat.org>

next in thread | raw e-mail | index | archive | help

I've tried to use uplt instead of lpt and got a kernel panic. From kernel
stack trace I found that it happens due to a wrong pointer to dev structure
being passed to usbd_do_request_flags. I've made a PR for the problem
(despite its number is'n known to me yet) but would like to duplicate it
here.

In fact, the stack trace must be containing all the needed information:

IdlePTD 4214784
initial pcb at 3681c0
panicstr: from debugger
panic messages:
---
Fatal trap 12: page fault while in kernel mode
fault virtual address	= 0x20726568
fault code		= supervisor read, page not present
instruction pointer	= 0x8:0xc01811a7
stack pointer	        = 0x10:0xc842ccb4
frame pointer	        = 0x10:0xc842cccc
code segment		= base 0x0, limit 0xfffff, type 0x1b
			= DPL 0, pres 1, def32 1, gran 1
processor eflags	= interrupt enabled, resume, IOPL = 0
current process		= 2858 (lpd)
panic: from debugger
panic: from debugger
Uptime: 36m38s

dumping to dev #da/0x20001, offset 262144
dump 128 127 126 125 124 123 122 121 120 119 118 117 116 115 114 113 112
111 110 109 108 107 106 105 104 103 102 101 100 99 98 97 96 95 94 93 92 91
90 89 88 87 86 85 84 83 82 81 80 79 78 77 76 75 74 73 72 71 70 69 68 67 66
65 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41
40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 
---
#0  dumpsys () at /usr/src/sys/kern/kern_shutdown.c:475
475		if (dumping++) {
#0  dumpsys () at /usr/src/sys/kern/kern_shutdown.c:475
#1  0xc019e6ac in boot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:318
#2  0xc019eaad in panic (fmt=0xc02c5894 "from debugger")
    at /usr/src/sys/kern/kern_shutdown.c:566
#3  0xc012f945 in db_panic (addr=-1072164441, have_addr=0, count=-1, 
    modif=0xc842cb2c "") at /usr/src/sys/ddb/db_command.c:433
#4  0xc012f8e3 in db_command (last_cmdp=0xc031cbdc, cmd_table=0xc031ca3c, 
    aux_cmd_tablep=0xc03616ac) at /usr/src/sys/ddb/db_command.c:333
#5  0xc012f9aa in db_command_loop () at /usr/src/sys/ddb/db_command.c:455
#6  0xc0131bf7 in db_trap (type=12, code=0) at
/usr/src/sys/ddb/db_trap.c:71
#7  0xc029c776 in kdb_trap (type=12, code=0, regs=0xc842cc74)
    at /usr/src/sys/i386/i386/db_interface.c:163
#8  0xc02a8888 in trap_fatal (frame=0xc842cc74, eva=544367976)
    at /usr/src/sys/i386/i386/trap.c:934
#9  0xc02a8601 in trap_pfault (frame=0xc842cc74, usermode=0, eva=544367976)
    at /usr/src/sys/i386/i386/trap.c:853
#10 0xc02a814b in trap (frame={tf_fs = -1071972336, tf_es = 16, tf_ds = 16, 
      tf_edi = 0, tf_esi = 375, tf_ebp = -935146292, tf_isp = -935146336, 
      tf_ebx = -935146236, tf_edx = 544367976, tf_ecx = 544367976, 
      tf_eax = -935146237, tf_trapno = 12, tf_err = 0, tf_eip =
-1072164441, 
      tf_cs = 8, tf_eflags = 66118, tf_esp = -1055754752, tf_ss = 375})
    at /usr/src/sys/i386/i386/trap.c:436
#11 0xc01811a7 in usbd_do_request_flags (dev=0x20726568, req=0xc842cd04, 
    data=0xc842cd03, flags=0, actlen=0x0) at
/usr/src/sys/dev/usb/usbdi.c:938
#12 0xc018117c in usbd_do_request (dev=0x20726568, req=0xc842cd04, 
    data=0xc842cd03) at /usr/src/sys/dev/usb/usbdi.c:919
#13 0xc017d540 in ulpt_status (sc=0xc1127600)
    at /usr/src/sys/dev/usb/ulpt.c:357
#14 0xc017d6e1 in ulptopen (dev=0xc103fc00, flag=2, mode=8192,
p=0xc7fff100)
    at /usr/src/sys/dev/usb/ulpt.c:418
#15 0xc01e358a in spec_open (ap=0xc842cda0)
    at /usr/src/sys/miscfs/specfs/spec_vnops.c:200
#16 0xc01e3439 in spec_vnoperate (ap=0xc842cda0)
    at /usr/src/sys/miscfs/specfs/spec_vnops.c:117
#17 0xc0279071 in ufs_vnoperatespec (ap=0xc842cda0)
    at /usr/src/sys/ufs/ufs/ufs_vnops.c:2312
#18 0xc01dd467 in vn_open (ndp=0xc842ce74, flagp=0xc842ce40, cmode=48)
    at vnode_if.h:189
#19 0xc01d8ead in open (p=0xc7fff100, uap=0xc842cf80)
    at /usr/src/sys/kern/vfs_syscalls.c:999
#20 0xc02a8cf8 in syscall2 (frame={tf_fs = 47, tf_es = 47, tf_ds = 47, 
      tf_edi = 134578534, tf_esi = -1077937784, tf_ebp = -1077938048, 
      tf_isp = -935145516, tf_ebx = 2, tf_edx = -1077938104, tf_ecx = 2, 
      tf_eax = 5, tf_trapno = 7, tf_err = 2, tf_eip = 269347636, tf_cs =
31, 
      tf_eflags = 582, tf_esp = -1077938092, tf_ss = 47})
    at /usr/src/sys/i386/i386/trap.c:1139
#21 0xc029d0df in Xint0x80_syscall ()
#22 0x804dbe9 in ?? ()
#23 0x804b5cd in ?? ()
#24 0x804db8e in ?? ()
#25 0x804acd5 in ?? ()
#26 0x804ab37 in ?? ()
#27 0x804a1e1 in ?? ()


-- 
    /Voland			Vadim Belman
				E-mail: voland@lflat.org


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




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