#1133977 uwsgi breaks uwsgi-plugin-python autopkgtest on s390x: Segmentation Fault

#1133977#5
Date:
2026-04-16 06:24:52 UTC
From:
To:
Source: uwsgi, uwsgi-plugin-python
Control: found -1 uwsgi/2.0.31-4
Control: found -1 uwsgi-plugin-python/0.0.2
Severity: serious
Tags: sid forky
User: debian-ci@lists.debian.org
Usertags: breaks needs-update
X-Debbugs-CC: debian-s390@lists.debian.org
User: debian-s390@lists.debian.org
Usertag: s390x

Dear maintainer(s),

With a recent upload of uwsgi the autopkgtest of uwsgi-plugin-python
fails in testing on s390x when that autopkgtest is run with the binary
packages of uwsgi from unstable. It passes when run with only packages
from testing. In tabular form:

                        pass            fail
uwsgi                  from testing    2.0.31-4
uwsgi-plugin-python    from testing    0.0.2
all others             from testing    from testing

I copied some of the output at the bottom of this report.

Currently this regression is blocking the migration of uwsgi to testing
[1]. Due to the nature of this issue, I filed this bug report against
both packages. Can you please investigate the situation and reassign the
bug to the right package?

More information about this bug and the reason for filing it can be found on
https://wiki.debian.org/ContinuousIntegration/RegressionEmailInformation

Paul

[1] https://qa.debian.org/excuses.php?package=uwsgi

https://ci.debian.net/data/autopkgtest/testing/s390x/u/uwsgi-plugin-python/70251971/log.gz

  56s test_cgi_helloworld (__main__.UwsgiTest.test_cgi_helloworld) ...
skipped "['cgi'] plugins not available but required for this test case"
  56s test_jvm_hellworld (__main__.UwsgiTest.test_jvm_hellworld) ...
skipped "['jvm'] plugins not available but required for this test case"
  56s test_mountpoints (__main__.UwsgiTest.test_mountpoints) ... ERROR
  56s [uWSGI] getting INI configuration from
/usr/src/uwsgi/t/python/manage_script_name/manage_script_name_test.ini
  56s *** Starting uWSGI 2.0.31-debian (64bit) on [Mon Apr 13 23:30:43
2026] ***
  56s compiled with version: 15.2.0 on 09 March 2026 22:28:50
  56s os: Linux-6.12.74+deb13+1-s390x #1 SMP Debian 6.12.74-2 (2026-03-08)
  56s nodename: ci-103-5a0b77e7
  56s machine: s390x
  56s clock source: unix
  56s pcre jit disabled
  56s *** big endian arch detected ***
  56s detected number of CPU cores: 10
  56s current working directory:
/tmp/autopkgtest-lxc.dv57h8nf/downtmp/build.3pl/src
  56s detected binary path: /usr/bin/uwsgi-core
  56s *** WARNING: you are running uWSGI without its master process
manager ***
  56s your memory page size is 4096 bytes
  56s detected max file descriptor number: 1024
  56s lock engine: pthread robust mutexes
  56s thunder lock: disabled (you can enable it with --thunder-lock)
  56s uwsgi socket 0 bound to TCP address 127.0.0.1:8000 fd 3
  56s Python version: 3.13.12 (main, Feb  4 2026, 15:06:39) [GCC 15.2.0]
  56s Python main interpreter initialized at 0x3ff8eeac8c8
  56s python threads support enabled
  56s your server socket listen backlog is limited to 100 connections
  56s your mercy for graceful operations on workers is 60 seconds
  56s mapped 72920 bytes (71 KB) for 1 cores
  56s *** Operational MODE: single process ***
  56s WSGI app 0 (mountpoint='') ready in 0 seconds on interpreter
0x3ff8eeac8c8 pid: 1460 (default app)
  56s mounting
/usr/src/uwsgi/t/python/manage_script_name//useless_app.py on /foo
  56s WSGI app 1 (mountpoint='/foo') ready in 0 seconds on interpreter
0x3ff9013e850 pid: 1460
  56s mounting
