SynoCommunity / spksrc

Cross compilation framework to create native packages for the Synology's NAS
https://synocommunity.com
Other
3.02k stars 1.23k forks source link

Jackett indexers fail to run after latest Mono and Jackett updates #3946

Closed mridude23 closed 1 year ago

mridude23 commented 4 years ago

Setup

Package Name: Mono / Jackett Package Version: 5.20 / 0.14

NAS Model: DS218 NAS Architecture: rtd1296 (armv8) DSM version: DSM 6.2.2

Expected behavior

Indexers from Jackett should work.

Actual behavior

An error occured while testing this indexer Exception (eztv): Ssl error:0f000078:elliptic curve routines:OPENSSL_internal:POINT_IS_NOT_ON_CURVE at /spksrc/spk/mono/work-aarch64-6.1/mono-5.20.1.34/external/boringssl/crypto/ec/ec.c:835: An error occurred while sending the request

Steps to reproduce

Update Mono and Jackett to latest version from Package Center.

More Details

Saw in Sonarr that there's a new version available for Mono and it was saying that my version (I'm gonna say 5.18, I think this one was the previous one) is no longer supported. Updated Mono to 5.20 then Jackett to 0.14, both from Package Center. After the update Jackett refuses to work with any of my 3 indexers (2 public, 1 private). Sonarr v3 is still working.

I removed Mono, Jackett and Sonar and reinstalled the previous packages I could find here https://synocommunity.com/packages for Mono and Jackett. Still not working. Tried a mix of Mono 5.20 and Jackett 0.11, still does not work. Tried latest Jacket with previous Mono, it makes me update to the latest Mono as well. Right now I don't know what to try and I'm left with nothing working :) Any ideas?

Package log

Same error reported in Jackett log as well.

ymartin59 commented 4 years ago

@hgy59 Is there a specific OpenSSL issue with aarch64?

hgy59 commented 4 years ago

@ymartin59 mono uses boringSSL (aka btls) as discussed in #3666. It's a known bug as of Elliptic Curve crypto in BTLS broken on ARM64 in Debian 8 . This mono issue is closed without a solution as for Debian > 8 there is no such error.

The reason of the bug is given as of the buggy GCC 4 support for ARM64.

Suggestions:

The first two suggestions are relativly easy to test, but the others need huge effort. I already created a build of Mono 6.8.0 but have not added the latest toolchain yet.

hgy59 commented 4 years ago

@mridude23 as of this older SO item can you please try this solution?

You can try to change the mono TLS provider.

The default TLS provider in newer mono versions is BTLS. But you can change it to the legacy TLS > provider:

Try adding MONO_TLS_PROVIDER=legacy to your environment variables, when you are having > trouble with BTLS.

I have no idea whether the legacy TLS provider is still supported, but give it a try.

ymartin59 commented 4 years ago

@hgy59 I am building mono and jackett with 6.2 toolchain to give it a try.

ymartin59 commented 4 years ago

There is some kind of mistake at https://sourceforge.net/projects/dsgpl/files/DSM%206.2%20Tool%20Chains/Intel%20x86%20Linux%204.4.59%20%28Rtd1296%29/ Wonder why "Intel x86" in folder for an ARMv8 architecture... I doubt that toolchain may fix this...

ymartin59 commented 4 years ago

@hgy59 Is it possible that an OpenSSL update contains fixes for ARM64?

ymartin59 commented 4 years ago

I wonder why Jackett would suffer this issue alone. Sonarr should also fail.

hgy59 commented 4 years ago

I saw this intel naming too, but it's the folder name only. TC 6.2.2 has corrected folder name. My mono_rtd1296-6.2.2_6.8.0.105-14.spk is just ready for testing. The only binary difference to mono_aarch64-6.1_6.8.0.105-14.spk are the files

bin/mono-sgen
bin/monodis
lib/libmono-btls-shared.so
lib/libmono-native.so.0.0.0

So there is a little chance that the behaviour is different.

hgy59 commented 4 years ago

@mridude23 just uploaded my special build here: Update Mono to 6.8.0.105

As usual: pre-release without any warranty.

hgy59 commented 4 years ago

I wonder why Jackett would suffer this issue alone. Sonarr should also fail.

The mono issue says:

Others have this issue. Jackett/Jackett#2173 Radarr/Radarr#2350 MichaIng/DietPi#1711

hgy59 commented 4 years ago

@hgy59 Is it possible that an OpenSSL update contains fixes for ARM64?

Mono uses BoringSSL, not OpenSSL. The current mono repo links to this BoringSSL

They have a fix for FreeBSD/aarch64 in this commit https://github.com/mono/boringssl/commit/c5b67767b1f9a0da50cfce60026577797c66f7d9 just 22 days ago.

And some older clang fixes in January 2019 (but tested with gcc 7.x and 8.x only)

ymartin59 commented 4 years ago

@hgy59 I am interested to know why there is "openssl" word in error message then routines:OPENSSL_internal:POINT_IS_NOT_ON_CURVE?

ymartin59 commented 4 years ago

OK it was "boring" for Google to improve OpenSSL so they forked and do not recommend to depend on it but now others are bored too with issues spread in Chromium and Mono... Is there a way to build Mono with OpenSSL? Is that this mentioned "legacy" switch?

mridude23 commented 4 years ago

@mridude23 just uploaded my special build here: Update Mono to 6.8.0.105

As usual: pre-release without any warranty.

Installed the package along Jackett 0.14, error still persists.

An error occured while testing this indexer Exception (eztv): Ssl error:0f000078:elliptic curve routines:OPENSSL_internal:POINT_IS_NOT_ON_CURVE at /spksrc/spk/mono/work-rtd1296-6.2.2/mono-6.8.0.105/external/boringssl/crypto/ec/ec.c:835: The SSL connection could not be established, see inner exception.

hgy59 commented 4 years ago

@mridude23 just found that libmonoboehm is in the spk package but it should not be there, as it is for x86_64 arch. Can you try to delete the following files after the installation of mono on your NAS?

/var/packages/mono/target/bin/mono-boehm
/var/packages/mono/target/lib/libmonoboehm-2.0.so
/var/packages/mono/target/lib/libmonoboehm-2.0.so.1
/var/packages/mono/target/lib/libmonoboehm-2.0.so.1.0.0
mridude23 commented 4 years ago

So, now the packages available in Package Center are at least one version behind.

Installed

LE: Did not see your comment and I was already working on the things I've stated. I'll try tomorrow most likely. If I manage before that I'll let you know.

jasoncodes commented 4 years ago

Can you try to delete the following files after the installation of mono on your NAS?

/var/packages/mono/target/bin/mono-boehm
/var/packages/mono/target/lib/libmonoboehm-2.0.so
/var/packages/mono/target/lib/libmonoboehm-2.0.so.1
/var/packages/mono/target/lib/libmonoboehm-2.0.so.1.0.0

This does not seem to change anything. I tried this both before and after installing the 6.8.0.105 special build.


Try adding MONO_TLS_PROVIDER=legacy to your environment variables, when you are having > trouble with BTLS.

I have no idea whether the legacy TLS provider is still supported, but give it a try.

This also made no difference for me. I guess the legacy provider is no longer supported.


To save having to restart services to test something out, I’m testing with the following:

wget https://github.com/mono/mono/raw/master/mcs/class/Mono.Security/Test/tools/mget/mget.cs
csc mget.cs
mono mget.exe https://example.com/

Until we have a solution for late versions of Mono, I downgraded to 5.8.0.108-11 [6.1 rtd1296] without having to uninstall a bunch of other packages with the following:

wget https://packages.synocommunity.com/mono/11/mono.v11.f15047[rtd1296].spk
rm -rf /volume1/\@appstore/mono /var/packages/mono
synopkg install mono.v11.f15047\[rtd1296\].spk

Note: It seems like editing version in /var/packages/mono/INFO (e.g. prefix with 0.) is also sufficient to trick synopkg into downgrading without having to blow away all the files.

ymartin59 commented 4 years ago

@jasoncodes Thanks for these valuable work-arounds to downgrade packages... we should document them as FAQ, because it happens we get troubles when publishing critical package like Mono or Python...

richyboy1980 commented 4 years ago

@mridude23 just uploaded my special build here: Update Mono to 6.8.0.105

As usual: pre-release without any warranty.

When I install this mono version, Sonarr v3 "fails to update"

Stanzilla commented 4 years ago

Yeah the mono upgrade is the cause of all the sonarr and jackett issues being reported recently

paul-charousset commented 3 years ago

Can you try to delete the following files after the installation of mono on your NAS?

/var/packages/mono/target/bin/mono-boehm
/var/packages/mono/target/lib/libmonoboehm-2.0.so
/var/packages/mono/target/lib/libmonoboehm-2.0.so.1
/var/packages/mono/target/lib/libmonoboehm-2.0.so.1.0.0

This does not seem to change anything. I tried this both before and after installing the 6.8.0.105 special build.

Try adding MONO_TLS_PROVIDER=legacy to your environment variables, when you are having > trouble with BTLS.

I have no idea whether the legacy TLS provider is still supported, but give it a try.

This also made no difference for me. I guess the legacy provider is no longer supported.

To save having to restart services to test something out, I’m testing with the following:

wget https://github.com/mono/mono/raw/master/mcs/class/Mono.Security/Test/tools/mget/mget.cs
csc mget.cs
mono mget.exe https://example.com/

Until we have a solution for late versions of Mono, I downgraded to 5.8.0.108-11 [6.1 rtd1296] without having to uninstall a bunch of other packages with the following:

wget https://packages.synocommunity.com/mono/11/mono.v11.f15047[rtd1296].spk
rm -rf /volume1/\@appstore/mono /var/packages/mono
synopkg install mono.v11.f15047\[rtd1296\].spk

Note: It seems like editing version in /var/packages/mono/INFO (e.g. prefix with 0.) is also sufficient to trick synopkg into downgrading without having to blow away all the files.

Thank you so much for this. I was starting to get desperate

bakerboy448 commented 1 year ago

Non-issue as jackett is dotnet now? Can be closed...?

GazzaBL commented 1 year ago

@jasoncodes Hi, Can i please get some assistance Back in october these codes worked for me via SSH but i need to reinstall mono v5.8 and i am having issues reinstalling mono

the rm -rf code seems to work but the other two error

wget https://packages.synocommunity.com/mono/11/mono.v11.f15047[rtd1296].spk
rm -rf /volume1/\@appstore/mono /var/packages/mono - Removes Mono App on NAS Temporarily
synopkg install mono.v11.f15047\[rtd1296\].spk - Installs Mono App on NAS (V.5.8)

Any Help is much appreciated Thankyou

Mono

hgy59 commented 1 year ago

@GazzaBL please see our FAQ for manual package installation or downgrading packages without uninstall

mreid-tt commented 1 year ago

Non-issue as jackett is dotnet now? Can be closed...?

@mridude23, @jasoncodes, @paul-charousset... I've built a new version of Jackett in https://github.com/SynoCommunity/spksrc/pull/5597 which includes the dotnet version for compatible architectures. If you wish you can test it by downloading the applicable version from the Artifacts section of the build.

When I install this mono version, Sonarr v3 "fails to update"

@richyboy1980, @Stanzilla... I've also been tracking the issue of the impact of Mono on Sonarr v3 and I've also built a new version in https://github.com/SynoCommunity/spksrc/pull/5604 which should help with the certificate verification errors. If you are willing to help test you can try the applicable version from the Artifacts section of that build.

paul-charousset commented 1 year ago

@mreid-tt I'll try to update and let you know. Only need to install the artifact ? Mono stays for the time being ?

mreid-tt commented 1 year ago

hey @paul-charousset, it depends on the NAS you have. If you check your NAS against this tutorial page -- What kind of CPU does my Synology NAS have? you will see the type of package arch you have. For archs aarch64 (ARMv8), x64 and armv7 (only on DSM 7, except armada370), these run on dotnet (indicated by the larger download size). If you install on these platforms Jackett is all that is needed and Mono can be uninstalled. For all other arch configs, these will depend on Mono. If that is the case, you can try installing the updated mono build (links included above) to see if that helps the situation.

EDIT: When you download the build file, you need to unzip it to reveal the .spk file inside to be used with a manual install.

mreid-tt commented 1 year ago

@mridude23, on looking into this issue further, for armv8 archs on DSM 6.x this is a known issue with Mono versions greater than 5.8.0. This was noted above in https://github.com/SynoCommunity/spksrc/issues/3946#issuecomment-612356178.

I'll be closing this issue in a few days if there are no objections.

mreid-tt commented 1 year ago

Closing this issue as a known bug which is unable to be fixed. Workarounds have been presented above.