[Bug 2026760] Re: [SRU] wrk fails to run

Juanjo Aparicio 2026760 at bugs.launchpad.net
Sat Feb 24 17:09:05 UTC 2024


I can confirm the proposed package fixes the issue for me.

Just upgraded to

ii  wrk            4.1.0-3build2 amd64        HTTP benchmarking tool


Tested against the following webservers:

* localhost

bnt at workstation:~$ wrk http://localhost/
Running 10s test @ http://localhost/
  2 threads and 10 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   509.81us    4.59ms  86.87ms   99.17%
    Req/Sec    35.11k     5.34k   42.95k    82.50%
  698425 requests in 10.00s, 7.65GB read
Requests/sec:  69835.52
Transfer/sec:    783.22MB


* different host on the same LAN

bnt at workstation:~$ wrk http://www.fastpace.org/
Running 10s test @ http://www.fastpace.org/
  2 threads and 10 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   136.95us   27.55us   1.03ms   73.95%
    Req/Sec    35.24k     1.51k   38.68k    71.64%
  704908 requests in 10.10s, 314.61MB read
Requests/sec:  69797.92
Transfer/sec:     31.15MB


* Internet host

bnt at workstation:~$ wrk http://www.google.com/
Running 10s test @ http://www.google.com/
  2 threads and 10 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   441.69ms   61.96ms 774.67ms   75.00%
    Req/Sec    13.25      8.47    40.00     80.77%
  220 requests in 10.02s, 11.25MB read
Requests/sec:     21.96
Transfer/sec:      1.12MB


** Tags removed: verification-needed-mantic
** Tags added: verification-done-mantic

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

Title:
  [SRU] wrk fails to run

Status in wrk package in Ubuntu:
  Fix Released
Status in wrk source package in Mantic:
  Fix Committed

Bug description:
  [ 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)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/wrk/+bug/2026760/+subscriptions




More information about the Ubuntu-sponsors mailing list