/usr/src/uwsgi/t/python/manage_script_name//useless_app.py on /foobis/
  56s WSGI app 2 (mountpoint='/foobis/') ready in 0 seconds on
interpreter 0x3ff900ff850 pid: 1460
  56s mounting
/usr/src/uwsgi/t/python/manage_script_name//useless_app.py on /footris/
  56s WSGI app 3 (mountpoint='/footris/') ready in 0 seconds on
interpreter 0x3ff900cf850 pid: 1460
  56s *** uWSGI is running in multiple interpreter mode ***
  56s spawned uWSGI worker 1 (and the only) (pid: 1460, cores: 1)
  56s [pid: 1460|app: 1|req: 1/1] 127.0.0.1 () {28 vars in 325 bytes}
[Mon Apr 13 23:30:43 2026] GET /foo => generated 4 bytes in 0 msecs
(HTTP/1.1 200) 1 headers in 44 bytes (1 switches on core 0)
  56s [pid: 1460|app: 1|req: 2/2] 127.0.0.1 () {28 vars in 327 bytes}
[Mon Apr 13 23:30:43 2026] GET /foo/ => generated 4 bytes in 0 msecs
(HTTP/1.1 200) 1 headers in 44 bytes (1 switches on core 0)
  56s [pid: 1460|app: 1|req: 3/3] 127.0.0.1 () {28 vars in 343 bytes}
[Mon Apr 13 23:30:43 2026] GET /foo/resource => generated 4 bytes in 0
msecs (HTTP/1.1 200) 1 headers in 44 bytes (1 switches on core 0)
  56s [pid: 1460|app: 3|req: 1/4] 127.0.0.1 () {28 vars in 335 bytes}
[Mon Apr 13 23:30:43 2026] GET /footris/ => generated 9 bytes in 0 msecs
(HTTP/1.1 200) 1 headers in 44 bytes (1 switches on core 0)
  56s !!! uWSGI process 1460 got Segmentation Fault !!!
  56s *** backtrace of 1460 ***
  56s /usr/bin/uwsgi(uwsgi_backtrace+0x2a) [0x2aa1d284f22]
  56s /usr/bin/uwsgi(uwsgi_segfault+0x32) [0x2aa1d285332]
  56s linux-vdso64.so.1(__kernel_sigreturn+0) [0x3ffe42fe4d8]
  56s /usr/lib/s390x-linux-gnu/libpython3.13.so.1.0(+0x22c5a8)
[0x3ff8e92c5a8]
  56s
/usr/lib/uwsgi/plugins/python3_plugin.so(uwsgi_request_subhandler_wsgi+0xa0)
[0x3ff8f0191c8]
  56s /usr/lib/uwsgi/plugins/python3_plugin.so(uwsgi_request_wsgi+0x146)
[0x3ff8f01801e]
  56s /usr/bin/uwsgi(wsgi_req_recv+0xbc) [0x2aa1d22cf84]
  56s /usr/bin/uwsgi(simple_loop_run+0xda) [0x2aa1d280272]
  56s /usr/bin/uwsgi(simple_loop+0x7e) [0x2aa1d280386]
  56s /usr/bin/uwsgi(uwsgi_ignition+0x260) [0x2aa1d285660]
  56s /usr/bin/uwsgi(uwsgi_worker_run+0x2fc) [0x2aa1d289214]
  56s /usr/bin/uwsgi(uwsgi_run+0x51c) [0x2aa1d2898a4]
  56s /usr/bin/uwsgi(_start+0) [0x2aa1d22c570]
  56s /usr/lib/s390x-linux-gnu/libc.so.6(+0x2ccba) [0x3ff8f1accba]
  56s /usr/lib/s390x-linux-gnu/libc.so.6(__libc_start_main+0xa8)
[0x3ff8f1acdb0]
  56s /usr/bin/uwsgi(+0x2c5b0) [0x2aa1d22c5b0]
  56s *** end of backtrace ***
  56s  56s test_php_session (__main__.UwsgiTest.test_php_session) ...
skipped "['php'] plugins not available but required for this test case"
  56s test_psgi_helloworld (__main__.UwsgiTest.test_psgi_helloworld) ...
skipped "['psgi'] plugins not available but required for this test case"
  56s test_pypy3_helloworld (__main__.UwsgiTest.test_pypy3_helloworld)
... skipped "['pypy3'] plugins not available but required for this test
case"
  56s test_python3_helloworld
(__main__.UwsgiTest.test_python3_helloworld) ... *** Starting uWSGI
2.0.31-debian (64bit) on [Mon Apr 13 23:30:43 2026] ***
  56s compiled with version: 15.2.0 on 09 March 2026 22:28:50
  56s os: Linux-6.12.74+deb13+1-s390x #1 SMP Debian 6.12.74-2 (2026-03-08)
  56s nodename: ci-103-5a0b77e7
  56s machine: s390x
  56s clock source: unix
  56s pcre jit disabled
  56s *** big endian arch detected ***
  56s detected number of CPU cores: 10
  56s current working directory:
/tmp/autopkgtest-lxc.dv57h8nf/downtmp/build.3pl/src
  56s detected binary path: /usr/bin/uwsgi-core
  56s *** WARNING: you are running uWSGI without its master process
manager ***
  56s your memory page size is 4096 bytes
  56s detected max file descriptor number: 1024
  56s lock engine: pthread robust mutexes
  56s thunder lock: disabled (you can enable it with --thunder-lock)
  56s uwsgi socket 0 bound to TCP address 127.0.0.1:8000 fd 3
  56s Python version: 3.13.12 (main, Feb  4 2026, 15:06:39) [GCC 15.2.0]
  56s Python main interpreter initialized at 0x3ffa01ac8c8
  56s python threads support enabled
  56s your server socket listen backlog is limited to 100 connections
  56s your mercy for graceful operations on workers is 60 seconds
  56s mapped 72920 bytes (71 KB) for 1 cores
  56s *** Operational MODE: single process ***
  56s WSGI app 0 (mountpoint='') ready in 0 seconds on interpreter
0x3ffa01ac8c8 pid: 1461 (default app)
  56s *** uWSGI is running in multiple interpreter mode ***
  56s spawned uWSGI worker 1 (and the only) (pid: 1461, cores: 1)
  56s [pid: 1461|app: 0|req: 1/1] 127.0.0.1 () {28 vars in 334 bytes}
[Mon Apr 13 23:30:43 2026] GET / => generated 11 bytes in 0 msecs
(HTTP/1.1 200) 1 headers in 44 bytes (1 switches on core 0)
  56s  56s ok
  56s test_rack_helloworld (__main__.UwsgiTest.test_rack_helloworld) ...
skipped "['rack'] plugins not available but required for this test case"
  56s test_static_expires (__main__.UwsgiTest.test_static_expires) ...
[uWSGI] getting INI configuration from /usr/src/uwsgi/t/static/config.ini
  56s [uwsgi-static] added mapping for /foobar => /usr/src/uwsgi/t/static/
  56s *** Starting uWSGI 2.0.31-debian (64bit) on [Mon Apr 13 23:30:43
2026] ***
  56s compiled with version: 15.2.0 on 09 March 2026 22:28:50
  56s os: Linux-6.12.74+deb13+1-s390x #1 SMP Debian 6.12.74-2 (2026-03-08)
  56s nodename: ci-103-5a0b77e7
  56s machine: s390x
  56s clock source: unix
  56s pcre jit disabled
  56s *** big endian arch detected ***
  56s detected number of CPU cores: 10
  56s current working directory:
/tmp/autopkgtest-lxc.dv57h8nf/downtmp/build.3pl/src
  56s detected binary path: /usr/bin/uwsgi-core
  56s *** WARNING: you are running uWSGI without its master process
manager ***
  56s your memory page size is 4096 bytes
  56s detected max file descriptor number: 1024
  56s building mime-types dictionary from file /etc/mime.types...1573
entry found
  56s lock engine: pthread robust mutexes
  56s thunder lock: disabled (you can enable it with --thunder-lock)
  56s uwsgi socket 0 bound to TCP address 127.0.0.1:8000 fd 3
  56s your server socket listen backlog is limited to 100 connections
  56s your mercy for graceful operations on workers is 60 seconds
  56s mapped 72920 bytes (71 KB) for 1 cores
  56s *** Operational MODE: single process ***
  56s *** no app loaded. going in full dynamic mode ***
  56s *** uWSGI is running in multiple interpreter mode ***
  56s spawned uWSGI worker 1 (and the only) (pid: 1462, cores: 1)
  56s  56s ok
  56s  56s
======================================================================
  56s ERROR: test_mountpoints (__main__.UwsgiTest.test_mountpoints)
  56s ----------------------------------------------------------------------
  56s Traceback (most recent call last):
  56s   File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py",
line 787, in urlopen
  56s     response = self._make_request(
  56s         conn,
  56s     ...<10 lines>...
  56s         **response_kw,
  56s     )
  56s   File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py",
line 534, in _make_request
  56s     response = conn.getresponse()
  56s   File "/usr/lib/python3/dist-packages/urllib3/connection.py",
line 571, in getresponse
  56s     httplib_response = super().getresponse()
  56s   File "/usr/lib/python3.13/http/client.py", line 1450, in getresponse
  56s     response.begin()
  56s     ~~~~~~~~~~~~~~^^
  56s   File "/usr/lib/python3.13/http/client.py", line 336, in begin
  56s     version, status, reason = self._read_status()
  56s                               ~~~~~~~~~~~~~~~~~^^
  56s   File "/usr/lib/python3.13/http/client.py", line 305, in _read_status
  56s     raise RemoteDisconnected("Remote end closed connection without"
  56s                              " response")
  56s http.client.RemoteDisconnected: Remote end closed connection
without response
  56s  56s During handling of the above exception, another exception
occurred:
  56s  56s Traceback (most recent call last):
  56s   File "/usr/lib/python3/dist-packages/requests/adapters.py", line
644, in send
  56s     resp = conn.urlopen(
  56s         method=request.method,
  56s     ...<9 lines>...
  56s         chunked=chunked,
  56s     )
  56s   File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py",
line 841, in urlopen
  56s     retries = retries.increment(
  56s         method, url, error=new_e, _pool=self,
_stacktrace=sys.exc_info()[2]
  56s     )
  56s   File "/usr/lib/python3/dist-packages/urllib3/util/retry.py",
line 490, in increment
  56s     raise reraise(type(error), error, _stacktrace)
  56s           ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  56s   File "/usr/lib/python3/dist-packages/urllib3/util/util.py", line
38, in reraise
  56s     raise value.with_traceback(tb)
  56s   File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py",
line 787, in urlopen
  56s     response = self._make_request(
  56s         conn,
  56s     ...<10 lines>...
  56s         **response_kw,
  56s     )
  56s   File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py",
line 534, in _make_request
  56s     response = conn.getresponse()
  56s   File "/usr/lib/python3/dist-packages/urllib3/connection.py",
line 571, in getresponse
  56s     httplib_response = super().getresponse()
  56s   File "/usr/lib/python3.13/http/client.py", line 1450, in getresponse
  56s     response.begin()
  56s     ~~~~~~~~~~~~~~^^
  56s   File "/usr/lib/python3.13/http/client.py", line 336, in begin
  56s     version, status, reason = self._read_status()
  56s                               ~~~~~~~~~~~~~~~~~^^
  56s   File "/usr/lib/python3.13/http/client.py", line 305, in _read_status
  56s     raise RemoteDisconnected("Remote end closed connection without"
  56s                              " response")
  56s urllib3.exceptions.ProtocolError: ('Connection aborted.',
RemoteDisconnected('Remote end closed connection without response'))
  56s  56s During handling of the above exception, another exception
occurred:
  56s  56s Traceback (most recent call last):
  56s   File "/usr/src/uwsgi/t/runner", line 134, in test_mountpoints
  56s     self.assert_GET_body(f"{mp}/" if not ends else f"{mp}"[:-1], mp)
  56s     ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  56s   File "/usr/src/uwsgi/t/runner", line 95, in assert_GET_body
  56s     with requests.get(f"http://{UWSGI_HTTP}{url_path}") as r:
  56s          ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  56s   File "/usr/lib/python3/dist-packages/requests/api.py", line 73,
in get
  56s     return request("get", url, params=params, **kwargs)
  56s   File "/usr/lib/python3/dist-packages/requests/api.py", line 59,
in request
  56s     return session.request(method=method, url=url, **kwargs)
  56s            ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  56s   File "/usr/lib/python3/dist-packages/requests/sessions.py", line
589, in request
  56s     resp = self.send(prep, **send_kwargs)
  56s   File "/usr/lib/python3/dist-packages/requests/sessions.py", line
703, in send
  56s     r = adapter.send(request, **kwargs)
  56s   File "/usr/lib/python3/dist-packages/requests/adapters.py", line
659, in send
  56s     raise ConnectionError(err, request=request)
  56s requests.exceptions.ConnectionError: ('Connection aborted.',
RemoteDisconnected('Remote end closed connection without response'))
  56s  56s
----------------------------------------------------------------------
  56s Ran 9 tests in 0.329s
  56s  56s FAILED (errors=1, skipped=6)
  57s autopkgtest [23:30:44]: test integration

#1133977#14
Date:
2026-04-16 07:58:59 UTC
From:
To:
Hi,

This is not a regression but rather the side-effect of test_mountpoints now being
enabled.

I can reproduce the segfault on s390x with both uwsgi-plugin-python from the
archive and a binary rebuild of src:uwsgi-plugin-python .

If I rebuild uwsgi-plugin-python and run:

    (sid_s390x-dchroot)niol@zelenka:~/uwsgi-plugin-python$ gdb --args uwsgi --plugin-dir . --plugin python3 --http-socket 127.0.0.1:8000 python/manage_script_name/manage_script_name_test.ini

And in another terminal do what the test script does:

    niol@zelenka:~$ wget -qO- http://localhost:8000/foo/resource
    /fooniol@zelenka:~$ wget -qO- http://localhost:8000/foobis/resource
    /foobis/niol@zelenka:~$ wget -qO- http://localhost:8000/footris/resource
    /footris/niol@zelenka:~$ wget -qO- http://127.0.0.1:8000/footris/resource
    /footris/niol@zelenka:~$ wget -qO- http://127.0.0.1:8000/foobis/resource
    /foobis/niol@zelenka:~$ wget -qO- http://127.0.0.1:8000/fooanything
    niol@zelenka:~$ wget -qO- http://127.0.0.1:8000/foobisbis/
    niol@zelenka:~$ wget -qO- http://127.0.0.1:8000/foofighters

I don't get the SEGFAULT.

So I need to spend more time on this to reproduce.

Thanks,

Alex

#1133977#19
Date:
2026-04-16 11:30:11 UTC
From:
To:
Hi,

The request triggering the SEGFAULT without gdb is:

    $ wget -qO- http://127.0.0.1:8000/footris

With gdb the SEGFAULT does not occur.

Thanks,

Alex

#1133977#24
Date:
2026-04-17 04:59:39 UTC
From:
To:
Hi,

valgrind --leak-check=yes:

HEAP SUMMARY:
    in use at exit: 697,560 bytes in 537 blocks
  total heap usage: 7,250 allocs, 6,713 frees, 7,797,903 bytes allocated

8 bytes in 1 blocks are definitely lost in loss record 8 of 347
   at 0x492A46E: malloc (vg_replace_malloc.c:446)
   by 0x4030B45: uwsgi_malloc (in /usr/bin/uwsgi-core)
   by 0x4077D97: uwsgi_concat2 (in /usr/bin/uwsgi-core)
   by 0x406C067: uwsgi_load_plugin (in /usr/bin/uwsgi-core)
   by 0x4085D15: uwsgi_opt_load_plugin (in /usr/bin/uwsgi-core)
   by 0x4060CED: add_exported_option_do (in /usr/bin/uwsgi-core)
   by 0x40638F3: uwsgi_commandline_config (in /usr/bin/uwsgi-core)
   by 0x4087F03: uwsgi_setup (in /usr/bin/uwsgi-core)
   by 0x402C569: main (in /usr/bin/uwsgi-core)

