xpad rumble causes full system hang

Bug #1564901 reported by Alistair Buxton
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Medium
Joseph Salisbury
Trusty
Incomplete
Medium
Unassigned
Wily
Incomplete
Medium
Unassigned
Xenial
Fix Released
Medium
Joseph Salisbury
linux-lts-utopic (Ubuntu)
Incomplete
Medium
Unassigned
linux-lts-vivid (Ubuntu)
Incomplete
Medium
Unassigned

Bug Description

To reproduce:

1. Have a wired xbox controller.
2. Modify the SDL2 testrumble.c so it runs forever. (attached)
3. Build and run it.
4. Kill it with sigkill from another terminal.

Expected result: The program should stop running.

Actual result: Entire computer freezes. Soundcard continuously plays the last second of audio. No response from any input devices or the network.

The bug can also be reproduced by playing the game Borderlands 2 while having a wired xbox controller connected. The system will randomly freeze in the exact same way.

The bug has existed since at least 14.04.

The last thing the kernel prints is this:

Apr 1 03:38:29 al-desktop kernel: [94142.404218] usb 7-3: new full-speed USB device number 2 using ohci-pci
Apr 1 03:38:29 al-desktop kernel: [94142.565264] usb 7-3: New USB device found, idVendor=045e, idProduct=0288
Apr 1 03:38:29 al-desktop kernel: [94142.565268] usb 7-3: New USB device strings: Mfr=0, Product=0, SerialNumber=0
Apr 1 03:38:29 al-desktop kernel: [94142.567304] hub 7-3:1.0: USB hub found
Apr 1 03:38:29 al-desktop kernel: [94142.569259] hub 7-3:1.0: 3 ports detected
Apr 1 03:38:29 al-desktop kernel: [94142.852248] usb 7-3.1: new full-speed USB device number 3 using ohci-pci
Apr 1 03:38:29 al-desktop kernel: [94142.949301] usb 7-3.1: New USB device found, idVendor=045e, idProduct=0289
Apr 1 03:38:29 al-desktop kernel: [94142.949308] usb 7-3.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
Apr 1 03:38:29 al-desktop kernel: [94142.982402] input: Microsoft X-Box pad v2 (US) as /devices/pci0000:00/0000:00:13.0/usb7/7-3/7-3.1/7-3.1:1.0/input/input23
Apr 1 03:38:29 al-desktop kernel: [94142.982503] usbcore: registered new interface driver xpad
Apr 1 03:40:09 al-desktop kernel: [94242.318271] ------------[ cut here ]------------
Apr 1 03:40:09 al-desktop kernel: [94242.318280] WARNING: CPU: 3 PID: 16529 at /build/linux-_Kv5oI/linux-4.2.0/drivers/usb/core/urb.c:339 usb_submit_urb+0x51/0x70()
Apr 1 03:40:09 al-desktop kernel: [94242.318282] URB ffff880106cbacc0 submitted while active
Apr 1 03:40:09 al-desktop kernel: [94242.318283] Modules linked in: joydev xpad ff_memless nvidia_uvm(POE) rfcomm pci_stub vboxpci(OE) vboxnetadp(OE) vboxnetflt(OE) vboxdrv(OE) rc_pinnacle_pctv_hd em28xx_rc tda18271 cxd2820r em28xx_dvb d
vb_core em28xx binfmt_misc bnep snd_hda_codec_hdmi rc_hauppauge ir_kbd_i2c tuner_simple tuner_types input_leds tuner uvcvideo videobuf2_vmalloc kvm_amd videobuf2_memops kvm btusb videobuf2_core btrtl snd_seq_midi btbcm snd_seq_midi_event
btintel snd_usb_audio snd_usbmidi_lib snd_hda_codec_via msp3400 snd_hda_codec_generic snd_rawmidi bluetooth nvidia(POE) snd_seq serio_raw snd_hda_intel snd_seq_device snd_hda_codec snd_hda_core snd_hwdep bttv k10temp tea575x tveeprom edac
_core videobuf_dma_sg edac_mce_amd rc_core videobuf_core snd_bt87x v4l2_common videodev snd_pcm media i2c_algo_bit snd_timer i2c_piix4 snd soundcore drm shpchp wmi 8250_fintek asus_atk0110 mac_hid parport_pc ppdev lp parport autofs4 uas u
sb_storage hid_generic usbhid hid pata_acpi psmouse pata_atiixp ahci libahci r8169 mii
Apr 1 03:40:09 al-desktop kernel: [94242.318324] CPU: 3 PID: 16529 Comm: testrumble Tainted: P OE 4.2.0-34-generic #39-Ubuntu
Apr 1 03:40:09 al-desktop kernel: [94242.318326] Hardware name: System manufacturer System Product Name/M4A79XTD EVO, BIOS 2102 06/17/2010
Apr 1 03:40:09 al-desktop kernel: [94242.318328] 0000000000000000 000000004da02d75 ffff88010a9c3ba8 ffffffff817ebed3
Apr 1 03:40:09 al-desktop kernel: [94242.318330] 0000000000000000 ffff88010a9c3c00 ffff88010a9c3be8 ffffffff8107b986
Apr 1 03:40:09 al-desktop kernel: [94242.318331] ffff88010a9c3bd8 0000000000000010 ffff880103216f08 ffff88010a9c3cd0
Apr 1 03:40:09 al-desktop kernel: [94242.318333] Call Trace:
Apr 1 03:40:09 al-desktop kernel: [94242.318337] [<ffffffff817ebed3>] dump_stack+0x45/0x57
Apr 1 03:40:09 al-desktop kernel: [94242.318340] [<ffffffff8107b986>] warn_slowpath_common+0x86/0xc0
Apr 1 03:40:09 al-desktop kernel: [94242.318342] [<ffffffff8107ba15>] warn_slowpath_fmt+0x55/0x70
Apr 1 03:40:09 al-desktop kernel: [94242.318345] [<ffffffff815e0c61>] usb_submit_urb+0x51/0x70
Apr 1 03:40:09 al-desktop kernel: [94242.318348] [<ffffffffc0bd82a0>] xpad_play_effect+0x130/0x240 [xpad]
Apr 1 03:40:09 al-desktop kernel: [94242.318351] [<ffffffffc0bd3744>] ml_play_effects+0x104/0x6b0 [ff_memless]
Apr 1 03:40:09 al-desktop kernel: [94242.318353] [<ffffffffc0bd3db5>] ml_ff_playback+0x85/0x100 [ff_memless]
Apr 1 03:40:09 al-desktop kernel: [94242.318355] [<ffffffff81638ff1>] input_ff_event+0x61/0x90
Apr 1 03:40:09 al-desktop kernel: [94242.318357] [<ffffffff81637cf7>] input_handle_event+0x77/0x4f0
Apr 1 03:40:09 al-desktop kernel: [94242.318359] [<ffffffff81638278>] input_inject_event+0x88/0x90
Apr 1 03:40:09 al-desktop kernel: [94242.318360] [<ffffffff8163c026>] evdev_write+0x1b6/0x230
Apr 1 03:40:09 al-desktop kernel: [94242.318363] [<ffffffff811fd2f8>] __vfs_write+0x18/0x40
Apr 1 03:40:09 al-desktop kernel: [94242.318364] [<ffffffff811fdc86>] vfs_write+0xa6/0x1a0
Apr 1 03:40:09 al-desktop kernel: [94242.318366] [<ffffffff811fe975>] SyS_write+0x55/0xc0
Apr 1 03:40:09 al-desktop kernel: [94242.318368] [<ffffffff817f2cf2>] entry_SYSCALL_64_fastpath+0x16/0x75
Apr 1 03:40:09 al-desktop kernel: [94242.318369] ---[ end trace 49879d5abf54403b ]---

ProblemType: Bug
DistroRelease: Ubuntu 15.10
Package: linux-image-4.2.0-34-generic 4.2.0-34.39
ProcVersionSignature: Ubuntu 4.2.0-34.39-generic 4.2.8-ckt4
Uname: Linux 4.2.0-34-generic x86_64
NonfreeKernelModules: nvidia_uvm nvidia
ApportVersion: 2.19.1-0ubuntu5
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC3: al 1628 F.... pulseaudio
 /dev/snd/controlC1: al 1628 F.... pulseaudio
 /dev/snd/controlC0: al 1628 F.... pulseaudio
CurrentDesktop: XFCE
Date: Fri Apr 1 14:12:05 2016
HibernationDevice: RESUME=UUID=5a0bdae5-ddc6-4b6f-aead-360c2949313a
InstallationDate: Installed on 2015-07-12 (264 days ago)
InstallationMedia: Xubuntu 15.04 "Vivid Vervet" - Release amd64 (20150422.1)
IwConfig:
 eth0 no wireless extensions.

 lo no wireless extensions.
MachineType: System manufacturer System Product Name
ProcFB:

ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.2.0-34-generic root=UUID=283ec8d4-031f-4703-9de4-8dfe31132378 ro quiet splash
RelatedPackageVersions:
 linux-restricted-modules-4.2.0-34-generic N/A
 linux-backports-modules-4.2.0-34-generic N/A
 linux-firmware 1.149.3
RfKill:
 0: hci0: Bluetooth
  Soft blocked: no
  Hard blocked: no
SourcePackage: linux
UdevLog: Error: [Errno 2] No such file or directory: '/var/log/udev'
UpgradeStatus: Upgraded to wily on 2015-12-31 (91 days ago)
dmi.bios.date: 06/17/2010
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: 2102
dmi.board.asset.tag: To Be Filled By O.E.M.
dmi.board.name: M4A79XTD EVO
dmi.board.vendor: ASUSTeK Computer INC.
dmi.board.version: Rev X.0X
dmi.chassis.asset.tag: Asset-1234567890
dmi.chassis.type: 3
dmi.chassis.vendor: Chassis Manufacture
dmi.chassis.version: Chassis Version
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvr2102:bd06/17/2010:svnSystemmanufacturer:pnSystemProductName:pvrSystemVersion:rvnASUSTeKComputerINC.:rnM4A79XTDEVO:rvrRevX.0X:cvnChassisManufacture:ct3:cvrChassisVersion:
dmi.product.name: System Product Name
dmi.product.version: System Version
dmi.sys.vendor: System manufacturer

CVE References

Revision history for this message
Alistair Buxton (a-j-buxton) wrote :
Revision history for this message
Brad Figg (brad-figg) wrote : Status changed to Confirmed

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
Revision history for this message
Alistair Buxton (a-j-buxton) wrote :
Changed in linux (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

I built a Xenial test kernel with a pick of commit 7fc595f. This test kernel can be downloaded from:
http://kernel.ubuntu.com/~jsalisbury/lp1564901/

Can you test this kernel and see if it resolves this bug?

Revision history for this message
Alistair Buxton (a-j-buxton) wrote :

Yes, it works fine with that kernel.

Revision history for this message
Alistair Buxton (a-j-buxton) wrote :

For reference/impact assessment here's the steam thread where I found the patch:

https://steamcommunity.com/app/233130/discussions/0/611702631210587760/

Changed in linux (Ubuntu Wily):
status: New → Confirmed
importance: Undecided → Medium
Changed in linux (Ubuntu):
assignee: nobody → Joseph Salisbury (jsalisbury)
Changed in linux (Ubuntu Wily):
assignee: nobody → Joseph Salisbury (jsalisbury)
status: Confirmed → In Progress
Changed in linux (Ubuntu):
status: Confirmed → In Progress
no longer affects: linux (Ubuntu Vivid)
Changed in linux (Ubuntu Trusty):
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Joseph Salisbury (jsalisbury)
no longer affects: linux-lts-vivid (Ubuntu Wily)
no longer affects: linux-lts-vivid (Ubuntu Xenial)
no longer affects: linux-lts-vivid (Ubuntu Trusty)
Changed in linux-lts-vivid (Ubuntu):
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Joseph Salisbury (jsalisbury)
Changed in linux-lts-utopic (Ubuntu):
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Joseph Salisbury (jsalisbury)
Revision history for this message
Matt Sturgeon (mattsturgeon) wrote :

It may be worth mentioning that while that patch fixes the bug, it also introduces this regression: https://github.com/paroj/xpad/issues/27

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

@Alistar, do you see the regression Matt posted in comment #7?

Revision history for this message
Alistair Buxton (a-j-buxton) wrote :

Yes, I do, eg with Saints Row 3, the controller starts vibrating immediately and never stops.

Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (3.5 KiB)

This bug was fixed in the package linux - 4.4.0-21.37

---------------
linux (4.4.0-21.37) xenial; urgency=low

  [ Tim Gardner ]

  * Release Tracking Bug
    - LP: #1571791

  * linux: MokSBState is ignored (LP: #1571691)
    - SAUCE: (noup) MODSIGN: Import certificates from UEFI Secure Boot
    - SAUCE: (noup) efi: Disable secure boot if shim is in insecure mode
    - SAUCE: (noup) Display MOKSBState when disabled

linux (4.4.0-20.36) xenial; urgency=low

  [ Tim Gardner ]

  * Release Tracking Bug
    - LP: #1571069

  * sysfs mount failure during stateful lxd snapshots (LP: #1570906)
    - SAUCE: kernfs: Do not match superblock in another user namespace when
      mounting

  * Kernel Panic in Ubuntu 16.04 netboot installer (LP: #1570441)
    - x86/topology: Fix logical package mapping
    - x86/topology: Fix Intel HT disable
    - x86/topology: Use total_cpus not nr_cpu_ids for logical packages
    - xen/apic: Provide Xen-specific version of cpu_present_to_apicid APIC op
    - x86/topology: Fix AMD core count

  * [regression]: Failed to call clock_adjtime(): Invalid argument
    (LP: #1566465)
    - ntp: Fix ADJ_SETOFFSET being used w/ ADJ_NANO

linux (4.4.0-19.35) xenial; urgency=low

  [ Tim Gardner ]

  * Release Tracking Bug
    - LP: #1570348

  * CVE-2016-2847 (LP: #1554260)
    - pipe: limit the per-user amount of pages allocated in pipes

  * xenial kernel crash on HP BL460c G7 (qla24xx problem?) (LP: #1554003)
    - SAUCE: (noup) qla2xxx: Add irq affinity notification V2

  * arm64: guest hangs when ntpd is running (LP: #1549494)
    - SAUCE: (noup) KVM: arm/arm64: Handle forward time correction gracefully

  * linux: Enforce signed module loading when UEFI secure boot (LP: #1566221)
    - [Config] CONFIG_EFI_SECURE_BOOT_SIG_ENFORCE=y

  * s390/cpumf: Fix lpp detection (LP: #1555344)
    - s390/facilities: use stfl mnemonic instead of insn magic
    - s390/facilities: always use lowcore's stfle field for storing facility bits
    - s390/cpumf: Fix lpp detection

  * s390x kernel image needs weightwatchers (LP: #1536245)
    - [Config] s390x: Use compressed kernel bzImage

  * Surelock GA2 SP1: surelock02p05: Not seeing sgX devices for LUNs after
    upgrading to Ubuntu 16.04 (LP: #1567581)
    - Revert "UBUNTU: SAUCE: (noup) powerpc/pci: Assign fixed PHB number based on
      device-tree properties"

  * Backport upstream bugfixes to ubuntu-16.04 (LP: #1555765)
    - cpufreq: powernv: Define per_cpu chip pointer to optimize hot-path
    - Revert "cpufreq: postfix policy directory with the first CPU in related_cpus"
    - cpufreq: powernv: Add sysfs attributes to show throttle stats

  * systemd-modules-load.service: Failing due to missing module 'ib_iser' (LP: #1566468)
    - [Config] Add ib_iser to generic inclusion list

  * thunderx nic performance improvements (LP: #1567093)
    - net: thunderx: Set recevie buffer page usage count in bulk
    - net: thunderx: Adjust nicvf structure to reduce cache misses

  * fixes for thunderx nic in multiqueue mode (LP: #1567091)
    - net: thunderx: Fix for multiqset not configured upon interface toggle
    - net: thunderx: Fix for HW TSO not enabled for secondary qsets
    - net: thund...

Read more...

Changed in linux (Ubuntu Xenial):
status: In Progress → Fix Released
Revision history for this message
Matt Sturgeon (mattsturgeon) wrote :

The regression I mentioned in #7 should be fixed in https://github.com/paroj/xpad/commit/ef9e5b156c4b0042a75897697a792e7b1c5fde4b

I've not had chance to test this personally yet.

Changed in linux (Ubuntu Wily):
status: In Progress → Incomplete
Changed in linux (Ubuntu Trusty):
status: In Progress → Incomplete
Changed in linux-lts-utopic (Ubuntu):
status: In Progress → Incomplete
Changed in linux-lts-vivid (Ubuntu):
status: In Progress → Incomplete
assignee: Joseph Salisbury (jsalisbury) → nobody
Changed in linux-lts-utopic (Ubuntu):
assignee: Joseph Salisbury (jsalisbury) → nobody
Changed in linux (Ubuntu Wily):
assignee: Joseph Salisbury (jsalisbury) → nobody
Changed in linux (Ubuntu Trusty):
assignee: Joseph Salisbury (jsalisbury) → nobody
Brad Figg (brad-figg)
tags: added: cscc
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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