Bug 201055

Summary: dvb-usb-v2: General Protection Fault shortly after boot
Product: v4l-dvb Reporter: Dan Ziemba (zman0900)
Component: dvb-usbAssignee: dvb-usb (v4l-dvb_dvb-usb)
Severity: normal CC: crope, mchehab, mkrufky, radek, toso, zman0900
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 4.18 Tree: Mainline
Regression: Yes

Description Dan Ziemba 2018-09-09 00:05:15 UTC
Starting with the first 4.18 RC kernel, my system experiences general protection faults leading to kernel panic shortly after the login prompt appears on most boots.  Occasionally that doesn't happen and instead numerous other seemingly random stack traces are printed (bad page map, scheduling while atomic, null pointer deref, etc), but either way the system is unusable.  This bug remains up through the latest mainline kernel 4.19-rc2.

Booting with my USB ATSC tv tuner disconnected prevents the bug from happening.

Kernel bisection between v4.17 and 4.18-rc1 shows problem is caused by:

1a0c10ed7bb1 media: dvb-usb-v2: stop using coherent memory for URBs

Building both 4.18.6 and 4.19-rc2 with that commit reverted resolves the bug for me.  

My DVB hardware uses driver mxl111sf:

Bus 002 Device 003: ID 2040:c61b Hauppauge 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x2040 Hauppauge
  idProduct          0xc61b 
  bcdDevice            0.00
  iManufacturer           1 Hauppauge
  iProduct                2 WinTV Aero-M

Other system info:

Arch Linux x86_64
Intel i7-3770
16 GB ram
Comment 1 Victor Toso 2018-10-25 14:05:38 UTC
You could try to see if it fixes the issue for you.
Comment 2 Dan Ziemba 2018-12-31 03:38:46 UTC
Sorry for the slow response.  I have been running the 4.14 LTS kernel for a while now and forgot to check on this.  I just tried out the 4.19.12 kernel as built by Arch Linux, and the TV tuner seems to be working fine.  So it seems something between 4.19-rc2 and 4.19.12 has fixed or hidden the problem.  

But I am now running ZFS on this server, so the kernel is tainted.  I guess it could be possible that that is somehow preventing the error from happening.
Comment 3 Dan Ziemba 2019-01-05 19:03:10 UTC
Scratch that, I must have just gotten lucky the day I tried that.  Arch has now upgraded their LTS kernel to 4.19.13, and the bug is happening again for me.  It is also happening with the standard kernel, which is now at 4.20.  

Trying to build now with the patch.  Looks like there is a v3 here, so I will try that one:
Comment 4 Dan Ziemba 2019-01-06 01:44:55 UTC
I have tried the v3 patch and can confirm it works.  I used the one from here since the mail-archive.com site seems to mangle tabs:

I applied it to Arch's linux-lts 4.19.13-1:

That built and worked fine.  I used it for watching TV for an hour or so while also building Arch's linux 4.20.arch1-1 kernel with the patch applied, so it seems stable.  The patched build of 4.20 also ran fine for an hour or so. 

Since 4.19 is an LTS release, please apply this patch there as well as mainline.
Comment 5 Mauro Carvalho Chehab 2019-01-07 14:34:49 UTC
Patch fixing it was merged upstream during the merge window and it is there for Kernel 5.0-rc1. The patch was also merged at stable trees for Kernels 4.19 and 4.20.