Open analytik opened 6 years ago
This issue happened with Python 3.6.4 but doesn't happen anymore with Python 3.6.5rc1.
I have the same repeated segfaults in uswgi 2.0.17.1 and python 3.7.1
*** Starting uWSGI 2.0.17.1 (64bit) on [Tue Nov 27 09:01:36 2018] ***
compiled with version: 6.3.0 20170516 on 13 November 2018 15:23:09
os: Linux-4.9.93-linuxkit-aufs #1 SMP Wed Jun 6 16:55:56 UTC 2018
nodename: c1d86efb08d6
machine: x86_64
clock source: unix
pcre jit enabled
detected number of CPU cores: 3
current working directory: /opt/app-root/app
detected binary path: /usr/local/bin/uwsgi
uWSGI running as root, you can use --uid/--gid/--chroot options
*** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***
your memory page size is 4096 bytes
*** WARNING: you have enabled harakiri without post buffering. Slow upload could be rejected on post-unbuffered webservers ***
detected max file descriptor number: 1048576
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
uwsgi socket 0 bound to TCP address 0.0.0.0:8080 fd 3
uWSGI running as root, you can use --uid/--gid/--chroot options
*** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***
Python version: 3.7.1 (default, Oct 24 2018, 22:38:59) [GCC 6.3.0 20170516]
Python main interpreter initialized at 0x5605f0833000
uWSGI running as root, you can use --uid/--gid/--chroot options
*** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***
python threads support enabled
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 5 seconds
mapped 511248 bytes (499 KB) for 5 cores
*** Operational MODE: preforking ***
Installing health check logging filter...
WSGI app 0 (mountpoint='') ready in 4 seconds on interpreter 0x5605f0833000 pid: 1 (default app)
uWSGI running as root, you can use --uid/--gid/--chroot options
*** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI master process (pid: 1)
spawned uWSGI worker 1 (pid: 19, cores: 1)
spawned uWSGI worker 2 (pid: 20, cores: 1)
running "unix_signal:2 gracefully_kill_them_all" (master-start)...
running "unix_signal:3 gracefully_kill_them_all" (master-start)...
running "unix_signal:5 gracefully_kill_them_all" (master-start)...
running "unix_signal:15 gracefully_kill_them_all" (master-start)...
Python auto-reloader enabled
!!! uWSGI process 19 got Segmentation Fault !!!
*** backtrace of 19 ***
uwsgi(uwsgi_backtrace+0x35) [0x5605f026aca5]
uwsgi(uwsgi_segfault+0x23) [0x5605f026b053]
/lib/x86_64-linux-gnu/libc.so.6(+0x33060) [0x7f85454b2060]
/usr/local/lib/libpython3.7m.so.1.0(PyBytes_AsString+0) [0x7f8545ae9bb0]
uwsgi(uwsgi_python_autoreloader_thread+0x166) [0x5605f0282416]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x7494) [0x7f854780f494]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x3f) [0x7f8545567acf]
*** end of backtrace ***
!!! uWSGI process 20 got Segmentation Fault !!!
*** backtrace of 20 ***
uwsgi(uwsgi_backtrace+0x35) [0x5605f026aca5]
uwsgi(uwsgi_segfault+0x23) [0x5605f026b053]
/lib/x86_64-linux-gnu/libc.so.6(+0x33060) [0x7f85454b2060]
/usr/local/lib/libpython3.7m.so.1.0(PyBytes_AsString+0) [0x7f8545ae9bb0]
uwsgi(uwsgi_python_autoreloader_thread+0x166) [0x5605f0282416]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x7494) [0x7f854780f494]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x3f) [0x7f8545567acf]
*** end of backtrace ***
DAMN ! worker 1 (pid: 19) died, killed by signal 11 :( trying respawn ...
Respawned uWSGI worker 1 (new pid: 23)
DAMN ! worker 2 (pid: 20) died, killed by signal 11 :( trying respawn ...
Python auto-reloader enabled
Respawned uWSGI worker 2 (new pid: 25)
While running both uwsgi 2.0.15 and 2.0.17 with something like
uwsgi --chdir=/project --http-socket 0.0.0.0:80 --module=app:api --pidfile=/tmp/uwsgi.pid --stats 127.0.0.1:1717 --stats-http --master --processes=2 --threads=2 --post-buffering --harakiri=30 --max-requests=5000 --vacuum --buffer-size=65535 --disable-logging --honour-stdin --py-autoreload=1
and then the segfault just keeps repeating every second or so.
The build itself seems to have been OK:
This started happening after rebuilding from the latest debian:stretch image. This wasn't happening a month ago.
Dockerfile for Debian:
Dockerfile for Python:
Dockerfile for the project: