[pkg-uWSGI-devel] Bug#900273: uwsgi: Segmentation fault with autoload = true
Andreas Admin
akadmin at tiker.net
Mon May 28 10:47:09 BST 2018
Package: uwsgi
Version: 2.0.15-11
Severity: important
Dear Maintainer,
I've found multiple issues with the package. First, recently uwsgi
simply seemed to stop working. (reported failure without an error
message after being started through systemd) This coincided with the
upgrade to 2.0.15-11, but I don't think that that was the root cause.
After much cursing, I discovered that the script /usr/share/uwsgi/init/specific_daemon,
specifically the start-stop-daemon line, redirects stdout and stderr to
/dev/null, which prevented me from seeing the error messages. That is
issue number one--I don't think masking errors is good practice.
This finally clued me in that I was dealing with segfaults:
May 27 13:12:43 badger uwsgi[608]: [uWSGI] getting INI configuration from /etc/uwsgi/apps-enabled/expensely.ini
May 27 13:12:44 badger uwsgi[608]: Sun May 27 13:12:44 2018 - !!! uWSGI process 1050 got Segmentation Fault !!!
May 27 13:12:44 badger exim4[631]: Starting MTA: exim4.
May 27 13:12:44 badger systemd[1]: Started LSB: exim Mail Transport Agent.
May 27 13:12:46 badger systemd[1]: Listening on Load/Save RF Kill Switch Status /dev/rfkill Watch.
May 27 13:12:47 badger uwsgi[608]: app/expensely![uWSGI] getting INI configuration from /usr/share/uwsgi/conf/default.ini
May 27 13:12:47 badger uwsgi[608]: [uWSGI] getting INI configuration from /etc/uwsgi/apps-enabled/gitweb.ini
May 27 13:12:47 badger uwsgi[608]: Sun May 27 13:12:47 2018 - !!! uWSGI process 1297 got Segmentation Fault !!!
May 27 13:12:50 badger uwsgi[608]: app/gitweb![uWSGI] getting INI configuration from /usr/share/uwsgi/conf/default.ini
May 27 13:12:50 badger uwsgi[608]: [uWSGI] getting INI configuration from /etc/uwsgi/apps-enabled/mailman.ini
May 27 13:12:50 badger uwsgi[608]: Sun May 27 13:12:50 2018 - !!! uWSGI process 1500 got Segmentation Fault !!!
May 27 13:12:52 badger spamd[556]: spamd: connection from localhost [::1]:47534 to port 783, fd 5
Second, by manually running the daemon, like so:
UWSGI_DEB_CONFNAMESPACE=app UWSGI_DEB_CONFNAME=expensely uwsgi --ini /usr/share/uwsgi/conf/default.ini --ini /etc/uwsgi/apps-enabled/gitweb.ini
I was able to see the segfaults first hand. gdb (in follow-child mode)
and valgrind were not much help, showing a crash in uwsgi_fork, which
was ostensibly returning to an invalid address.
As a lucky guess, I disabled autoload=true in the default config, and
that cured the segfaults--even if I don't understand why. That's the
second issue I'm reporting.
I have the python, python3 and cgi plugins installed.
Andreas
-- System Information:
Debian Release: buster/sid
APT prefers testing
APT policy: (990, 'testing'), (500, 'stable-updates'), (500, 'unstable'), (500, 'stable'), (500, 'oldstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 4.16.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages uwsgi depends on:
ii uwsgi-core 2.0.15-11
uwsgi recommends no packages.
uwsgi suggests no packages.
-- Configuration Files:
/etc/default/uwsgi changed:
RUN_AT_STARTUP=yes
VERBOSE=yes
PRINT_CONFNAMES_IN_INITD_SCRIPT_OUTPUT=yes
INHERITED_CONFIG=/usr/share/uwsgi/conf/default.ini
-- no debconf information
More information about the pkg-uWSGI-devel
mailing list