unbit / uwsgi

uWSGI application server container
http://projects.unbit.it/uwsgi
Other
3.45k stars 688 forks source link

UWSGI 2.0.25: static-expires-uri option does not work with libpcre2 #2634

Closed sandre35 closed 4 months ago

sandre35 commented 5 months ago

Hi there,

The issue happens since the release of uswgi 2.0.25 (using Python3.10). Here is the extract log of uwsgi installation below, using libpcre2:

(grocker-bluedjango) sandre35@sandre35-ThinkPad-T490s:~/dev_repo/grocker-bluedjango$ pip install --force --no-cache --upgrade uwsgi -vvv
[...]
Collecting uwsgi
  Created temporary directory: /tmp/pip-unpack-swryrsqx
  Starting new HTTPS connection (1): files.pythonhosted.org:443
  https://files.pythonhosted.org:443 "GET /packages/52/9a/ab43cf8fb4847a6fda585beb1374deba0583660fa05c882a498784b2fc77/uwsgi-2.0.25.1.tar.gz HTTP/1.1" 200 812004
  Downloading uwsgi-2.0.25.1.tar.gz (812 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 812.0/812.0 kB 10.0 MB/s eta 0:00:00
  Added uwsgi from https://files.pythonhosted.org/packages/52/9a/ab43cf8fb4847a6fda585beb1374deba0583660fa05c882a498784b2fc77/uwsgi-2.0.25.1.tar.gz to build tracker '/tmp/pip-build-tracker-ptxtyksa'
  Running setup.py (path:/tmp/pip-install-4y7b7qr3/uwsgi_012f30eae2f8452dafa662504a9e5c08/setup.py) egg_info for package uwsgi
  Created temporary directory: /tmp/pip-pip-egg-info-mabvle24
  Running command python setup.py egg_info
  /home/sandre35/.virtualenvs/grocker-bluedjango/lib/python3.10/site-packages/setuptools/_distutils/dist.py:266: UserWarning: Unknown distribution option: 'descriptions'
    warnings.warn(msg)
  running egg_info
  creating /tmp/pip-pip-egg-info-mabvle24/uWSGI.egg-info
  writing /tmp/pip-pip-egg-info-mabvle24/uWSGI.egg-info/PKG-INFO
  writing dependency_links to /tmp/pip-pip-egg-info-mabvle24/uWSGI.egg-info/dependency_links.txt
  writing top-level names to /tmp/pip-pip-egg-info-mabvle24/uWSGI.egg-info/top_level.txt
  writing manifest file '/tmp/pip-pip-egg-info-mabvle24/uWSGI.egg-info/SOURCES.txt'
  reading manifest file '/tmp/pip-pip-egg-info-mabvle24/uWSGI.egg-info/SOURCES.txt'
  adding license file 'LICENSE'
  writing manifest file '/tmp/pip-pip-egg-info-mabvle24/uWSGI.egg-info/SOURCES.txt'
  Preparing metadata (setup.py) ... done
  Source in /tmp/pip-install-4y7b7qr3/uwsgi_012f30eae2f8452dafa662504a9e5c08 has version 2.0.25.1, which satisfies requirement uwsgi from https://files.pythonhosted.org/packages/52/9a/ab43cf8fb4847a6fda585beb1374deba0583660fa05c882a498784b2fc77/uwsgi-2.0.25.1.tar.gz
  Removed uwsgi from https://files.pythonhosted.org/packages/52/9a/ab43cf8fb4847a6fda585beb1374deba0583660fa05c882a498784b2fc77/uwsgi-2.0.25.1.tar.gz from build tracker '/tmp/pip-build-tracker-ptxtyksa'
Created temporary directory: /tmp/pip-unpack-7btes9y7
Building wheels for collected packages: uwsgi
  Created temporary directory: /tmp/pip-wheel-ivdfqdou
  Building wheel for uwsgi (setup.py) ...   Destination directory: /tmp/pip-wheel-ivdfqdou
  Running command python setup.py bdist_wheel
  /home/sandre35/.virtualenvs/grocker-bluedjango/lib/python3.10/site-packages/setuptools/_distutils/dist.py:266: UserWarning: Unknown distribution option: 'descriptions'
    warnings.warn(msg)
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib
  copying uwsgidecorators.py -> build/lib
  /home/sandre35/.virtualenvs/grocker-bluedjango/lib/python3.10/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
  !!

          ********************************************************************************
          Please avoid running ``setup.py`` directly.
          Instead, use pypa/build, pypa/installer or other
          standards-based tools.

          See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
          ********************************************************************************

  !!
    self.initialize_options()
  installing to build/bdist.linux-x86_64/wheel
  running install
  using profile: buildconf/default.ini
  detected include path: ['/usr/lib/gcc/x86_64-linux-gnu/11/include', '/usr/local/include', '/usr/include/x86_64-linux-gnu', '/usr/include']
  Patching "bin_name" to properly install_scripts dir
  detected CPU cores: 8
  configured CFLAGS: -O2 -I. -Wall -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wformat-signedness -DUWSGI_HAS_IFADDRS -DUWSGI_ZLIB -DUWSGI_LOCK_USE_MUTEX -DUWSGI_EVENT_USE_EPOLL -DUWSGI_EVENT_TIMER_USE_TIMERFD -DUWSGI_EVENT_FILEMONITOR_USE_INOTIFY  -DUWSGI_PCRE2 -DUWSGI_ROUTING -DUWSGI_UUID -DUWSGI_VERSION="\"2.0.25.1\"" -DUWSGI_VERSION_BASE="2" -DUWSGI_VERSION_MAJOR="0" -DUWSGI_VERSION_MINOR="25" -DUWSGI_VERSION_REVISION="1" -DUWSGI_VERSION_CUSTOM="\"\"" -DUWSGI_YAML -DUWSGI_SSL -I/usr/include/libxml2 -DUWSGI_XML -DUWSGI_XML_LIBXML2 -DUWSGI_PLUGIN_DIR="\".\"" -DUWSGI_DECLARE_EMBEDDED_PLUGINS="UDEP(python);UDEP(gevent);UDEP(ping);UDEP(cache);UDEP(nagios);UDEP(rrdtool);UDEP(carbon);UDEP(rpc);UDEP(corerouter);UDEP(fastrouter);UDEP(http);UDEP(ugreen);UDEP(signal);UDEP(syslog);UDEP(rsyslog);UDEP(logsocket);UDEP(router_uwsgi);UDEP(router_redirect);UDEP(router_basicauth);UDEP(zergpool);UDEP(redislog);UDEP(mongodblog);UDEP(router_rewrite);UDEP(router_http);UDEP(logfile);UDEP(router_cache);UDEP(rawrouter);UDEP(router_static);UDEP(sslrouter);UDEP(spooler);UDEP(cheaper_busyness);UDEP(symcall);UDEP(transformation_tofile);UDEP(transformation_gzip);UDEP(transformation_chunked);UDEP(transformation_offload);UDEP(router_memcached);UDEP(router_redis);UDEP(router_hash);UDEP(router_expires);UDEP(router_metrics);UDEP(transformation_template);UDEP(stats_pusher_socket);" -DUWSGI_LOAD_EMBEDDED_PLUGINS="ULEP(python);ULEP(gevent);ULEP(ping);ULEP(cache);ULEP(nagios);ULEP(rrdtool);ULEP(carbon);ULEP(rpc);ULEP(corerouter);ULEP(fastrouter);ULEP(http);ULEP(ugreen);ULEP(signal);ULEP(syslog);ULEP(rsyslog);ULEP(logsocket);ULEP(router_uwsgi);ULEP(router_redirect);ULEP(router_basicauth);ULEP(zergpool);ULEP(redislog);ULEP(mongodblog);ULEP(router_rewrite);ULEP(router_http);ULEP(logfile);ULEP(router_cache);ULEP(rawrouter);ULEP(router_static);ULEP(sslrouter);ULEP(spooler);ULEP(cheaper_busyness);ULEP(symcall);ULEP(transformation_tofile);ULEP(transformation_gzip);ULEP(transformation_chunked);ULEP(transformation_offload);ULEP(router_memcached);ULEP(router_redis);ULEP(router_hash);ULEP(router_expires);ULEP(router_metrics);ULEP(transformation_template);ULEP(stats_pusher_socket);"
  *** uWSGI compiling server core ***
  [thread 1][x86_64-linux-gnu-gcc] core/utils.o
  [thread 5][x86_64-linux-gnu-gcc] core/protocol.o
  [thread 6][x86_64-linux-gnu-gcc] core/socket.o
  [thread 2][x86_64-linux-gnu-gcc] core/logging.o
  [thread 4][x86_64-linux-gnu-gcc] core/master.o
  [thread 3][x86_64-linux-gnu-gcc] core/master_utils.o
  [thread 7][x86_64-linux-gnu-gcc] core/emperor.o
  [thread 0][x86_64-linux-gnu-gcc] core/notify.o
  [thread 0][x86_64-linux-gnu-gcc] core/mule.o
  [thread 5][x86_64-linux-gnu-gcc] core/subscription.o
  [thread 4][x86_64-linux-gnu-gcc] core/stats.o
  [thread 0][x86_64-linux-gnu-gcc] core/sendfile.o
  [thread 6][x86_64-linux-gnu-gcc] core/async.o
  [thread 2][x86_64-linux-gnu-gcc] core/master_checks.o
  [thread 3][x86_64-linux-gnu-gcc] core/fifo.o
  [thread 0][x86_64-linux-gnu-gcc] core/offload.o
  [thread 7][x86_64-linux-gnu-gcc] core/io.o
  [thread 4][x86_64-linux-gnu-gcc] core/static.o
  [thread 6][x86_64-linux-gnu-gcc] core/websockets.o
  [thread 5][x86_64-linux-gnu-gcc] core/spooler.o
  [thread 3][x86_64-linux-gnu-gcc] core/snmp.o
  [thread 2][x86_64-linux-gnu-gcc] core/exceptions.o
  [thread 0][x86_64-linux-gnu-gcc] core/config.o
  [thread 3][x86_64-linux-gnu-gcc] core/setup_utils.o
  [thread 1][x86_64-linux-gnu-gcc] core/clock.o
  [thread 6][x86_64-linux-gnu-gcc] core/init.o
  [thread 4][x86_64-linux-gnu-gcc] core/buffer.o
  [thread 5][x86_64-linux-gnu-gcc] core/reader.o
  [thread 2][x86_64-linux-gnu-gcc] core/writer.o
  [thread 7][x86_64-linux-gnu-gcc] core/alarm.o
  [thread 3][x86_64-linux-gnu-gcc] core/cron.o
  [thread 1][x86_64-linux-gnu-gcc] core/hooks.o
  [thread 0][x86_64-linux-gnu-gcc] core/plugins.o
  [thread 4][x86_64-linux-gnu-gcc] core/lock.o
  [thread 6][x86_64-linux-gnu-gcc] core/cache.o
  [thread 5][x86_64-linux-gnu-gcc] core/daemons.o
  [thread 7][x86_64-linux-gnu-gcc] core/errors.o
  [thread 3][x86_64-linux-gnu-gcc] core/hash.o
  [thread 2][x86_64-linux-gnu-gcc] core/master_events.o
  [thread 1][x86_64-linux-gnu-gcc] core/chunked.o
  [thread 0][x86_64-linux-gnu-gcc] core/queue.o
  [thread 4][x86_64-linux-gnu-gcc] core/event.o
  [thread 3][x86_64-linux-gnu-gcc] core/signal.o
  [thread 7][x86_64-linux-gnu-gcc] core/strings.o
  [thread 2][x86_64-linux-gnu-gcc] core/progress.o
  [thread 5][x86_64-linux-gnu-gcc] core/timebomb.o
  [thread 1][x86_64-linux-gnu-gcc] core/ini.o
  [thread 0][x86_64-linux-gnu-gcc] core/fsmon.o
  [thread 4][x86_64-linux-gnu-gcc] core/mount.o
  [thread 2][x86_64-linux-gnu-gcc] core/metrics.o
  [thread 5][x86_64-linux-gnu-gcc] core/plugins_builder.o
  [thread 3][x86_64-linux-gnu-gcc] core/sharedarea.o
  [thread 7][x86_64-linux-gnu-gcc] core/rpc.o
  [thread 1][x86_64-linux-gnu-gcc] core/gateway.o
  [thread 6][x86_64-linux-gnu-gcc] core/loop.o
  [thread 0][x86_64-linux-gnu-gcc] core/cookie.o
  [thread 5][x86_64-linux-gnu-gcc] core/querystring.o
  [thread 4][x86_64-linux-gnu-gcc] core/rb_timers.o
  [thread 7][x86_64-linux-gnu-gcc] core/transformations.o
  [thread 1][x86_64-linux-gnu-gcc] core/uwsgi.o
  [thread 5][x86_64-linux-gnu-gcc] proto/base.o
  [thread 3][x86_64-linux-gnu-gcc] proto/uwsgi.o
  [thread 6][x86_64-linux-gnu-gcc] proto/http.o
  [thread 0][x86_64-linux-gnu-gcc] proto/fastcgi.o
  [thread 4][x86_64-linux-gnu-gcc] proto/scgi.o
  [thread 2][x86_64-linux-gnu-gcc] proto/puwsgi.o
  [thread 7][x86_64-linux-gnu-gcc] lib/linux_ns.o
  [thread 3][x86_64-linux-gnu-gcc] core/zlib.o
  [thread 4][x86_64-linux-gnu-gcc] core/regexp.o
  [thread 5][x86_64-linux-gnu-gcc] core/routing.o
  [thread 0][x86_64-linux-gnu-gcc] core/yaml.o
  [thread 2][x86_64-linux-gnu-gcc] core/ssl.o
  [thread 6][x86_64-linux-gnu-gcc] core/legion.o
  [thread 7][x86_64-linux-gnu-gcc] core/xmlconf.o
  [thread 3][x86_64-linux-gnu-gcc] core/dot_h.o
  [thread 4][x86_64-linux-gnu-gcc] core/config_py.o
  *** uWSGI compiling embedded plugins ***
  [thread 3][x86_64-linux-gnu-gcc] plugins/python/python_plugin.o
  [thread 4][x86_64-linux-gnu-gcc] plugins/python/pyutils.o
  core/ssl.c: In function ‘uwsgi_ssl_new_server_context’:
  core/ssl.c:268:17: warning: ‘PEM_read_bio_DHparams’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
    268 |                 DH *dh = PEM_read_bio_DHparams(bio, NULL, NULL, NULL);
        |                 ^~
  In file included from /usr/include/openssl/ssl.h:36,
                   from ./uwsgi.h:357,
                   from core/ssl.c:1:
  /usr/include/openssl/pem.h:469:1: note: declared here
    469 | DECLARE_PEM_rw_attr(OSSL_DEPRECATEDIN_3_0, DHparams, DH)
        | ^~~~~~~~~~~~~~~~~~~
  core/ssl.c:273:25: warning: ‘DH_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
    273 |                         DH_free(dh);
        |                         ^~~~~~~
  In file included from /usr/include/openssl/dsa.h:51,
                   from /usr/include/openssl/x509.h:37,
                   from /usr/include/openssl/ssl.h:31,
                   from ./uwsgi.h:357,
                   from core/ssl.c:1:
  /usr/include/openssl/dh.h:204:28: note: declared here
    204 | OSSL_DEPRECATEDIN_3_0 void DH_free(DH *dh);
        |                            ^~~~~~~
  core/ssl.c:279:9: warning: ‘EC_KEY_new_by_curve_name’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
    279 |         EC_KEY *ecdh = EC_KEY_new_by_curve_name(NID_X9_62_prime256v1);
        |         ^~~~~~
  In file included from /usr/include/openssl/x509.h:33,
                   from /usr/include/openssl/ssl.h:31,
                   from ./uwsgi.h:357,
                   from core/ssl.c:1:
  /usr/include/openssl/ec.h:998:31: note: declared here
    998 | OSSL_DEPRECATEDIN_3_0 EC_KEY *EC_KEY_new_by_curve_name(int nid);
        |                               ^~~~~~~~~~~~~~~~~~~~~~~~
  core/ssl.c:283:17: warning: ‘EC_KEY_free’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
    283 |                 EC_KEY_free(ecdh);
        |                 ^~~~~~~~~~~
  In file included from /usr/include/openssl/x509.h:33,
                   from /usr/include/openssl/ssl.h:31,
                   from ./uwsgi.h:357,
                   from core/ssl.c:1:
  /usr/include/openssl/ec.h:1003:28: note: declared here
   1003 | OSSL_DEPRECATEDIN_3_0 void EC_KEY_free(EC_KEY *key);
        |                            ^~~~~~~~~~~
  core/ssl.c: In function ‘uwsgi_sha1’:
  core/ssl.c:563:9: warning: ‘SHA1_Init’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
    563 |         SHA1_Init(&sha);
        |         ^~~~~~~~~
  In file included from /usr/include/openssl/x509.h:41,
                   from /usr/include/openssl/ssl.h:31,
                   from ./uwsgi.h:357,
                   from core/ssl.c:1:
  /usr/include/openssl/sha.h:49:27: note: declared here
     49 | OSSL_DEPRECATEDIN_3_0 int SHA1_Init(SHA_CTX *c);
        |                           ^~~~~~~~~
  core/ssl.c:564:9: warning: ‘SHA1_Update’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
    564 |         SHA1_Update(&sha, src, len);
        |         ^~~~~~~~~~~
  In file included from /usr/include/openssl/x509.h:41,
                   from /usr/include/openssl/ssl.h:31,
                   from ./uwsgi.h:357,
                   from core/ssl.c:1:
  /usr/include/openssl/sha.h:50:27: note: declared here
     50 | OSSL_DEPRECATEDIN_3_0 int SHA1_Update(SHA_CTX *c, const void *data, size_t len);
        |                           ^~~~~~~~~~~
  core/ssl.c:565:9: warning: ‘SHA1_Final’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
    565 |         SHA1_Final((unsigned char *)dst, &sha);
        |         ^~~~~~~~~~
  In file included from /usr/include/openssl/x509.h:41,
                   from /usr/include/openssl/ssl.h:31,
                   from ./uwsgi.h:357,
                   from core/ssl.c:1:
  /usr/include/openssl/sha.h:51:27: note: declared here
     51 | OSSL_DEPRECATEDIN_3_0 int SHA1_Final(unsigned char *md, SHA_CTX *c);
        |                           ^~~~~~~~~~
  core/ssl.c: In function ‘uwsgi_md5’:
  core/ssl.c:571:9: warning: ‘MD5_Init’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
    571 |         MD5_Init(&md5);
        |         ^~~~~~~~
  In file included from core/ssl.c:4:
  /usr/include/openssl/md5.h:49:27: note: declared here
     49 | OSSL_DEPRECATEDIN_3_0 int MD5_Init(MD5_CTX *c);
        |                           ^~~~~~~~
  core/ssl.c:572:9: warning: ‘MD5_Update’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
    572 |         MD5_Update(&md5, src, len);
        |         ^~~~~~~~~~
  In file included from core/ssl.c:4:
  /usr/include/openssl/md5.h:50:27: note: declared here
     50 | OSSL_DEPRECATEDIN_3_0 int MD5_Update(MD5_CTX *c, const void *data, size_t len);
        |                           ^~~~~~~~~~
  core/ssl.c:573:9: warning: ‘MD5_Final’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
    573 |         MD5_Final((unsigned char *)dst, &md5);
        |         ^~~~~~~~~
  In file included from core/ssl.c:4:
  /usr/include/openssl/md5.h:51:27: note: declared here
     51 | OSSL_DEPRECATEDIN_3_0 int MD5_Final(unsigned char *md, MD5_CTX *c);
        |                           ^~~~~~~~~
  core/ssl.c: In function ‘uwsgi_sha1_2n’:
  core/ssl.c:579:9: warning: ‘SHA1_Init’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
    579 |         SHA1_Init(&sha);
        |         ^~~~~~~~~
  In file included from /usr/include/openssl/x509.h:41,
                   from /usr/include/openssl/ssl.h:31,
                   from ./uwsgi.h:357,
                   from core/ssl.c:1:
  /usr/include/openssl/sha.h:49:27: note: declared here
     49 | OSSL_DEPRECATEDIN_3_0 int SHA1_Init(SHA_CTX *c);
        |                           ^~~~~~~~~
  core/ssl.c:580:9: warning: ‘SHA1_Update’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
    580 |         SHA1_Update(&sha, s1, len1);
        |         ^~~~~~~~~~~
  In file included from /usr/include/openssl/x509.h:41,
                   from /usr/include/openssl/ssl.h:31,
                   from ./uwsgi.h:357,
                   from core/ssl.c:1:
  /usr/include/openssl/sha.h:50:27: note: declared here
     50 | OSSL_DEPRECATEDIN_3_0 int SHA1_Update(SHA_CTX *c, const void *data, size_t len);
        |                           ^~~~~~~~~~~
  core/ssl.c:581:9: warning: ‘SHA1_Update’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
    581 |         SHA1_Update(&sha, s2, len2);
        |         ^~~~~~~~~~~
  In file included from /usr/include/openssl/x509.h:41,
                   from /usr/include/openssl/ssl.h:31,
                   from ./uwsgi.h:357,
                   from core/ssl.c:1:
  /usr/include/openssl/sha.h:50:27: note: declared here
     50 | OSSL_DEPRECATEDIN_3_0 int SHA1_Update(SHA_CTX *c, const void *data, size_t len);
        |                           ^~~~~~~~~~~
  core/ssl.c:582:9: warning: ‘SHA1_Final’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
    582 |         SHA1_Final((unsigned char *)dst, &sha);
        |         ^~~~~~~~~~
  In file included from /usr/include/openssl/x509.h:41,
                   from /usr/include/openssl/ssl.h:31,
                   from ./uwsgi.h:357,
                   from core/ssl.c:1:
  /usr/include/openssl/sha.h:51:27: note: declared here
     51 | OSSL_DEPRECATEDIN_3_0 int SHA1_Final(unsigned char *md, SHA_CTX *c);
        |                           ^~~~~~~~~~
  [thread 0][x86_64-linux-gnu-gcc] plugins/python/pyloader.o
  [thread 7][x86_64-linux-gnu-gcc] plugins/python/wsgi_handlers.o
  [thread 2][x86_64-linux-gnu-gcc] plugins/python/wsgi_headers.o
  [thread 4][x86_64-linux-gnu-gcc] plugins/python/wsgi_subhandler.o
  [thread 6][x86_64-linux-gnu-gcc] plugins/python/web3_subhandler.o
  [thread 0][x86_64-linux-gnu-gcc] plugins/python/pump_subhandler.o
  [thread 2][x86_64-linux-gnu-gcc] plugins/python/gil.o
  [thread 7][x86_64-linux-gnu-gcc] plugins/python/uwsgi_pymodule.o
  [thread 5][x86_64-linux-gnu-gcc] plugins/python/profiler.o
  [thread 3][x86_64-linux-gnu-gcc] plugins/python/symimporter.o
  [thread 4][x86_64-linux-gnu-gcc] plugins/python/tracebacker.o
  [thread 6][x86_64-linux-gnu-gcc] plugins/python/raw.o
  [thread 2][x86_64-linux-gnu-gcc] plugins/gevent/gevent.o
  [thread 0][x86_64-linux-gnu-gcc] plugins/gevent/hooks.o
  [thread 1][x86_64-linux-gnu-gcc] plugins/ping/ping_plugin.o
  [thread 5][x86_64-linux-gnu-gcc] plugins/cache/cache.o
  [thread 6][x86_64-linux-gnu-gcc] plugins/nagios/nagios.o
  [thread 4][x86_64-linux-gnu-gcc] plugins/rrdtool/rrdtool.o
  [thread 3][x86_64-linux-gnu-gcc] plugins/carbon/carbon.o
  [thread 1][x86_64-linux-gnu-gcc] plugins/rpc/rpc_plugin.o
  [thread 2][x86_64-linux-gnu-gcc] plugins/corerouter/cr_common.o
  [thread 5][x86_64-linux-gnu-gcc] plugins/corerouter/cr_map.o
  [thread 0][x86_64-linux-gnu-gcc] plugins/corerouter/corerouter.o
  [thread 6][x86_64-linux-gnu-gcc] plugins/fastrouter/fastrouter.o
  [thread 4][x86_64-linux-gnu-gcc] plugins/http/http.o
  [thread 3][x86_64-linux-gnu-gcc] plugins/http/keepalive.o
  [thread 5][x86_64-linux-gnu-gcc] plugins/http/https.o
  [thread 2][x86_64-linux-gnu-gcc] plugins/http/spdy3.o
  [thread 1][x86_64-linux-gnu-gcc] plugins/ugreen/ugreen.o
  [thread 6][x86_64-linux-gnu-gcc] plugins/signal/signal_plugin.o
  [thread 3][x86_64-linux-gnu-gcc] plugins/syslog/syslog_plugin.o
  [thread 0][x86_64-linux-gnu-gcc] plugins/rsyslog/rsyslog_plugin.o
  [thread 1][x86_64-linux-gnu-gcc] plugins/logsocket/logsocket_plugin.o
  [thread 5][x86_64-linux-gnu-gcc] plugins/router_uwsgi/router_uwsgi.o
  [thread 6][x86_64-linux-gnu-gcc] plugins/router_redirect/router_redirect.o
  [thread 4][x86_64-linux-gnu-gcc] plugins/router_basicauth/router_basicauth.o
  [thread 3][x86_64-linux-gnu-gcc] plugins/zergpool/zergpool.o
  [thread 2][x86_64-linux-gnu-gcc] plugins/redislog/redislog_plugin.o
  [thread 7][x86_64-linux-gnu-gcc] plugins/mongodblog/mongodblog_plugin.o
  [thread 1][x86_64-linux-gnu-gcc] plugins/router_rewrite/router_rewrite.o
  [thread 0][x86_64-linux-gnu-gcc] plugins/router_http/router_http.o
  [thread 5][x86_64-linux-gnu-gcc] plugins/logfile/logfile.o
  [thread 6][x86_64-linux-gnu-gcc] plugins/router_cache/router_cache.o
  [thread 4][x86_64-linux-gnu-gcc] plugins/rawrouter/rawrouter.o
  [thread 7][x86_64-linux-gnu-gcc] plugins/router_static/router_static.o
  [thread 3][x86_64-linux-gnu-gcc] plugins/sslrouter/sslrouter.o
  [thread 2][x86_64-linux-gnu-gcc] plugins/spooler/spooler_plugin.o
  [thread 1][x86_64-linux-gnu-gcc] plugins/cheaper_busyness/cheaper_busyness.o
  [thread 0][x86_64-linux-gnu-gcc] plugins/symcall/symcall_plugin.o
  [thread 5][x86_64-linux-gnu-gcc] plugins/transformation_tofile/tofile.o
  [thread 6][x86_64-linux-gnu-gcc] plugins/transformation_gzip/gzip.o
  [thread 2][x86_64-linux-gnu-gcc] plugins/transformation_chunked/chunked.o
  [thread 7][x86_64-linux-gnu-gcc] plugins/transformation_offload/offload.o
  [thread 4][x86_64-linux-gnu-gcc] plugins/router_memcached/router_memcached.o
  [thread 0][x86_64-linux-gnu-gcc] plugins/router_redis/router_redis.o
  [thread 1][x86_64-linux-gnu-gcc] plugins/router_hash/router_hash.o
  [thread 5][x86_64-linux-gnu-gcc] plugins/router_expires/expires.o
  [thread 3][x86_64-linux-gnu-gcc] plugins/router_metrics/plugin.o
  [thread 6][x86_64-linux-gnu-gcc] plugins/transformation_template/tt.o
  [thread 2][x86_64-linux-gnu-gcc] plugins/stats_pusher_socket/plugin.o
  *** uWSGI linking ***
  x86_64-linux-gnu-gcc -o build/bdist.linux-x86_64/wheel/uWSGI-2.0.25.1.data/scripts/uwsgi -L/usr/lib/x86_64-linux-gnu -Wl,-rpath,/usr/lib/x86_64-linux-gnu core/utils.o core/protocol.o core/socket.o core/logging.o core/master.o core/master_utils.o core/emperor.o core/notify.o core/mule.o core/subscription.o core/stats.o core/sendfile.o core/async.o core/master_checks.o core/fifo.o core/offload.o core/io.o core/static.o core/websockets.o core/spooler.o core/snmp.o core/exceptions.o core/config.o core/setup_utils.o core/clock.o core/init.o core/buffer.o core/reader.o core/writer.o core/alarm.o core/cron.o core/hooks.o core/plugins.o core/lock.o core/cache.o core/daemons.o core/errors.o core/hash.o core/master_events.o core/chunked.o core/queue.o core/event.o core/signal.o core/strings.o core/progress.o core/timebomb.o core/ini.o core/fsmon.o core/mount.o core/metrics.o core/plugins_builder.o core/sharedarea.o core/rpc.o core/gateway.o core/loop.o core/cookie.o core/querystring.o core/rb_timers.o core/transformations.o core/uwsgi.o proto/base.o proto/uwsgi.o proto/http.o proto/fastcgi.o proto/scgi.o proto/puwsgi.o lib/linux_ns.o core/zlib.o core/regexp.o core/routing.o core/yaml.o core/ssl.o core/legion.o core/xmlconf.o core/dot_h.o core/config_py.o plugins/python/python_plugin.o plugins/python/pyutils.o plugins/python/pyloader.o plugins/python/wsgi_handlers.o plugins/python/wsgi_headers.o plugins/python/wsgi_subhandler.o plugins/python/web3_subhandler.o plugins/python/pump_subhandler.o plugins/python/gil.o plugins/python/uwsgi_pymodule.o plugins/python/profiler.o plugins/python/symimporter.o plugins/python/tracebacker.o plugins/python/raw.o plugins/gevent/gevent.o plugins/gevent/hooks.o plugins/ping/ping_plugin.o plugins/cache/cache.o plugins/nagios/nagios.o plugins/rrdtool/rrdtool.o plugins/carbon/carbon.o plugins/rpc/rpc_plugin.o plugins/corerouter/cr_common.o plugins/corerouter/cr_map.o plugins/corerouter/corerouter.o plugins/fastrouter/fastrouter.o plugins/http/http.o plugins/http/keepalive.o plugins/http/https.o plugins/http/spdy3.o plugins/ugreen/ugreen.o plugins/signal/signal_plugin.o plugins/syslog/syslog_plugin.o plugins/rsyslog/rsyslog_plugin.o plugins/logsocket/logsocket_plugin.o plugins/router_uwsgi/router_uwsgi.o plugins/router_redirect/router_redirect.o plugins/router_basicauth/router_basicauth.o plugins/zergpool/zergpool.o plugins/redislog/redislog_plugin.o plugins/mongodblog/mongodblog_plugin.o plugins/router_rewrite/router_rewrite.o plugins/router_http/router_http.o plugins/logfile/logfile.o plugins/router_cache/router_cache.o plugins/rawrouter/rawrouter.o plugins/router_static/router_static.o plugins/sslrouter/sslrouter.o plugins/spooler/spooler_plugin.o plugins/cheaper_busyness/cheaper_busyness.o plugins/symcall/symcall_plugin.o plugins/transformation_tofile/tofile.o plugins/transformation_gzip/gzip.o plugins/transformation_chunked/chunked.o plugins/transformation_offload/offload.o plugins/router_memcached/router_memcached.o plugins/router_redis/router_redis.o plugins/router_hash/router_hash.o plugins/router_expires/expires.o plugins/router_metrics/plugin.o plugins/transformation_template/tt.o plugins/stats_pusher_socket/plugin.o -lpthread -lm -rdynamic -ldl -lz -lpcre2-8 -luuid -lssl -lcrypto -lxml2 -lcrypt -ldl -lm -lm -lpython3.10 -lcrypt
  ################# uWSGI configuration #################

  kernel = Linux
  execinfo = False
  ifaddrs = True
  locking = pthread_mutex
  event = epoll
  timer = timerfd
  filemonitor = inotify
  pcre = True
  routing = True
  capabilities = False
  yaml = embedded
  json = False
  ssl = True
  xml = libxml2
  debug = False
  plugin_dir = .
  zlib = True
  ucontext = True
  malloc = libc

  ############## end of uWSGI configuration #############
  total build time: 7 seconds
  *** uWSGI is ready, launch it with build/bdist.linux-x86_64/wheel/uWSGI-2.0.25.1.data/scripts/uwsgi ***
  running install_lib
  creating build/bdist.linux-x86_64/wheel/uWSGI-2.0.25.1.data/purelib
  copying build/lib/uwsgidecorators.py -> build/bdist.linux-x86_64/wheel/uWSGI-2.0.25.1.data/purelib
  running install_egg_info
  running egg_info
  creating uWSGI.egg-info
  writing uWSGI.egg-info/PKG-INFO
  writing dependency_links to uWSGI.egg-info/dependency_links.txt
  writing top-level names to uWSGI.egg-info/top_level.txt
  writing manifest file 'uWSGI.egg-info/SOURCES.txt'
  reading manifest file 'uWSGI.egg-info/SOURCES.txt'
  adding license file 'LICENSE'
  writing manifest file 'uWSGI.egg-info/SOURCES.txt'
  Copying uWSGI.egg-info to build/bdist.linux-x86_64/wheel/uWSGI-2.0.25.1.data/purelib/uWSGI-2.0.25.1-py3.10.egg-info
  running install_scripts
  creating build/bdist.linux-x86_64/wheel/uWSGI-2.0.25.1.dist-info/WHEEL
  creating '/tmp/pip-wheel-ivdfqdou/uWSGI-2.0.25.1-cp310-cp310-linux_x86_64.whl' and adding 'build/bdist.linux-x86_64/wheel' to it
  adding 'uWSGI-2.0.25.1.data/purelib/uwsgidecorators.py'
  adding 'uWSGI-2.0.25.1.data/scripts/uwsgi'
  adding 'uWSGI-2.0.25.1.dist-info/LICENSE'
  adding 'uWSGI-2.0.25.1.dist-info/METADATA'
  adding 'uWSGI-2.0.25.1.dist-info/WHEEL'
  adding 'uWSGI-2.0.25.1.dist-info/top_level.txt'
  adding 'uWSGI-2.0.25.1.dist-info/RECORD'
  removing build/bdist.linux-x86_64/wheel
done
  Created wheel for uwsgi: filename=uWSGI-2.0.25.1-cp310-cp310-linux_x86_64.whl size=597378 sha256=1564cfd7b25ec4df488b0070176b8dbe900dcdb57e5589ea30cddaf00fa5228c
  Stored in directory: /tmp/pip-ephem-wheel-cache-94u6x04n/wheels/fc/c9/ad/b343c28723abf47ecc7b0388861ebb1a926476e4ec7c015747
Successfully built uwsgi
Installing collected packages: uwsgi
  Attempting uninstall: uwsgi
    Found existing installation: uWSGI 2.0.24
    Uninstalling uWSGI-2.0.24:
      Created temporary directory: /tmp/pip-uninstall-kgkrj269
      Removing file or directory /home/sandre35/.virtualenvs/grocker-bluedjango/bin/uwsgi
      Created temporary directory: /tmp/pip-uninstall-0inh712d
      Removing file or directory /home/sandre35/.virtualenvs/grocker-bluedjango/lib/python3.10/site-packages/__pycache__/uwsgidecorators.cpython-310.pyc
      Created temporary directory: /home/sandre35/.virtualenvs/grocker-bluedjango/lib/python3.10/site-packages/~WSGI-2.0.24.dist-info
      Removing file or directory /home/sandre35/.virtualenvs/grocker-bluedjango/lib/python3.10/site-packages/uWSGI-2.0.24.dist-info/
      Created temporary directory: /tmp/pip-uninstall-psex_ifv
      Removing file or directory /home/sandre35/.virtualenvs/grocker-bluedjango/lib/python3.10/site-packages/uwsgidecorators.py
      Successfully uninstalled uWSGI-2.0.24

Successfully installed uwsgi-2.0.25.1
[...]

I am using JinJa2 template to proide uswgi configuration:

[statics]
static-expires-uri = /{{static_path}}/* 315360000
static-map = /{{static_path}}={{staticassets}}
offload-threads = 4

In my tests, I am looking for Expires header in response.

response = send_request(
   listening_port, '/static/selftest/img/default.png'
)
assert response.status_code == 200, 'test: static'
assert (
    response.headers.get('content-type', None) == 'image/png'
), 'static/selftest/img/default.png'
assert 'Expires' in response.headers

And the report of test failure, not finding Expires header

def test_run_service_metrics(self):
        listening_port = pick_unused_port()
        stat_port = pick_unused_port()
        metrics_port = pick_unused_port()

        with out_err_streams() as (output, errors):
            self.test_environ['BLUEDJANGO_UWSGI_HTTP_SOCKET'] = (
                f'127.0.0.1:{listening_port}'
            )
            self.test_environ['BLUEDJANGO_UWSGI_STATS'] = f'127.0.0.1:{stat_port}'
            self.test_environ['BLUEDJANGO_SYSLOG_HOST'] = ''
            self.test_environ['BLUEDJANGO_WARMUP_URL'] = '/selftest/ping/'
            self.test_environ['BLUEDJANGO_METRICS_PORT'] = str(metrics_port)
            self.test_environ['BLUEDJANGO_METRICS_ENABLED'] = 'true'

            process = subprocess.Popen(  # pylint: disable=consider-using-with
                ['grocker-runner', 'start', 'ops'],
                env=self.test_environ,
                stdout=output,
                stderr=errors,
            )

            def send_request(port, path, headers=None):
                headers = dict(headers or {})
                headers['Host'] = 'example.org'
                url = f"http://localhost:{port}/{path.lstrip('/')}"
                return requests.get(url, headers=headers, timeout=self.test_timeout)

            # check service status
            process.poll()
            # process should still be running
            self.assertReturnCodeIsNone(process, errors)
            try:
                wait_for_service('localhost', listening_port, 10)
                wait_for_service('localhost', metrics_port, 10)

                response = send_request(
                    listening_port, '/static/selftest/img/default.png'
                )
                assert response.status_code == 200, 'test: static'
                assert (
                    response.headers.get('content-type', None) == 'image/png'
                ), 'static/selftest/img/default.png'
>               assert 'Expires' in response.headers
E               AssertionError: assert 'Expires' in {'Content-Type': 'image/png', 'Content-Length': '2932', 'Last-Modified': 'Thu, 25 Apr 2024 03:31:13 GMT'}
E                +  where {'Content-Type': 'image/png', 'Content-Length': '2932', 'Last-Modified': 'Thu, 25 Apr 2024 03:31:13 GMT'} = <Response [200]>.headers

tests/test_runner.py:513: AssertionError

Pining uwsgi to 2.0.24 solves the issue. The installation of uwsgi 2.0.24 uses libpcre3

xrmx commented 5 months ago

Thanks for reporting, what do you have in static_path, just static?

sandre35 commented 5 months ago

@xrmx Yes, the content of static_path variable is static

xrmx commented 5 months ago

Do you have any pcre related log when starting uwsgi?

sandre35 commented 5 months ago

Here is the log when lauching UWSGI. I find the mapping for static path. There is one line with pcre : pcre jit disabled

[uwsgi-static] added mapping for /static => /tmp/tmppruzuo8y/app.venv/lib/python3.10/site-packages/bluedj/staticassets

;uWSGI instance configuration
[uwsgi]
ini = /tmp/tmp1md5ahs9/root-fs/home/sys.cfg/uwsgi.ini
ini = :env
env = SHELL=/bin/bash
env = SESSION_MANAGER=local/sandre35-ThinkPad-T490s:@/tmp/.ICE-unix/5438,unix/sandre35-ThinkPad-T490s:/tmp/.ICE-unix/5438
env = QT_ACCESSIBILITY=1
env = COLORTERM=truecolor
env = XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/etc/xdg
env = SSH_AGENT_LAUNCHER=gnome-keyring
env = NVM_INC=/home/sandre35/.nvm/versions/node/v11.15.0/include/node
env = XDG_MENU_PREFIX=gnome-
env = TERM_PROGRAM_VERSION=1.88.1
env = GNOME_DESKTOP_SESSION_ID=this-is-deprecated
env = PGPORT=5432
env = GNOME_SHELL_SESSION_MODE=ubuntu
env = SSH_AUTH_SOCK=/run/user/1000/keyring/ssh
env = XMODIFIERS=@im=ibus
env = DESKTOP_SESSION=ubuntu
env = GTK_MODULES=gail:atk-bridge
env = PWD=/home/sandre35/dev_repo/grocker-bluedjango
env = XDG_SESSION_DESKTOP=ubuntu
env = LOGNAME=sandre35
env = XDG_SESSION_TYPE=wayland
env = SYSTEMD_EXEC_PID=5461
env = XAUTHORITY=/run/user/1000/.mutter-Xwaylandauth.GQZHM2
env = VSCODE_GIT_ASKPASS_NODE=/usr/share/code/code
env = IM_CONFIG_CHECK_ENV=1
env = GJS_DEBUG_TOPICS=JS ERROR;JS LOG
env = VIRTUALENVWRAPPER_SCRIPT=/usr/share/virtualenvwrapper/virtualenvwrapper.sh
env = HOME=/home/sandre35
env = USERNAME=sandre35
env = IM_CONFIG_PHASE=1
env = LANG=fr_FR.UTF-8
env = LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:
env = _VIRTUALENVWRAPPER_API= mkvirtualenv rmvirtualenv lsvirtualenv showvirtualenv workon add2virtualenv cdsitepackages cdvirtualenv lssitepackages toggleglobalsitepackages cpvirtualenv setvirtualenvproject mkproject cdproject mktmpenv wipeenv allvirtualenv mkvirtualenv rmvirtualenv lsvirtualenv showvirtualenv workon add2virtualenv cdsitepackages cdvirtualenv lssitepackages toggleglobalsitepackages cpvirtualenv setvirtualenvproject mkproject cdproject mktmpenv wipeenv allvirtualenv
env = XDG_CURRENT_DESKTOP=Unity
env = VIRTUAL_ENV=/home/sandre35/.virtualenvs/grocker-bluedjango
env = WAYLAND_DISPLAY=wayland-0
env = VIRTUALENVWRAPPER_WORKON_CD=1
env = TMPDIR=/tmp
env = GIT_ASKPASS=/usr/share/code/resources/app/extensions/git/dist/askpass.sh
env = PGUSER=postgres
env = INVOCATION_ID=b2b58f92fec943f0ac2ff23c972c3976
env = MANAGERPID=5295
env = CHROME_DESKTOP=code-url-handler.desktop
env = GJS_DEBUG_OUTPUT=stderr
env = NVM_DIR=/home/sandre35/.nvm
env = VSCODE_GIT_ASKPASS_EXTRA_ARGS=
env = WORKON_HOME=/home/sandre35/.virtualenvs
env = GNOME_SETUP_DISPLAY=:1
env = LESSCLOSE=/usr/bin/lesspipe uwsgi.ini uwsgi.ini
env = XDG_SESSION_CLASS=user
env = TERM=xterm-256color
env = LESSOPEN=| /usr/bin/lesspipe uwsgi.ini
env = USER=sandre35
env = VSCODE_GIT_IPC_HANDLE=/run/user/1000/vscode-git-497b2790a4.sock
env = VIRTUALENVWRAPPER_PROJECT_FILENAME=.project
env = DISPLAY=:0
env = SHLVL=1
env = NVM_CD_FLAGS=
env = QT_IM_MODULE=ibus
env = VIRTUAL_ENV_PROMPT=(grocker-bluedjango)
env = XDG_RUNTIME_DIR=/run/user/1000
env = PS1=\[\](grocker-bluedjango) \[\]\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ \[\]\[\]
env = PGHOST=localhost
env = VSCODE_GIT_ASKPASS_MAIN=/usr/share/code/resources/app/extensions/git/dist/askpass-main.js
env = JOURNAL_STREAM=8:42152
env = XDG_DATA_DIRS=/usr/share/ubuntu:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop
env = GDK_BACKEND=x11
env = PATH=/tmp/tmppruzuo8y/app.venv/bin:/home/sandre35/.virtualenvs/grocker-bluedjango/bin:/home/sandre35/.npm-packages/bin:/home/sandre35/.local/bin:/home/sandre35/bin:/home/sandre35/.npm-packages/bin:/home/sandre35/.nvm/versions/node/v11.15.0/bin:/home/sandre35/.local/bin:/home/sandre35/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin:/home/sandre35/bin:/home/sandre35/bin
env = VIRTUALENVWRAPPER_HOOK_DIR=/home/sandre35/.virtualenvs
env = GDMSESSION=ubuntu
env = ORIGINAL_XDG_CURRENT_DESKTOP=ubuntu:GNOME
env = DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
env = NVM_BIN=/home/sandre35/.nvm/versions/node/v11.15.0/bin
env = GIO_LAUNCHED_DESKTOP_FILE_PID=30107
env = GIO_LAUNCHED_DESKTOP_FILE=/usr/share/applications/code.desktop
env = TERM_PROGRAM=vscode
env = _=/home/sandre35/.virtualenvs/grocker-bluedjango/bin/python
env = DJANGO_SETTINGS_MODULE=bluedj.settings
env = BLUEDJ_ENVIRONMENT=prod
env = BLUEDJ_DJANGO_SECRET_KEY=mocked
env = BLUEDJ_DB_HOST=localhost
env = BLUEDJ_DB_PORT=5432
env = BLUEDJ_DB_NAME=grocker-bluedjango
env = BLUEDJ_DB_USER=grocker-bluedjango
env = BLUEDJ_S3_BUCKET_NAME=grocker-bluedjango
env = BLUEDJ_S3_ENDPOINT_URL=http://127.0.0.1:8282
env = BLUEDJ_S3_ACCESS_KEY=accessKey1
env = BLUEDJ_S3_SECRET_KEY=verySecretKey1
env = BLUEDJ_SERVICES_URLS_FILE=/home/sandre35/.virtualenvs/grocker-bluedjango/lib/python3.10/site-packages/libservices/dev_urls.yml
env = GROCKER_APP=bluedj
env = GROCKER_HOME=/tmp/tmp1md5ahs9/root-fs/home
env = GROCKER_FS_ROOT=/tmp/tmp1md5ahs9/root-fs
env = BLUEDJ_LOGGING_FORCE_CONSOLE=1
env = BLUEDJANGO_UWSGI_HTTP_SOCKET=127.0.0.1:33287
env = BLUEDJANGO_UWSGI_STATS=127.0.0.1:60875
env = BLUEDJANGO_UWSGI_APP_MODULE=django.core.wsgi:get_wsgi_application
env = BLUEDJANGO_SYSLOG_HOST=
env = BLUEDJANGO_WARMUP_URL=/selftest/ping/
env = BLUEDJANGO_METRICS_ENABLED=false
env = BLUEDJ_CONFIG=ini:///tmp/tmp1md5ahs9/root-fs/config/app/*.ini
env = BLUEDJ_PROMETHEUS_METRICS_DIR=/tmp/tmp1md5ahs9/root-fs/tmp/prometheus_metrics
env = BLUEDJ_SERVICE=ops
ini = :app
chdir = /tmp/tmp1md5ahs9/root-fs/home
py-programname = /tmp/tmppruzuo8y/app.venv/bin/python3.10
need-app = true
module = bluedjango.wsgi_prefork:get_wsgi_application()
ini = :master
master = true
die-on-term = true
pidfile = /tmp/tmp1md5ahs9/root-fs/home/uwsgi.pid
post-buffering = true
single-interpreter = true
ini = :performances
tcp-nodelay = true
http-keepalive = 65
http-auto-gzip = true
ini = :log
show-config = true
log-x-forwarded-for = true
backtrace-depth = 64
log-ioerror = false
py-tracebacker = /tmp/tbsocket
ini = :authentication
route-if-not = empty:${HTTP_X_REMOTE_USER} setuser:${HTTP_X_REMOTE_USER}
ini = :https
route-if-not = empty:${HTTP_X_FORWARDED_PROTO} setscheme:${HTTP_X_FORWARDED_PROTO}
ini = :statics
static-expires-uri = /static/* 315360000
static-map = /static=/tmp/tmppruzuo8y/app.venv/lib/python3.10/site-packages/bluedj/staticassets
offload-threads = 4
ini = :tuning
http-socket = 127.0.0.1:33287
stats = 127.0.0.1:60875
workers = 10
buffer-size = 8192
harakiri = 60
max-requests = 5000
reload-on-as = 1024
reload-on-rss = 400
static-path = static
ini = :stats
stats-http = true
enable-metrics = true
;end of configuration

*** Starting uWSGI 2.0.24 (64bit) on [Fri Apr 26 10:45:57 2024] ***
compiled with version: 11.4.0 on 09 February 2024 15:50:33
os: Linux-6.5.0-28-generic #29~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Apr  4 14:39:20 UTC 2
nodename: sandre35-ThinkPad-T490s
machine: x86_64
clock source: unix
pcre jit disabled
detected number of CPU cores: 8
current working directory: /home/sandre35/dev_repo/grocker-bluedjango
writing pidfile to /tmp/tmp1md5ahs9/root-fs/home/uwsgi.pid
detected binary path: /tmp/tmppruzuo8y/app.venv/bin/uwsgi
*** dumping internal routing table ***
[rule: 0] subject: ${HTTP_X_REMOTE_USER} func: !empty action: setuser:${HTTP_X_REMOTE_USER}
[rule: 1] subject: ${HTTP_X_FORWARDED_PROTO} func: !empty action: setscheme:${HTTP_X_FORWARDED_PROTO}
*** end of the internal routing table ***
chdir() to /tmp/tmp1md5ahs9/root-fs/home
your processes number limit is 126421
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: 8192
building mime-types dictionary from file /etc/mime.types...1516 entry found
lock engine: pthread robust mutexes
niol commented 5 months ago

Seems like pcre2_match() with no match_data structure does not work. The following patch seems to fix the issue, I'll submit a PR later. Please note that /{{static_path}}/* should be a regexp, maybe you mean ^/{{static_path}}/.

--- a/core/regexp.c
+++ b/core/regexp.c
@@ -69,7 +69,7 @@ int uwsgi_regexp_build(char *re, uwsgi_pcre ** pattern) {

 int uwsgi_regexp_match(uwsgi_pcre *pattern, const char *subject, int length) {
 #ifdef UWSGI_PCRE2
-       return pcre2_match(pattern, (const unsigned char *)subject, length, 0, 0, NULL, NULL);
+       return uwsgi_regexp_match_ovec(pattern, subject, length, NULL, 0);
 #else
        return pcre_exec((const pcre *) pattern->p, (const pcre_extra *) pattern->extra, subject, length, 0, 0, NULL, 0);
 #endif