-
Notifications
You must be signed in to change notification settings - Fork 241
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
Latest Widevine 4.10.2252.0 fails to load #678
Comments
ARM, LibreELEC |
This affects all ARM-based Linux systems (not Android systems). And what is worse, it appears Google will be revoking older Widevine CDM versions as of 2021-05-31, so we have 3 weeks to get a fix out, or all Widevine-encoded content will stop working. https://www.widevine.com/news |
This appears to be the dlerror: At least with testing a simple C program to just do a dlopen:
|
Do we have access to 4.10.2252.0 for other platforms? https://dl.google.com/widevine-cdm/versions.txt also lists 4.10.2209.0/1 as latest If thats the case, it would mean we need to find a new source for a Linux ARM build of Widevine blob. |
I think libwidevinecdm0 comes from Ventz. It's not fully clear whether it is an official Google agreement. My guess is they may be pulling it from the same sources. |
i dont think they would take it from there to be honest. They are quite big org and seem to do things "by the book". Just tried using my Widevine pull script, and still no Linux ARM builds - only Darwin ARM64 and the others. I wonder if those Chrome blobs are using newer version of one of the linked libs or something like that? |
I know it's not a special build for Raspberry Pi, it has the same sha1 as the one pulled from ChromeOS. But that may not really indicate much of anything. |
just had a thought over herE: We are sure the blobs aren't AARCH64 now? |
They are not, it's still armhf. You can tell because it has a dependency on the armhf dynamic linker: If you compile with: The last 2 arguments are forcing a link to libtcmalloc.so.4 even though it is not needed by the C program, and run with LD_DEBUG=all you see it gets past linking and calls init in libwidevinecdm and results in a segmentation fault. My guess is Chromium is linking libtcmalloc.so.4, so the symbols are already loaded and TLS is already allocated, and malloc() has been replaced at this point before they dlopen(libwidevinecdm.so). Don't know though. I noticed there are 4 new global symbols: These are related gperftools (which includes tcmalloc). Not really an expert on all of this dynamic linker & ELF binary stuff. But could't really go much further than that. LD_DEBUG=all LD_LIBRARY_PATH=/storage:/storage/.kodi/userdata/addon_data/script.module.inputstreamhelper/backup/13816.64.0/ ./wvdl
|
thanks for confirming :) |
BTW, this is what 1679 looks like through the same program (through the point where the segfault happens):
|
anyone got a copy of the new blob that they can upload and send me? |
so, opening that new blob in text editor, there is all the below text in it near the top that older versions dont have Error text from top of blob (just opening with notepad): |
Did you get this sha1? 4d129768d3753328a837a940e6ee903830c791c4 libwidevinecdm.so I downloaded 2 separate ChromeOS images and got the same sha1, and it does dynamically link if the binary doing the dlopen is linked with tcmalloc, just crashes. No Chromebook here. |
did you see all the error text... pretty sure that shouldnt be inside the blob... I think it's a bad blob... We need to confirm with a chrome OS user if it works... |
Yeah, possibly. Or it could be what you said earlier, "maybe 4.10.2252.0 is just for Chrome OS and is now more closely linked". bits of that blob are from: |
Well, this is interesting, 2252 has a .init section (which is where I am crashing), 1679 does not. In that .init section it calls InitializeCdmModule_4, which is problematic because CdmAdapter normally does that.
|
This doesn't make sense to me:
|
below posted by Fuzzard on Slack "
" below is me again: The error we get when trying to load the lib is "cannot allocate memory in static TLS block" @CastagnaIT on slack suggested trying the widevine blob with chromium browser on RPI and see if that works. |
Here is the chrome dependencies from the 138614 image:
Wondering if boringssl & tcmalloc is statically linked in chrome? |
I can confirm that the PHASER version 13816.64.0 image (also reported as 90.13816.0 or ChromeOS 90.0.4430.100) works fine on a Chromebook using Widevine on Netflix. |
@matthuisman If I understand the error correctly, it means some loaded library is deplating the preallocated TLS area. So that must be one of the libraries loaded prior to the error. There could be a few reasons for this:
The solution could be to:
And a workaround that was mentioned is to preload the library complaining so it has sufficient TLS area when loaded. Reference: https://bugzilla.redhat.com/show_bug.cgi?id=1722181#c20 |
On my x64 laptop, I can see libwidevinecdm.so itself is using a much larger TLS area now (96 bytes instead of 24 bytes). [dag@moria ~]$ readelf -Wl libwidevinecdm.so.x64.old.working | grep TLS
TLS 0x321020 0x0000000000322020 0x0000000000322020 0x000010 0x000018 R 0x8
[dag@moria ~]$ readelf -Wl libwidevinecdm.so.x64.new.working | grep TLS
TLS 0x9d8080 0x00000000009da080 0x00000000009da080 0x000014 0x000060 R 0x40 |
@dagwieers Since you have a Chromebook that runs with this image, perhaps you can run Chrome with LD_DEBUG? Something like this on the command line: Should output a /tmp/ld.pid file reporting dynamic linkers bindings (searching for symbols and where they are found). That could at least validate whether libwidevinecdm is looking for the 8 symbols noted earlier. Example: basically this is running LD_DEBUG on the "ls" command, and you can see ls is resolving getenv@GLIBC_2.2.5 from libc.so.6. |
@wagnerch No, I cannot. I don't have a console on these. And since they are being used, I cannot just go and scratch them :-/ Update: ChromeOS v91 can now give console access without the need to reinstall the laptop 👍🏻 |
@matthuisman @CastagnaIT If you haven't gotten to it, using this libwidevinecdm on Raspberry Pi OS results in the following errors on the terminal when running chromium-browser and accessing Netflix: [1423:1:0511/123011.891141:ERROR:cdm_module.cc(139)] CDM at /opt/WidevineCdm/_platform_specific/linux_arm/libwidevinecdm.so could not be loaded. |
I posted this on emilsvennesson/script.module.inputstreamhelper#437 (comment)There are some other things bothering me:
What are these unknown attributes in the dynamic section? Based on some research this is an Android-specific ELF extension called relative relocations (RELR), see: There is also a ".relr.dyn" section in the library. Binutils has no idea what it is, one of the tools actually complains about it (I think objcopy, when I tried to strip the .init and .fini sections). Also, when runninng: And analyzing the core dump:
0x3fd6a4 is the virtual address for InitializeCdmModule_4, which is called by the ".init" section.
Oh, and hey there is nm complaining about an unknown section ".relr.dyn". Interestingly, gdb sees this symbol at: So to me that suggests maybe the relocation was not done, because glibc doesn't understand it? Not sure. |
There's a slight problem with that as I need to stay with Kodi 18 on my Pi 2 (or rather, I would prefer to). It must have pulled the libc6 from your repo when I did |
@jamieburchell |
Oh yes, you're absolutely right. Turns out the only thing I had to do in OSMC / Kodi 18 was to update the libc6 library from the OSMC repo. |
I have OSMC latest stable. Should I update(downgrade) if I have following library which still works with latest widevine: Now I tried installing the version from wagnerch ppa and it says it would remove a lot of packages, probably there are some incompatibilities:
|
OSMC (and Raspberry Pi OS Buster/Bullseye, XBian Bullseye), as I understand it from comments above, should include these patched libc6 binaries now. So you do not need that PPA, if you have it installed then you can remove the PPA via (if you used the PPA install instructions): Then proceed with a normal apt-get update, apt-get upgrade. I believe Sam also pushed a fix for OSMC Buster. By the way "libc6=2.28-10" is the unpatched version, if you want to install that then you would need to install version-locked dependencies as well (based on your output it looks like libc6, libc6-dev, libc-dev-bin). The patched version in that PPA is libc6=2.28-110.1, I believe OSMC is also using the same version as my PPA. |
@wagnerch Thanks, removed your ppa back. I got confused with the new PPA. I thought it must be different version that the one I've installed long time ago. My current version (110-1) is from osmc ppa. No issues with this package BTW. > apt-cache policy libc6
libc6:
Installed: 2.28-110.1
Candidate: 2.28-110.1
Version table:
*** 2.28-110.1 500
500 http://apt.osmc.tv buster/main armhf Packages
100 /var/lib/dpkg/status
2.28-10 500
500 http://ftp.debian.org/debian buster/main armhf Packages
|
@wagnerch do you have a raspberry kodi setup on your home ? |
@DjDiabolik I don't know the background of your question but I can confirm that it's working just fine |
There are some reports about stuttering with the latest libwidevinecdm.so version 4.10.2391.0. Apparently it doesn't happen with all addons, Not yet sure what's going on, but going back to 4.10.2252.5 apparently helps. |
I can also confirm massive stuttering with latest widevine on up-to-date XBian on Raspberry Pi 3, I also had to downgrade winevine for this reason. |
I have a related problem with the newest version in that suddenly it keeps buffering, where before it was fine. Could it be that the latest widevine version does not properly adhere to maximum resolution settings? EDIT: downgrading libwidevinecdm.so solves this issue. |
Does anyone have any rough stats on CPU usage before/after downgrading versions? |
Lol sorry me it was my intention to try to contact @wagnerch because is as found a valid solution when this issue it's appears on all arm devices. |
@DjDiabolik I personally haven't used the new Widevine, I typically turn off InputStream Helper's automatic updates and run it until it doesn't work. @glennguy would know more of the guts here. But I believe WidevideCDM doesn't actually decode the frames, I think it just decrypts them? So it could be CPU cycles on the decryption side, which I think he was looking for some info on CPU utilization. Since this is also using SW decoding, and depending on hardware, 1080p is pretty "hard". My RPi4 has no problem handling 1080p from Netflix, but my Vero 4k+ (Amlogic S905D / GXL) not so much -- best it can handle is 720p otherwise it stutters & consumes all 4 cores. |
Yes that was what I was getting at. The same change was made in the Android decrypter a while back which seemed to fix a very similar problem. |
Hello, Thanks |
Not on Kodi 18 |
Hello, |
CUT CUT |
I usually go into InputStream Helper's settings and there is a "Disable InputStream Helper" setting. My experience is this will stop the "forced" updates (which I think is just a 30 day timer), you can also click "Cancel" if the pop-up comes asking to update (but that's annoying with every video). IIRC, you can still Install/Reinstall/Rollback. Which is how I manage it, when something is broken with Widevine and reports suggest a new Widevine version then i'll go in an click "Install". It's a bit hard to know if it is Widevine or something else, but my experience with Netflix is 95% of the time it is something Netflix server-side changed and the add-on hasn't been updated yet. |
I can confirm this has worked for me as well! Kodi 18.(Belgium, VRT.NU stopped working and now it works again) Thanks! |
worked for me as well on OSMC |
It appears Google may have changed the latest Widevine libraries, the size has changed by about 1M, and it is not linking all of the same libraries as it used to (perhaps some stuff is statically linked now). In any case these are the errors, but there isn't enough logging to know the issue. Also the dlerror() message is squashed and never bubbles up.
2021-05-09 20:29:53.661 T:4807 ERROR : AddOnLog: inputstream.adaptive: Unable to load widevine shared library (/storage/.kodi/cdm/libwidevinecdm.so)
2021-05-09 20:29:53.661 T:4807 ERROR : AddOnLog: inputstream.adaptive: OpenDRMSystem failed
Related issues:
CastagnaIT/plugin.video.netflix#1154
Working CDM:
13505.111.0/libwidevinecdm.so:
linux-vdso.so.1 (0xbefbd000)
/usr/lib/libarmmem-v7l.so (0xb6808000)
libpthread.so.0 => /usr/lib/libpthread.so.0 (0xb67df000)
libm.so.6 => /usr/lib/libm.so.6 (0xb6776000)
libdl.so.2 => /usr/lib/libdl.so.2 (0xb6763000)
librt.so.1 => /usr/lib/librt.so.1 (0xb674c000)
libnss3.so => /usr/lib/libnss3.so (0xb664f000)
libnssutil3.so => /usr/lib/libnssutil3.so (0xb661c000)
libnspr4.so => /usr/lib/libnspr4.so (0xb65e5000)
libc.so.6 => /usr/lib/libc.so.6 (0xb64a6000)
/usr/lib/ld-linux-armhf.so.3 (0xb6f66000)
libplc4.so => /usr/lib/libplc4.so (0xb6f8f000)
libplds4.so => /usr/lib/libplds4.so (0xb6f8b000)
Non-working CDM:
13816.64.0/libwidevinecdm.so:
linux-vdso.so.1 (0xbedb9000)
/usr/lib/libarmmem-v7l.so (0xb5dd7000)
libdl.so.2 => /usr/lib/libdl.so.2 (0xb5dc4000)
libpthread.so.0 => /usr/lib/libpthread.so.0 (0xb5d9b000)
librt.so.1 => /usr/lib/librt.so.1 (0xb5d84000)
libm.so.6 => /usr/lib/libm.so.6 (0xb5d1b000)
libc.so.6 => /usr/lib/libc.so.6 (0xb5bdc000)
/usr/lib/ld-linux-armhf.so.3 (0xb6f78000)
The text was updated successfully, but these errors were encountered: