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

Deluge 1.3.15-9 not starting - OpenSSL problem #3201

Closed
tonabnehmer opened this issue Mar 4, 2018 · 23 comments
Closed

Deluge 1.3.15-9 not starting - OpenSSL problem #3201

tonabnehmer opened this issue Mar 4, 2018 · 23 comments
Labels

Comments

@tonabnehmer
Copy link

Setup

Package Name: Deluge from #3138
Package Version: 1.3.15-9

NAS Model: DS215j
NAS Architecture: armada375
DSM version: DSM 6.1.5-15254 Update 1

--

Expected behavior

Deluge starting

Actual behavior

Deluge not starting, with Python from #3138, version: 2.7.14-18 see attached log
Seems like it does not find the imports for openssl or crypto packages?

Package log

[INFO    ] 17:05:30 configmanager:70 Setting config directory to: /volume2/@appstore/deluge/var/
[ERROR   ] 17:05:31 main:248 /var/packages/python/target/lib/python2.7/site-packages/cryptography/hazmat/bindings/_openssl.so: undefined symbol: pthread_atfork
Traceback (most recent call last):
  File "/volume2/@appstore/deluge/env/lib/python2.7/site-packages/deluge-1.3.15-py2.7.egg/deluge/main.py", line 240, in start_daemon
    from deluge.core.daemon import Daemon
  File "/volume2/@appstore/deluge/env/lib/python2.7/site-packages/deluge-1.3.15-py2.7.egg/deluge/core/daemon.py", line 47, in <module>
    from deluge.core.rpcserver import RPCServer, export
  File "/volume2/@appstore/deluge/env/lib/python2.7/site-packages/deluge-1.3.15-py2.7.egg/deluge/core/rpcserver.py", line 47, in <module>
    from twisted.internet import ssl, reactor, defer
  File "/var/packages/python/target/lib/python2.7/site-packages/twisted/internet/ssl.py", line 59, in <module>
    from OpenSSL import SSL
  File "/var/packages/python/target/lib/python2.7/site-packages/OpenSSL/__init__.py", line 8, in <module>
    from OpenSSL import crypto, SSL
  File "/var/packages/python/target/lib/python2.7/site-packages/OpenSSL/crypto.py", line 16, in <module>
    from OpenSSL._util import (
  File "/var/packages/python/target/lib/python2.7/site-packages/OpenSSL/_util.py", line 6, in <module>
    from cryptography.hazmat.bindings.openssl.binding import Binding
  File "/var/packages/python/target/lib/python2.7/site-packages/cryptography/hazmat/bindings/openssl/binding.py", line 13, in <module>
    from cryptography.hazmat.bindings._openssl import ffi, lib
ImportError: /var/packages/python/target/lib/python2.7/site-packages/cryptography/hazmat/bindings/_openssl.so: undefined symbol: pthread_atfork

@Safihre
Copy link
Contributor

Safihre commented Mar 5, 2018

It's worse than missing, there's a cross compile problem problem: undefined symbol: pthread_atfork .
I tried something else, could you try installing this version?
https://github.com/Safihre/spksrc/releases/tag/python-retest2

@tonabnehmer
Copy link
Author

Thanks for the quick update. Reinstalled the python package, deluge still reports the same error.

@Safihre
Copy link
Contributor

Safihre commented Mar 5, 2018

Google seems to indicate that it's a problem in the compilation of OpenSSL.
Have to dig deeper to find what switches are in the wrong order :/

Build debug log

@Safihre Safihre added the bug label Mar 6, 2018
@Safihre Safihre changed the title Deluge 1.3.15-9 not starting Deluge 1.3.15-9 not starting - OpenSSL problem Mar 6, 2018
@Safihre
Copy link
Contributor

Safihre commented Mar 8, 2018

@tonabnehmer Do you have time to test another one for me?
https://github.com/Safihre/spksrc/releases/tag/python-retest3

This will be a trial-and-error process, since I don't have a device with armada375.

@tonabnehmer
Copy link
Author

Sure no problem, tried with new python package, but the error remains...

@Safihre
Copy link
Contributor

Safihre commented Mar 9, 2018

I now tried to compile with an older toolchain, could you see if this ones does something?
https://github.com/Safihre/spksrc/releases/tag/python-retest3

@BaukeZwart
Copy link

FYI

I'm getting the exact same error in the log on my DS216PLAY
Package Name: Deluge and Python from #3138
Package Version: 1.3.15-9/2.7.14-8

NAS Model: DS216PLAY
NAS Architecture: STM STiH412 (Monaco)
DSM version: DSM 6.1.5-15254 Update 1

[INFO    ] 15:49:10 configmanager:70 Setting config directory to: /volume1/@appstore/deluge/var/
[ERROR   ] 15:49:11 main:248 /var/packages/python/target/lib/python2.7/site-packages/cryptography/hazmat/bindings/_openssl.so: undefined symbol: pthread_atfork
Traceback (most recent call last):
  File "/volume1/@appstore/deluge/env/lib/python2.7/site-packages/deluge-1.3.15-py2.7.egg/deluge/main.py", line 240, in start_daemon
    from deluge.core.daemon import Daemon
  File "/volume1/@appstore/deluge/env/lib/python2.7/site-packages/deluge-1.3.15-py2.7.egg/deluge/core/daemon.py", line 47, in <module>
    from deluge.core.rpcserver import RPCServer, export
  File "/volume1/@appstore/deluge/env/lib/python2.7/site-packages/deluge-1.3.15-py2.7.egg/deluge/core/rpcserver.py", line 47, in <module>
    from twisted.internet import ssl, reactor, defer
  File "/var/packages/python/target/lib/python2.7/site-packages/twisted/internet/ssl.py", line 59, in <module>
    from OpenSSL import SSL
  File "/var/packages/python/target/lib/python2.7/site-packages/OpenSSL/__init__.py", line 8, in <module>
    from OpenSSL import crypto, SSL
  File "/var/packages/python/target/lib/python2.7/site-packages/OpenSSL/crypto.py", line 16, in <module>
    from OpenSSL._util import (
  File "/var/packages/python/target/lib/python2.7/site-packages/OpenSSL/_util.py", line 6, in <module>
    from cryptography.hazmat.bindings.openssl.binding import Binding
  File "/var/packages/python/target/lib/python2.7/site-packages/cryptography/hazmat/bindings/openssl/binding.py", line 13, in <module>
    from cryptography.hazmat.bindings._openssl import ffi, lib
ImportError: /var/packages/python/target/lib/python2.7/site-packages/cryptography/hazmat/bindings/_openssl.so: undefined symbol: pthread_atfork

@Safihre
Copy link
Contributor

Safihre commented Mar 16, 2018

And could you try the release I linked above?

@BaukeZwart
Copy link

That's not complied for Monaco

@ghost
Copy link

ghost commented Mar 17, 2018

I am also having the exact same problem.
System:
DS218play
Realtek RTD1296 SoC
DSM 6.1.5-15254 Update 1

Deluge 1.3.15-9 installed from #3138
Python 2.7.14-18 - first installed from repo, and also tried installing it from #3138

[INFO    ] 10:32:12 configmanager:70 Setting config directory to: /volume1/@appstore/deluge/var/
[ERROR   ] 10:32:16 main:248 /var/packages/python/target/lib/python2.7/site-packages/cryptography/hazmat/bindings/_openssl.so: undefined symbol: pthread_atfork
Traceback (most recent call last):
  File "/volume1/@appstore/deluge/env/lib/python2.7/site-packages/deluge-1.3.15-py2.7.egg/deluge/main.py", line 240, in start_daemon
    from deluge.core.daemon import Daemon
  File "/volume1/@appstore/deluge/env/lib/python2.7/site-packages/deluge-1.3.15-py2.7.egg/deluge/core/daemon.py", line 47, in <module>
    from deluge.core.rpcserver import RPCServer, export
  File "/volume1/@appstore/deluge/env/lib/python2.7/site-packages/deluge-1.3.15-py2.7.egg/deluge/core/rpcserver.py", line 47, in <module>
    from twisted.internet import ssl, reactor, defer
  File "/var/packages/python/target/lib/python2.7/site-packages/twisted/internet/ssl.py", line 59, in <module>
    from OpenSSL import SSL
  File "/var/packages/python/target/lib/python2.7/site-packages/OpenSSL/__init__.py", line 8, in <module>
    from OpenSSL import crypto, SSL
  File "/var/packages/python/target/lib/python2.7/site-packages/OpenSSL/crypto.py", line 16, in <module>
    from OpenSSL._util import (
  File "/var/packages/python/target/lib/python2.7/site-packages/OpenSSL/_util.py", line 6, in <module>
    from cryptography.hazmat.bindings.openssl.binding import Binding
  File "/var/packages/python/target/lib/python2.7/site-packages/cryptography/hazmat/bindings/openssl/binding.py", line 13, in <module>
    from cryptography.hazmat.bindings._openssl import ffi, lib
ImportError: /var/packages/python/target/lib/python2.7/site-packages/cryptography/hazmat/bindings/_openssl.so: undefined symbol: pthread_atfork

@tonabnehmer
Copy link
Author

Tested the last version of python, error remains the same :/

@Safihre
Copy link
Contributor

Safihre commented Mar 17, 2018

@ymartin59 could you un-publish Python again? Seems it's still bad :(

@ymartin59
Copy link
Contributor

I have unpublished all architectures... users will have to re-install application packages.

@ymartin59
Copy link
Contributor

@Safihre I just noticed I probably made a mistake with Python 2.7.14-18 for x64 architecture - I published compiled version for DSM 5.2. Question: is it expected it should run on DSM 6 too (because does not rely on libstdc++) ?

@ghost
Copy link

ghost commented Mar 18, 2018

If you compile a version of 2.7.14-18 for RTD1296 x64 I would be happy to test, if the compilation was the problem :)

EDIT: Just realized that even though RTD1296 is 64-bit on the DS218play, it is not covered by the x64 packages you have up for testing in #3138
So to be specific, I can test on DS218play with RTD1296 processor :)

@ghost
Copy link

ghost commented Mar 27, 2018

Hey guys, I have an update on the issue.

I just returned my DS218play and got a DS218+ instead. For various reasons. Anyways, I thought I remembered that Deluge was working fine for a brief moment, on the DS218play, but never got it to work again.
I have now just freshly installed my new NAS, and I havent updated anything. It is running DSM 6.1.5-15254 and I have NOT updated to "Update 1".
I installed Deluge and Python from #3138 and both are running fine now.
It seems "Update 1" is ruining it, so I will hesitate to update my DSM.
I don't know if you can use this information, or already knew it. But maybe it can help you locate the issue :)

Ask away, if you need more information og need me to test something.

@Safihre
Copy link
Contributor

Safihre commented Mar 27, 2018

@Qbone Unfortunately (for us) the reason is simpeler: your DS218play is rtd1296 (ARM) while the DS218+ is a x64. That's a "safe" arch that is easiest.
https://github.com/SynoCommunity/spksrc/wiki/Architecture-per-Synology-model

@ghost
Copy link

ghost commented Mar 28, 2018

Arh shoot. I thought I was on to something :)
I have updated my DSM and it is all still running fine - so I rushed a bit to conclusions. My bad.

