-
Notifications
You must be signed in to change notification settings - Fork 10
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
Comments
Hi dimerr, thanks for your report. 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! |
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. |
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) |
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.
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) |
Sounds to me like you have a driver issue, I have seen more of them. |
I have both , DVB-S2 TBS5922SE and DVB-T2 Geniatech T230, both using completely different drivers, both are resulting in segfault |
Hmm, I'll setup a Ubuntu 16.04 server this week. |
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 |
Did you try building out of tree? There are some small differences in the resulting dvbloopback module. |
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... |
So you're saying that both in-tree and out-of-tree gives you the crashes? |
What kernel version worked on your old hardware? |
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 |
Are you willing to test with Debian Jessie? |
Sure, I would test anything, if that helps. Installing, as we speak |
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 http://security.debian.org/ jessie/updates main contrib non-free deb 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 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! |
In the meantime, you use your TBS tuner box in production systems, right? (without the Geniatech one) |
I'm using official TBS drivers and your tbs-dvbloopback repo, that fetches and builds them out of tree |
But it disables your Geniatech device of course. And you're testing with that device right now, so please proceed with what I posted. |
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 |
Same thing on Debian, crashes... |
I've got 2 options left, have to run some tests first. I'll get back to you. |
Tested on similar AMD board - no problems. Then on i5-3470+C210 chipset - also no problems... This is a disaster... |
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) |
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. 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. |
and I've seen this once during my tests, prolly with that kernel also...
|
Ok, that's a clue. Will look into that shortly. Probably next week.
Op 8 mrt. 2017 18:06 schreef "Dmitry Ermakov" <notifications@github.com>:
… 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.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#12 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAvhxubrfQ84RUdeEwzVbTemHpGTr96Cks5rjuAPgaJpZM4MOr9O>
.
|
Does the file /lib/firmware/dvb-usb-tbsqbox-id5923.fw exist on your system? |
yes, it does I've tried this patch, but no use: https://patchwork.kernel.org/patch/9556101/ |
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. |
Are you going to clarify the purpose of your ticket? |
Can you please test with this latest patch again? It seems to address (some parts of) DMA handling. |
Just for references: |
Do you have the intel-microcode package installed? If so, what version? |
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 |
That might be because it is blacklisted by default, you may have to
investigate.
Op 14 mrt. 2017 17:50 schreef "Dmitry Ermakov" <notifications@github.com>:
… still same thing.
I did not have it installed, installed now, from Sid (cause Jessie would
be senseless, i guess), but it doesnt help in any way
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#12 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAvhxrCKxpeutSqCE8Qrsla4o22dqWvaks5rlsVbgaJpZM4MOr9O>
.
|
It's module, which is blacklisted, but microcode is in kernel already, i believe. Tried 4.8.0, opensource driver works, but dvbloopback fails |
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... |
Maybe your BIOS enables you to tweak some usb behaviour, like not using xhci, or fall back to usb v2.0 in general. |
Unfortunately, that was the first thing I've tried, and I keep trying different options once in a while with new patches |
What exactly was the first thing you tried? I don't know at what post you
are reacting.
Op 15 mrt. 2017 14:59 schreef "Dmitry Ermakov" <notifications@github.com>:
… Unfortunately, that was the first thing I've tried, and I keep trying
different options once in a while with new patches
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#12 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAvhxsSNjsXT6A_gFbDzfg863q1Nn3MXks5rl-7WgaJpZM4MOr9O>
.
|
About BIOS, i dont see others |
https://github.com/bas-t/dvbloopback/blob/master/dvbloopback/dvb_loopback.c#L777 This is where crash happens, on a copy from userspace |
That may be so, bit it does not necessarily mean that this line is the actual root cause of the crash. |
According to crazycat69, the firmware loading bug is fixed. |
The good news is that opensource driver is working fine. The bad news - well, you know... |
Yeah, I know... |
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 |
Im afraid, for that money i can buy new PCI-E DVB card |
Sorry, did not think of that.
Another wild idea: maybe your usb 3 driver can be forced into usb 2 mode
somehow?
Op 23 mrt. 2017 07:59 schreef "Dmitry Ermakov" <notifications@github.com>:
… Im afraid, for that money i can buy new PCI-E DVB card
25+36 shipping
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#12 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAvhxoU5m6L57UUF6CW_8mrL4C2cYSXLks5rohhOgaJpZM4MOr9O>
.
|
Tried, 3.0 is not backwards compatible with 2.0, so ehci_xcd simply doesnt bring up usb ports |
Bummer...
Op 23 mrt. 2017 08:17 schreef "Dmitry Ermakov" <notifications@github.com>:
… Tried, 3.0 is not backwards compatible with 2.0, so ehci_xcd simply doesnt
bring up usb ports
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#12 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAvhxjCzvfVVxAS97D0zjbW8fTDYbdD5ks5rohx5gaJpZM4MOr9O>
.
|
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. |
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. |
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. |
Ubuntu 16.04.2 x86_64 running on
After upgrading platform to Intel Kaby Lake, dvbloopback keeps crashing.
Steps to reproduce:
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.
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
The text was updated successfully, but these errors were encountered: