[SRU] wrk fails to run
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
wrk (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Mantic |
Fix Released
|
Undecided
|
Unassigned |
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://
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://
- It should show result like:
$ wrk http://
Running 10s test @ http://
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:/
- It should show results like:
$ wrk https:/
Running 10s test @ https:/
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:/
Running 10s test @ https:/
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@workstation:~$ wrk http://
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@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@workstation:~$ ldd /usr/bin/wrk
linux-vdso.so.1 (0x00007ffe049a
libluajit-5.1.so.2 => /lib/x86_
libm.so.6 => /lib/x86_
libssl.so.3 => /lib/x86_
libcrypto.so.3 => /lib/x86_
libc.so.6 => /lib/x86_
libgcc_s.so.1 => /lib/x86_
/lib64/
bnt@workstation:~$ dpkg --list libluajit*
Desired=
| Status=
|/ Err?=(none)
||/ Name Version Architecture Description
+++-===
ii libluajit-
ii libluajit-
un libluajit2-5.1-2 <none> <none> (no description available)
un libluajit2-
Changed in wrk (Ubuntu Mantic): | |
status: | New → Confirmed |
assignee: | nobody → Sudip Mukherjee (sudipmuk) |
Changed in wrk (Ubuntu): | |
status: | Confirmed → Fix Released |
Changed in wrk (Ubuntu Mantic): | |
status: | Confirmed → In Progress |
tags: |
added: verification-done removed: verification-needed |
I downloaded the package sources via
apt-get download wrk
then proceeded to build the package with
dpkg- buildpackage -us -uc
The process complained about missing libraries, libluajit-5.1-dev if I recall correctly. Installing it allowed me to build the package.
Installing the generated package results in a wrk binary that actually works.