[Bug 2026760] [NEW] [SRU] wrk fails to run

Launchpad Bug Tracker 2026760 at bugs.launchpad.net
Mon Feb 19 21:10:57 UTC 2024


You have been subscribed to a public bug by Sudip Mukherjee (sudipmuk):

[ Impact ]

wrk is completely unusable as it will fail to run with the following
error when tried to benchmark the http server:

$ wrk http://localhost/
PANIC: unprotected error in call to Lua API (attempt to index a nil value)

[ Test Plan ]

wrk is a http benchmarking tool and can be used to benchmark servers.

* Test with a local server:
  - Install wrk and apache2
  - execute "wrk http://127.0.0.1/"
  - It should show result like:

$ wrk http://127.0.0.1
Running 10s test @ http://127.0.0.1
  2 threads and 10 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   252.68us  396.44us   4.85ms   91.09%
    Req/Sec    33.23k     4.37k   43.34k    70.00%
  661179 requests in 10.00s, 6.73GB read
Requests/sec:  66114.70
Transfer/sec:    688.92MB

* Test with remote server:
  - Install wrk
  - execute "wrk https://ubuntu.com/"
  - It should show results like:

$ wrk https://ubuntu.com/
Running 10s test @ https://ubuntu.com/
  2 threads and 10 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    53.19ms  117.13ms   1.28s    95.87%
    Req/Sec   148.63     34.23   220.00     70.50%
  2964 requests in 10.01s, 293.91MB read
Requests/sec:    296.04
Transfer/sec:     29.36MB

[ Where problems could occur ]

This is not changing anything, is just a rebuild which Ubuntu missed for
some reason. Debian has done the rebuild as '4.1.0-3+b2' for the
libluajit transition. And, the chances of regression because of the
rebuild is almost nil.

[ Other Info ]

Just for fun, I tried to do a benchmark of google.com also for a
comparison with ubuntu.com benchmarking result.

$ wrk https://google.com
Running 10s test @ https://google.com
  2 threads and 10 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   187.83ms  175.23ms 949.07ms   81.17%
    Req/Sec    37.29     55.67   202.00     84.62%
  598 requests in 10.03s, 650.20KB read
Requests/sec:     59.62
Transfer/sec:     64.83KB

[ Original Bug Description ]

Running wrk 4.1.0-3build1 against a web server fails:

bnt at workstation:~$ wrk http://localhost/
PANIC: unprotected error in call to Lua API (attempt to index a nil value)

I'm running Ubuntu 23.04.

Running wrk with no options shows the help info:

bnt at workstation:~$ wrk
Usage: wrk <options> <url>
  Options:
    -c, --connections <N>  Connections to keep open
    -d, --duration    <T>  Duration of test
    -t, --threads     <N>  Number of threads to use

    -s, --script      <S>  Load Lua script file
    -H, --header      <H>  Add header to request
        --latency          Print latency statistics
        --timeout     <T>  Socket/request timeout
    -v, --version          Print version details

  Numeric arguments may include a SI unit (1k, 1M, 1G)
  Time arguments may include a time unit (2s, 2m, 2h)

ldd shows wrk relies on libluajit-5.1.so.2, which is installed:

bnt at workstation:~$ ldd /usr/bin/wrk
 linux-vdso.so.1 (0x00007ffe049a4000)
 libluajit-5.1.so.2 => /lib/x86_64-linux-gnu/libluajit-5.1.so.2 (0x00007f30f0321000)
 libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f30f0238000)
 libssl.so.3 => /lib/x86_64-linux-gnu/libssl.so.3 (0x00007f30f0193000)
 libcrypto.so.3 => /lib/x86_64-linux-gnu/libcrypto.so.3 (0x00007f30efc00000)
 libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f30ef800000)
 libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f30f016d000)
 /lib64/ld-linux-x86-64.so.2 (0x00007f30f03fe000)

bnt at workstation:~$ dpkg --list libluajit*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                  Version                          Architecture Description
+++-=====================-================================-============-============================>
ii  libluajit-5.1-2:amd64 2.1.0~beta3+git20220320+dfsg-4.1 amd64        Just in time compiler for Lu>
ii  libluajit-5.1-common  2.1.0~beta3+git20220320+dfsg-4.1 all          Just in time compiler for Lu>
un  libluajit2-5.1-2      <none>                           <none>       (no description available)
un  libluajit2-5.1-common <none>                           <none>       (no description available)

** Affects: wrk (Ubuntu)
     Importance: Undecided
         Status: Fix Released

** Affects: wrk (Ubuntu Mantic)
     Importance: Undecided
         Status: Confirmed

-- 
[SRU] wrk fails to run
https://bugs.launchpad.net/bugs/2026760
You received this bug notification because you are a member of Ubuntu Sponsors, which is subscribed to the bug report.



More information about the Ubuntu-sponsors mailing list