You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There seems to be an issue in the python 0.8.0 version which occasionally causes websockify to get stuck at 100% cpu usage. The problem disappears when reverting to 0.7.0. This has happened on both a Centos 6 server, and a Ubuntu server. Normally cpu usage is < 2% per websockify process.
Here is the stack trace (probably not useful):
#0 0x0000712e54be059d in PyEval_EvalFrameEx ()
from /usr/lib64/libpython2.6.so.1.0 #1 0x0000712e54be5647 in PyEval_EvalCodeEx ()
from /usr/lib64/libpython2.6.so.1.0 #2 0x0000712e54be3a94 in PyEval_EvalFrameEx ()
from /usr/lib64/libpython2.6.so.1.0 #3 0x0000712e54be5647 in PyEval_EvalCodeEx ()
from /usr/lib64/libpython2.6.so.1.0 #4 0x0000712e54be3a94 in PyEval_EvalFrameEx ()
from /usr/lib64/libpython2.6.so.1.0 #5 0x0000712e54be4b7f in PyEval_EvalFrameEx ()
from /usr/lib64/libpython2.6.so.1.0 #6 0x0000712e54be4b7f in PyEval_EvalFrameEx ()
from /usr/lib64/libpython2.6.so.1.0 #7 0x0000712e54be4b7f in PyEval_EvalFrameEx ()
from /usr/lib64/libpython2.6.so.1.0 #8 0x0000712e54be5647 in PyEval_EvalCodeEx ()
from /usr/lib64/libpython2.6.so.1.0 #9 0x0000712e54b78ca0 in ?? () from /usr/lib64/libpython2.6.so.1.0 #10 0x0000712e54b51c63 in PyObject_Call () from /usr/lib64/libpython2.6.so.1.0 #11 0x0000712e54b646af in ?? () from /usr/lib64/libpython2.6.so.1.0 #12 0x0000712e54b51c63 in PyObject_Call () from /usr/lib64/libpython2.6.so.1.0
The process doesn't seem to be stuck...it exits normally when the user disconnects.
Here is the process listing for a few websockify processes:
Both processes here have been running 2.5hrs. One has used 38 minutes of cpu time during that interval, and the other just 35 seconds. This is not to do with usage...even with our highest packet throughput these processes typically only use 2% of cpu, even with 0.8.0. I think there is some factor that is occasionally causing 0.8.0 to sometimes use all the cpu time.
The text was updated successfully, but these errors were encountered:
Yes, confirmed...after applying this change the problem is now fixed. It wasn't detecting the closed socket, so select() was always returning immediately.
There seems to be an issue in the python 0.8.0 version which occasionally causes websockify to get stuck at 100% cpu usage. The problem disappears when reverting to 0.7.0. This has happened on both a Centos 6 server, and a Ubuntu server. Normally cpu usage is < 2% per websockify process.
Here is the stack trace (probably not useful):
#0 0x0000712e54be059d in PyEval_EvalFrameEx ()
from /usr/lib64/libpython2.6.so.1.0
#1 0x0000712e54be5647 in PyEval_EvalCodeEx ()
from /usr/lib64/libpython2.6.so.1.0
#2 0x0000712e54be3a94 in PyEval_EvalFrameEx ()
from /usr/lib64/libpython2.6.so.1.0
#3 0x0000712e54be5647 in PyEval_EvalCodeEx ()
from /usr/lib64/libpython2.6.so.1.0
#4 0x0000712e54be3a94 in PyEval_EvalFrameEx ()
from /usr/lib64/libpython2.6.so.1.0
#5 0x0000712e54be4b7f in PyEval_EvalFrameEx ()
from /usr/lib64/libpython2.6.so.1.0
#6 0x0000712e54be4b7f in PyEval_EvalFrameEx ()
from /usr/lib64/libpython2.6.so.1.0
#7 0x0000712e54be4b7f in PyEval_EvalFrameEx ()
from /usr/lib64/libpython2.6.so.1.0
#8 0x0000712e54be5647 in PyEval_EvalCodeEx ()
from /usr/lib64/libpython2.6.so.1.0
#9 0x0000712e54b78ca0 in ?? () from /usr/lib64/libpython2.6.so.1.0
#10 0x0000712e54b51c63 in PyObject_Call () from /usr/lib64/libpython2.6.so.1.0
#11 0x0000712e54b646af in ?? () from /usr/lib64/libpython2.6.so.1.0
#12 0x0000712e54b51c63 in PyObject_Call () from /usr/lib64/libpython2.6.so.1.0
The process doesn't seem to be stuck...it exits normally when the user disconnects.
Here is the process listing for a few websockify processes:
root 29597 24.0 0.0 196368 9216 ? R 09:07 38:01 python /home/packages/websockify-master/websockify.py
root 29599 0.3 0.0 196500 9404 ? S 09:07 0:35 python /home/packages/websockify-master/websockify.py
Both processes here have been running 2.5hrs. One has used 38 minutes of cpu time during that interval, and the other just 35 seconds. This is not to do with usage...even with our highest packet throughput these processes typically only use 2% of cpu, even with 0.8.0. I think there is some factor that is occasionally causing 0.8.0 to sometimes use all the cpu time.
The text was updated successfully, but these errors were encountered: