Discover Centmin Mod today
Register Now

nginx.conf bug with NGINX_IOURING

Discussion in 'Bug Reports' started by pdinh97qng, Oct 13, 2020.

  1. pdinh97qng

    pdinh97qng Member

    101
    12
    18
    Jan 24, 2016
    Ratings:
    +32
    Local Time:
    2:09 AM
    I did setup a VPS with Ryzen CPU for testing. I upgraded the kernel first then install centminmod with NGINX_IOURING_PATCH_BETA='y'. Nginx did compiled with --with-file-aio but nginx.conf still contains sendfile on rather than switch to:
    Code:
    sendfile off;
    aio on;
    • CentOS Version: CentOS 7 64bit
    • Centmin Mod Version Installed: 123.09beta01
    • Nginx Version Installed: 1.19.3
    • PHP Version Installed: 7.4.11
    • MariaDB MySQL Version Installed: 10.4.15

     
  2. eva2000

    eva2000 Administrator Staff Member

    45,703
    10,377
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,103
    Local Time:
    8:09 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    To troubleshoot, you need to check the full nginx upgrade log at /root/centminlogs and instructions under Sharing logs and errors heading for using Pastebin.com or Gists to share a sanitised version of the contents of the nginx_upgrade.log log. You can see full details at How to troubleshoot Centmin Mod initial install issues

    also what's output of
    Code (Text):
    nginx -t

    when you run centmin.sh menu option 4 there's a nginx upgrade log timestamped at /root/centminlogs

    if you type this command it lists all logs in date ascending order so latest log at bottom
    Code (Text):
    ls -lArt /root/centminlogs

    so copy the entire contents of latest nginx_upgrade log to gist.github.com or pastebin.com

    you can use grep to filter the logs, i.e. look for nginx_upgrade in log name
    Code (Text):
    ls -lahrt /root/centminlogs/ | grep nginx_upgrade
    -rw-r--r--  1 root root 3.2M Oct 11 15:55 centminmod_1.2.3-eva2000.09.001_111016-155345_nginx_upgrade.log
    -rw-r--r--  1 root root 672K Oct 11 22:06 centminmod_1.2.3-eva2000.09.001_111016-220515_nginx_upgrade.log

    So the last nginx upgrade log was named centminmod_1.2.3-eva2000.09.001_111016-220515_nginx_upgrade.log and located at /root/centminlogs/centminmod_1.2.3-eva2000.09.001_111016-220515_nginx_upgrade.log

    then use cat command to output the contents of that log

    clear your ssh window buffer/screen and type
    Code (Text):
    cat /root/centminlogs/centminmod_1.2.3-eva2000.09.001_111016-220515_nginx_upgrade.log

    then select and copy and paste output to pastebin.com or gist.github.com file to share. If your SSH client's scroll buffer isn't large enough using cat might not output the entire log file contents, so you may need to download the log and use local text editor to open and copy and paste.

    so only need content of one specific log, in this case most recent nginx_upgrade.log log
     
  3. pdinh97qng

    pdinh97qng Member

    101
    12
    18
    Jan 24, 2016
    Ratings:
    +32
    Local Time:
    2:09 AM
    It does exceed free size on pastebin so I upload it to zippyshare.
    Code:
    https://www20.zippyshare.com/v/aquk0u98/file.html
    Nginx -V still show --with-file-aio
    Code:
    nginx version: nginx/1.19.3 (141020-062141-centos7-kvm-fb20fd7-br-9aec15e)
    built by gcc 9.3.1 20200408 (Red Hat 9.3.1-2) (GCC)
    built with OpenSSL 1.1.1h  22 Sep 2020
    TLS SNI support enabled
    configure arguments: --with-ld-opt='-Wl,-E -L/usr/local/zlib-cf/lib -L/usr/local/lib -ljemalloc -Wl,-z,relro -Wl,-rpath,/usr/local/zlib-cf/lib:/usr/local/lib -flto=2 -fuse-ld=gold' --with-cc-opt='-I/usr/local/zlib-cf/include -I/usr/local/include -m64 -march=native -DTCP_FASTOPEN=23 -g -O3 -Wno-error=strict-aliasing -fstack-protector-strong -flto=2 -fuse-ld=gold --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wno-error=pointer-sign -Wimplicit-fallthrough=0 -fcode-hoisting -Wp,-D_FORTIFY_SOURCE=2 -Wno-deprecated-declarations -gsplit-dwarf' --sbin-path=/usr/local/sbin/nginx --conf-path=/usr/local/nginx/conf/nginx.conf --build=141020-062141-centos7-kvm-fb20fd7-br-9aec15e --with-compat --with-http_stub_status_module --with-libatomic --with-http_gzip_static_module --with-file-aio --add-dynamic-module=../ngx_brotli --with-threads --with-http_realip_module --add-dynamic-module=../ngx_devel_kit-0.3.0 --add-dynamic-module=../set-misc-nginx-module-0.32 --add-dynamic-module=../echo-nginx-module-0.62 --add-module=../redis2-nginx-module-0.15 --add-module=../memc-nginx-module-0.19 --add-module=../srcache-nginx-module-0.32 --add-dynamic-module=../headers-more-nginx-module-0.33 --with-pcre-jit --with-zlib=../zlib-cloudflare-1.3.0 --with-http_ssl_module --with-http_v2_module --with-http_v2_hpack_enc --with-openssl=../openssl-1.1.1h --with-openssl-opt='enable-ec_nistp_64_gcc_128 enable-tls1_3 -fuse-ld=gold'
    But I have to manually change nginx.conf from:
    Code:
    sendfile on;
    to
    Code:
    sendfile off;
    aio on;
     
  4. pdinh97qng

    pdinh97qng Member

    101
    12
    18
    Jan 24, 2016
    Ratings:
    +32
    Local Time:
    2:09 AM
    I don't know if this is the problem. Ryzen 3900x
    Code:
    make[1]: Entering directory `/svr-setup/liburing/src'
         CC setup.ol
         CC queue.ol
    In file included from include/liburing.h:16:0,
                     from setup.c:12:
    include/liburing/barrier.h:56:23: fatal error: stdatomic.h: No such file or directory
     #include <stdatomic.h>
                           ^
    compilation terminated.
    In file included from include/liburing.h:16:0,
                     from queue.c:12:
    include/liburing/barrier.h:56:23: fatal error: stdatomic.h: No such file or directory
     #include <stdatomic.h>
                           ^
    compilation terminated.
    make[1]: *** [setup.ol] Error 1
    make[1]: *** Waiting for unfinished jobs....
    make[1]: *** [queue.ol] Error 1
    make[1]: Leaving directory `/svr-setup/liburing/src'
    make: *** [all] Error 2
    sed -e "s%@prefix@%/usr%g" \
        -e "s%@libdir@%/usr/lib%g" \
        -e "s%@includedir@%/usr/include%g" \
        -e "s%@NAME@%liburing%g" \
        -e "s%@VERSION@%0.7%g" \
        liburing.pc.in >liburing.pc
    make[1]: Entering directory `/svr-setup/liburing/src'
         CC setup.ol
    In file included from include/liburing.h:16:0,
                     from setup.c:12:
    include/liburing/barrier.h:56:23: fatal error: stdatomic.h: No such file or directory
     #include <stdatomic.h>
                           ^
    compilation terminated.
    make[1]: *** [setup.ol] Error 1
    make[1]: Leaving directory `/svr-setup/liburing/src'
    make: *** [install] Error 2
     
  5. eva2000

    eva2000 Administrator Staff Member

    45,703
    10,377
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,103
    Local Time:
    8:09 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    kernel version ?

    output for
    Code (Text):
    uname -r
     
  6. pdinh97qng

    pdinh97qng Member

    101
    12
    18
    Jan 24, 2016
    Ratings:
    +32
    Local Time:
    2:09 AM
    I did try with different kernels
    Code:
    5.9.2-1.el7.elrepo.x86_64
    5.9.1-1.el7.elrepo.x86_64
    5.9.0-1.el7.elrepo.x86_64
    My full custom_config:
    Code:
    CRYPTO_DEVTOOLSETGCC='y'
    DEVTOOLSETNINE='y'
    DUALCERTS='y'
    ENABLEMOTD='n'
    GCC_FALIGN_FUNCTION='y'
    GENERAL_DEVTOOLSETGCC='y'
    LETSENCRYPT_DETECT='y'
    LUAJIT_GITINSTALL='n'
    MARCH_TARGETNATIVE='y'
    MARCH_TARGETNATIVE_ALWAYS='y'
    MARIADB_INSTALLTENFOUR='y'
    MEMCACHED_DISABLED='y'
    MEMCACHED_INSTALL='n'
    MM_LICENSE_KEY='reG0DTnKJC8ojb45'
    NGINXBACKUP='n'
    NGINX_ADDITION='n'
    NGINX_BROTLIDEP_UPDATE='y'
    NGINX_CACHEPURGE='n'
    NGINX_DEVTOOLSETGCC='y'
    NGINX_DYNAMICTLS='y'
    NGINX_FANCYINDEX='n'
    NGINX_GEOIP='n'
    NGINX_HPACK='y'
    NGINX_HTTPREDIS='n'
    NGINX_IMAGEFILTER='n'
    NGINX_IOURING_PATCH_BETA='y'
    NGINX_IPV='y'
    NGINX_LIBBROTLI='y'
    NGINX_SECURELINK='n'
    NGINX_STAPLE_CACHE_OVERRIDE='y'
    NGINX_STAPLE_CACHE_TTL='86400'
    NGINX_STICKY='n'
    NGINX_STREAM='n'
    NGINX_STREAMGEOIP='n'
    NGINX_STREAMREALIP='n'
    NGINX_STREAMSSLPREREAD='n'
    NGINX_SUB='n'
    NGXDYNAMIC_BROTLI='y'
    NSD_DISABLED='y'
    PHPGEOIP_ALWAYS='n'
    PHPINTL='n'
    PHPMAILPARSE='n'
    PHPPCNTL='n'
    PHPSNMP='n'
    PHP_ARGON='y'
    PHP_BROTLI='y'
    PHP_FTPEXT='n'
    PHP_LZF='y'
    PHP_LZFOUR='y'
    PHP_MCRYPTPECL='n'
    PHP_MEMCACHE='n'
    PHP_MEMCACHED='n'
    PHP_PGO='y'
    PHP_ZSTD='y'
    PRIORITIZE_CHACHA_OPENSSL='y'
    PUREFTPD_DISABLED='y'
    SET_DEFAULT_MYSQLCHARSET='utf8mb4'
    SSL_PROTOCOL_MODERN='y'
    VHOSTCTRL_AUTOPROTECTINC='n'
    VHOSTCTRL_CLOUDFLAREINC='y'
    ZONEINFO=Asia/Singapore
    ZSTD_LOGROTATE_NGINX='y'
    ZSTD_LOGROTATE_PHPFPM='y'
    
     
  7. eva2000

    eva2000 Administrator Staff Member

    45,703
    10,377
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,103
    Local Time:
    8:09 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    Interesting for now just disable Nginx IOURING patch and remove
    NGINX_IOURING_PATCH_BETA='y' and recompile Nginx. I wouldn't have time to troubleshoot and test this right now due to work commitments.
     
  8. rdan

    rdan Well-Known Member

    5,009
    1,213
    113
    May 25, 2014
    Ratings:
    +1,839
    Local Time:
    6:09 PM
    Mainline
    10.2
    Just a guess, XDA? :D
     
  9. eva2000

    eva2000 Administrator Staff Member

    45,703
    10,377
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,103
    Local Time:
    8:09 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    Nope not XDA, though they are a past client of mine :)