Open estevopaz opened 6 years ago
With uwsgi 2.0.17 installed through pip3 --user
:
File "/home/hoot/backend/hoot/jobs/__init__.py", line 34, in get_jobs
output = ssh_client.run_command('ps -o pid,ppid,lstart,pcpu,rss,cmd -u $(whoami)', use_pty=False)
File "/home/hoot/.local/lib/python3.6/site-packages/pssh/pssh2_client.py", line 182, in run_command
encoding=encoding, use_pty=use_pty, timeout=timeout)
File "/home/hoot/.local/lib/python3.6/site-packages/pssh/base_pssh.py", line 91, in run_command
self.get_output(cmd, output)
File "/home/hoot/.local/lib/python3.6/site-packages/pssh/base_pssh.py", line 136, in get_output
(channel, host, stdout, stderr, stdin) = cmd.get()
File "src/gevent/greenlet.py", line 654, in gevent._greenlet.Greenlet.get
File "src/gevent/greenlet.py", line 642, in gevent._greenlet.Greenlet.get
File "src/gevent/_greenlet_primitives.py", line 59, in gevent.__greenlet_primitives.SwitchOutGreenletWithLoop.switch
File "src/gevent/_greenlet_primitives.py", line 63, in gevent.__greenlet_primitives.SwitchOutGreenletWithLoop.switch
File "src/gevent/__greenlet_primitives.pxd", line 35, in gevent.__greenlet_primitives._greenlet_switch
gevent.exceptions.LoopExit: This operation would block forever
Hub: <Hub '' at 0x7efe0aab6978 epoll pending=0 ref=0 fileno=10 resolver=<gevent.resolver_thread.Resolver at 0x7efdbeac4240 pool=<ThreadPool at 0x7efdbef30f98 0/4/10 hub=<Hub at 0x7efe0aab6978 thread_ident=0x139629343045376>>> threadpool=<ThreadPool at 0x7efdbef30f98 0/4/10 hub=<Hub at 0x7efe0aab6978 thread_ident=0x139629343045376>> thread_ident=0x7efdfd647700>
Handles:
[]
Looks like more than an application issue than an uwsgi one. Have you tried googling the exception message?
Yes, I'm fighting with this for days.
For libcrypto segfault, I didn't find nothing similar in google.
For gevent.exceptions.LoopExit: This operation would block forever
it's maybe related to gevent and monkey patch. Initially, I solved moving from pssh.pssh_client import ParallelSSHClient
to second ans newest implementation from pssh.pssh2_client import ParallelSSHClient
.
So, uwsgi and pssh work both very well separately, but together you see.
If the gevent exception is "solved" why writing it here?
Because when no gevent error, libcrypto segfault, and when no segfault, gevent error.
Have you tried to do whatever you are doing with pssh and gevent without uwsgi? That may be easier to debug for you.
Ok, I can try, I never used gevent outside of uwsgi.
Hello! I have the same problem with my Flask application.
It is only fails when running under uwsgi. If i run it with flask run
everything is ok.
Hi,
Recently I added to our project:
from pssh.pssh2_client import ParallelSSHClient
And when the lib is used, uwsgi crash:
It happens in local with Debian testing and in our servers with stable.
Thanks for your attention, I appreciate a lot any kind of help. Don't hesitate ask me more details. Best, Estevo.