Kernel Oops on Unexpected Disconnect of /dev/ttyUSBx Device

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

 



Hi Again

I am resubmitting this with a new title and additional information. My
previous post may have incorrectly led readers to believe there was 
a bug in the sierra driver which is not the case. My intention with this
posting is/was to report a bug in the kernel related to the unexpected 
disconnect of a /dev/ttyUSBx device. 

I have confirmed this is not only a sierra serial driver problem by
repeating a test using a Prolific Technology Inc. PL2302 USB-to-RS-232 
converter cable and I get the same result. I used the "cat" test, described
below. 

If this is the wrong forum for this post, perhaps someone would be kind 
enough to advise a more appropriate venue. The remainder of this post is
a duplicate of one I submitted on Friday Nov. 20th.

Using kernel 2.6.27.39 we can reproduce a kernel oops in the sierra 
driver. We haven't pinpointed which exact kernel version introduced this 
problem, but it does _not_ occur in the kernel delivered with Ubuntu 
8.10 (2.6.27-7). The results reported in the remainder of this email
were gathered using a Ubuntu 8.04 machine on i386 architecture.

We downloaded 2.6.27.39 today from kernel.org and built it on our 8.04 
machine. The ".config" file contains all the same settings as Ubuntu 
8.04 and all the additional ones are the default. 

A similar problem seems to be the subject of this discussion:

http://bugzilla.kernel.org/show_bug.cgi?id=13675

The overall cause appears to be that the driver's shutdown entry
is being called before the close entry. When we try this on 
well-behaved kernels, the order is reversed - close first, then
shutdown.

Two different examples of how we reproduce this problem are:

1) Take a modem and start a PPP session using the PPP daemon
2) Pull the modem from the host computer
3) Dump the log and see the oops

Another way to reproduce it is:

1) Open a shell, then
2) cat > /dev/ttyUSB2
3) Unplug the modem (dumping the log here reveals no problem... yet)
4) ^C the command from step 2
5) Dump the log and see the oops

Neither of these methods reproduces the oops on other kernels: 2.6.24-16 
and 2.6.27-7.

Here is the oops report produced using the first example - disconnecting the 
modem during an active PPP session:

[  323.672675] BUG: unable to handle kernel NULL pointer dereference at 00000060
[  323.672681] IP: [<f8d71437>] :sierra:sierra_close+0x17/0xe0
[  323.672690] *pde = 00000000 
[  323.672694] Oops: 0002 [#1] SMP 
[  323.672698] Modules linked in: ppp_deflate zlib_deflate bsd_comp ppp_async crc_ccitt ppp_generic slhc sierra_net usbnet mii sierra usbserial af_packet i915 drm ipv6 uinput ppdev acpi_cpufreq cpufreq_stats cpufreq_ondemand cpufreq_conservative cpufreq_userspace freq_table cpufreq_powersave container sbs sbshc iptable_filter ip_tables x_tables parport_pc lp parport pcmcia psmouse serio_raw pcspkr yenta_socket rsrc_nonstatic pcmcia_core iTCO_wdt iTCO_vendor_support battery ac thinkpad_acpi video output rfkill shpchp pci_hotplug led_class intel_agp button agpgart nvram evdev ext3 jbd mbcache sr_mod cdrom pata_acpi usbhid hid sg sd_mod ata_piix ata_generic ahci libata scsi_mod dock tg3 libphy ehci_hcd uhci_hcd usbcore thermal processor fan thermal_sys fuse
[  323.672767] 
[  323.672770] Pid: 6813, comm: pppd Not tainted (2.6.27.39-rf #1)
[  323.672773] EIP: 0060:[<f8d71437>] EFLAGS: 00010282 CPU: 1
[  323.672778] EIP is at sierra_close+0x17/0xe0 [sierra]
[  323.672780] EAX: da12b800 EBX: f1c20300 ECX: e881ba80 EDX: f7999200
[  323.672782] ESI: 00000000 EDI: f7999200 EBP: f1c20a20 ESP: da0cbe94
[  323.672785]  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
[  323.672788] Process pppd (pid: 6813, ti=da0ca000 task=f1f54b70 task.ti=da0ca000)
[  323.672790] Stack: da12b800 00000000 f8d743a0 f7999200 f1c20a20 f799924c f8d68a14 ffffffff 
[  323.672798]        ffffffff da12b800 e881ba80 e881ba80 da12b800 f8d74980 da12b800 00000000 
[  323.672805]        d3c8fd48 e881ba80 c02613da c01032b9 00000000 c0143dbc da0cbf10 0000ccb0 
[  323.672813] Call Trace:
[  323.672818]  [<f8d68a14>] serial_close+0x164/0x1c0 [usbserial]
[  323.672827]  [<c02613da>] release_dev+0x14a/0x500
[  323.672834]  [<c01032b9>] do_notify_resume+0x3a9/0x7b0
[  323.672839]  [<c0143dbc>] getnstimeofday+0x4c/0x110
[  323.672845]  [<c026179f>] tty_release+0xf/0x20
[  323.672848]  [<c018fb03>] __fput+0xa3/0x190
[  323.672852]  [<c018cad9>] filp_close+0x49/0x80
[  323.672857]  [<c018e10c>] sys_close+0x6c/0xc0
[  323.672861]  [<c0103dcb>] sysenter_do_call+0x12/0x2f
[  323.672865]  =======================
[  323.672866] Code: 3f 89 c6 75 cf 89 c2 89 e8 5b 5e 5f 5d e9 b2 2a 5b c7 66 90 55 57 89 d7 56 53 83 ec 08 89 04 24 8b 2a 8b b2 94 01 00 00 8b 5d 48 <c7> 46 60 00 00 00 00 c7 46 64 00 00 00 00 8b 45 08 e8 73 e3 ae 
[  323.672910] EIP: [<f8d71437>] sierra_close+0x17/0xe0 [sierra] SS:ESP 0068:da0cbe94
[  323.672919] ---[ end trace 9f352d0994a9bff9 ]---







--
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