[Kernel-packages] [Bug 2002938] [NEW] Logitech webcam crashed the kernel

2023-01-15 Thread Yariv Barkan
Public bug reported:

This happens during a "Zoom" video conference call done within a virtual
machine. Both the host and the guest OSes are Ubuntu 22.04. A few
minutes after the video call started audio is lost, and a few seconds
later the (guest) system crashes.

The webcam used is a USB Logitech Webcam C270 which is connected to the
VM as a USB passthrough (i.e. using the "Add new virtual hardware => USB
host device" in virt-manager).

Note that the "dmesg" attached is probably irrelevant so I attached the
output of "journalctl --boot=..." of the relevant session. The kernel
crash can be seen near the end of the log, look for the following lines:

Jan 10 19:54:12 yariv-encrypted-ubuntu kernel: usb 1-4: cannot submit urb (err 
= -27)
Jan 10 19:54:13 yariv-encrypted-ubuntu kernel: usb 1-4: timeout: still 1 active 
urbs on EP #86
Jan 10 19:54:13 yariv-encrypted-ubuntu kernel: [ cut here 
]
Jan 10 19:54:13 yariv-encrypted-ubuntu kernel: URB  submitted 
while active

...

ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: linux-image-5.15.0-58-generic 5.15.0-58.64
ProcVersionSignature: Ubuntu 5.15.0-58.64-generic 5.15.74
Uname: Linux 5.15.0-58-generic x86_64
ApportVersion: 2.20.11-0ubuntu82.3
Architecture: amd64
AudioDevicesInUse:
 USERPID ACCESS COMMAND
 /dev/snd/controlC1:  yariv  1897 F pulseaudio
 /dev/snd/controlC0:  yariv  1897 F pulseaudio
CasperMD5CheckResult: unknown
CurrentDesktop: ubuntu:GNOME
Date: Mon Jan 16 09:06:56 2023
HibernationDevice: RESUME=UUID=1c38618d-3590-45c4-b960-ca9d157ad22f
InstallationDate: Installed on 2019-02-26 (1419 days ago)
InstallationMedia: Ubuntu 18.04.1 LTS "Bionic Beaver" - Release amd64 (20180725)
IwConfig:
 lono wireless extensions.
 
 ens3  no wireless extensions.
 
 docker0   no wireless extensions.
MachineType: QEMU Standard PC (i440FX + PIIX, 1996)
ProcFB: 0 virtio_gpudrmfb
ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-5.15.0-58-generic 
root=/dev/mapper/ubuntu--vg-root ro quiet splash vt.handoff=7
RelatedPackageVersions:
 linux-restricted-modules-5.15.0-58-generic N/A
 linux-backports-modules-5.15.0-58-generic  N/A
 linux-firmware 20220329.git681281e4-0ubuntu3.9
RfKill:
 
SourcePackage: linux
UpgradeStatus: Upgraded to jammy on 2022-10-12 (95 days ago)
dmi.bios.date: 04/01/2014
dmi.bios.release: 0.0
dmi.bios.vendor: SeaBIOS
dmi.bios.version: 1.15.0-1
dmi.chassis.type: 1
dmi.chassis.vendor: QEMU
dmi.chassis.version: pc-i440fx-bionic
dmi.modalias: 
dmi:bvnSeaBIOS:bvr1.15.0-1:bd04/01/2014:br0.0:svnQEMU:pnStandardPC(i440FX+PIIX,1996):pvrpc-i440fx-bionic:cvnQEMU:ct1:cvrpc-i440fx-bionic:sku:
dmi.product.name: Standard PC (i440FX + PIIX, 1996)
dmi.product.version: pc-i440fx-bionic
dmi.sys.vendor: QEMU

** Affects: linux (Ubuntu)
 Importance: Undecided
 Status: New


** Tags: amd64 apport-bug jammy

** Attachment added: "journalctl of the relevant boot session"
   
https://bugs.launchpad.net/bugs/2002938/+attachment/5641536/+files/freeze_issue.log

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/2002938

Title:
  Logitech webcam crashed the kernel

Status in linux package in Ubuntu:
  New

Bug description:
  This happens during a "Zoom" video conference call done within a
  virtual machine. Both the host and the guest OSes are Ubuntu 22.04. A
  few minutes after the video call started audio is lost, and a few
  seconds later the (guest) system crashes.

  The webcam used is a USB Logitech Webcam C270 which is connected to
  the VM as a USB passthrough (i.e. using the "Add new virtual hardware
  => USB host device" in virt-manager).

  Note that the "dmesg" attached is probably irrelevant so I attached
  the output of "journalctl --boot=..." of the relevant session. The
  kernel crash can be seen near the end of the log, look for the
  following lines:

  Jan 10 19:54:12 yariv-encrypted-ubuntu kernel: usb 1-4: cannot submit urb 
(err = -27)
  Jan 10 19:54:13 yariv-encrypted-ubuntu kernel: usb 1-4: timeout: still 1 
active urbs on EP #86
  Jan 10 19:54:13 yariv-encrypted-ubuntu kernel: [ cut here 
]
  Jan 10 19:54:13 yariv-encrypted-ubuntu kernel: URB  submitted 
while active

  ...

  ProblemType: Bug
  DistroRelease: Ubuntu 22.04
  Package: linux-image-5.15.0-58-generic 5.15.0-58.64
  ProcVersionSignature: Ubuntu 5.15.0-58.64-generic 5.15.74
  Uname: Linux 5.15.0-58-generic x86_64
  ApportVersion: 2.20.11-0ubuntu82.3
  Architecture: amd64
  AudioDevicesInUse:
   USERPID ACCESS COMMAND
   /dev/snd/controlC1:  yariv  1897 F pulseaudio
   /dev/snd/controlC0:  yariv  1897 F pulseaudio
  CasperMD5CheckResult: unknown
  CurrentDesktop: ubuntu:GNOME
  Date: Mon Jan 16 09:06:56 2023
  HibernationDevice: RESUME=UUID=1c38618d-3590-45c4-b960-ca9d157ad22f
  InstallationDate: Installed on 2019-02-26 

[Kernel-packages] [Bug 1876449] Re: Apple external Trackpad event timestamps are jittery

2023-01-15 Thread Yariv Barkan
** Changed in: linux (Ubuntu)
   Status: Confirmed => Fix Released

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1876449

Title:
  Apple external Trackpad event timestamps are jittery

Status in linux package in Ubuntu:
  Fix Released

Bug description:
  Using a vanilla installation of Ubuntu 20.04, the timestamps of input
  events from my Apple "Magic Trackpad" - 1st generation, connected over
  Bluetooth - are jittery.

  This is a regression, the timestamps were fine when using Ubuntu
  19.10.

  I bisected the bug.

  - The problem starts with upstream kernel commit 3b51c44bd693 ("Input: allow 
drivers specify timestamp for input events"). After that commit, the same 
timestamp is always emitted.
  - This was partially fixed in commit 4370b231d100 ("Input: reset device 
timestamp on sync"), however ever since then the timestamps are jittery.

  The problem still exists in the current upstream 'master' (commit
  c45e8bccecaf).

  The following patch fixes the bug, however this is obviously a hack.
  It effectively reverts commit 3b51c44bd693:

  diff --git a/drivers/input/input.c b/drivers/input/input.c
  index 3cfd2c18eebd..8890195547d6 100644
  --- a/drivers/input/input.c
  +++ b/drivers/input/input.c
  @@ -1958,7 +1958,7 @@ ktime_t *input_get_timestamp(struct input_dev *dev)
   {
  const ktime_t invalid_timestamp = ktime_set(0, 0);

  -   if (!ktime_compare(dev->timestamp[INPUT_CLK_MONO], invalid_timestamp))
  +   // if (!ktime_compare(dev->timestamp[INPUT_CLK_MONO], 
invalid_timestamp))
  input_set_timestamp(dev, ktime_get());

  return dev->timestamp;

  
  Steps to reproduce
  --

  I used the following script as a reproducer. It relies on libinput-
  debug-events. This script measures the time delta between consecutive
  input events, then prints a "histogram" of these deltas.

  #!/bin/bash

  # log file name
  logFile=${1:-~/Downloads/`uname -r`}
  echo logFile=$logFile

  if [[ "$1" == '' ]]; then
echo record

# log some events
sudo libinput debug-events | grep POINTER | tee $logFile
  fi

  # process the results
  lastN=0
  for f in `cat $logFile | awk '{print $3}' | sed "s/s//g" | sed "s/+//g"`;
  do
echo "$f-$lastN" | bc;
lastN=$f;
  done | sort | uniq -c

  1. Pair an external Apple Trackpad over Blutooth.
  2. Run the above script
  3. Move your finger in circles on the touchpad for a few seconds
  4. Press ctrl+c

  An example output of this script before the regression
  --

2 .010
  371 .011
  127 .012
1 .876

  The above output means that: 2 times the delta was 10ms, 371 times
  11ms, 127 times 12ms and 1 time 876ms. This corresponds well with the
  Trackpad's ~90Hz polling rate.

  An example output of this script after the regression
  -

3 .003
   12 .004
   16 .005
   14 .006
   21 .007
   16 .008
   20 .009
   13 .010
  359 .011
   47 .012
   20 .013
   17 .014
   21 .015
   14 .016
   16 .017
   15 .018
2 .019
1 .020
   38 .022
   21 .023
1 1.060

  
  I suspect that other input devices might be affected as well.

  ProblemType: Bug
  DistroRelease: Ubuntu 20.04
  Package: linux-image-5.4.0-28-generic 5.4.0-28.32
  ProcVersionSignature: Ubuntu 5.4.0-28.32-generic 5.4.30
  Uname: Linux 5.4.0-28-generic x86_64
  ApportVersion: 2.20.11-0ubuntu27
  Architecture: amd64
  AudioDevicesInUse:
   USERPID ACCESS COMMAND
   /dev/snd/controlC0:  yariv  1783 F pulseaudio
  CasperMD5CheckResult: skip
  Date: Sat May  2 13:58:34 2020
  InstallationDate: Installed on 2019-07-13 (293 days ago)
  InstallationMedia: Ubuntu 19.04 "Disco Dingo" - Release amd64 (20190416)
  MachineType: Gigabyte Technology Co., Ltd. Z170X-UD5 TH
  ProcFB: 0 i915drmfb
  ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-5.4.0-28-generic 
root=UUID=6deee348-bb50-4b88-837b-108413e4d8f2 ro quiet splash 
btusb.enable_autosuspend=0 vt.handoff=7
  RelatedPackageVersions:
   linux-restricted-modules-5.4.0-28-generic N/A
   linux-backports-modules-5.4.0-28-generic  N/A
   linux-firmware1.187
  RfKill:
   0: hci0: Bluetooth
Soft blocked: no
Hard blocked: no
  SourcePackage: linux
  UpgradeStatus: Upgraded to focal on 2020-04-28 (3 days ago)
  dmi.bios.date: 03/09/2018
  dmi.bios.vendor: American Megatrends Inc.
  dmi.bios.version: F22g
  dmi.board.asset.tag: Default string
  dmi.board.name: Z170X-UD5 TH-CF
  dmi.board.vendor: Gigabyte Technology Co., Ltd.
  dmi.board.version: x.x
  dmi.chassis.asset.tag: Default string
  dmi.chassis.type: 3
  dmi.chassis.vendor: Default string
  dmi.chassis.version: Default string
  dmi.modalias: