Re: an Oops when opening ttyUSB in ftdi_sio driver

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

 



On Thu, Mar 15, 2012 at 10:02:34AM +0800, Ken Huang wrote:
> hi,
> 
> Prevousely i was working on an sms related program using a ftdichip modem in
> 2.6.30-gentoor8 linux with ftdi_sio driver v1.4.3.
> But i was running into a weird situation:
> when OS starts up, my program will try to open /dev/ttyUSB0 infinitely
> without sleep until it succeeds(due to be not considered properly when
> coding), and then i plugin my USB serial modem, a bug message will
> show up immediately with dmesg, and if i unplug modem, the system will
> have no response. Then my program may be killed or be in state D.
> 
> the BUG message copied from dmesg:
> 
> [   43.769794] BUG: unable to handle kernel NULL pointer dereference
> at 00000074
> [   43.775687] IP: [<405829ba>] _spin_lock_irqsave+0x8/0x1a
> [   43.775687] *pdpt = 000000009ad51001 <6>usb 2-2: Detected FT232BM
> [   43.785760] usb 2-2: FTDI USB Serial Device converter now attached
> to ttyUSB0
> [   43.785840] drivers/usb/core/inode.c: creating file '002'
> [   43.785686] *pde = 0000000000000000
> [   43.785686] Oops: 0002 [#1] SMP
> [   43.785686] last sysfs file:
> [   43.785686] Modules linked in: ixgbe igb dca e1000e e1000
> [   43.785686]
> [   43.785686] Pid: 1059, comm: smssp.orig Not tainted (2.6.30-gentoo-
> r8 #24) AM5400B
> [   43.785686] EIP: 0060:[<405829ba>] EFLAGS: 00010046 CPU: 1
> [   43.785686] EIP is at _spin_lock_irqsave+0x8/0x1a
> [   43.785686] EAX: 00000074 EBX: 00000074 ECX: 00000246 EDX: 00000100
> [   43.785686] ESI: dade8400 EDI: 00000000 EBP: d903ba00 ESP: da43be28
> [   43.785686]  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
> [   43.785686] Process smssp.orig (pid: 1059, ti=da43a000
> task=dad6f710 task.ti=da43a000)
> [   43.785686] Stack:
> [   43.785686]  4047d5c8 da5f3000 4045bbb5 4073d460 d903ba00 d9001340
> dade8400 404799fd
> [   43.785686]  d88bfb40 d9001378 d903bad0 d903ba58 d903ba04 da652300
> dade8400 d88bfb40
> [   43.785686]  dade8400 4035d144 da8e48a8 00000000 00000902 00000100
> 0bc00000 00000000
> [   43.785686] Call Trace:
> [   43.785686]  [<4047d5c8>] ? ftdi_open+0x42/0x1a1
> [   43.785686]  [<4045bbb5>] ? usb_autopm_do_interface+0x9a/0xa1
> [   43.785686]  [<404799fd>] ? serial_open+0x112/0x189
> [   43.785686]  [<4035d144>] ? tty_open+0x27b/0x3a9
> [   43.785686]  [<40293524>] ? chrdev_open+0x128/0x152
> [   43.785686]  [<402a198c>] ? mntput_no_expire+0x12/0xe0
> [   43.785686]  [<402933fc>] ? chrdev_open+0x0/0x152
> [   43.785686]  [<4028f5dd>] ? __dentry_open+0x113/0x1e9
> [   43.785686]  [<40290413>] ? nameidata_to_filp+0x29/0x3c
> [   43.785686]  [<40299ac4>] ? do_filp_open+0x3ab/0x689
> [   43.785686]  [<4025d5bb>] ? __rcu_process_callbacks+0x57/0x159
> [   43.785686]  [<40236d6a>] ? autoremove_wake_function+0x0/0x2d
> [   43.785686]  [<402a05ff>] ? alloc_fd+0x5e/0xd0
> [   43.785686]  [<4028f3ea>] ? do_sys_open+0x44/0xb4
> [   43.785686]  [<4028f49e>] ? sys_open+0x1e/0x23
> [   43.785686]  [<40202964>] ? sysenter_do_call+0x12/0x22
> [   43.785686] Code: 74 05 e8 3e fe ff ff c3 fa f0 83 28 01 79 05 e8
> 4d fe ff ff c3 f0 81 00 00 00 00 01 fb c3 f0 ff 00 fb c3 9c 59 fa ba
> 00 01 00 00 <f0> 66 0f c1 10 38 f2 74 06 f3 90 8a 10 eb f6 89 c8 c3 9c
> 5a fa
> [   43.785686] EIP: [<405829ba>] _spin_lock_irqsave+0x8/0x1a SS:ESP
> 0068:da43be28
> [   43.785686] CR2: 0000000000000074
> [   43.785686] ---[ end trace b68e6189f2a3d267 ]---
> [   45.882827] hub 1-0:1.0: hub_suspend
> [   45.886552] usb usb1: bus auto-suspend
> [   45.890434] ehci_hcd 0000:00:1d.7: suspend root hub

The oops above is from 2.6.30 -- can you reproduce this on 3.2.11 and
attach the corresponding oops message?

[...]
 
> reproducing procedure:
> 1.insmod usbserial.ko ftdi_sio.ko
> 2.#./usb.exe to run my test program
> 3.plug USB modem in and the dmesg about ftdi_sio stack info above
> shows up

Can you reproduce this if you enable debugging by loading the modules
with the debug flag?

	modprobe usbserial debug=1
	modprobe ftdi_sio debug=1

[...]

> I've tried to compile newer kernel to check if it has similar
> issue(bug info from dmesg), and
> the follow is the tested buggy kernel:
> 2.6.32.58
> 2.6.35.13
> 3.2.11
> all of them are downloaded from main page of kernel.org

Please try the above with 3.2.11.

Thanks,
Johan
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux