Sundtek Support Forum

English => Sundtek MediaTV Pro (Europe) => Thema gestartet von: jelzinga am Mai 05, 2014, 10:29:03 Nachmittag

Titel: Kernel panic on Intel NUC D34010WYKH and Ubuntu 14.04
Beitrag von: jelzinga am Mai 05, 2014, 10:29:03 Nachmittag
Since the installation of the Sundtek device with the Net-Installer I have kernel-panics occasionally on my Intel NUC D34010WYKH (Intel i3).

I'm beginning to suspect there is something 'wrong' with the USB3-implementation on Linux on the device, since I would expect the Sundtek-drivers being userspace-drivers they alone can not cause kernel-panics... However, I must say that it only happened after I connected the Sundtek USB-stick and "the taint is on mediasrv" which is from the Sundtek-drivers.

I was wondering if any of you guys can shine some light on my issue, hence a copy/paste of the stack-trace after a recent kernel-panic:

May  5 01:17:26 xbmc kernel: [31865.863680] ------------[ cut here ]------------
May  5 01:17:26 xbmc kernel: [31865.863691] WARNING: CPU: 1 PID: 2315 at /home/apw/COD/linux/drivers/usb/host/xhci-ring.c:569 xhci_find_new_dequeue_state+0x231/0x260()
May  5 01:17:26 xbmc kernel: [31865.863693] Modules linked in: ir_lirc_codec ir_mce_kbd_decoder ir_sanyo_decoder ir_sony_decoder ir_jvc_decoder ir_rc6_decoder ir_rc5_decoder ir_nec_decoder rc_rc6_mce nuvoton_cir des_generic md4 mceusb lirc_dev bnep rfcomm bluetooth 6lowpan_iphc snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic nls_utf8 cifs fscache joydev nls_iso8859_1 hid_sunplus usbhid intel_rapl x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel snd_hda_intel kvm snd_hda_codec snd_hwdep snd_pcm ftdi_sio usbserial crct10dif_pclmul crc32_pclmul i915 ghash_clmulni_intel snd_seq_midi snd_seq_midi_event aesni_intel rc_core aes_x86_64 snd_rawmidi lrw gf128mul snd_seq drm_kms_helper glue_helper i2c_hid ablk_helper snd_seq_device snd_timer parport_pc cryptd dw_dmac hid drm dw_dmac_core snd video ppdev 8250_dw i2c_designware_platform soundcore mei_me i2c_algo_bit spi_pxa2xx_platform lpc_ich mei i2c_designware_core lp microcode mac_hid parport e1000e ahci ptp libahci pps_core sdhci_acpi sdhci [last unloaded: nuvoton_cir]
May  5 01:17:26 xbmc kernel: [31865.863768] CPU: 1 PID: 2315 [b]Comm: mediasrv Tainted: G      D      3.14.1-031401-generic #201404141220[/b]
May  5 01:17:26 xbmc kernel: [31865.863770] Hardware name:                  /D34010WYK, BIOS WYLPT10H.86A.0025.2014.0303.1008 03/03/2014
May  5 01:17:26 xbmc kernel: [31865.863772]  0000000000000239 ffff8800a183dbf8 ffffffff8175bbf5 0000000000000007
May  5 01:17:26 xbmc kernel: [31865.863776]  0000000000000000 ffff8800a183dc38 ffffffff8106ac9c ffffffff81595770
May  5 01:17:26 xbmc kernel: [31865.863780]  ffff8800368aa000 ffff880036b545c0 ffff8800a183dcc0 ffff8800d6ed8000
May  5 01:17:26 xbmc kernel: [31865.863784] Call Trace:
May  5 01:17:26 xbmc kernel: [31865.863789]  [<ffffffff8175bbf5>] dump_stack+0x46/0x58
May  5 01:17:26 xbmc kernel: [31865.863794]  [<ffffffff8106ac9c>] warn_slowpath_common+0x8c/0xc0
May  5 01:17:26 xbmc kernel: [31865.863800]  [<ffffffff81595770>] ? trace_xhci_dbg_quirks+0x70/0x70
May  5 01:17:26 xbmc kernel: [31865.863803]  [<ffffffff8106acea>] warn_slowpath_null+0x1a/0x20
May  5 01:17:26 xbmc kernel: [31865.863807]  [<ffffffff815a3731>] xhci_find_new_dequeue_state+0x231/0x260
May  5 01:17:26 xbmc kernel: [31865.863810]  [<ffffffff81599e51>] xhci_cleanup_stalled_ring+0x71/0x100
May  5 01:17:26 xbmc kernel: [31865.863813]  [<ffffffff8159a016>] xhci_endpoint_reset+0x136/0x1a0
May  5 01:17:26 xbmc kernel: [31865.863817]  [<ffffffff81567b45>] usb_hcd_reset_endpoint+0x25/0x70
May  5 01:17:26 xbmc kernel: [31865.863821]  [<ffffffff8156ada8>] usb_enable_endpoint+0xa8/0xb0
May  5 01:17:26 xbmc kernel: [31865.863824]  [<ffffffff8156adf2>] usb_enable_interface+0x42/0x60
May  5 01:17:26 xbmc kernel: [31865.863828]  [<ffffffff8156b2e6>] usb_set_interface+0x1f6/0x340
May  5 01:17:26 xbmc kernel: [31865.863831]  [<ffffffff815756a9>] usbdev_do_ioctl+0x589/0xc50
May  5 01:17:26 xbmc kernel: [31865.863835]  [<ffffffff810a4fb9>] ? account_user_time+0x99/0xb0
May  5 01:17:26 xbmc kernel: [31865.863838]  [<ffffffff81575d9e>] usbdev_ioctl+0xe/0x20
May  5 01:17:26 xbmc kernel: [31865.863843]  [<ffffffff811e46e5>] do_vfs_ioctl+0x75/0x2c0
May  5 01:17:26 xbmc kernel: [31865.863846]  [<ffffffff81024195>] ? syscall_trace_enter+0x165/0x280
May  5 01:17:26 xbmc kernel: [31865.863850]  [<ffffffff811eea95>] ? __fget_light+0x25/0x70
May  5 01:17:26 xbmc kernel: [31865.863853]  [<ffffffff811e49c1>] SyS_ioctl+0x91/0xb0
May  5 01:17:26 xbmc kernel: [31865.863858]  [<ffffffff8177247f>] tracesys+0xe1/0xe6
May  5 01:17:26 xbmc kernel: [31865.863860] ---[ end trace f07cfa4073dc9914 ]---
May  5 01:17:26 xbmc kernel: [31865.863869] BUG: unable to handle kernel NULL pointer dereference at 0000000000000010
May  5 01:17:26 xbmc kernel: [31865.863910] IP: [<ffffffff815a37c5>] xhci_queue_new_dequeue_state+0x65/0xd0
May  5 01:17:26 xbmc kernel: [31865.863944] PGD 36ac3067 PUD d8b44067 PMD 0
May  5 01:17:26 xbmc kernel: [31865.863969] Oops: 0000 [#2] SMP
May  5 01:17:26 xbmc kernel: [31865.863987] Modules linked in: ir_lirc_codec ir_mce_kbd_decoder ir_sanyo_decoder ir_sony_decoder ir_jvc_decoder ir_rc6_decoder ir_rc5_decoder ir_nec_decoder rc_rc6_mce nuvoton_cir des_generic md4 mceusb lirc_dev bnep rfcomm bluetooth 6lowpan_iphc snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic nls_utf8 cifs fscache joydev nls_iso8859_1 hid_sunplus usbhid intel_rapl x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel snd_hda_intel kvm snd_hda_codec snd_hwdep snd_pcm ftdi_sio usbserial crct10dif_pclmul crc32_pclmul i915 ghash_clmulni_intel snd_seq_midi snd_seq_midi_event aesni_intel rc_core aes_x86_64 snd_rawmidi lrw gf128mul snd_seq drm_kms_helper glue_helper i2c_hid ablk_helper snd_seq_device snd_timer parport_pc cryptd dw_dmac hid drm dw_dmac_core snd video ppdev 8250_dw i2c_designware_platform soundcore mei_me i2c_algo_bit spi_pxa2xx_platform lpc_ich mei i2c_designware_core lp microcode mac_hid parport e1000e ahci ptp libahci pps_core sdhci_acpi sdhci [last unloaded: nuvoton_cir]
May  5 01:17:26 xbmc kernel: [31865.864495] CPU: 1 PID: 2315 Comm: mediasrv Tainted: G      D W    3.14.1-031401-generic #201404141220
May  5 01:17:26 xbmc kernel: [31865.864534] Hardware name:                  /D34010WYK, BIOS WYLPT10H.86A.0025.2014.0303.1008 03/03/2014
May  5 01:17:26 xbmc kernel: [31865.864574] task: ffff8800af0cb1e0 ti: ffff8800a183c000 task.ti: ffff8800a183c000
May  5 01:17:26 xbmc kernel: [31865.864606] RIP: 0010:[<ffffffff815a37c5>]  [<ffffffff815a37c5>] xhci_queue_new_dequeue_state+0x65/0xd0
May  5 01:17:26 xbmc kernel: [31865.864649] RSP: 0018:ffff8800a183dc48  EFLAGS: 00010046
May  5 01:17:26 xbmc kernel: [31865.864672] RAX: 0000000000000000 RBX: ffff8800a183dcc0 RCX: 0000000000000000
May  5 01:17:26 xbmc kernel: [31865.864702] RDX: 0000000000000000 RSI: ffff8800d6ed0000 RDI: 0000000000000000
May  5 01:17:26 xbmc kernel: [31865.864733] RBP: ffff8800a183dca8 R08: ffff8800a183dcc0 R09: ffff8800d6ed0000
May  5 01:17:26 xbmc kernel: [31865.864764] R10: 0000000000000003 R11: 0000000000000455 R12: ffff8800368aa000
May  5 01:17:26 xbmc kernel: [31865.864794] R13: ffff8800d6ed81f8 R14: 0000000000000000 R15: 0000000000000002
May  5 01:17:26 xbmc kernel: [31865.864826] FS:  00007fe7b2462700(0000) GS:ffff88011fa80000(0000) knlGS:0000000000000000
May  5 01:17:26 xbmc kernel: [31865.864861] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
May  5 01:17:26 xbmc kernel: [31865.864885] CR2: 0000000000000010 CR3: 00000000d6e71000 CR4: 00000000001407e0
May  5 01:17:26 xbmc kernel: [31865.864915] Stack:
May  5 01:17:26 xbmc kernel: [31865.864925]  ffff8800a183dcb8 ffff8800a183dc68 ffffffff81adc073 ffff8800d6ed0000
May  5 01:17:26 xbmc kernel: [31865.868359]  0000000200000003 00000000a183dcd0 ffff8800368aa000 ffff8800d6ed81f8
May  5 01:17:26 xbmc kernel: [31865.871788]  ffff8800368aa000 ffff8800d6ed0000 0000000000000002 ffff8800368aa048
May  5 01:17:26 xbmc kernel: [31865.875182] Call Trace:
May  5 01:17:26 xbmc kernel: [31865.878582]  [<ffffffff81599ed1>] xhci_cleanup_stalled_ring+0xf1/0x100
May  5 01:17:26 xbmc kernel: [31865.881853]  [<ffffffff8159a016>] xhci_endpoint_reset+0x136/0x1a0
May  5 01:17:26 xbmc kernel: [31865.885003]  [<ffffffff81567b45>] usb_hcd_reset_endpoint+0x25/0x70
May  5 01:17:26 xbmc kernel: [31865.888042]  [<ffffffff8156ada8>] usb_enable_endpoint+0xa8/0xb0
May  5 01:17:26 xbmc kernel: [31865.890984]  [<ffffffff8156adf2>] usb_enable_interface+0x42/0x60
May  5 01:17:26 xbmc kernel: [31865.893814]  [<ffffffff8156b2e6>] usb_set_interface+0x1f6/0x340
May  5 01:17:26 xbmc kernel: [31865.896600]  [<ffffffff815756a9>] usbdev_do_ioctl+0x589/0xc50
May  5 01:17:26 xbmc kernel: [31865.899361]  [<ffffffff810a4fb9>] ? account_user_time+0x99/0xb0
May  5 01:17:26 xbmc kernel: [31865.902094]  [<ffffffff81575d9e>] usbdev_ioctl+0xe/0x20
May  5 01:17:26 xbmc kernel: [31865.904796]  [<ffffffff811e46e5>] do_vfs_ioctl+0x75/0x2c0
May  5 01:17:26 xbmc kernel: [31865.907479]  [<ffffffff81024195>] ? syscall_trace_enter+0x165/0x280
May  5 01:17:26 xbmc kernel: [31865.910158]  [<ffffffff811eea95>] ? __fget_light+0x25/0x70
May  5 01:17:26 xbmc kernel: [31865.912839]  [<ffffffff811e49c1>] SyS_ioctl+0x91/0xb0
May  5 01:17:26 xbmc kernel: [31865.915514]  [<ffffffff8177247f>] tracesys+0xe1/0xe6
May  5 01:17:26 xbmc kernel: [31865.918191] Code: 10 01 00 00 4c 89 c3 4d 8b 48 08 49 89 fc 44 89 55 c0 89 4d cc 4c 89 f7 4c 89 ce 4c 8d 68 28 4c 89 4d b8 e8 ee ec ff ff 8b 53 10 <4d> 8b 46 10 4c 89 f1 4c 8b 4d b8 48 89 04 24 4c 89 e7 48 c7 c6
May  5 01:17:26 xbmc kernel: [31865.921175] RIP  [<ffffffff815a37c5>] xhci_queue_new_dequeue_state+0x65/0xd0
May  5 01:17:26 xbmc kernel: [31865.923962]  RSP <ffff8800a183dc48>
May  5 01:17:26 xbmc kernel: [31865.926748] CR2: 0000000000000010
May  5 01:17:26 xbmc kernel: [31865.946709] ---[ end trace f07cfa4073dc9915 ]---

This is taken on Ubuntu 14.04 - it happened on both the supplied 3.13 kernel as well on the 3.14.1 kernel which is installed right now.

Unfortunately the device has only USB3-ports connected on the outside and I can not seem to find a way to 'fall back' on EHCI rather than XCHI - but perhaps you can shine a light on this ?

To clarify, it is this device:
http://www.intel.nl/content/www/nl/nl/nuc/nuc-kit-d34010wykh.html

I have BIOS 0025 installed on it (latest stable) and Ubuntu 14.04 with kernel 3.14.1 (Linux 3.14.1-031401-generic #201404141220 SMP Mon Apr 14 16:21:48 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux)


Titel: Re:Kernel panic on Intel NUC D34010WYKH and Ubuntu 14.04
Beitrag von: Sundtek am Mai 05, 2014, 10:40:47 Nachmittag
I just created a bugreport on bugzilla.kernel.org; let's try to push this a little bit it's indeed a kernel bug - not related to our drivers at all but they are affected by this bug.

https://bugzilla.kernel.org/show_bug.cgi?id=75521

There are USB 3.0 issues known with various systems, however we are currently manufacturing new satellite devices and would only have time to dig closer into it once we're done with that process.

As a workaround you might try some older Linux kernel which only supports USB 2.0 (ehci driver)
Titel: Re:Kernel panic on Intel NUC D34010WYKH and Ubuntu 14.04
Beitrag von: jelzinga am Mai 05, 2014, 10:48:22 Nachmittag
Markus, thanks for the (almost) immediate update, much appreciated !

I figured the problem was indeed in the XHCI-implementation in the Linux kernel. Unfortunately, there are only USB3 headers connected to the outside of the small NUC-case, but I learned there is a USB2-connector on the inside. I have not checked if there is a possibility to use that header, but since the case is so compact I fear it requires a Dremel-tool, measures which I rather not take ;)

In the meantime I have successfully installed the stick on my Synology DS211J and use a Network-connection to my i3. This seems to work, but I end up with interruptions on the stream, and TVHeadend then cuts off the stream.. So that is not ideal. I suspect the DS211J lacks the RAM/CPU to hold up - but I have not investigated fully.

Perhaps my Raspberry Pi would be better suited for this in the meantime until this kernel-issue gets resolved?
Titel: Re:Kernel panic on Intel NUC D34010WYKH and Ubuntu 14.04
Beitrag von: Sundtek am Mai 05, 2014, 10:56:26 Nachmittag
Are you using our Network Implementation?
If so be sure you enable PID Filtering on your client, we noticed passing the full transport stream from the NAS to various target systems might cause hickups (full TS = around 50-60mbit constantly!). But you should be rather safe when enabling the filter so it will decrease the network bandwidth to around 0.5-2mb/sec (depending if SD or HD)
The NAS shows up the current bandwidth utilization in the webinterface nicely.
Titel: Re:Kernel panic on Intel NUC D34010WYKH and Ubuntu 14.04
Beitrag von: jelzinga am Mai 06, 2014, 06:34:11 Vormittag
Yeah I am using the PID-filtering. I can see the transfer in the web-interface to be 1-2 Mbyte/sec when streaming so it is definitely not sending the whole mux over the LAN.

It is not so much hickups or artifacts, the stream simply stops after a while (on XBMC with Tvheadend addon) or it repeats a small portion of the stream (VLC Media Player with HTSP plugin). Bit unsure what causes it, I have not seen this behavior when the stick was plugged in on the local TVheadend-machine.

I'm uncertain if dropping to a lower kernel without USB3-support will be a serious option, I don't know when xhci was added to the kernel but I'm worried such an old kernel will have other negative consequences (e.g. crappy video-performance on the Haswell onboard video).
Titel: Re:Kernel panic on Intel NUC D34010WYKH and Ubuntu 14.04
Beitrag von: Sundtek am Mai 06, 2014, 09:15:24 Vormittag
http://support.sundtek.com/index.php/topic,179.0.html

http://support.sundtek.com/index.php/topic,841.0.html

We successfully used this one for live streaming, however filtering needs to be enabled.
Titel: Re:Kernel panic on Intel NUC D34010WYKH and Ubuntu 14.04
Beitrag von: jelzinga am Mai 07, 2014, 11:28:39 Vormittag
Unfortunately, I can not *keep* it working with the Synology. Everything seems to work OK, but after ~5 till ~10 minutes I get a Transport Error in TVHeadend and I need to restart the stream. Obviously not a success watching TV like that. I am uncertain what causes this - I do not have any similar issues when I use the stick on the local tvheadend-server (but that is the kernel panic machine...)

Obviously it might also be a problem with TVheadend interpreting something wrong as a transport-error, I don't know. Right now I do not have a whole lot of other options to test, any recommendations on this problem ?

I've looked around a bit for 'an older kernel' but without USB3 you are looking at kernels >5 years old, which will have other issues (e.g. no TRIM, no decent video-performance, etc etc) so that is not a work-around which is possible.

Titel: Re:Kernel panic on Intel NUC D34010WYKH and Ubuntu 14.04
Beitrag von: Sundtek am Mai 07, 2014, 12:52:03 Nachmittag
Are you using our network driver implementation or do you use tvheadend only for streaming?

Which Synology NAS is that?
Our NAS is a Synology DS213J and we have no problem with it
Titel: Re:Kernel panic on Intel NUC D34010WYKH and Ubuntu 14.04
Beitrag von: jelzinga am Mai 07, 2014, 01:58:54 Nachmittag
The NAS is a Synology DS211J (ARMv5 / 128 Mb.)

I am using the Network driver implementation, because running Tvheadend on it will put an even bigger strain on the already poor CPU. Your DS213J has an ARMv7 if I recall correctly which is a lot more powerful - it might explain the difference. I did the driver-installation via the Synology web-interface after adding the Sundtek-repo to it. I also tried using PID-filter. The stream runs for about 5~ minutes and then it stops with a Transport-error in Tvheadend.



Nevertheless, I got a few more hardware-options available, so I am not giving up yet. Next project will be either trying to use internal USB2 headers on my Intel NUC or trying to run it on an old Atom-board I might still have lying around somewhere :)


Titel: Re:Kernel panic on Intel NUC D34010WYKH and Ubuntu 14.04
Beitrag von: Sundtek am Mai 07, 2014, 02:25:51 Nachmittag
Did you disable Full Mux Reception in your tvheadend configuration?

Because by default TVHeadend tries to read all the TS Datastream which would be 5 MB/Sec which makes TS filtering on the NAS obsolete.

/opt/bin/mediaclient --lc should show up a number of PIDs below the demux node (if it shows up 0x2000 then it means it will send out the entire TS stream).
Titel: Re:Kernel panic on Intel NUC D34010WYKH and Ubuntu 14.04
Beitrag von: jelzinga am Mai 07, 2014, 02:48:28 Nachmittag
I do not think there is "Full Mux Reception" anymore in TvHeadend 3.9.

I saw roughly 1.5-2.0 Megabyte/sec traffic outgoing on the Synology webinterface, I doubt that is a full mux (of 40-50 Mbit from my cable-provider). Nevertheless I can give that --lc command a go to see what I get.

But it all honesty, the DS211J with DSM5 already has a cpu-load when i simply click somewhere at the webinterface. I do not hold my breath if this can run it properly.
Titel: Re:Kernel panic on Intel NUC D34010WYKH and Ubuntu 14.04
Beitrag von: jelzinga am Mai 08, 2014, 04:38:51 Nachmittag
I´m trying to run TVheadend 3.9 now on the Synology DS211J. My CPU-load is roughly 100% when watching HD channels.

My output of --lc±

./mediaclient --lc
**** List of Media Clients ****
/dev/dvb/adapter0/frontend0:
  5495 ... tvheadend
/dev/dvb/adapter0/dvr0:
  5495 ... tvheadend
/dev/dvb/adapter0/demux0:
  5495 ... tvheadend (0000)
  5495 ... tvheadend (0001)
  5495 ... tvheadend (0010)
  5495 ... tvheadend (0011)
  5495 ... tvheadend (0012)
  5495 ... tvheadend (138f)
  5495 ... tvheadend (1838)
  5495 ... tvheadend (1839)
  5495 ... tvheadend (183a)
  5495 ... tvheadend (183b)
  5495 ... tvheadend (041c)
/dev/mediainput0:
  No client connected

Unfortunately this version of tvheadend has no option to turn off full mux-reception. You think I should make changes to /etc/sundtek.conf on the NAS to change this or...
Titel: Re:Kernel panic on Intel NUC D34010WYKH and Ubuntu 14.04
Beitrag von: Sundtek am Mai 08, 2014, 04:55:27 Nachmittag
The CPU Load of the NAS is 100% which processes use the CPU?

the PID filtering parts look okay.
Titel: Re:Kernel panic on Intel NUC D34010WYKH and Ubuntu 14.04
Beitrag von: jelzinga am Mai 08, 2014, 06:21:50 Nachmittag
tvheadend uses the largest part (up to 95%) - but with some smart 'tvheadend-tweaking' I managed to drop it to considerable less (45%) while watching a HD channel @ 12 Mbit as shown below:

Mem: 98652K used, 19664K free, 0K shrd, 2864K buff, 22436K cached
CPU: [b]43.2%[/b] usr  1.3% sys  0.0% nic 55.1% idle  0.0% io  0.0% irq  0.1% sirq
Load average: 0.13 0.33 0.46 4/195 21429
  PID  PPID USER     STAT   VSZ %MEM %CPU COMMAND
 5495     1 tvheaden S     269m232.3 [b]43.7[/b] /usr/local/tvheadend-testing/bin/tvheadend

The biggest reason why TVHeadend uses so much CPU is mostly because my DVB-C is encrypted : TVHeadend has to use CSA (via Oscam) to decrypt the Irdeto-protection

Nevertheless, it seems to be working now, as long as I don't do anything else on the NAS obviously :)

Now all I need is a kernel-patch for the USB3 issues so I can move back to my i3 with the stick - but keeping my fingers crossed this will hold in the meantime :)
Titel: Re:Kernel panic on Intel NUC D34010WYKH and Ubuntu 14.04
Beitrag von: eleete0712 am Mai 24, 2014, 10:31:49 Nachmittag
So are there any news about this issue (the USB kernel stuff)?
Is anybody working on it?

Because i'm also desperatly waiting for a solution.
Titel: Re:Kernel panic on Intel NUC D34010WYKH and Ubuntu 14.04
Beitrag von: Sundtek am Mai 24, 2014, 11:55:06 Nachmittag
No one is currently working on it, we can offer that you send your Intel NUC device to Berlin and we can have a look at it (estimate time for the investigation is around 5 days then we would ship it back).
Unfortunately we cannot get all the test hardware, we already have a lot here..
It is a Linux Kernel problem which has to be solved for everyone.
Titel: Re:Kernel panic on Intel NUC D34010WYKH and Ubuntu 14.04
Beitrag von: lsr am Juni 13, 2014, 12:25:57 Nachmittag
As already mentioned, xhci_hcd is to blame. In my configuration I use two sticks: one old MediaTV Pro and one MediaTV Pro III, connected to an ASRock Vision HT (HM87 chipset, i7-4702MQ) also with Ubuntu 14.04 and Tvheadend, getting the same Kernel Ooops constantly.

The setup worked fine on my old computer with Ubuntu 13.10 and kernel 3.11.0.19, albeit with USB 3.0 controllers from Renesas and Fresco Logic, not Intel.

I have not tried to use the aforementioned 3.11 kernel on 14.04 since I hoped for a fix in 3.15 ("xhci: delete endpoints from bandwidth list before freeing whole device"), but this one only seems to defeat an oops in resume from S4/hibernate. Consequently, installing 3.15-utopic from kernel.ubuntu.com didn't change anything.
May be worth knowing that the (one) dedicated USB 2.0 port of the new ASRock leads to the same result and that xhci-crashes are also triggered by a Seagate Backup Plus Slim with Initio INIC-3609 bridge whereas ASMedia and Fujitsu bridges (all USB 3.0) run fine.

Temporarily the sticks are now connected and net-mounted to my old Seagate Dockstar. It's not as snappy as a direct connection and prone to errors if the network is saturated so I really hope for a solid Linux USB 3.0 implementation soon.  :-\
Titel: Re:Kernel panic on Intel NUC D34010WYKH and Ubuntu 14.04
Beitrag von: Sundtek am Juni 13, 2014, 12:32:15 Nachmittag
Can you update the driver and check /opt/bin/mediaclient --cpucheck and maybe change the CPU scheduler to performance while using the USB devices?

We figured out some systems have issues with the CPU Scheduling Governor and USB.
Titel: Re:Kernel panic on Intel NUC D34010WYKH and Ubuntu 14.04
Beitrag von: lsr am Juni 13, 2014, 12:56:24 Nachmittag
Thanks, testing now.
By the way, last line of my dmesg output:

usb 3-6.4: usbfs: process 2120 (mediasrv) did not claim interface 0 before use
Titel: Re:Kernel panic on Intel NUC D34010WYKH and Ubuntu 14.04
Beitrag von: Sundtek am Juni 13, 2014, 01:01:46 Nachmittag
That does not matter, we do that on purpose for some reason.
Titel: Re:Kernel panic on Intel NUC D34010WYKH and Ubuntu 14.04
Beitrag von: lsr am Juni 13, 2014, 01:10:30 Nachmittag
That didn't last long... [dmesg truncated: "Beitrag hat die max. Länge erreicht (20000 Zeichen)"]

#> mediaclient --cpucheck
Sundtek CPU Check

cpu0:
   current scheduler: performance
   available schedulers: performance powersave
   to change the scheduler you might run following command:

   echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

cpu1:
   current scheduler: performance
   available schedulers: performance powersave
   to change the scheduler you might run following command:

   echo performance > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor

cpu2:
   current scheduler: performance
   available schedulers: performance powersave
   to change the scheduler you might run following command:

   echo performance > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor

cpu3:
   current scheduler: performance
   available schedulers: performance powersave
   to change the scheduler you might run following command:

   echo performance > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor

cpu4:
   current scheduler: performance
   available schedulers: performance powersave
   to change the scheduler you might run following command:

   echo performance > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor

cpu5:
   current scheduler: performance
   available schedulers: performance powersave
   to change the scheduler you might run following command:

   echo performance > /sys/devices/system/cpu/cpu5/cpufreq/scaling_governor

cpu6:
   current scheduler: performance
   available schedulers: performance powersave
   to change the scheduler you might run following command:

   echo performance > /sys/devices/system/cpu/cpu6/cpufreq/scaling_governor

cpu7:
   current scheduler: performance
   available schedulers: performance powersave
   to change the scheduler you might run following command:

   echo performance > /sys/devices/system/cpu/cpu7/cpufreq/scaling_governor


[ 1072.649867] ------------[ cut here ]------------
[ 1072.649873] WARNING: CPU: 5 PID: 4129 at /home/apw/COD/linux/drivers/usb/host/xhci-ring.c:605 xhci_find_new_dequeue_state+0x15d/0x290()
[ 1072.649874] Modules linked in: videodev arc4 md4 snd_hda_codec_hdmi snd_hda_codec_realtek x86_pkg_temp_thermal coretemp kvm_intel kvm crct10dif_pclmul crc32_pclmul ghash_clmulni_intel aesni_intel aes_x86_64 lrw gf128mul glue_helper ablk_helper cryptd snd_hda_intel snd_hda_codec snd_hwdep snd_pcm snd_page_alloc snd_seq_midi snd_seq_midi_event snd_rawmidi snd_seq snd_seq_device ir_lirc_codec lirc_dev snd_timer ir_mce_kbd_decoder lib80211_crypt_tkip ir_sanyo_decoder ir_sony_decoder ir_jvc_decoder microcode ir_rc6_decoder ir_rc5_decoder psmouse ir_nec_decoder wl(POF) serio_raw rfcomm bnep snd i915 bluetooth rtsx_pci_ms lib80211 joydev drm_kms_helper rc_rc6_mce cfg80211 memstick mei_me nuvoton_cir lpc_ich soundcore rc_core drm video mei mac_hid i2c_algo_bit intel_smartconnect nls_utf8 parport_pc cifs ppdev fscache lp parport ext2 xfs libcrc32c rtsx_pci_sdmmc hid_generic e1000e usb_storage ahci libahci ptp rtsx_pci pps_core usbhid hid
[ 1072.649915] CPU: 5 PID: 4129 Comm: mediasrv Tainted: PF          O 3.12.20-031220-generic #201405160935
[ 1072.649916] Hardware name: To Be Filled By O.E.M. To Be Filled By O.E.M./HM87-HT, BIOS P1.50 01/06/2014
[ 1072.649917]  000000000000025d ffff8803d4401be8 ffffffff81745261 0000000000000007
[ 1072.649919]  0000000000000000 ffff8803d4401c28 ffffffff8106784c ffffffff8158a8c0
[ 1072.649921]  ffff880404348000 ffff8803d4401cb0 ffff8803df5e7400 00000000c739b000
[ 1072.649923] Call Trace:
[ 1072.649927]  [<ffffffff81745261>] dump_stack+0x46/0x58
[ 1072.649930]  [<ffffffff8106784c>] warn_slowpath_common+0x8c/0xc0
[ 1072.649933]  [<ffffffff8158a8c0>] ? trace_xhci_dbg_quirks+0x70/0x70
[ 1072.649935]  [<ffffffff8106789a>] warn_slowpath_null+0x1a/0x20
[ 1072.649937]  [<ffffffff8159875d>] xhci_find_new_dequeue_state+0x15d/0x290
[ 1072.649939]  [<ffffffff8158e978>] xhci_cleanup_stalled_ring+0x78/0x100
[ 1072.649941]  [<ffffffff8158eb36>] xhci_endpoint_reset+0x136/0x190
[ 1072.649943]  [<ffffffff81561f8e>] ? usb_alloc_urb+0x1e/0x50
[ 1072.649945]  [<ffffffff81561675>] usb_hcd_reset_endpoint+0x25/0x70
[ 1072.649947]  [<ffffffff815646a8>] usb_enable_endpoint+0xa8/0xb0
[ 1072.649949]  [<ffffffff815646f2>] usb_enable_interface+0x42/0x60
[ 1072.649951]  [<ffffffff81564be6>] usb_set_interface+0x1f6/0x340
[ 1072.649953]  [<ffffffff8156ee79>] usbdev_do_ioctl+0x589/0xc50
[ 1072.649956]  [<ffffffff8111323c>] ? acct_account_cputime+0x1c/0x20
[ 1072.649958]  [<ffffffff810a0c89>] ? account_user_time+0x99/0xb0
[ 1072.649960]  [<ffffffff8156f56e>] usbdev_ioctl+0xe/0x20
[ 1072.649962]  [<ffffffff811d3cda>] do_vfs_ioctl+0x7a/0x2e0
[ 1072.649964]  [<ffffffff810227f5>] ? syscall_trace_enter+0x165/0x280
[ 1072.649966]  [<ffffffff811d3fd1>] SyS_ioctl+0x91/0xb0
[ 1072.649968]  [<ffffffff8175abbf>] tracesys+0xe1/0xe6
[ 1072.649969] ---[ end trace 2c231d95ff701c85 ]---
[ 1072.649976] BUG: unable to handle kernel NULL pointer dereference at 0000000000000010
[ 1072.650718] IP: [<ffffffff815988fc>] xhci_queue_new_dequeue_state+0x6c/0xe0
[ 1072.651389] PGD 40739b067 PUD 4051c0067 PMD 0
[ 1072.651825] Oops: 0000 [#1] SMP
[ 1072.652138] Modules linked in: videodev arc4 md4 snd_hda_codec_hdmi snd_hda_codec_realtek x86_pkg_temp_thermal coretemp kvm_intel kvm crct10dif_pclmul crc32_pclmul ghash_clmulni_intel aesni_intel aes_x86_64 lrw gf128mul glue_helper ablk_helper cryptd snd_hda_intel snd_hda_codec snd_hwdep snd_pcm snd_page_alloc snd_seq_midi snd_seq_midi_event snd_rawmidi snd_seq snd_seq_device ir_lirc_codec lirc_dev snd_timer ir_mce_kbd_decoder lib80211_crypt_tkip ir_sanyo_decoder ir_sony_decoder ir_jvc_decoder microcode ir_rc6_decoder ir_rc5_decoder psmouse ir_nec_decoder wl(POF) serio_raw rfcomm bnep snd i915 bluetooth rtsx_pci_ms lib80211 joydev drm_kms_helper rc_rc6_mce cfg80211 memstick mei_me nuvoton_cir lpc_ich soundcore rc_core drm video mei mac_hid i2c_algo_bit intel_smartconnect nls_utf8 parport_pc cifs ppdev fscache lp parport ext2 xfs libcrc32c rtsx_pci_sdmmc hid_generic e1000e usb_storage ahci libahci ptp rtsx_pci pps_core usbhid hid
[ 1072.660691] CPU: 5 PID: 4129 Comm: mediasrv Tainted: PF       W  O 3.12.20-031220-generic #201405160935
[ 1072.661559] Hardware name: To Be Filled By O.E.M. To Be Filled By O.E.M./HM87-HT, BIOS P1.50 01/06/2014
[ 1072.662449] task: ffff8803dad90000 ti: ffff8803d4400000 task.ti: ffff8803d4400000
[ 1072.663179] RIP: 0010:[<ffffffff815988fc>]  [<ffffffff815988fc>] xhci_queue_new_dequeue_state+0x6c/0xe0
[ 1072.664059] RSP: 0018:ffff8803d4401c38  EFLAGS: 00010046
[ 1072.664566] RAX: 0000000000000000 RBX: ffff8803d4401cb0 RCX: 0000000000000040
[ 1072.665243] RDX: 0000000000000000 RSI: ffff8803e0d34170 RDI: 0000000000000000
[ 1072.665904] RBP: ffff8803d4401c98 R08: ffff8803d4401cb0 R09: ffff8803e0d34170
[ 1072.666580] R10: 0000000000000006 R11: 000000000000047e R12: ffff880404348000
[ 1072.667259] R13: ffff880403cd01e8 R14: 0000000000000000 R15: 0000000000000002
[ 1072.667918] FS:  00007f9a82a70700(0000) GS:ffff88041e340000(0000) knlGS:0000000000000000
[ 1072.668685] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 1072.669213] CR2: 0000000000000010 CR3: 0000000406d6e000 CR4: 00000000001407e0
[ 1072.669871] Stack:
[ 1072.670051]  ffff8803d4401ca8 ffff8803d4401c58 ffffffff81acb1c9 ffff8803e0d34170
[ 1072.670787]  ffff880300000006 00000000c739b001 ffff880404348000 ffff880403cd01e8
[ 1072.671525]  ffff880404348000 ffff880408767000 0000000000000002 ffff880404348048
[ 1072.672244] Call Trace:
[ 1072.672468]  [<ffffffff8158e9f9>] xhci_cleanup_stalled_ring+0xf9/0x100
[ 1072.673083]  [<ffffffff8158eb36>] xhci_endpoint_reset+0x136/0x190
[ 1072.673656]  [<ffffffff81561f8e>] ? usb_alloc_urb+0x1e/0x50
[ 1072.674171]  [<ffffffff81561675>] usb_hcd_reset_endpoint+0x25/0x70
[ 1072.674761]  [<ffffffff815646a8>] usb_enable_endpoint+0xa8/0xb0
[ 1072.675326]  [<ffffffff815646f2>] usb_enable_interface+0x42/0x60
[ 1072.675882]  [<ffffffff81564be6>] usb_set_interface+0x1f6/0x340
[ 1072.676427]  [<ffffffff8156ee79>] usbdev_do_ioctl+0x589/0xc50
[ 1072.676959]  [<ffffffff8111323c>] ? acct_account_cputime+0x1c/0x20
[ 1072.677532]  [<ffffffff810a0c89>] ? account_user_time+0x99/0xb0
[ 1072.678078]  [<ffffffff8156f56e>] usbdev_ioctl+0xe/0x20
[ 1072.678580]  [<ffffffff811d3cda>] do_vfs_ioctl+0x7a/0x2e0
[ 1072.679097]  [<ffffffff810227f5>] ? syscall_trace_enter+0x165/0x280
[ 1072.679676]  [<ffffffff811d3fd1>] SyS_ioctl+0x91/0xb0
[ 1072.680141]  [<ffffffff8175abbf>] tracesys+0xe1/0xe6
[ 1072.680596] Code: 03 84 d7 10 01 00 00 4d 8b 48 08 4c 89 c3 49 89 fc 44 89 55 c0 4c 89 f7 4c 89 ce 4c 8d 68 28 4c 89 4d b8 e8 77 ec ff ff 8b 53 10 <4d> 8b 46 10 4c 89 f1 4c 8b 4d b8 48 89 04 24 4c 89 e7 48 c7 c6
[ 1072.682934] RIP  [<ffffffff815988fc>] xhci_queue_new_dequeue_state+0x6c/0xe0
[ 1072.683615]  RSP <ffff8803d4401c38>
[ 1072.683934] CR2: 0000000000000010
[ 1072.747120] HDMI: ELD buf size is 0, force 128
[ 1072.747614] HDMI: invalid ELD data byte 0
[ 1072.748063] HDMI: ELD buf size is 0, force 128
[ 1072.748543] HDMI: invalid ELD data byte 0
[ 1073.221675] ---[ end trace 2c231d95ff701c86 ]---
[ 1093.400986] ------------[ cut here ]------------
[ 1093.400994] WARNING: CPU: 2 PID: 2186 at /home/apw/COD/linux/kernel/watchdog.c:245 watchdog_overflow_callback+0x9a/0xc0()
[ 1093.400996] Watchdog detected hard LOCKUP on cpu 2
[ 1093.400997] Modules linked in: videodev arc4 md4 snd_hda_codec_hdmi snd_hda_codec_realtek x86_pkg_temp_thermal coretemp kvm_intel kvm crct10dif_pclmul crc32_pclmul ghash_clmulni_intel aesni_intel aes_x86_64 lrw gf128mul glue_helper ablk_helper cryptd snd_hda_intel snd_hda_codec snd_hwdep snd_pcm snd_page_alloc snd_seq_midi snd_seq_midi_event snd_rawmidi snd_seq snd_seq_device ir_lirc_codec lirc_dev snd_timer ir_mce_kbd_decoder lib80211_crypt_tkip ir_sanyo_decoder ir_sony_decoder ir_jvc_decoder microcode ir_rc6_decoder ir_rc5_decoder psmouse ir_nec_decoder wl(POF) serio_raw rfcomm bnep snd i915 bluetooth rtsx_pci_ms lib80211 joydev drm_kms_helper rc_rc6_mce cfg80211 memstick mei_me nuvoton_cir lpc_ich soundcore rc_core drm video mei mac_hid i2c_algo_bit intel_smartconnect nls_utf8 parport_pc cifs ppdev fscache lp parport ext2 xfs libcrc32c rtsx_pci_sdmmc hid_generic e1000e usb_storage ahci libahci ptp rtsx_pci pps_core usbhid hid
[ 1093.401056] CPU: 2 PID: 2186 Comm: mediasrv Tainted: PF     D W  O 3.12.20-031220-generic #201405160935
[ 1093.401057] Hardware name: To Be Filled By O.E.M. To Be Filled By O.E.M./HM87-HT, BIOS P1.50 01/06/2014
[ 1093.401059]  00000000000000f5 ffff88041e287ba8 ffffffff81745261 0000000000000007
[ 1093.401062]  ffff88041e287bf8 ffff88041e287be8 ffffffff8106784c 0000000000000000
[ 1093.401065]  ffff8804081f8000 0000000000000000 ffff88041e287d20 0000000000000000
[ 1093.401068] Call Trace:
[ 1093.401069]  <NMI>  [<ffffffff81745261>] dump_stack+0x46/0x58
[ 1093.401078]  [<ffffffff8106784c>] warn_slowpath_common+0x8c/0xc0
[ 1093.401081]  [<ffffffff81067936>] warn_slowpath_fmt+0x46/0x50
[ 1093.401084]  [<ffffffff8110a27a>] watchdog_overflow_callback+0x9a/0xc0
[ 1093.401088]  [<ffffffff81148d4c>] __perf_event_overflow+0x9c/0x230
[ 1093.401092]  [<ffffffff8102ae88>] ? x86_perf_event_set_period+0xd8/0x150
[ 1093.401096]  [<ffffffff81149654>] perf_event_overflow+0x14/0x20
[ 1093.401099]  [<ffffffff810326ae>] intel_pmu_handle_irq+0x1ae/0x2a0
[ 1093.401103]  [<ffffffff81753874>] perf_event_nmi_handler+0x34/0x60
[ 1093.401105]  [<ffffffff81752fca>] nmi_handle.isra.3+0x8a/0x1a0
[ 1093.401107]  [<ffffffff817538f0>] ? perf_ibs_nmi_handler+0x50/0x50
[ 1093.401110]  [<ffffffff81753259>] default_do_nmi+0xe9/0x240
[ 1093.401112]  [<ffffffff81753440>] do_nmi+0x90/0xd0
[ 1093.401115]  [<ffffffff817523c1>] end_repeat_nmi+0x1e/0x2e
[ 1093.401119]  [<ffffffff8175174d>] ? _raw_spin_lock_irqsave+0x3d/0x60
[ 1093.401122]  [<ffffffff8175174d>] ? _raw_spin_lock_irqsave+0x3d/0x60
[ 1093.401125]  [<ffffffff8175174d>] ? _raw_spin_lock_irqsave+0x3d/0x60
[ 1093.401126]  <<EOE>>  [<ffffffff8158e2cd>] xhci_urb_enqueue+0x14d/0x430
[ 1093.401133]  [<ffffffff81560ea8>] usb_hcd_submit_urb+0x88/0x1b0
[ 1093.401136]  [<ffffffff815622af>] usb_submit_urb.part.6+0x15f/0x430
[ 1093.401139]  [<ffffffff815625b5>] usb_submit_urb+0x35/0x80
[ 1093.401141]  [<ffffffff815634ca>] usb_start_wait_urb+0x6a/0x170
[ 1093.401144]  [<ffffffff81561f8e>] ? usb_alloc_urb+0x1e/0x50
[ 1093.401146]  [<ffffffff81561f8e>] ? usb_alloc_urb+0x1e/0x50
[ 1093.401149]  [<ffffffff8156385a>] usb_control_msg+0xda/0x110
[ 1093.401152]  [<ffffffff8156d22c>] proc_control+0x2bc/0x3a0
[ 1093.401155]  [<ffffffff810901e0>] ? lock_hrtimer_base.isra.23+0x30/0x60
[ 1093.401157]  [<ffffffff8156f137>] usbdev_do_ioctl+0x847/0xc50
[ 1093.401160]  [<ffffffff8111323c>] ? acct_account_cputime+0x1c/0x20
[ 1093.401163]  [<ffffffff810a0c89>] ? account_user_time+0x99/0xb0
[ 1093.401165]  [<ffffffff8156f56e>] usbdev_ioctl+0xe/0x20
[ 1093.401168]  [<ffffffff811d3cda>] do_vfs_ioctl+0x7a/0x2e0
[ 1093.401171]  [<ffffffff810227f5>] ? syscall_trace_enter+0x165/0x280
[ 1093.401174]  [<ffffffff811d3fd1>] SyS_ioctl+0x91/0xb0
[ 1093.401177]  [<ffffffff8175abbf>] tracesys+0xe1/0xe6
[ 1093.401178] ---[ end trace 2c231d95ff701c87 ]---
Titel: Re:Kernel panic on Intel NUC D34010WYKH and Ubuntu 14.04
Beitrag von: Sundtek am Juni 13, 2014, 01:29:15 Nachmittag
can you contact us via Skype-chat? Our Account is "sundtek"
Titel: Re:Kernel panic on Intel NUC D34010WYKH and Ubuntu 14.04
Beitrag von: lsr am Juni 17, 2014, 03:05:11 Nachmittag
Small update: quite a few changes * (http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.16-rc1-utopic/CHANGES (http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.16-rc1-utopic/CHANGES)) regarding xhci in Ubuntu Kernel 3.16-rc1, but the crash/oops unfortunately persists.

*
Zitat
Mathias Nyman (4):
      xhci: Use command structures when queuing commands on the command ring
      xhci: Add a global command queue
      xhci: Use completion and status in global command queue
      xhci: rework command timeout and cancellation,
[etc.]
Titel: Re:Kernel panic on Intel NUC D34010WYKH and Ubuntu 14.04
Beitrag von: Yoshi am März 24, 2015, 11:43:11 Vormittag
Is there any news for this issue? Bug is present very long  >:(
Titel: Re:Kernel panic on Intel NUC D34010WYKH and Ubuntu 14.04
Beitrag von: Sundtek am März 24, 2015, 12:00:44 Nachmittag
Did you update your Kernel Version?

This is not our bug -- this bug is a linux bug depending on this particular usb controller used with this Intel NUC.

So unfortunately there's nothing we can do in our driver to avoid such a problem if the upper layer hardware's driver which is shipped with Linux is faulty.

All issues created by our driver can be fixed by us of course (and we really prefer to fix our problems by our-self because it's the shortest way), but the USB Controller is really out of our hands.
Titel: Re:Kernel panic on Intel NUC D34010WYKH and Ubuntu 14.04
Beitrag von: Yoshi am März 26, 2015, 12:07:57 Nachmittag
I'm aware this is not caused by your driver. Just asking if anyone knows if there's any progress, that's all.

No update for the kernel version. I'm on CentOS 7.
Titel: Re:Kernel panic on Intel NUC D34010WYKH and Ubuntu 14.04
Beitrag von: Sundtek am März 26, 2015, 09:17:41 Nachmittag
The Bios Updates are bleeding edge you really need one of the latest USB Controller Kernel drivers for this.

I see on the Intel Website they provide a separate USB 3.0 driver for Windows, so no wonder that things have to work in a different way with Linux.

Aside of that those Systems seem to have a genuine USB 2.0 Bus on the Minicard interface, there are MiniPCIe to USB Adapters available which might be able to route a genuine USB 2.0 port.