On Sat, 2018-09-22 at 07:21 -0300, Mauro Carvalho Chehab wrote:
> Em Thu, 20 Sep 2018 00:07:09 -0400
> Dan Ziemba <zman0...@gmail.com> escreveu:
> 
> > I reported this on bugzilla also a few days ago, but I'm not sure
> > if
> > that is actually the right place to report, so copying to the
> > mailing
> > list...
> 
> I saw a report on BZ, but haven't time yet to dig into it. Those
> days, it is usually better to report via the ML.
>  
> > 
> > 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.  
> 
> There's something really weird on it: that patch changes a code that
> it is only called when the device is streaming. It shouldn't be
> causing GFP/kernel panic, depending if the machine was booted with
> or without it.

It hadn't occurred to me to try disabled my tv software.  When I
disable tvheadend so it doesn't start at boot, crash does not happen
until I later start it manually.  I believe it does some scanning
through the channels at start up to update EPG data.

> 
> Perhaps it would be a side effect due to some changes at the USB
> subsystem? There are some changes happening there changing some
> locks.
> 
> I see one minor issue there: it is using GFP_ATOMIC instead
> of GFP_KERNEL.
> 
> Could you please try to change this line:
> 
>       stream->buf_list[stream->buf_num] = kzalloc(size, GFP_ATOMIC);
> 
> to
> 
>       stream->buf_list[stream->buf_num] = kzalloc(size, GFP_KERNEL);

I'll give this a try now.

> 
> Also, it would be great if you could post the GPF logs.

It's difficult to capture much, since the system often locks up without
syncing to disk.  The stack traces appear pretty random to me, but I
have attached two examples I captured by tailing dmesg over ssh while
starting tvheadend. In the first, there was actually not a complete
lock up, so it is complete.  For the second one, there was a complete
lockup and quite a bit more printed on the local console that didn't
make it though the network. 

> 
> > 
> > 
> > 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
> > 
> > Bugzilla:
> > https://bugzilla.kernel.org/show_bug.cgi?id=201055
> > 
> > Arch bug:
> > https://bugs.archlinux.org/task/59990
> > 
> > 
> > Thanks,
> > Dan Ziemba
> > 
> > 
> 
> 
> 
> Thanks,
> Mauro
kern  :notice: [  410.089420] audit: type=1130 audit(1537653893.759:73): pid=1 
uid=0 auid=4294967295 ses=4294967295 msg='unit=tvheadend comm="systemd" 
exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
kern  :err   : [  412.638173] usb 4-1.5: dvb_usb_v2: 2nd usb_bulk_msg() 
failed=-110
kern  :err   : [  412.638229] error writing addr: 0x8d, mask: 0x01, data: 0x01, 
retrying...
kern  :warn  : [  412.985663] usb 4-1.5: DVB: adapter 0 frontend 0 frequency 0 
out of range (54000000..858000000)
kern  :err   : [  415.198280] usb 4-1.5: dvb_usb_v2: 2nd usb_bulk_msg() 
failed=-110
kern  :err   : [  415.198342] error writing addr: 0x8d, mask: 0x01, data: 0x01, 
retrying...
kern  :warn  : [  429.186180] general protection fault: 0000 [#1] PREEMPT SMP 
PTI
kern  :warn  : [  429.186280] CPU: 2 PID: 288 Comm: md1_raid6 Not tainted 
4.18.9-arch1-1-ARCH #1
kern  :warn  : [  429.186328] Hardware name: To Be Filled By O.E.M. To Be 
Filled By O.E.M./Z77 Extreme6, BIOS P2.80 07/01/2013
kern  :warn  : [  429.186398] RIP: 0010:memcpy_erms+0x6/0x10
kern  :warn  : [  429.186427] Code: 90 90 90 90 eb 1e 0f 1f 00 48 89 f8 48 89 
d1 48 c1 e9 03 83 e2 07 f3 48 a5 89 d1 f3 a4 c3 66 0f 1f 44 00 00 48 89 f8 48 
89 d1 <f3> a4 c3 0f 1f 80 00 00 00 00 48 89 f8 48 83 fa 20 72 7e 40 38 fe 
kern  :warn  : [  429.186588] RSP: 0018:ffffa38c03be7a70 EFLAGS: 00010206
kern  :warn  : [  429.186625] RAX: ffff900d75115000 RBX: ffff900d75115000 RCX: 
0000000000001000
kern  :warn  : [  429.186676] RDX: 0000000000001000 RSI: 62db1d4c87f61263 RDI: 
ffff900d75115000
kern  :warn  : [  429.186726] RBP: 0000000000000000 R08: 0000000000001000 R09: 
ffffa38c03be7b00
kern  :warn  : [  429.186774] R10: 0000000000001000 R11: 0000000000001000 R12: 
ffffa38c03be7b00
kern  :warn  : [  429.186824] R13: 0000000000001000 R14: ffff900d767bbc80 R15: 
0000000000000000
kern  :warn  : [  429.186876] FS:  0000000000000000(0000) 
GS:ffff900d9f280000(0000) knlGS:0000000000000000
kern  :warn  : [  429.186929] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
kern  :warn  : [  429.186969] CR2: 00007f447c0b3938 CR3: 00000005eb80a001 CR4: 
00000000001606e0
kern  :warn  : [  429.187016] Call Trace:
kern  :warn  : [  429.187043]  async_memcpy+0x22f/0x1000 [async_memcpy]
kern  :warn  : [  429.187085]  async_copy_data.isra.14+0x21e/0x2c0 [raid456]
kern  :warn  : [  429.187129]  raid_run_ops+0x8fb/0x15e0 [raid456]
kern  :warn  : [  429.187167]  ? handle_stripe_dirtying+0x701/0x7f0 [raid456]
kern  :warn  : [  429.187209]  ? swiotlb_map_sg_attrs+0x4c/0x140
kern  :warn  : [  429.187246]  handle_stripe+0xb21/0x1ed0 [raid456]
kern  :warn  : [  429.187282]  ? ktime_get+0x36/0xa0
kern  :warn  : [  429.187311]  ? cfq_dispatch_requests+0x30/0xbd0
kern  :warn  : [  429.187349]  handle_active_stripes.isra.30+0x393/0x590 
[raid456]
kern  :warn  : [  429.187395]  raid5d+0x348/0x530 [raid456]
kern  :warn  : [  429.187428]  ? schedule_timeout+0x1d9/0x4a0
kern  :warn  : [  429.187461]  ? preempt_count_add+0x68/0xa0
kern  :warn  : [  429.187492]  ? _raw_spin_lock_irqsave+0x25/0x50
kern  :warn  : [  429.187531]  ? md_register_thread+0xd0/0xd0 [md_mod]
kern  :warn  : [  429.187570]  md_thread+0xf9/0x160 [md_mod]
kern  :warn  : [  429.187602]  ? wait_woken+0x80/0x80
kern  :warn  : [  429.187631]  kthread+0x112/0x130
kern  :warn  : [  429.187658]  ? kthread_flush_work_fn+0x10/0x10
kern  :warn  : [  429.187691]  ret_from_fork+0x35/0x40
kern  :warn  : [  429.187720] Modules linked in: bridge stp llc nf_log_ipv6 
nf_conntrack_ipv6 nf_defrag_ipv6 ip6t_REJECT nf_reject_ipv6 ip6t_rt 
ip6table_filter ip6_tables nf_log_ipv4 nf_log_common nf_conntrack_ipv4 
nf_defrag_ipv4 xt_LOG xt_recent ipt_REJECT nf_reject_ipv4 xt_addrtype xt_tcpudp 
xt_pkttype xt_conntrack iptable_filter nct6775 hwmon_vid nls_iso8859_1 
nls_cp437 vfat fat mxl111sf_tuner lg2160 intel_rapl mxl111sf_demod 
x86_pkg_temp_thermal intel_powerclamp lgdt3305 coretemp kvm_intel kvm irqbypass 
crct10dif_pclmul crc32_pclmul ghash_clmulni_intel pcbc dvb_usb_mxl111sf 
aesni_intel dvb_usb_v2 aes_x86_64 crypto_simd cryptd tveeprom glue_helper 
dvb_core videobuf2_vmalloc i915 mxm_wmi gpio_ich iTCO_wdt iTCO_vendor_support 
videobuf2_memops videobuf2_common videodev media intel_cstate intel_uncore 
rc_core drm_kms_helper
kern  :warn  : [  429.191594]  intel_rapl_perf drm igb pcspkr i2c_algo_bit 
input_leds intel_gtt agpgart dca pcc_cpufreq led_class mei_me syscopyarea 
sysfillrect evdev sysimgblt wmi mac_hid fb_sys_fops mei lpc_ich ie31200_edac 
i2c_i801 nfsd auth_rpcgss nfs_acl lockd grace sunrpc nf_conntrack_sane 
nf_conntrack ip_tables x_tables ext4 crc16 mbcache jbd2 fscrypto dm_mod 
hid_generic usbhid hid sd_mod uas usb_storage ahci libahci xhci_pci libata 
ehci_pci xhci_hcd ehci_hcd scsi_mod usbcore usb_common raid456 libcrc32c 
crc32c_generic crc32c_intel async_raid6_recov async_memcpy async_pq async_xor 
xor async_tx raid6_pq raid1 md_mod
kern  :warn  : [  429.201023] ---[ end trace 9e2d7c875488f557 ]---
kern  :warn  : [  429.202416] RIP: 0010:memcpy_erms+0x6/0x10
kern  :warn  : [  429.203408] Code: 90 90 90 90 eb 1e 0f 1f 00 48 89 f8 48 89 
d1 48 c1 e9 03 83 e2 07 f3 48 a5 89 d1 f3 a4 c3 66 0f 1f 44 00 00 48 89 f8 48 
89 d1 <f3> a4 c3 0f 1f 80 00 00 00 00 48 89 f8 48 83 fa 20 72 7e 40 38 fe 
kern  :warn  : [  429.205506] RSP: 0018:ffffa38c03be7a70 EFLAGS: 00010206
kern  :warn  : [  429.206546] RAX: ffff900d75115000 RBX: ffff900d75115000 RCX: 
0000000000001000
kern  :warn  : [  429.207539] RDX: 0000000000001000 RSI: 62db1d4c87f61263 RDI: 
ffff900d75115000
kern  :warn  : [  429.208534] RBP: 0000000000000000 R08: 0000000000001000 R09: 
ffffa38c03be7b00
kern  :warn  : [  429.209545] R10: 0000000000001000 R11: 0000000000001000 R12: 
ffffa38c03be7b00
kern  :warn  : [  429.210514] R13: 0000000000001000 R14: ffff900d767bbc80 R15: 
0000000000000000
kern  :warn  : [  429.211485] FS:  0000000000000000(0000) 
GS:ffff900d9f280000(0000) knlGS:0000000000000000
kern  :warn  : [  429.212485] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
kern  :warn  : [  429.213344] CR2: 00007f447c0b3938 CR3: 00000005eb80a001 CR4: 
00000000001606e0
kern  :info  : [  429.214141] note: md1_raid6[288] exited with preempt_count 3
daemon:warn  : [  664.473663] systemd[1]: systemd-journald.service: State 
'stop-sigabrt' timed out. Terminating.
daemon:warn  : [  754.723181] systemd[1]: systemd-journald.service: State 
'stop-sigterm' timed out. Killing.
daemon:notice: [  754.725127] systemd[1]: systemd-journald.service: Killing 
process 368 (systemd-journal) with signal SIGKILL.
daemon:warn  : [  844.727776] systemd[1]: systemd-journald.service: Processes 
still around after SIGKILL. Ignoring.
kern  :notice: [   76.235033] audit: type=1130 audit(1537654618.909:66): pid=1 
uid=0 auid=4294967295 ses=4294967295 msg='unit=tvheadend comm="systemd" 
exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
syslog:warn  : [   76.560142] systemd-journald[366]: File 
/var/log/journal/9ebf93d137434ec68b05472bb8d498ab/user-1337.journal corrupted 
or uncleanly shut down, renaming and replacing.
kern  :err   : [   78.776697] usb 4-1.5: dvb_usb_v2: 2nd usb_bulk_msg() 
failed=-110
kern  :err   : [   78.776752] error writing addr: 0x8d, mask: 0x01, data: 0x01, 
retrying...
kern  :warn  : [   79.124062] usb 4-1.5: DVB: adapter 0 frontend 0 frequency 0 
out of range (54000000..858000000)
kern  :err   : [   81.336677] usb 4-1.5: dvb_usb_v2: 2nd usb_bulk_msg() 
failed=-110
kern  :err   : [   81.336740] error writing addr: 0x8d, mask: 0x01, data: 0x01, 
retrying...
kern  :warn  : [  162.339652] general protection fault: 0000 [#1] PREEMPT SMP 
PTI
kern  :warn  : [  162.339752] CPU: 3 PID: 1003 Comm: tvheadend Not tainted 
4.18.9-arch1-1-ARCH #1
kern  :warn  : [  162.339801] Hardware name: To Be Filled By O.E.M. To Be 
Filled By O.E.M./Z77 Extreme6, BIOS P2.80 07/01/2013
kern  :warn  : [  162.339868] RIP: 0010:wait_consider_task+0x26/0x920
kern  :warn  : [  162.339902] Code: 00 00 66 90 0f 1f 44 00 00 41 57 41 56 41 
55 41 54 55 53 48 89 d3 48 83 ec 30 65 48 8b 04 25 28 00 00 00 48 89 44 24 28 
31 c0 <8b> 92 8c 04 00 00 83 fa 10 74 2d 8b 07 48 89 fd 41 89 f5 83 f8 03 
kern  :warn  : [  162.340063] RSP: 0018:ffffac3f03ecfd50 EFLAGS: 00010246
kern  :warn  : [  162.340100] RAX: 0000000000000000 RBX: 7c778145a68f22c3 RCX: 
0000000000000001
kern  :warn  : [  162.340147] RDX: 7c778145a68f22c3 RSI: 0000000000000000 RDI: 
ffffac3f03ecfdf8
kern  :warn  : [  162.340195] RBP: ffffac3f03ecfdf8 R08: 0000000000000000 R09: 
0000000000000001
kern  :warn  : [  162.340243] R10: 0000000000000001 R11: 0000000000000000 R12: 
ffffac3f03ecfe20
kern  :warn  : [  162.340290] R13: 00000000fffffff6 R14: 7c778145a68f22c3 R15: 
ffff9a10b8860510
kern  :warn  : [  162.340339] FS:  00007f4da9706700(0000) 
GS:ffff9a10df2c0000(0000) knlGS:0000000000000000
kern  :warn  : [  162.340392] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
kern  :warn  : [  162.340431] CR2: 00007f4da406c000 CR3: 00000007b51e6002 CR4: 
00000000001606e0
kern  :warn  : [  162.340479] Call Trace:
kern  :warn  : [  162.340506]  ? preempt_count_add+0x68/0xa0
kern  :warn  : [  162.340537]  do_wait+0x11c/0x240
kern  :warn  : [  162.340563]  kernel_wait4+0x9e/0x140
kern  :warn  : [  162.340592]  ? task_stopped_code+0x50/0x50
kern  :warn  : [  162.340623]  __se_sys_wait4+0x88/0xa0
kern  :warn  : [  162.340653]  ? syscall_slow_exit_work+0x19b/0x1b0
kern  :warn  : [  162.340688]  ? syscall_trace_enter+0x1d3/0x2d0
kern  :warn  : [  162.340724]  ? do_epoll_wait+0x8b/0xd0
kern  :warn  : [  162.340754]  do_syscall_64+0x5b/0x170
kern  :warn  : [  162.340784]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
kern  :warn  : [  162.340821] RIP: 0033:0x7f4db4bd9d42
kern  :warn  : [  162.340847] Code: 41 54 41 89 d4 55 48 89 f5 53 89 fb 48 83 
ec 10 e8 a3 f0 ff ff 45 31 d2 44 89 e2 48 89 ee 41 89 c0 89 df b8 3d 00 00 00 
0f 05 <48> 3d 00 f0 ff ff 77 30 44 89 c7 89 44 24 0c e8 da f0 ff ff 8b 44 
kern  :warn  : [  162.341006] RSP: 002b:00007f4da97056b0 EFLAGS: 00000246 
ORIG_RAX: 000000000000003d
kern  :warn  : [  162.341062] RAX: ffffffffffffffda RBX: 00000000ffffffff RCX: 
00007f4db4bd9d42
kern  :warn  : [  162.341109] RDX: 0000000000000001 RSI: 00007f4da97056e4 RDI: 
00000000ffffffff
kern  :warn  : [  162.341156] RBP: 00007f4da97056e4 R08: 0000000000000000 R09: 
0000000000000000
kern  :warn  : [  162.341204] R10: 0000000000000000 R11: 0000000000000246 R12: 
0000000000000001
kern  :warn  : [  162.341251] R13: 0000000000000000 R14: 00007f4da9706700 R15: 
0000000000000000
kern  :warn  : [  162.341300] Modules linked in: bridge stp llc nf_log_ipv6 
nf_conntrack_ipv6 nf_defrag_ipv6 ip6t_REJECT nf_reject_ipv6 ip6t_rt 
ip6table_filter ip6_tables nf_log_ipv4 nf_log_common nf_conntrack_ipv4 
nf_defrag_ipv4 xt_LOG xt_recent ipt_REJECT nf_reject_ipv4 xt_addrtype xt_tcpudp 
xt_pkttype xt_conntrack iptable_filter nct6775 hwmon_vid nls_iso8859_1 
nls_cp437 vfat fat mxl111sf_tuner lg2160 intel_rapl x86_pkg_temp_thermal 
intel_powerclamp coretemp mxl111sf_demod kvm_intel kvm irqbypass lgdt3305 
crct10dif_pclmul crc32_pclmul ghash_clmulni_intel pcbc aesni_intel aes_x86_64 
crypto_simd cryptd glue_helper dvb_usb_mxl111sf dvb_usb_v2 tveeprom dvb_core 
videobuf2_vmalloc intel_cstate i915 mxm_wmi videobuf2_memops videobuf2_common 
iTCO_wdt iTCO_vendor_support videodev gpio_ich media rc_core intel_uncore 
intel_rapl_perf
kern  :warn  : [  162.345453]  drm_kms_helper drm igb intel_gtt pcspkr 
input_leds mei_me agpgart i2c_algo_bit lpc_ich i2c_i801 syscopyarea sysfillrect 
sysimgblt mei fb_sys_fops dca pcc_cpufreq evdev led_class wmi ie31200_edac 
mac_hid nfsd auth_rpcgss nfs_acl lockd grace sunrpc nf_conntrack_sane 
nf_conntrack ip_tables x_tables ext4 crc16 mbcache jbd2 fscrypto dm_mod 
hid_generic usbhid hid sd_mod uas usb_storage ahci libahci xhci_pci xhci_hcd 
ehci_pci ehci_hcd libata usbcore scsi_mod usb_common raid456 libcrc32c 
crc32c_generic crc32c_intel async_raid6_recov async_memcpy async_pq async_xor 
xor async_tx raid6_pq raid1 md_mod
kern  :warn  : [  162.355599] ---[ end trace 0d08aea59c61bbec ]---
kern  :warn  : [  162.356694] RIP: 0010:wait_consider_task+0x26/0x920
kern  :warn  : [  162.357577] Code: 00 00 66 90 0f 1f 44 00 00 41 57 41 56 41 
55 41 54 55 53 48 89 d3 48 83 ec 30 65 48 8b 04 25 28 00 00 00 48 89 44 24 28 
31 c0 <8b> 92 8c 04 00 00 83 fa 10 74 2d 8b 07 48 89 fd 41 89 f5 83 f8 03 
kern  :warn  : [  162.359419] RSP: 0018:ffffac3f03ecfd50 EFLAGS: 00010246
kern  :warn  : [  162.360321] RAX: 0000000000000000 RBX: 7c778145a68f22c3 RCX: 
0000000000000001
kern  :warn  : [  162.361216] RDX: 7c778145a68f22c3 RSI: 0000000000000000 RDI: 
ffffac3f03ecfdf8
kern  :warn  : [  162.362074] RBP: ffffac3f03ecfdf8 R08: 0000000000000000 R09: 
0000000000000001
kern  :warn  : [  162.362923] R10: 0000000000000001 R11: 0000000000000000 R12: 
ffffac3f03ecfe20
kern  :warn  : [  162.363790] R13: 00000000fffffff6 R14: 7c778145a68f22c3 R15: 
ffff9a10b8860510
kern  :warn  : [  162.364692] FS:  00007f4da9706700(0000) 
GS:ffff9a10df2c0000(0000) knlGS:0000000000000000
kern  :warn  : [  162.365550] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
kern  :warn  : [  162.366409] CR2: 00007f4da406c000 CR3: 00000007b51e6002 CR4: 
00000000001606e0

Reply via email to