WARNING: at /build/buildd/linux-2.6.26/drivers/usb/serial/usb-serial.c:322 serial_write_room+0x72/0x80 [usbserial]()

Bug #258804 reported by Matt Zimmerman
8
Affects Status Importance Assigned to Milestone
Linux
Fix Released
Medium
linux (Debian)
Fix Released
Unknown
linux (Ubuntu)
Fix Released
Medium
Stefan Bader

Bug Description

While experimenting with a 3G card and Network Manager, I received a large burst (over 30) of warnings of the form:

Aug 16 18:22:11 perseus klogd: [21962.699081] WARNING: at /build/buildd/linux-2.6.26/drivers/usb/serial/usb-serial.c:322 serial_write_room+0x72/0x80 [usbserial]()

I am attaching a log showing the call traces etc.

ProblemType: Bug
Architecture: amd64
DistroRelease: Ubuntu 8.10
Package: linux-image-2.6.26-5-generic 2.6.26-5.17 [modified: lib/modules/2.6.26-5-generic/modules.pcimap lib/modules/2.6.26-5-generic/modules.dep lib/modules/2.6.26-5-generic/modules.ieee1394map lib/modules/2.6.26-5-generic/modules.usbmap lib/modules/2.6.26-5-generic/modules.isapnpmap lib/modules/2.6.26-5-generic/modules.inputmap lib/modules/2.6.26-5-generic/modules.seriomap lib/modules/2.6.26-5-generic/modules.alias lib/modules/2.6.26-5-generic/modules.symbols]
ProcCmdLine: root=UUID=305dde78-d20a-4248-aaf4-09447b7c5791 ro quiet splash
ProcEnviron:
 LC_COLLATE=C
 PATH=/home/username/bin:/usr/lib/ccache:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/sbin:/usr/sbin:/usr/games:/usr/lib/surfraw
 LANG=en_US.UTF-8
 SHELL=/bin/zsh
ProcVersionSignature: Ubuntu 2.6.26-5.17-generic
SourcePackage: linux

Revision history for this message
Matt Zimmerman (mdz) wrote :
Changed in linux:
assignee: nobody → ubuntu-kernel-team
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

The Ubuntu Kernel Team is planning to move to the 2.6.27 kernel for the upcoming Intrepid Ibex 8.10 release. As a result, the kernel team would appreciate it if you could please test this newer 2.6.27 Ubuntu kernel. There are one of two ways you should be able to test:

1) If you are comfortable installing packages on your own, the linux-image-2.6.27-* package is currently available for you to install and test.

--or--

2) The upcoming Alpha5 for Intrepid Ibex 8.10 will contain this newer 2.6.27 Ubuntu kernel. Alpha5 is set to be released Thursday Sept 4. Please watch http://www.ubuntu.com/testing for Alpha5 to be announced. You should then be able to test via a LiveCD.

Please let us know immediately if this newer 2.6.27 kernel resolves the bug reported here or if the issue remains. More importantly, please open a new bug report for each new bug/regression introduced by the 2.6.27 kernel and tag the bug report with 'linux-2.6.27'. Also, please specifically note if the issue does or does not appear in the 2.6.26 kernel. Thanks again, we really appreicate your help and feedback.

Revision history for this message
Matt Zimmerman (mdz) wrote :

I am still seeing this in 2.6.27-2.3.

Revision history for this message
Matt Zimmerman (mdz) wrote :

This warning seems to indicate that the .write_room function is being called when the device is not open. It's not clear to me why that condition justifies a warning, though. Other tty devices don't seem to care so much.

Revision history for this message
Matt Zimmerman (mdz) wrote :
Changed in linux:
status: Unknown → Confirmed
status: Unknown → Confirmed
Revision history for this message
Matt Zimmerman (mdz) wrote :

Still happens on 2.6.27-5.8

Changed in linux:
status: Confirmed → Fix Released
Changed in linux:
status: Confirmed → Fix Released
Stefan Bader (smb)
Changed in linux:
assignee: ubuntu-kernel-team → stefan-bader-canonical
Revision history for this message
Stefan Bader (smb) wrote :

The driver behind this is sierra.c. The kernel bug as well as the debian bug are related to option.c. I change the kernel bug to one matching better.

Changed in linux:
status: Fix Released → Unknown
Changed in linux:
status: Unknown → Confirmed
Revision history for this message
Stefan Bader (smb) wrote :

There seem to be debug options for usb-serial and sierra. Could you add dmesg output of the warning with

options usb-serial debug=1
options sierra debug=1

set?

Revision history for this message
Matt Zimmerman (mdz) wrote :

Debug output attached.

Revision history for this message
Stefan Bader (smb) wrote :

Some of the things I noticed: open and close seem balanced. The interesting part is that in the first case the outdat callbacks for the written data are called and all indat callbacks see urb's with error status. In the failure case there outdat callbacks are not called before the close and two of the three indat callbacks see urb's without an error status and then try to write data.
Compared to the option driver, the sierra driver allocates the outbound urb's dynamically and therfor cannot kill them on close.

Revision history for this message
Stefan Bader (smb) wrote :

Does this sierra.ko (for i386-generic 2.6.27-7.11) give better results?

Revision history for this message
Matt Zimmerman (mdz) wrote : Re: [Bug 258804] Re: WARNING: at /build/buildd/linux-2.6.26/drivers/usb/serial/usb-serial.c:322 serial_write_room+0x72/0x80 [usbserial]()

On Thu, Oct 16, 2008 at 09:50:12PM -0000, Stefan Bader wrote:
> Does this sierra.ko (for i386-generic 2.6.27-7.11) give better results?
>
> ** Attachment added: "sierra.ko"
> http://launchpadlibrarian.net/18619719/sierra.ko

As shown in the bug description, I'm running a 64-bit kernel, so I can't use
this module. Can you attach the patch you used and/or build me a matching
module?

--
 - mdz

Revision history for this message
Stefan Bader (smb) wrote :

Sorry, I am attaching the module with the correct architecture.

Revision history for this message
Stefan Bader (smb) wrote :

This patch was used for the modules.

Revision history for this message
Matt Zimmerman (mdz) wrote :

On Mon, Oct 20, 2008 at 08:15:24AM -0000, Stefan Bader wrote:
> Sorry, I am attaching the module with the correct architecture.

With this module, I'm no longer able to reproduce the warning with my
previous test case (echoing a command to /dev/ttyUSB0). I can't currently
test whether the device still works properly otherwise, as I will need to
swap a SIM card into it.

--
 - mdz

Changed in linux:
status: Confirmed → In Progress
Revision history for this message
Stefan Bader (smb) wrote :

Matt, I got a intrepid kernel including the proposed fix in my PPA at https://launchpad.net/~stefan-bader-canonical/+archive. Would it be possible for you to try this and check whether this fixes the warning while still keep the device working? Thanks.

Revision history for this message
Matt Zimmerman (mdz) wrote :

On Thu, Jan 08, 2009 at 02:44:03PM -0000, Stefan Bader wrote:
> Matt, I got a intrepid kernel including the proposed fix in my PPA at
> https://launchpad.net/~stefan-bader-canonical/+archive. Would it be
> possible for you to try this and check whether this fixes the warning
> while still keep the device working? Thanks.

I've since upgraded to Jaunty, so I'm running 2.6.28-4.6-generic. Does that
package include this patch as well?

--
 - mdz

Revision history for this message
Stefan Bader (smb) wrote : Re: [Bug 258804] Re: WARNING: at /build/buildd/linux-2.6.26/drivers/usb/serial/usb-serial.c:322 serial_write_room+0x72/0x80 [usbserial]()

> I've since upgraded to Jaunty, so I'm running 2.6.28-4.6-generic. Does that
> package include this patch as well?

No, not yet. The driver itself has also changed slightly around there. But if
you could verify whether the warning will still be issued with Jaunty, that
would help too. If yes, I forward-port the patch-ords!

Revision history for this message
Matt Zimmerman (mdz) wrote : Re: [Bug 258804] Re: WARNING: at /build/buildd/linux-2.6.26/drivers/usb/serial/usb-serial.c:322 serial_write_room+0x72/0x80 [usbserial]()

On Fri, Jan 09, 2009 at 09:26:13PM -0000, Stefan Bader wrote:
> > I've since upgraded to Jaunty, so I'm running 2.6.28-4.6-generic. Does that
> > package include this patch as well?
>
> No, not yet. The driver itself has also changed slightly around there. But if
> you could verify whether the warning will still be issued with Jaunty, that
> would help too. If yes, I forward-port the patch-ords!

I can still reproduce on 2.6.28-4.6-generic with:

echo "at" > /dev/ttyUSB0

--
 - mdz

Revision history for this message
Stefan Bader (smb) wrote :

I uploaded some test kernels based on 2.6.28-11.42 to http://people.ubuntu.com/~smb/bug258804/
Could you try with one of those and see whether the warning is gone and the functionality seems to be ok? Thanks.

Changed in linux (Ubuntu):
status: Triaged → In Progress
Revision history for this message
Matt Zimmerman (mdz) wrote :

I'm no longer able to reproduce this on 2.6.28-11.42 using my test case in https://bugs.edge.launchpad.net/ubuntu/+source/linux/+bug/258804/comments/19

This means it would be difficult to tell whether your test kernels fix the problem. Do you have any other ideas for how I could trigger the bug?

Revision history for this message
Stefan Bader (smb) wrote : Re: [Bug 258804] Re: WARNING: at /build/buildd/linux-2.6.26/drivers/usb/serial/usb-serial.c:322 serial_write_room+0x72/0x80 [usbserial]()

Right, I might need to check whether there has been some other means of
protecting that case. I try to see whether there is another way of getting
there but as it is related to the device being used (opened) or not I think
there would be no other way of doing so.

Changed in linux:
status: In Progress → Fix Released
Changed in linux (Ubuntu):
status: In Progress → Fix Released
Changed in linux:
importance: Unknown → Medium
Changed in linux (Debian):
status: Fix Released → Confirmed
Changed in linux (Debian):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.