Package: wrk
Version: 4.0.2-2
Followup-For: Bug #874176

Dear Maintainer,

  * What led up to the situation?

I needed to use wrk for some benchmark.

   * What exactly did you do (or not do) that was effective (or
     ineffective)?

apt install wrk && wrk -c 800 -d 10 -t 24 http://127.0.0.1:8080/

   * What was the outcome of this action?

PANIC: unprotected error in call to Lua API (attempt to index a nil value)

   * What outcome did you expect instead?

the benchmark to run.

Currently luajit-2.1 is installed but the sources are looking for luajit-2.0, 
also luajit-2.1 is missing a define (luaL_reg luaL_Reg) and src/script.c fail 
to compile.

-- System Information:
Debian Release: bullseye/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.19.0-5-amd64 (SMP w/8 CPU cores)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, 
TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages wrk depends on:
ii  libc6            2.28-10
ii  libluajit-5.1-2  2.1.0~beta3+dfsg-5.1
ii  libssl1.1        1.1.1c-1

wrk recommends no packages.

wrk suggests no packages.

-- no debconf information
Index: wrk-4.0.2/src/script.h
===================================================================
--- wrk-4.0.2.orig/src/script.h
+++ wrk-4.0.2/src/script.h
@@ -2,9 +2,9 @@
 #define SCRIPT_H
 
 #include <stdbool.h>
-#include <luajit-2.0/lua.h>
-#include <luajit-2.0/lualib.h>
-#include <luajit-2.0/lauxlib.h>
+#include <luajit-2.1/lua.h>
+#include <luajit-2.1/lualib.h>
+#include <luajit-2.1/lauxlib.h>
 #include <unistd.h>
 #include "stats.h"
 #include "wrk.h"
Index: wrk-4.0.2/src/wrk.h
===================================================================
--- wrk-4.0.2.orig/src/wrk.h
+++ wrk-4.0.2/src/wrk.h
@@ -10,7 +10,7 @@
 
 #include <openssl/ssl.h>
 #include <openssl/err.h>
-#include <luajit-2.0/lua.h>
+#include <luajit-2.1/lua.h>
 
 #include "stats.h"
 #include "ae.h"
Index: wrk-4.0.2/src/script.c
===================================================================
--- wrk-4.0.2.orig/src/script.c
+++ wrk-4.0.2/src/script.c
@@ -26,6 +26,8 @@ static void set_fields(lua_State *, int,
 static void set_field(lua_State *, int, char *, int);
 static int push_url_part(lua_State *, char *, struct http_parser_url *, enum 
http_parser_url_fields);
 
+#define luaL_reg      luaL_Reg
+
 static const struct luaL_reg addrlib[] = {
     { "__tostring", script_addr_tostring   },
     { "__gc"    ,   script_addr_gc         },

Reply via email to