20.0-testing-r2181 / AMD64: included unrar gives core dump, leading to failed downloads #542
Comments
Unrar shipped with nzbget installer is statically linked; that's to make it compatible with many Linux distributions. In v19 and early versions unrar was compiled using uClibc (just like nzbget itself). In v20 I'm using glibc for x86_64 and armhf; for other targets unrar is still compiled using uClibc. That explains why 32 bit version of unrar works - it's compiled with uClibc. I think Ubuntu 18.04 has changes related to locales which probably require newer glibc or it must be configured differently. Unrar from rarlab is dynamically linked against glibc and therefore uses the installed version of glibc. Although that makes it work with Ubuntu 18.04 the dynamic linking reduce compatibility with other systems. In particular it will not work on systems which don't use glibc (like embedded) or use older glibc versions than the one used when unrar was compiled. Anyway I'm questioning why unrar needs locale support at all. The source code contains a call to function I removed the call to |
Your unrar works on Ubuntu 18.04 (see below). Nice. So you removed setlocale from unrar itself and unrar still works? Cool ... worth a patch towards rarlab? BTW: I thought unrar from rarlab was self-contained, but now I see "ldd unrar" indeed show libraries (see below)
The rarlab's unrar ... with libraries indeed:
|
btw, same behavior with included |
Oh, yes indeed:
|
@BartmanAbyss thanks for mentioning this. |
Applied the same fix to 7zip. |
20.0-testing-r2181 on Ubuntu 18.04 on AMD64 aka x86_64: included unrar gives core dump, leading to failed downloads
"Unpack for <blabla> failed."
See https://forum.nzbget.net/viewtopic.php?f=3&t=3212&p=20545#p20545
Proof the problem is in nzbget-20's unrar (and workaround): Replacing with unrar from nzbget-19.1 'solves' it.
Another workaround: in nzbget's settings, point to the unrar provided by Linux.
The unrar from the rarlab works too https://www.rarlab.com/rar/rarlinux-x64-5.5.0.tar.gz
EDIT:
FWIW:
If I set LC_ALL to C (hadolint/hadolint#173 (comment)), the faulty unrar works:
EDIT 2: FWIW: the x86_32 unrar is ok:
EDIT 3: FWIW
On an old Ubuntu 12.04 (also x86_64), the included unrar does work. Strange. Is the problem glibc version dependent (as the loadlocale.c seems to be a part of glibc)?
The included unar works too on
Ubuntu 16.04, with GNU C Library (Ubuntu GLIBC 2.23-0ubuntu10) stable release version 2.23
Ubuntu 17.10 with GNU C Library (Ubuntu GLIBC 2.26-0ubuntu2.1) stable release version 2.26
(On Ubuntu 18.04: GNU C Library (Ubuntu GLIBC 2.27-3ubuntu1) stable release version 2.27, so if it's glibc, it's something that changed between 2.26 and 2.27)
The text was updated successfully, but these errors were encountered: