USBDUX driver timeout

Bug #483343 reported by Bernd Porr on 2009-11-16
20
This bug affects 2 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Medium
Unassigned
Lucid
Medium
Unassigned

Bug Description

SRU Justification/Impact:

Per the request of the usbdux maintainer, the following patches resolve a usbdux driver timeout and lockup. All three patches have landed in 2.6.33 upstream. Please note that this set of patches depend on the patch to fix bug 563436 (ie re-enable comedi drivers). I recognize we are frozen for the upcoming release so please consider this for the first Lucid Stable Release Update.

TEST CASE:

I've built a test kernel with the upstream patches applied. I've received confirmation from the bug reporter (usbdux maintainer) that this indeed resolves the timeout and lockup.

=====

This is a patch for the kernel source for Ubuntu Karmic. 2.6.31.
I'm the maintainer of the usbdux.c driver. I've made a patch which resolves the issue.

ProblemType: Bug
AplayDevices:
 **** List of PLAYBACK Hardware Devices ****
 card 0: NVidia [HDA NVidia], device 0: STAC92xx Analog [STAC92xx Analog]
   Subdevices: 1/1
   Subdevice #0: subdevice #0
Architecture: i386
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: bp1 1527 F.... pulseaudio
CRDA: Error: [Errno 2] No such file or directory
Card0.Amixer.info:
 Card hw:0 'NVidia'/'HDA NVidia at 0xfe024000 irq 23'
   Mixer name : 'SigmaTel STAC9227'
   Components : 'HDA:83847618,102801f4,00100201'
   Controls : 32
   Simple ctrls : 22
Date: Mon Nov 16 00:43:58 2009
DistroRelease: Ubuntu 9.10
HibernationDevice: RESUME=UUID=9371ee38-3399-4f29-b63b-2f270c1490b9
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release i386 (20091028.5)
IwConfig:
 lo no wireless extensions.

 eth0 no wireless extensions.
Lsusb:
 Bus 002 Device 003: ID 046d:c016 Logitech, Inc. M-UV69a/HP M-UV96 Optical Wheel Mouse
 Bus 002 Device 002: ID 413c:2005 Dell Computer Corp. RT7D50 Keyboard
 Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
MachineType: Dell Inc Dimension C521
NonfreeKernelModules: nvidia
Package: linux-image-2.6.31-14-generic 2.6.31-14.48
ProcCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.31-14-generic root=/dev/sda1 ro
ProcEnviron:
 LANG=en_GB.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-14.48-generic
RelatedPackageVersions:
 linux-backports-modules-2.6.31-14-generic N/A
 linux-firmware 1.24
RfKill:

SourcePackage: linux
Uname: Linux 2.6.31-14-generic i686
WifiSyslog:

XsessionErrors:
 (gnome-settings-daemon:1574): GLib-CRITICAL **: g_propagate_error: assertion `src != NULL' failed
 (gnome-settings-daemon:1574): GLib-CRITICAL **: g_propagate_error: assertion `src != NULL' failed
 (polkit-gnome-authentication-agent-1:1685): GLib-CRITICAL **: g_once_init_leave: assertion `initialization_value != 0' failed
 (nautilus:1670): Eel-CRITICAL **: eel_preferences_get_boolean: assertion `preferences_is_initialized ()' failed
 (gnome-panel:1669): Gtk-WARNING **: gtk_widget_size_allocate(): attempt to allocate widget with width -4 and height 24
dmi.bios.date: 12/09/2006
dmi.bios.vendor: Dell Inc
dmi.bios.version: 1.1.4
dmi.board.name: 0HY175
dmi.board.vendor: Dell Inc
dmi.board.version: A03
dmi.chassis.type: 3
dmi.chassis.vendor: Dell Inc
dmi.modalias: dmi:bvnDellInc:bvr1.1.4:bd12/09/2006:svnDellInc:pnDimensionC521:pvr:rvnDellInc:rn0HY175:rvrA03:cvnDellInc:ct3:cvr:
dmi.product.name: Dimension C521
dmi.sys.vendor: Dell Inc

Bernd Porr (berndporr) wrote :
Bernd Porr (berndporr) wrote :

This patch fixes the timeout issue.

Andy Whitcroft (apw) on 2009-11-25
tags: added: kernel-karmic
Bernd Porr (berndporr) wrote :

this is another bug which has been reported by a user. Would be nice if you could also apply that.
This patch fixes an issue where the driver might hang forever when the comedi ringbuffer runs empty during asynchronous acquisition. The patch below fixes this issue. Please apply it after you've applied the timeout patch.

Changed in linux (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
Andy Whitcroft (apw) wrote :

@arbeitstier -- have either of these gone upstream yet? If so is there upstream commit id's for them please. They sound like things that should go to stable too, and if you concur that might be the easiest way to get them into the ubuntu kernel?

Hi Andy,

Yes. It has gone upstream. Here are the patches:

[PATCH 076/235] Staging: comedi: fix usbdux timeout bug
[PATCH 04/19] Staging: comedi: usbdux.c: fix locking up of the driver
when the comedi ringbuffer runs empty
[PATCH 05/19] Staging: comedi: removed "depricated" from COMEDI_CB_BLOCK

All committed by GregKH and myself.

/Bernd

www: http://www.berndporr.me.uk/
         http://www.linux-usb-daq.co.uk/
 http://www.imdb.com/name/nm3293421/
Mobile: +44 (0)7840 340069
Work: +44 (0)141 330 5237
         University of Glasgow
         Department of Electronics & Electrical Engineering
         Room 519, Rankine Building, Oakfield Avenue,
         Glasgow, G12 8LT

Andy Whitcroft wrote:
> @arbeitstier -- have either of these gone upstream yet? If so is there
> upstream commit id's for them please. They sound like things that
> should go to stable too, and if you concur that might be the easiest way
> to get them into the ubuntu kernel?
>

Bernd Porr (berndporr) wrote :

Hi Andy,

I've just installed lucid and the *whole* comedi directory with all drivers is not there! Can this be fixed before the official release of lucid.

/Bernd

tags: added: kernel-lucid

As I noted in comment #4 of bug 563436, https://bugs.edge.launchpad.net/ubuntu/+source/linux/+bug/563436/comments/4 , It seems the requested patches here went upstream as of 2.6.33 which explains why they're not present in Lucid with is a 2.6.32 based kernel. I'm just adding some extra info below. Note that this bug depends on bug 563436 being fixed first. I'll try to put together some test kernels and get this submitted for a Stable Release Update for Lucid since the entire distro is currently frozen.

ogasawara@emiko:~/linux-2.6$ git describe --contains ea25371a78c33e276527361d3ab19393d558b2fd
v2.6.33-rc2~13^2~179
ogasawara@emiko:~/linux-2.6$ git show ea25371a78c33e276527361d3ab19393d558b2fd
commit ea25371a78c33e276527361d3ab19393d558b2fd
Author: Bernd Porr <email address hidden>
Date: Mon Nov 16 01:12:02 2009 +0000

    Staging: comedi: fix usbdux timeout bug

ogasawara@emiko:~/linux-2.6$ git show d4c3a56587af3edbe5f618b20e800e9f9fde13cb
commit d4c3a56587af3edbe5f618b20e800e9f9fde13cb
Author: Bernd Porr <email address hidden>
Date: Fri Nov 27 12:00:53 2009 +0000

    Staging: comedi: usbdux.c: fix locking up of the driver when the comedi ringbuffer runs empty

ogasawara@emiko:~/linux-2.6$ git describe --contains d103bef45180892515345e761f42db5601de9846
v2.6.33-rc2~13^2~14
ogasawara@emiko:~/linux-2.6$ git show d103bef45180892515345e761f42db5601de9846
commit d103bef45180892515345e761f42db5601de9846
Author: Bernd Porr <email address hidden>
Date: Fri Nov 27 12:07:48 2009 +0000

    Staging: comedi: removed "depricated" from COMEDI_CB_BLOCK

Changed in linux (Ubuntu):
assignee: nobody → Leann Ogasawara (leannogasawara)
status: Triaged → In Progress
Bernd Porr (berndporr) wrote :

Thanks. The packages work for me.

However, there are still the two bug in this kernel as you know because it only went into 2.6.33. Below is the patch for the ubuntu kernel 2.6.32-21-generic which should also work with your kernel 2.6.32-21-generic #32+lp563436. Can you please apply.

/Bernd

Hi Bernd,

I've built and posted a test kernel at the following:

http://people.canonical.com/~ogasawara/lp483343/i386/

It includes the patch from bug 563436 which re-enables comedi, and then has also applied the 3 patches noted above in comment #7. Could you please give this a test and let me know that it indeed resolves the usbdux driver timeout. I can then submit this for a Lucid Stable Release Update. Thanks again.

Bernd Porr (berndporr) wrote :

Hi Leann,

I've just tested linux-image-2.6.32-21-generic_2.6.32-21.32+lp483343_i386 and it works fine.

Thanks for the quick response.

/Bernd

description: updated
Changed in linux (Ubuntu Lucid):
milestone: none → lucid-updates
Andy Whitcroft (apw) on 2010-04-21
Changed in linux (Ubuntu Lucid):
status: In Progress → Fix Committed
Bernd Porr (berndporr) wrote :

thanks for all the work, guys!
/Bernd

tags: added: patch

Accepted linux into lucid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

tags: added: verification-needed
Launchpad Janitor (janitor) wrote :
Download full text (25.2 KiB)

This bug was fixed in the package linux - 2.6.32-23.37

---------------
linux (2.6.32-23.37) lucid-proposed; urgency=low

  [ Alex Deucher ]

  * SAUCE: drm/radeon/kms/atom: fix dual-link DVI on DCE3.2/4.0
    - LP: #564559

  [ Andy Whitcroft ]

  * [Config] ports -- build in dm-mod to enable LVM boot
    - LP: #560717
  * tools -- fix perf version extraction for multi-part flavours
    - LP: #555130
  * SAUCE: ACPI: EC: Allow multibyte access to EC (v3)
    - LP: #526354
  * [Config] enforce -- ensure dm_mod is built-in for LVM
    - LP: #560717
  * update to ubuntu-debian:7e708d33054c373faf41da23b73e8b48c342d958
    - LP: #570500, #576274

  [ Chase Douglas ]

  * Revert "(pre-stable): input: ALPS - Add signature for HP Pavilion dm3
    laptops"
    - LP: #550625
  * Enable ftrace function profiler
    - LP: #570389
  * enforce CONFIG_TMPFS_POSIX_ACL=y
    - LP: #575940

  [ Leann Ogasawara ]

  * Revert "staging/comdi -- disable"
    - LP: #563436
  * [Config] Enable multicast routing for sparc
    - LP: #416266
  * [Config] Add ahci.ko to virtual sub-flavour
    - LP: #570542

  [ Stefan Bader ]

  * Revert "SAUCE: drm/i915: Disable FBC on 915GM and 945GM"
    - LP: #588832

  [ Tim Gardner ]

  * ubuntu: rtl8192se -- update to version 0015.0127.2010
    - LP: #567016
  * [Config] Add atl1c to nic-modules udeb
    - LP: #557130

  [ Upstream Kernel Changes ]

  * Revert "(pre-stable) iwlwifi: fix nfreed--"
    - LP: #575853
  * Revert "backlight: mbp_nvidia_bl - add five more MacBook variants"
    - LP: #575853
  * Revert "(pre-stable) pata_via: Add VIA VX900 support"
    - LP: #575853
  * Revert "(pre-stable) x86-32, resume: do a global tlb flush in S4
    resume"
    - LP: #575853
  * Revert "x86: disable IOMMUs on kernel crash"
    - LP: #575853
  * Revert "sunrpc: fix peername failed on closed listener"
    - LP: #575853
  * Revert "sunrpc: move the close processing after do recvfrom method"
    - LP: #575853
  * Revert "(pre-stable) drm/edid: allow certain bogus edids to hit a fixup
    path rather than fail"
    - LP: #575853
  * Revert "drm/radeon/kms: don't print error on -ERESTARTSYS."
    - LP: #575853
  * Revert "ath9k: fix lockdep warning when unloading module" on stable
    kernels
    - LP: #588832
  * Staging: comedi: removed "depricated" from COMEDI_CB_BLOCK
    - LP: #483343
  * fat: fix buffer overflow in vfat_create_shortname()
    - LP: #575853
  * xfs: simplify inode teardown
    - LP: #575853
  * xfs: fix mmap_sem/iolock inversion in xfs_free_eofblocks
    - LP: #575853
  * xfs: I/O completion handlers must use NOFS allocations
    - LP: #575853
  * xfs: Wrapped journal record corruption on read at recovery
    - LP: #575853
  * xfs: Fix error return for fallocate() on XFS
    - LP: #575853
  * xfs: check for not fully initialized inodes in xfs_ireclaim
    - LP: #575853
  * xfs: fix timestamp handling in xfs_setattr
    - LP: #575853
  * xfs: Don't flush stale inodes
    - LP: #575853
  * xfs: Ensure we force all busy extents in range to disk
    - LP: #575853
  * xfs: reclaim inodes under a write lock
    - LP: #575853
  * xfs: Avoid inodes in reclaim when flushing from inode cache
    - LP: #575853
  * xfs: recla...

Changed in linux (Ubuntu Lucid):
status: Fix Committed → Fix Released
Changed in linux (Ubuntu):
status: Fix Committed → Fix Released
assignee: Leann Ogasawara (leannogasawara) → nobody
Changed in linux (Ubuntu Lucid):
assignee: Leann Ogasawara (leannogasawara) → nobody
To post a comment you must log in.