ymartin59 added a commit to ymartin59/spksrc that referenced this issue May 5, 2018
Add WHEELS_CFLAGS and WHEELS_LDFLAGS to pass additional cross-compilation
options to "pip wheel"

Resolves SynoCommunity#3246 SynoCommunity#3201
@ymartin59
Copy link
Contributor

@pbone Here is a test package for rtd1296/DS218play, I hope include proper fix for cryptography / openssl / pthread to work: http://dl.free.fr/kwT4PmoNE
May you please install it manually and test again Deluge to confirm it fixes this issue?

@ghost
Copy link

ghost commented May 5, 2018

@ymartin59 like I mentioned earlier, I returned my DS218play, and got the DS218+ instead. So I cant test IT unfornately ☹️

@DownbeatK
Copy link

DownbeatK commented May 22, 2018

@ymartin59 I installed that on my DS418/RTD1296 and Deluge is having the same problem.

ymartin59 added a commit to ymartin59/spksrc that referenced this issue May 27, 2018
Add WHEELS_CFLAGS and WHEELS_LDFLAGS to pass additional cross-compilation
options to "pip wheel"

Resolves SynoCommunity#3246 SynoCommunity#3201
ymartin59 added a commit to ymartin59/spksrc that referenced this issue May 28, 2018
Add WHEELS_CFLAGS and WHEELS_LDFLAGS to pass additional cross-compilation
options to "pip wheel"

Resolves SynoCommunity#3246 SynoCommunity#3201
ymartin59 added a commit that referenced this issue May 28, 2018
Add WHEELS_CFLAGS and WHEELS_LDFLAGS to pass additional cross-compilation
options to "pip wheel"

Resolves #3246 #3201
@ymartin59
Copy link
Contributor

@tonabnehmer Deluge with fixed Python for ARM architecture have been published. Please confirm.

@tonabnehmer
Copy link
Author

@ymartin59 Can confirm working. Thanks for the update. Issue can be closed.

stefaang pushed a commit to stefaang/spksrc that referenced this issue Jan 21, 2019
Add WHEELS_CFLAGS and WHEELS_LDFLAGS to pass additional cross-compilation
options to "pip wheel"

Resolves SynoCommunity#3246 SynoCommunity#3201
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants