Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dvbloopback crashing on Intel Kaby Lake #12

Closed
dimerr opened this issue Feb 28, 2017 · 85 comments
Closed

dvbloopback crashing on Intel Kaby Lake #12

dimerr opened this issue Feb 28, 2017 · 85 comments

Comments

@dimerr
Copy link

dimerr commented Feb 28, 2017

Ubuntu 16.04.2 x86_64 running on

                       system         Computer
/0                     bus            Motherboard
/0/0                   memory         7856MiB System memory
/0/1                   processor      Intel(R) Pentium(R) CPU G4560 @ 3.50GHz
/0/100                 bridge         Intel Corporation
/0/100/2               display        Intel Corporation
/0/100/14              bus            Sunrise Point-H USB 3.0 xHCI Controller
/0/100/16              communication  Sunrise Point-H CSME HECI #1
/0/100/17              storage        Sunrise Point-H SATA controller [AHCI mode]
/0/100/1c              bridge         Sunrise Point-H PCI Express Root Port #5
/0/100/1c.7            bridge         Sunrise Point-H PCI Express Root Port #8
/0/100/1c.7/0  enp2s0  network        RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
/0/100/1d              bridge         Sunrise Point-H PCI Express Root Port #9
/0/100/1f              bridge         Sunrise Point-H LPC Controller
/0/100/1f.2            memory         Memory controller
/0/100/1f.3            multimedia     Sunrise Point-H HD Audio
/0/100/1f.4            bus            Sunrise Point-H SMBus

After upgrading platform to Intel Kaby Lake, dvbloopback keeps crashing.

Steps to reproduce:

  1. Freshly installed Ubuntu 16.04.2
  2. Built dvbloopback by running ./configure, which rebuilds kernel with dvbloopback in tree
  3. modprobe dvbloopback && ffdecsawrapper --join 0:1
  4. Open VLC or Kaffeine or TVHeadend and specify adapter as /dev/dvb/adapter1

I'm actually using TBS5922SE dvb card, but for a test I've connected Geniatech Mygica T230 and there is exactly the same issue with it.

[  373.339759] dvbloopback: registering 1 adapters
[  373.339833] DVB: registering new adapter (DVB-LOOPBACK)
[  395.815985] BUG: unable to handle kernel paging request at 00007f8279b39720
[  395.816014] IP: [<ffffffffc0d10330>] dvblb_ioctl+0x510/0x6d0 [dvbloopback]
[  395.816042] PGD 20e83b067 PUD 2058d0067 PMD 1fb25c067 PTE 8000000217b99867
[  395.816069] Oops: 0001 [#1] SMP
[  395.816084] Modules linked in: dvbloopback(OE) bnep pci_stub vboxpci(OE) vboxnetadp(OE) vboxnetflt(OE) vboxdrv(OE) xt_CHECKSUM iptable_mangle ipt_MASQUERADE nf_nat_masquerade_ipv4 iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack xt_tcpudp iptable_filter ip_tables x_tables bridge stp llc tbsfe(OE) tbs5922se(POE) ir_lirc_codec(OE) lirc_dev(OE) ir_mce_kbd_decoder(OE) ir_sony_decoder(OE) ir_jvc_decoder(OE) ir_rc6_decoder(OE) ir_rc5_decoder(OE) dvb_usb_tbs5923(OE) dvb_usb(OE) dvb_core(OE) ir_nec_decoder(OE) rc_core(OE) eeepc_wmi asus_wmi mxm_wmi sparse_keymap intel_rapl x86_pkg_temp_thermal intel_powerclamp snd_hda_codec_hdmi snd_hda_codec_realtek kvm snd_hda_codec_generic input_leds irqbypass joydev crct10dif_pclmul crc32_pclmul ghash_clmulni_intel snd_hda_intel snd_hda_codec
[  395.816345]  aesni_intel snd_hda_core snd_hwdep snd_pcm snd_seq_midi aes_x86_64 snd_seq_midi_event snd_rawmidi lrw glue_helper ablk_helper snd_seq cryptd snd_seq_device hci_uart acpi_als snd_timer btbcm serio_raw btqca snd btintel kfifo_buf soundcore industrialio intel_lpss_acpi bluetooth mei_me intel_lpss wmi shpchp mei mac_hid acpi_pad nfsd nct6775 hwmon_vid auth_rpcgss nfs_acl lockd coretemp grace sunrpc parport_pc ppdev lp parport autofs4 raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq libcrc32c raid0 multipath linear raid1 i915 i2c_algo_bit hid_generic drm_kms_helper r8169 ahci syscopyarea sysfillrect mii sysimgblt fb_sys_fops libahci psmouse usbhid i2c_hid drm pinctrl_sunrisepoint video pinctrl_intel hid fjes
[  395.816623] CPU: 2 PID: 7128 Comm: vlc Tainted: P         C OE   4.8.0-39-generic #42~16.04.1-Ubuntu
[  395.816648] Hardware name: System manufacturer System Product Name/H110M-R, BIOS 3016 12/27/2016
[  395.816673] task: ffff9c0501d5e3c0 task.stack: ffff9c0524654000
[  395.816690] RIP: 0010:[<ffffffffc0d10330>]  [<ffffffffc0d10330>] dvblb_ioctl+0x510/0x6d0 [dvbloopback]
[  395.816720] RSP: 0018:ffff9c0524657aa0  EFLAGS: 00010246
[  395.816736] RAX: 0000000000000000 RBX: 00007f8279b39720 RCX: 0000000000000000
[  395.816756] RDX: fffffffffffffff2 RSI: 00007f8279b39730 RDI: ffff9c0524657de0
[  395.816776] RBP: ffff9c0524657e80 R08: ffff9c0524658000 R09: 00000000000000c0
[  395.816797] R10: ffff9c052ad7c238 R11: ffff9c05001ede40 R12: ffff9c0524657dd0
[  395.816817] R13: ffff9c052ad7c200 R14: 0000000000000010 R15: 0000000040106f52
[  395.816837] FS:  00007f8279b3a700(0000) GS:ffff9c0536d00000(0000) knlGS:0000000000000000
[  395.816860] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  395.816877] CR2: 00007f8279b39720 CR3: 00000002114b6000 CR4: 00000000003406e0
[  395.816897] Stack:
[  395.816904]  0000000100005e1d ffffffff98cf3e80 0000000101d5e3c0 ffffffffc0d0f450
[  395.816931]  0000000000000000 0000000000000246 0000000000000283 0000000000000283
[  395.816965]  ffff9c0524657b08 ffffffff98cc6fc5 ffff9c04fb2d0090 ffffffff99498b52
[  395.816990] Call Trace:
[  395.817002]  [<ffffffff98cf3e80>] ? del_timer_sync+0x50/0x50
[  395.817019]  [<ffffffffc0d0f450>] ? dvblb_fake_ioctl+0x450/0x450 [dvbloopback]
[  395.817041]  [<ffffffff98cc6fc5>] ? finish_wait+0x55/0x70
[  395.817059]  [<ffffffff99498b52>] ? mutex_lock_interruptible+0x12/0x40
[  395.817078]  [<ffffffffc0d0f277>] ? dvblb_fake_ioctl+0x277/0x450 [dvbloopback]
[  395.817100]  [<ffffffff98cc7470>] ? wake_atomic_t_function+0x60/0x60
[  395.817119]  [<ffffffffc0d0fa6b>] ? dvblb_open+0x2cb/0x3c0 [dvbloopback]
[  395.817141]  [<ffffffffc0ba54b7>] ? dvb_device_open+0xd7/0x110 [dvb_core]
[  395.817161]  [<ffffffff98e37d5f>] ? chrdev_open+0xbf/0x1b0
[  395.817179]  [<ffffffff98e4bfb4>] ? dput+0xc4/0x250
[  395.817194]  [<ffffffff98e55924>] ? mntput+0x24/0x40
[  395.817210]  [<ffffffff98e3d69e>] ? terminate_walk+0x8e/0xf0
[  395.817227]  [<ffffffff98e422a1>] ? path_openat+0x411/0x1440
[  395.817244]  [<ffffffff98e445a5>] ? do_filp_open+0xa5/0x100
[  395.817262]  [<ffffffff98e4bf24>] ? dput+0x34/0x250
[  395.817278]  [<ffffffff98e478c1>] do_vfs_ioctl+0xa1/0x5f0
[  395.817294]  [<ffffffff98e43444>] ? putname+0x54/0x60
[  395.818617]  [<ffffffff98e534e5>] ? set_close_on_exec+0x35/0x70
[  395.819943]  [<ffffffff98e47e89>] SyS_ioctl+0x79/0x90
[  395.821238]  [<ffffffff9949b7f6>] entry_SYSCALL_64_fastpath+0x1e/0xa8
[  395.822536] Code: e8 26 b3 32 d8 48 85 c0 48 c7 c2 f2 ff ff ff 0f 85 5e ff ff ff 41 81 ff 52 6f 10 40 74 0d 41 81 ff 53 6f 10 80 0f 85 5d fe ff ff <8b> 03 be c0 00 40 02 48 8d 14 c0 48 8d 3c 50 48 c1 e7 02 e8 38 
[  395.823975] RIP  [<ffffffffc0d10330>] dvblb_ioctl+0x510/0x6d0 [dvbloopback]
[  395.825328]  RSP <ffff9c0524657aa0>
[  395.826691] CR2: 00007f8279b39720
[  395.834804] ---[ end trace 1aff8204f1e1cacb ]---

I believe this is an issue with the new platform, but I'm out of ideas already how to determine the source. BIOS was updated, different settings were tried, but nothing helps

@bas-t
Copy link
Owner

bas-t commented Mar 1, 2017

Hi dimerr, thanks for your report.
I don't know yet what the root case of this stack corruption is. However, a few things spring to mind:

First of all: judging from your report, recompiling the stock kernel went wrong. You are running a 4.8 kernel, should be 4.4 on Ubuntu 16.04

Furthermore, Tvheadend does not need the dvbloopback module. Even worse, any recent version of Tvheadend is absolutely incompatible with dvbloopback/ffdecsawrapper. Combining those is asking for trouble. Don't know about VLC or Kaffeine though. I only use this for Mythtv, not testing any other combinations. Well, a couple of years ago I was testing with Tvheadend too, just for fun. Untill it didn't match anymore that is...

It seems to me like a shot in the dark, but maybe you could try compiling a vanilla kernel. My advice would be:

./configure --vanilla=4.9.13 --drivers=no

Use the supplied kernel config when asked.

Please (re)compile ffdecsawrapper during the process, it's log just might shine some light on wether the platform update is to blame in any way or not.

Then reboot with this kernel and see what happens, but DON'T test with Tvheadend!

Best of luck!
Tycho.

@dimerr
Copy link
Author

dimerr commented Mar 1, 2017

Hi, thanks for your reply,

the reason it has built 4.8 is due to a recent 16.04.2 release, which brought linux-generic-hwe-16.04 package. In any case, I have tried this on kernel 4.2, then 4.4 in 16.04, then 4.8 in 16.04.2.

Also, I am actually using mythtv, but in order to bring my htpc back, i've had to put old mainboard there. So I took new mobo and spare hdd, installed 16.04.2 there and trying with vlc and tvheadend and kaffeine. Exactly the same issue was with mythtv...

If im just replacing mainboard to old one, everything starts to work, without recompiling anything even.

To be clear, I've ran CPU burn-in tests, RAM tests, no problems, everything runs perfect except dvbloopback

Meanwhile, I'm building 4.9.13, as you've suggested.

@bas-t
Copy link
Owner

bas-t commented Mar 5, 2017

I don't understand what you are saying. How can you setup a htpc, using mythtv with encrypted channels, without recompiling the kernel with dvbloopback? (or compiling the dvbloopback module out of tree)

@dimerr
Copy link
Author

dimerr commented Mar 5, 2017

I've had old AMD+nVidia platform running mythv+ffdecsawrapper+dvbloppback out of tree. Then, I've bought new mainboard+cpu, replaced -- dvblopback is crashing. After series of tests, 've discovered that dvbloopback is crashing nomatter what app is using it, so I've put old mainboard back, and started to test new mainboard with clean install on another HDD.

without recompiling anything even.

means i did not recompile dvbloopback or ffdescawrapper after switching platforms back

Cant try 4.9.13, cause something is broken in it,and dvb-t2 doesnt work on it (confirmed regression)

@bas-t
Copy link
Owner

bas-t commented Mar 6, 2017

Sounds to me like you have a driver issue, I have seen more of them.
In all of those cases it was the dvb driver that caused dvbloopback crashes.
Sadly I don't remember wether your dvb driver was one of those, but I'll have a look one of these days.

@dimerr
Copy link
Author

dimerr commented Mar 6, 2017

I have both , DVB-S2 TBS5922SE and DVB-T2 Geniatech T230, both using completely different drivers, both are resulting in segfault

@bas-t
Copy link
Owner

bas-t commented Mar 6, 2017

Hmm, I'll setup a Ubuntu 16.04 server this week.
Just so I can verify if I suffer from dvbloopback crashes too.
Currently, I'm running both Debian stable and Debian testing, no troubles there...

@dimerr
Copy link
Author

dimerr commented Mar 6, 2017

Unless you have some recent Intel hardware and (i think) USB DVB card, you wont have that crash... Cause i simply change mainboard+cpu and keep same system installed, and there is no crash anymore. So I'm thinking about some extensive kernel debugging, but not quite sure how, maybe starting from dvblb_ioctl function in dvbloopback... Need your suggestions for that matter

@bas-t
Copy link
Owner

bas-t commented Mar 7, 2017

Did you try building out of tree? There are some small differences in the resulting dvbloopback module.
I just compile tested using the ffdecsawrapper repo on Ubuntu 16.04.2 with the 4.8 hwe kernel+headers. Works fine. Unless of course the confirmed regression you mentioned was introduced prior to 4.9.x

@dimerr
Copy link
Author

dimerr commented Mar 7, 2017

Yes, i did. All those years before, i was always building out of tree, now im just trying all the possible options to get rid of that crash...

@bas-t
Copy link
Owner

bas-t commented Mar 7, 2017

So you're saying that both in-tree and out-of-tree gives you the crashes?
And that the 4.8 kernel is not affected with the regression?

@bas-t
Copy link
Owner

bas-t commented Mar 7, 2017

What kernel version worked on your old hardware?

@dimerr
Copy link
Author

dimerr commented Mar 7, 2017

Any kernel version is working on old hardware. 4.2,4.4, 4.8 (works atm on an old mobo)

As for 4.9 kernel, regression is only connected with DVB-T2 card, which I'm currently using for tests

@bas-t
Copy link
Owner

bas-t commented Mar 7, 2017

Are you willing to test with Debian Jessie?

@dimerr
Copy link
Author

dimerr commented Mar 7, 2017

Sure, I would test anything, if that helps. Installing, as we speak

@bas-t
Copy link
Owner

bas-t commented Mar 7, 2017

OK, when you are done, do:

mv /etc/apt/sources.list /etc/apt/sources.list.old

echo "deb http://ftp.nl.debian.org/debian/ jessie main contrib non-free
deb-src http://ftp.nl.debian.org/debian/ jessie main contrib non-free

deb http://security.debian.org/ jessie/updates main contrib non-free
deb-src http://security.debian.org/ jessie/updates main contrib non-free

deb http://ftp.nl.debian.org/debian/ jessie-updates main contrib non-free
deb-src http://ftp.nl.debian.org/debian/ jessie-updates main contrib non-free

#deb http://ftp.nl.debian.org/debian/ jessie-backports main contrib non-free
#deb-src http://ftp.nl.debian.org/debian/ jessie-backports main contrib non-free

deb http://www.deb-multimedia.org jessie main non-free
deb-src http://www.deb-multimedia.org jessie main non-free

" > /etc/apt/sources.list

Well, replace the 'nl' part with some countrycode near your residence.

Then:

apt-get update && apt-get --yes --quiet --allow-unauthenticated install deb-multimedia-keyring && apt-get update && apt-get dist-upgrade -y

apt-get install git-core -y

git clone https://github.com/bas-t/dvbloopback.git && cd dvbloopback

./configure --vanilla=4.4.52 --headers=yes --drivers=no

When prompted for, accept using the supplied kernel config.

Reboot with your new kernel and see what happens.

This method will enable you to test with out-of-tree dvbloopback too, should it still give you those crashes.

Best of luck!

@bas-t
Copy link
Owner

bas-t commented Mar 7, 2017

In the meantime, you use your TBS tuner box in production systems, right? (without the Geniatech one)
What drivers do you use? The one from Luis Alves, the official TBS linux drivers or what?

@dimerr
Copy link
Author

dimerr commented Mar 7, 2017

I'm using official TBS drivers and your tbs-dvbloopback repo, that fetches and builds them out of tree

@bas-t
Copy link
Owner

bas-t commented Mar 7, 2017

But it disables your Geniatech device of course. And you're testing with that device right now, so please proceed with what I posted.

@bas-t
Copy link
Owner

bas-t commented Mar 7, 2017

This reminded me to port a patch that is supposed to address this and/or similar stack corruption to my tbs-dvbloopback repo. Might just be your hit the jackpot doodledidee gamechanger. Well, I hope it is...

https://github.com/bas-t/tbs-dvbloopback/commit/12f2a3c72bee7e0e2113994708550edaf4346d0b

@dimerr
Copy link
Author

dimerr commented Mar 7, 2017

Same thing on Debian, crashes...

@bas-t
Copy link
Owner

bas-t commented Mar 7, 2017

I've got 2 options left, have to run some tests first. I'll get back to you.

@dimerr
Copy link
Author

dimerr commented Mar 8, 2017

Tested on similar AMD board - no problems. Then on i5-3470+C210 chipset - also no problems... This is a disaster...

@bas-t
Copy link
Owner

bas-t commented Mar 8, 2017

Yeah, support for your Kaby Lake is not yet mature, but I'm not ready to give up yet. Still running tests that hopefully will address the issue(s)

@bas-t
Copy link
Owner

bas-t commented Mar 8, 2017

As for the support in Windows, it seems tu run well on Windows 10, but not on previous versions, so I don't have very high hopes for Linux. The highest compatible kernel (with official TBS drivers that is) is 4.9.13. So as a last resort you can try that in your Debian Jessie installation.
To do so, please go into your dvbloopback clone and run ./configure --vanilla=4.9.13 --headers=yes --drivers=no

Accept the supplied kernel config when prompted.

Having done that, reboot with your new kernel and clone tbs-dvbloopback, it has some changes that may or may not save your ass.
I guess running just ./configure without any flags will do the job.
Now hope and pray and keep your fingers crossed, as I don't have any alternatives.
Just to make sure: this is ment to test with your TBS tuner box, not the other one.

@dimerr
Copy link
Author

dimerr commented Mar 8, 2017

and I've seen this once during my tests, prolly with that kernel also...

[  962.930267] usb 1-7: new high-speed USB device number 5 using xhci_hcd
[  963.070389] usb 1-7: New USB device found, idVendor=734c, idProduct=5923
[  963.070393] usb 1-7: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[  963.070734] dvb-usb: found a 'TBS 5922SE DVBS2 USB2.0' in cold state, will try to load a firmware
[  963.070792] dvb-usb: downloading firmware from file 'dvb-usb-tbsqbox-id5923.fw'
[  963.070794] tbs5922se: start downloading TBS5922SE firmware
[  963.070799] ------------[ cut here ]------------
[  963.070831] WARNING: CPU: 0 PID: 105 at drivers/usb/core/hcd.c:1584 usb_hcd_map_urb_for_dma+0x39a/0x560 [usbcore]
[  963.070832] transfer buffer not dma capable
[  963.070834] Modules linked in: ir_lirc_codec(OE) lirc_dev(OE) ir_mce_kbd_decoder(OE) ir_sony_decoder(OE) ir_jvc_decoder(OE) ir_rc6_decoder(OE) ir_rc5_decoder(OE) dvb_usb_tbs5923(OE) ir_nec_decoder(OE) dvb_usb(OE) dvb_core(OE) rc_core(OE) cpufreq_powersave(E) cpufreq_conservative(E) cpufreq_userspace(E) cfg80211(E) nfsd(E) auth_rpcgss(E) nfs_acl(E) nfs(E) lockd(E) grace(E) fscache(E) sunrpc(E) snd_hda_codec_hdmi(E) snd_hda_codec_realtek(E) snd_hda_codec_generic(E) joydev(E) i915(E) iTCO_wdt(E) iTCO_vendor_support(E) intel_rapl(E) x86_pkg_temp_thermal(E) intel_powerclamp(E) coretemp(E) kvm_intel(E) kvm(E) irqbypass(E) crct10dif_pclmul(E) crc32_pclmul(E) ghash_clmulni_intel(E) aesni_intel(E) aes_x86_64(E) lrw(E) gf128mul(E) glue_helper(E) ablk_helper(E) hci_uart(E) cryptd(E) ppdev(E) btbcm(E) btqca(E)
[  963.070891]  eeepc_wmi(E) btintel(E) asus_wmi(E) mxm_wmi(E) sparse_keymap(E) bluetooth(E) evdev(E) drm_kms_helper(E) drm(E) i2c_i801(E) serio_raw(E) pcspkr(E) parport_pc(E) snd_hda_intel(E) wmi(E) rfkill(E) parport(E) i2c_smbus(E) snd_hda_codec(E) video(E) battery(E) snd_hda_core(E) intel_lpss_acpi(E) intel_lpss(E) mfd_core(E) i2c_algo_bit(E) mei_me(E) acpi_pad(E) tpm_tis(E) tpm_tis_core(E) button(E) acpi_als(E) kfifo_buf(E) tpm(E) snd_hwdep(E) snd_pcm(E) snd_timer(E) snd(E) soundcore(E) mei(E) industrialio(E) shpchp(E) fuse(E) autofs4(E) ext4(E) crc16(E) jbd2(E) fscrypto(E) mbcache(E) hid_generic(E) usbhid(E) sg(E) sd_mod(E) crc32c_intel(E) psmouse(E) ahci(E) libahci(E) libata(E) scsi_mod(E) xhci_pci(E) xhci_hcd(E) r8169(E) mii(E) usbcore(E) fan(E) thermal(E) i2c_hid(E) hid(E) fjes(E)
[  963.070966] CPU: 0 PID: 105 Comm: kworker/0:2 Tainted: G           OE   4.9.13 #1
[  963.070968] Hardware name: System manufacturer System Product Name/H110M-R, BIOS 3016 12/27/2016
[  963.070986] Workqueue: usb_hub_wq hub_event [usbcore]
[  963.070990]  0000000000000000 ffffffff9152a185 ffffb151010d7670 0000000000000000
[  963.070996]  ffffffff91277804 ffff9338715f0480 ffffb151010d76c8 0000000000000000
[  963.071001]  ffffb151010d7874 00000000000007d0 0000000000000001 ffffffff9127787f
[  963.071007] Call Trace:
[  963.071018]  [<ffffffff9152a185>] ? dump_stack+0x5c/0x77
[  963.071027]  [<ffffffff91277804>] ? __warn+0xc4/0xe0
[  963.071033]  [<ffffffff9127787f>] ? warn_slowpath_fmt+0x5f/0x80
[  963.071050]  [<ffffffffc00f91fa>] ? usb_hcd_map_urb_for_dma+0x39a/0x560 [usbcore]
[  963.071056]  [<ffffffff91386e10>] ? get_page_from_freelist+0x350/0xad0
[  963.071072]  [<ffffffffc00f95a0>] ? usb_hcd_submit_urb+0x1e0/0xa50 [usbcore]
[  963.071077]  [<ffffffff91388587>] ? __alloc_pages_nodemask+0xf7/0x270
[  963.071094]  [<ffffffffc00fb78d>] ? usb_start_wait_urb+0x6d/0x170 [usbcore]
[  963.071109]  [<ffffffffc00fb96c>] ? usb_control_msg+0xdc/0x130 [usbcore]
[  963.071116]  [<ffffffffc0966117>] ? tbs5922se_op_rw.constprop.4+0xd7/0x120 [dvb_usb_tbs5923]
[  963.071120]  [<ffffffffc09661ee>] ? tbs5922se_load_firmware+0x8e/0x1f0 [dvb_usb_tbs5923]
[  963.071127]  [<ffffffffc0a82388>] ? dvb_usb_download_firmware+0x88/0xd0 [dvb_usb]
[  963.071132]  [<ffffffffc0a829f6>] ? dvb_usb_device_init+0x486/0x720 [dvb_usb]
[  963.071137]  [<ffffffffc0966031>] ? tbs5922se_probe+0x21/0x30 [dvb_usb_tbs5923]
[  963.071153]  [<ffffffffc00ffe42>] ? usb_probe_interface+0x152/0x300 [usbcore]
[  963.071163]  [<ffffffff9166deae>] ? driver_probe_device+0x21e/0x430
[  963.071168]  [<ffffffff9166e1d0>] ? driver_allows_async_probing+0x30/0x30
[  963.071173]  [<ffffffff9166bbe2>] ? bus_for_each_drv+0x62/0xb0
[  963.071179]  [<ffffffff9166db59>] ? __device_attach+0xd9/0x160
[  963.071185]  [<ffffffff9166cf77>] ? bus_probe_device+0x87/0xa0
[  963.071189]  [<ffffffff9166ad48>] ? device_add+0x478/0x640
[  963.071207]  [<ffffffffc00fded9>] ? usb_set_configuration+0x549/0x8d0 [usbcore]
[  963.071225]  [<ffffffffc0108e28>] ? generic_probe+0x28/0x80 [usbcore]
[  963.071231]  [<ffffffff9166deae>] ? driver_probe_device+0x21e/0x430
[  963.071237]  [<ffffffff9166e1d0>] ? driver_allows_async_probing+0x30/0x30
[  963.071241]  [<ffffffff9166bbe2>] ? bus_for_each_drv+0x62/0xb0
[  963.071247]  [<ffffffff9166db59>] ? __device_attach+0xd9/0x160
[  963.071252]  [<ffffffff9166cf77>] ? bus_probe_device+0x87/0xa0
[  963.071257]  [<ffffffff9166ad48>] ? device_add+0x478/0x640
[  963.071272]  [<ffffffffc00f3657>] ? usb_new_device+0x267/0x4a0 [usbcore]
[  963.071287]  [<ffffffffc00f578c>] ? hub_event+0xfcc/0x1530 [usbcore]
[  963.071293]  [<ffffffff912916bb>] ? process_one_work+0x14b/0x410
[  963.071297]  [<ffffffff91292175>] ? worker_thread+0x65/0x4a0
[  963.071300]  [<ffffffff91292110>] ? rescuer_thread+0x340/0x340
[  963.071304]  [<ffffffff91292110>] ? rescuer_thread+0x340/0x340
[  963.071309]  [<ffffffff91297470>] ? kthread+0xe0/0x100
[  963.071316]  [<ffffffff9122476b>] ? __switch_to+0x2bb/0x700
[  963.071321]  [<ffffffff91297390>] ? kthread_park+0x60/0x60
[  963.071328]  [<ffffffff917fa8b5>] ? ret_from_fork+0x25/0x30
[  963.071331] ---[ end trace 01324789c1b92aa5 ]---
[  963.071338] tbs5922se: error while transferring firmware
[  963.071394] tbs5922se: could not restart the USB controller CPU.
[  963.071448] tbs5922se: could not restart the USB controller CPU.

@bas-t
Copy link
Owner

bas-t commented Mar 8, 2017 via email

@bas-t
Copy link
Owner

bas-t commented Mar 8, 2017

Does the file /lib/firmware/dvb-usb-tbsqbox-id5923.fw exist on your system?

@dimerr
Copy link
Author

dimerr commented Mar 9, 2017

yes, it does

I've tried this patch, but no use: https://patchwork.kernel.org/patch/9556101/

@bas-t
Copy link
Owner

bas-t commented Mar 9, 2017

To ensure the best possible support for your platform you need the newest kernel imo. But you can try the same procedure with 4.8.17, just to see if the firmware issue does not exist in that one.

@bas-t
Copy link
Owner

bas-t commented Mar 12, 2017

Are you going to clarify the purpose of your ticket?
Or do you want me to break in and do it for you?

bas-t added a commit that referenced this issue Mar 14, 2017
@bas-t
Copy link
Owner

bas-t commented Mar 14, 2017

Can you please test with this latest patch again? It seems to address (some parts of) DMA handling.

bas-t added a commit that referenced this issue Mar 14, 2017
@bas-t
Copy link
Owner

bas-t commented Mar 14, 2017

@bas-t
Copy link
Owner

bas-t commented Mar 14, 2017

Do you have the intel-microcode package installed? If so, what version?

@dimerr
Copy link
Author

dimerr commented Mar 14, 2017

still same thing.

I did not have it installed, installed now, from Sid 3.20161104.1 (cause Jessie would be senseless, i guess), but it doesnt help in any way

@bas-t
Copy link
Owner

bas-t commented Mar 14, 2017 via email

@dimerr
Copy link
Author

dimerr commented Mar 14, 2017

It's module, which is blacklisted, but microcode is in kernel already, i believe.

Tried 4.8.0, opensource driver works, but dvbloopback fails

@dimerr
Copy link
Author

dimerr commented Mar 14, 2017

I've installed virtualbox and ubuntu inside of it and it works fine... As i assume, due to USB controller abstraction. Cause CPU and it's registers are quite the same, other aspects are not much related, imo. Would be nice to find some PCI-E USB Controller and try on it...

@bas-t
Copy link
Owner

bas-t commented Mar 15, 2017

Maybe your BIOS enables you to tweak some usb behaviour, like not using xhci, or fall back to usb v2.0 in general.

@dimerr
Copy link
Author

dimerr commented Mar 15, 2017

Unfortunately, that was the first thing I've tried, and I keep trying different options once in a while with new patches

@bas-t
Copy link
Owner

bas-t commented Mar 15, 2017 via email

@dimerr
Copy link
Author

dimerr commented Mar 15, 2017

About BIOS, i dont see others

@dimerr
Copy link
Author

dimerr commented Mar 19, 2017

https://github.com/bas-t/dvbloopback/blob/master/dvbloopback/dvb_loopback.c#L777

This is where crash happens, on a copy from userspace

@bas-t
Copy link
Owner

bas-t commented Mar 20, 2017

That may be so, bit it does not necessarily mean that this line is the actual root cause of the crash.
I'm pretty much clueless right now.

bas-t added a commit that referenced this issue Mar 21, 2017
Patch by crazycat69
Refs #12
@bas-t
Copy link
Owner

bas-t commented Mar 21, 2017

According to crazycat69, the firmware loading bug is fixed.

@dimerr
Copy link
Author

dimerr commented Mar 22, 2017

The good news is that opensource driver is working fine.

The bad news - well, you know...

@bas-t
Copy link
Owner

bas-t commented Mar 23, 2017

Yeah, I know...
Did you try your idea of using a pci-e usb controller yet?

@dimerr
Copy link
Author

dimerr commented Mar 23, 2017

It's hard to find it, because usually they are USB3.0 controllers and i need USB2.0...

Intel has deprecated USB2.0 since previous generation and i have a strong feeling that this might be one of the reasons, so I wanna get USB2.0 controller somewhere

Out of ideas where to find guys who might care about such kind of "bug" in kernel/platform support. Guess once i mention some "dvbloopback", i'd be told to search problems in that third-party module and not in kernel

@dimerr
Copy link
Author

dimerr commented Mar 23, 2017

Im afraid, for that money i can buy new PCI-E DVB card
25+36 shipping

@bas-t
Copy link
Owner

bas-t commented Mar 23, 2017 via email

@dimerr
Copy link
Author

dimerr commented Mar 23, 2017

Tried, 3.0 is not backwards compatible with 2.0, so ehci_xcd simply doesnt bring up usb ports

@bas-t
Copy link
Owner

bas-t commented Mar 23, 2017 via email

@bas-t
Copy link
Owner

bas-t commented Mar 27, 2017

Do you agree that your Kaby Lake cpu is probably not to blame, but the incompatible usb port is more likely the culprit?

Furthermore: if you want to keep on compiling your open source driver in-tree, I suggest you fork this repo and maintain it for your driver in the future. I will get rid of the test branch in a couple of days, so you have the time to decide what you want.

@dimerr
Copy link
Author

dimerr commented Mar 27, 2017

The CPU itself is of course is not the reason. Kaby Lake as platform - yes. I think its even since Sky Lake, when Intel discontinued EHCI support.

@bas-t
Copy link
Owner

bas-t commented Mar 27, 2017

Ok, I see. So I think it's fair to conclude that either the driver for your TBS device and/or the hardware itself is incompatible with XHCI.
That's reason enough for me to close this ticket now, since it does does not appear to me as a dvbloopback related issue.
Feel free though to disagree and reopen it, but you'll have to come with obvious and convincing arguments.

@bas-t bas-t closed this as completed Mar 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants