Lenovo e73 USB webcam problems

Bug #1705900 reported by Lukas Jirkovsky
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Expired
Medium
Unassigned

Bug Description

I'm experiencing problems with USB webcam on Lenovo e73 with Ubuntu 16.04.2 Xenial 32bit.

Originally with 4.4 connecting the camera often resulted in complete hang of the system (apparently not even SysRq worked, though I did not test that personally since it is a system I'm administering remotely for a family member). There was always a null pointer dereference just before the hang, so I suspect that is the culprit (see the attached kernel log).

After some updates the system no longer hangs. I suspect this was fixed by going from linux 4.4 to 4.8. However, the webcam still often doesn't work and most application just return error. This is usually fixed after several tries, but sometimes it is necessary to reboot computer. Updating BIOS didn't help. The kernel logs still contain the same null pointer dereference with exactly the same stack trace for both 4.8 and 4.10.
---
ApportVersion: 2.20.1-0ubuntu2.10
Architecture: i386
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC2: user 1852 F.... pulseaudio
 /dev/snd/controlC0: user 1852 F.... pulseaudio
 /dev/snd/controlC1: user 1852 F.... pulseaudio
DistroRelease: Ubuntu 16.04
HibernationDevice: RESUME=UUID=de34a223-a620-435a-974a-e29dad30f1ac
InstallationDate: Installed on 2017-05-05 (85 days ago)
InstallationMedia: Ubuntu 15.10 "Wily Werewolf" - Release i386 (20151021)
IwConfig:
 tun0 no wireless extensions.

 enp2s0 no wireless extensions.

 lo no wireless extensions.
MachineType: LENOVO 10DR002SMC
Package: linux (not installed)
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 LANG=sk_SK.UTF-8
 SHELL=/bin/bash
ProcFB: 0 inteldrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.8.0-58-generic root=UUID=07f94680-ac2c-498b-86e4-72ff6e4bd18f ro quiet splash usbcore.autosuspend=-1 vt.handoff=7
ProcVersionSignature: Ubuntu 4.8.0-58.63~16.04.1-generic 4.8.17
PulseList:
 Error: command ['pacmd', 'list'] failed with exit code 1: Home directory not accessible: Permission denied
 No PulseAudio daemon running, or not running as session daemon.
RelatedPackageVersions:
 linux-restricted-modules-4.8.0-58-generic N/A
 linux-backports-modules-4.8.0-58-generic N/A
 linux-firmware 1.157.11
RfKill:

Tags: xenial
Uname: Linux 4.8.0-58-generic i686
UpgradeStatus: Upgraded to xenial on 2017-05-05 (85 days ago)
UserGroups:

_MarkForUpload: True
dmi.bios.date: 02/13/2017
dmi.bios.vendor: LENOVO
dmi.bios.version: FCKT82AUS
dmi.board.name: 3098
dmi.board.vendor: LENOVO
dmi.board.version: SDK0G00599 WIN
dmi.chassis.type: 3
dmi.chassis.vendor: LENOVO
dmi.modalias: dmi:bvnLENOVO:bvrFCKT82AUS:bd02/13/2017:svnLENOVO:pn10DR002SMC:pvrThinkCentreE73:rvnLENOVO:rn3098:rvrSDK0G00599WIN:cvnLENOVO:ct3:cvr:
dmi.product.name: 10DR002SMC
dmi.product.version: ThinkCentre E73
dmi.sys.vendor: LENOVO

Revision history for this message
Lukas Jirkovsky (l-jirkovsky) wrote :
Revision history for this message
Lukas Jirkovsky (l-jirkovsky) wrote :
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1705900

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Would it be possible for you to test the latest upstream kernel? Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Please test the latest v4.13 kernel[0].

If this bug is fixed in the mainline kernel, please add the following tag 'kernel-fixed-upstream'.

If the mainline kernel does not fix this bug, please add the tag: 'kernel-bug-exists-upstream'.

Once testing of the upstream kernel is complete, please mark this bug as "Confirmed".

Thanks in advance.

[0] http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.13-rc2

Changed in linux (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Lukas Jirkovsky (l-jirkovsky) wrote :

Will do as soon as I have access to the computer in question.

Revision history for this message
Lukas Jirkovsky (l-jirkovsky) wrote : AlsaInfo.txt

apport information

tags: added: apport-collected xenial
description: updated
Revision history for this message
Lukas Jirkovsky (l-jirkovsky) wrote : CRDA.txt

apport information

Revision history for this message
Lukas Jirkovsky (l-jirkovsky) wrote : CurrentDmesg.txt

apport information

Revision history for this message
Lukas Jirkovsky (l-jirkovsky) wrote : JournalErrors.txt

apport information

Revision history for this message
Lukas Jirkovsky (l-jirkovsky) wrote : Lspci.txt

apport information

Revision history for this message
Lukas Jirkovsky (l-jirkovsky) wrote : Lsusb.txt

apport information

Revision history for this message
Lukas Jirkovsky (l-jirkovsky) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
Lukas Jirkovsky (l-jirkovsky) wrote :

I tried to update to linux-image-4.13.0-041300rc2-generic_4.13.0-041300rc2.201707232231_i386.deb, but I was told it was no longer possible to log in (the login screen appeared, but it was not possible to write password as if the keyboard was not connected at all). After reverting to the previous kernel it was possible to log in again.

However, I still have some findings that may be useful. I tried to add some debug printk's around the code that caused the null pointer dereference and I was able to find the exact place where the null pointer dereference occurs. I used Ubuntu-hwe-4.8.0-58.63_16.04.1 for that.

The problem is in usb_ifnum_to_if where config->interface[i] is null (http://kernel.ubuntu.com/git/ubuntu/ubuntu-xenial.git/tree/drivers/usb/core/usb.c?h=Ubuntu-hwe-4.8.0-58.63_16.04.1&id=2e1f960b96b3d80fc2b91809bf0cb02c97abe8f4#n144)

Here's a short snippet of the code:

for (i = 0; i < config->desc.bNumInterfaces; i++) {
  if (config->interface[i]->altsetting[0] /* config->interface[i] == 0 here! */
      .desc.bInterfaceNumber == ifnum) {
    return config->interface[i];
  }
}

And it's not a single interface that fails, it seems that all interfaces are null, since the changed code that I used for debugging actually looks like this:

for (i = 0; i < config->desc.bNumInterfaces; i++) {
  if (config->interface[i] == 0) {
    printk(KERN_ALERT "DEBUG: Interface %d is null\n", i);
    continue;
  }
  if (config->interface[i]->altsetting[0]
      .desc.bInterfaceNumber == ifnum) {
    return config->interface[i];
  }
}

And in dmesg I found:
júl 23 13:40:11 lenovo kernel: DEBUG: Interface 0 is null
júl 23 13:40:12 lenovo kernel: DEBUG: Interface 1 is null
júl 23 13:40:12 lenovo kernel: DEBUG: Interface 2 is null
júl 23 13:40:12 lenovo kernel: DEBUG: Interface 3 is null
júl 23 13:40:12 lenovo kernel: DEBUG: Interface 0 is null
júl 23 13:40:13 lenovo kernel: DEBUG: Interface 1 is null
júl 23 13:40:13 lenovo kernel: DEBUG: Interface 2 is null
júl 23 13:40:13 lenovo kernel: DEBUG: Interface 3 is null

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Is the webcam in question Microsoft® LifeCam HD-3000?

Revision history for this message
Lukas Jirkovsky (l-jirkovsky) wrote :

I reported the bug with the Microsoft one, but the same problem also occurs with Trust WB-5400 webcam.

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

I think the NULL pointer dereference is red herring here, the disconnection is where problem occurs:
júl 22 21:12:50 lenovo kernel: usb 3-2: USB disconnect, device number 2

So we need to know why the webcam disconnected right before it starts streaming.
Please add "xhci-pci.dyndbg=+p xhci-hcd.dyndbg=+p usbcore.dyndbg=+p" to the kernel parameter, reproduce the bug, then attach dmesg.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for linux (Ubuntu) because there has been no activity for 60 days.]

Changed in linux (Ubuntu):
status: Incomplete → Expired
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.