33 (9 direct, 24 indirect) bytes in 1 blocks are definitely lost in loss record 178 of 347
   at 0x4931B40: calloc (vg_replace_malloc.c:1675)
   by 0x4034B79: uwsgi_calloc (in /usr/bin/uwsgi-core)
   by 0x59A5A25: init_pyargv (pyutils.c:353)
   by 0x59A3D49: uwsgi_python_preinit_apps (python_plugin.c:1101)
   by 0x4086EC3: uwsgi_start (in /usr/bin/uwsgi-core)
   by 0x4088D35: uwsgi_setup (in /usr/bin/uwsgi-core)
   by 0x402C569: main (in /usr/bin/uwsgi-core)

57 bytes in 1 blocks are possibly lost in loss record 211 of 347
   at 0x492A46E: malloc (vg_replace_malloc.c:446)
   by 0x4030B45: uwsgi_malloc (in /usr/bin/uwsgi-core)
   by 0x4077D97: uwsgi_concat2 (in /usr/bin/uwsgi-core)
   by 0x4083B13: ??? (in /usr/bin/uwsgi-core)
   by 0x4084223: uwsgi_opt_load (in /usr/bin/uwsgi-core)
   by 0x40639AF: uwsgi_commandline_config (in /usr/bin/uwsgi-core)
   by 0x4087F03: uwsgi_setup (in /usr/bin/uwsgi-core)
   by 0x402C569: main (in /usr/bin/uwsgi-core)

66 (18 direct, 48 indirect) bytes in 2 blocks are definitely lost in loss record 213 of 347
   at 0x4931B40: calloc (vg_replace_malloc.c:1675)
   by 0x4034B79: uwsgi_calloc (in /usr/bin/uwsgi-core)
   by 0x59A5A25: init_pyargv (pyutils.c:353)
   by 0x59A69BB: init_uwsgi_app (pyloader.c:182)
   by 0x59A1A0D: uwsgi_python_mount_app (python_plugin.c:973)
   by 0x4086039: uwsgi_init_all_apps (in /usr/bin/uwsgi-core)
   by 0x4087723: uwsgi_start (in /usr/bin/uwsgi-core)
   by 0x4088D35: uwsgi_setup (in /usr/bin/uwsgi-core)
   by 0x402C569: main (in /usr/bin/uwsgi-core)

151 bytes in 1 blocks are definitely lost in loss record 261 of 347
   at 0x492A46E: malloc (vg_replace_malloc.c:446)
   by 0x4030B45: uwsgi_malloc (in /usr/bin/uwsgi-core)
   by 0x4058B29: uwsgi_simple_file_read (in /usr/bin/uwsgi-core)
   by 0x59A2AF7: uwsgi_pyimport_by_filename (python_plugin.c:500)
   by 0x59A6EFB: uwsgi_file_loader (pyloader.c:600)
   by 0x59A5F2D: init_uwsgi_app (pyloader.c:208)
   by 0x59A4149: uwsgi_python_init_apps (python_plugin.c:1253)
   by 0x4085F3B: uwsgi_init_all_apps (in /usr/bin/uwsgi-core)
   by 0x4087723: uwsgi_start (in /usr/bin/uwsgi-core)
   by 0x4088D35: uwsgi_setup (in /usr/bin/uwsgi-core)
   by 0x402C569: main (in /usr/bin/uwsgi-core)

172 bytes in 1 blocks are definitely lost in loss record 264 of 347
   at 0x4931B40: calloc (vg_replace_malloc.c:1675)
   by 0x4034B79: uwsgi_calloc (in /usr/bin/uwsgi-core)
   by 0x59A133B: uwsgi_python_init (python_plugin.c:276)
   by 0x40867E7: uwsgi_start (in /usr/bin/uwsgi-core)
   by 0x4088D35: uwsgi_setup (in /usr/bin/uwsgi-core)
   by 0x402C569: main (in /usr/bin/uwsgi-core)

408 bytes in 1 blocks are definitely lost in loss record 274 of 347
   at 0x492A46E: malloc (vg_replace_malloc.c:446)
   by 0x4030B45: uwsgi_malloc (in /usr/bin/uwsgi-core)
   by 0x59A2025: uwsgi_python_fixup (python_plugin.c:1910)
   by 0x408900B: uwsgi_worker_run (in /usr/bin/uwsgi-core)
   by 0x40898A3: uwsgi_run (in /usr/bin/uwsgi-core)
   by 0x402C56F: main (in /usr/bin/uwsgi-core)

423 bytes in 1 blocks are possibly lost in loss record 275 of 347
   at 0x492A46E: malloc (vg_replace_malloc.c:446)
   by 0x4030B45: uwsgi_malloc (in /usr/bin/uwsgi-core)
   by 0x4078227: uwsgi_concat3n (in /usr/bin/uwsgi-core)
   by 0x40317C9: magic_sub (in /usr/bin/uwsgi-core)
   by 0x405A903: uwsgi_open_and_read (in /usr/bin/uwsgi-core)
   by 0x4079371: uwsgi_ini_config (in /usr/bin/uwsgi-core)
   by 0x40841F5: uwsgi_opt_load (in /usr/bin/uwsgi-core)
   by 0x40639AF: uwsgi_commandline_config (in /usr/bin/uwsgi-core)
   by 0x4087F03: uwsgi_setup (in /usr/bin/uwsgi-core)
   by 0x402C569: main (in /usr/bin/uwsgi-core)

453 bytes in 3 blocks are definitely lost in loss record 276 of 347
   at 0x492A46E: malloc (vg_replace_malloc.c:446)
   by 0x4030B45: uwsgi_malloc (in /usr/bin/uwsgi-core)
   by 0x4058B29: uwsgi_simple_file_read (in /usr/bin/uwsgi-core)
   by 0x59A2AF7: uwsgi_pyimport_by_filename (python_plugin.c:500)
   by 0x59A6EFB: uwsgi_file_loader (pyloader.c:600)
   by 0x59A7421: uwsgi_mount_loader (pyloader.c:528)
   by 0x59A5F2D: init_uwsgi_app (pyloader.c:208)
   by 0x59A1A0D: uwsgi_python_mount_app (python_plugin.c:973)
   by 0x4086039: uwsgi_init_all_apps (in /usr/bin/uwsgi-core)
   by 0x4087723: uwsgi_start (in /usr/bin/uwsgi-core)
   by 0x4088D35: uwsgi_setup (in /usr/bin/uwsgi-core)
   by 0x402C569: main (in /usr/bin/uwsgi-core)

LEAK SUMMARY:
   definitely lost: 1,219 bytes in 10 blocks
   indirectly lost: 72 bytes in 3 blocks
     possibly lost: 480 bytes in 2 blocks
   still reachable: 695,789 bytes in 522 blocks
        suppressed: 0 bytes in 0 blocks
Reachable blocks (those to which a pointer was found) are not shown.
To see them, rerun with: --leak-check=full --show-leak-kinds=all

#1133977#29
Date:
2026-05-27 21:57:29 UTC
From:
To:
Please find a patch attached that fixes this.
When you are adding this please remove 2004_disable_test_mountpoints_s390x.patch

#1133977#36
Date:
2026-05-28 08:40:23 UTC
From:
To:
Hi,

Thanks a *lot* for looking at this, I was clueless about how to debug this
further and was planning on going all in on printf debugging. I wonder
how you got the root cause of this.

Anyway, fixed version awaiting sponsorship on mentors.

Thanks again!

Alex

#1133977#41
Date:
2026-06-01 09:22:09 UTC
From:
To:
Hi all,

I also was looking into this last week. Came to the same conclusions.
I tested out Bastian's patch on my s390x machine and it does work.

I can also see a Pull request: https://github.com/unbit/uwsgi/pull/2774

Thanks & Regards,
Pranav