{"action":"created","issue":{"url":"https://api.github.com/repos/wg/wrk/issues/298","repository_url":"https://api.github.com/repos/wg/wrk","labels_url":"https://api.github.com/repos/wg/wrk/issues/298/labels{/name}","comments_url":"https://api.github.com/repos/wg/wrk/issues/298/comments","events_url":"https://api.github.com/repos/wg/wrk/issues/298/events","html_url":"https://github.com/wg/wrk/issues/298","id":260149081,"number":298,"title":"PANIC: unprotected error in call to Lua API (attempt to index a nil value)","user":{"login":"centminmod","id":5899584,"avatar_url":"https://avatars3.githubusercontent.com/u/5899584?v=4","gravatar_id":"","url":"https://api.github.com/users/centminmod","html_url":"https://github.com/centminmod","followers_url":"https://api.github.com/users/centminmod/followers","following_url":"https://api.github.com/users/centminmod/following{/other_user}","gists_url":"https://api.github.com/users/centminmod/gists{/gist_id}","starred_url":"https://api.github.com/users/centminmod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/centminmod/subscriptions","organizations_url":"https://api.github.com/users/centminmod/orgs","repos_url":"https://api.github.com/users/centminmod/repos","events_url":"https://api.github.com/users/centminmod/events{/privacy}","received_events_url":"https://api.github.com/users/centminmod/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-09-25T04:02:25Z","updated_at":"2018-05-09T15:09:19Z","closed_at":null,"author_association":"NONE","body":"I install Wrk via git clone on CentOS 7.4 64bit systems. Usually it works fine except for one system I get the following error when running `wrk` with parameters\r\n\r\n```\r\nPANIC: unprotected error in call to Lua API (attempt to index a nil value)\r\n```\r\n\r\n```\r\nwrk -v\r\nwrk 4.0.2-2-g91655b5 [epoll] Copyright (C) 2012 Will Glozer\r\nUsage: wrk <options> <url>                            \r\n  Options:                                            \r\n    -c, --connections <N>  Connections to keep open   \r\n    -d, --duration    <T>  Duration of test           \r\n    -t, --threads     <N>  Number of threads to use   \r\n                                                      \r\n    -s, --script      <S>  Load Lua script file       \r\n    -H, --header      <H>  Add header to request      \r\n        --latency          Print latency statistics   \r\n        --timeout     <T>  Socket/request timeout     \r\n    -v, --version          Print version details      \r\n                                                      \r\n  Numeric arguments may include a SI unit (1k, 1M, 1G)\r\n  Time arguments may include a time unit (2s, 2m, 2h)\r\n```\r\n\r\n```\r\n ldd wrk\r\n        linux-vdso.so.1 =>  (0x00007ffd9215e000)\r\n        libluajit-5.1.so.2 => /opt/wrk-luajit/lib/libluajit-5.1.so.2 (0x00007f774201a000)\r\n        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f7741ded000)\r\n        libm.so.6 => /lib64/libm.so.6 (0x00007f7741aeb000)\r\n        libdl.so.2 => /lib64/libdl.so.2 (0x00007f77418e7000)\r\n        libc.so.6 => /lib64/libc.so.6 (0x00007f7741523000)\r\n        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f774130d000)\r\n        /lib64/ld-linux-x86-64.so.2 (0x000055f9372b6000)\r\n```\r\n\r\n```\r\n/opt/wrk-openssl/bin/openssl version -a\r\nOpenSSL 1.1.0f  25 May 2017\r\nbuilt on: reproducible build, date unspecified\r\nplatform: linux-x86_64\r\ncompiler: ccache gcc -DZLIB -DZLIB_SHARED -DDSO_DLFCN -DHAVE_DLFCN_H -DNDEBUG -DOPENSSL_THREADS -DOPENSSL_NO_DYNAMIC_ENGINE -DOPENSSL_PIC -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DRC4_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DPADLOCK_ASM -DPOLY1305_ASM -DOPENSSLDIR=\"\\\"/opt/wrk-openssl\\\"\" -DENGINESDIR=\"\\\"/opt/wrk-openssl/lib/engines-1.1\\\"\"  -Wa,--noexecstack\r\nOPENSSLDIR: \"/opt/wrk-openssl\"\r\nENGINESDIR: \"/opt/wrk-openssl/lib/engines-1.1\"\r\n```\r\nI installed using following steps on all systems that are working as well\r\n\r\n```\r\nOPENSSL_VERSION='1.1.0f'\r\nrm -rf /svr-setup/wrk-openssl\r\nmkdir -p /svr-setup/wrk-openssl\r\ncd /svr-setup/wrk-openssl\r\nwget -cnv https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz\r\ntar xvzf openssl-${OPENSSL_VERSION}.tar.gz\r\ncd openssl-${OPENSSL_VERSION}\r\nOPENSSL_CUSTOMPATH='/opt/wrk-openssl'\r\nexport STATICLIBSSL=\"${OPENSSL_CUSTOMPATH}\"\r\nLIBRPATH='/opt/wrk-openssl/lib'\r\n./config -Wl,--enable-new-dtags,-rpath,'$(LIBRPATH)' --prefix=$STATICLIBSSL --openssldir=$STATICLIBSSL no-shared zlib-dynamic\r\nmake -j2\r\nmake install_ssldirs\r\nmake install_sw\r\n\\cp -Rpf /etc/ssl/certs/* /opt/wrk-openssl/certs/\r\n\r\ncd /svr-setup\r\nrm -rf /svr-setup/wrk-luajit\r\ngit clone http://luajit.org/git/luajit-2.0.git wrk-luajit\r\ncd wrk-luajit\r\nmake -j2 PREFIX=/opt/wrk-luajit\r\nmake install PREFIX=/opt/wrk-luajit\r\nMAJVER=$(awk -F \"=  \" '/MAJVER=  / {print $2}' Makefile)\r\nMINVER=$(awk -F \"=  \" '/MINVER=  / {print $2}' Makefile)\r\nRELVER=$(awk -F \"=  \" '/RELVER=  / {print $2}' Makefile)\r\nPREREL=$(awk -F \"=  \" '/PREREL=  / {print $2}' Makefile)\r\nrm -rf /opt/wrk-luajit/bin/luajit\r\nln -sf /opt/wrk-luajit/bin/luajit-${MAJVER}.${MINVER}.${RELVER}${PREREL} /opt/wrk-luajit/bin/luajit\r\n\r\ncd /svr-setup\r\nrm -rf /svr-setup/wrk\r\ngit clone https://github.com/wg/wrk\r\ncd wrk\r\nexport PATH=$PATH:/opt/wrk-luajit/bin\r\nexport LDFLAGS='-Wl,-rpath,/opt/wrk-luajit/lib'\r\nmake WITH_LUAJIT=/opt/wrk-luajit WITH_OPENSSL=/opt/wrk-openssl\r\n\\cp -af wrk /usr/local/bin/wrk\r\n```"},"comment":{"url":"https://api.github.com/repos/wg/wrk/issues/comments/387772145","html_url":"https://github.com/wg/wrk/issues/298#issuecomment-387772145","issue_url":"https://api.github.com/repos/wg/wrk/issues/298","id":387772145,"user":{"login":"dantti","id":29507,"avatar_url":"https://avatars0.githubusercontent.com/u/29507?v=4","gravatar_id":"","url":"https://api.github.com/users/dantti","html_url":"https://github.com/dantti","followers_url":"https://api.github.com/users/dantti/followers","following_url":"https://api.github.com/users/dantti/following{/other_user}","gists_url":"https://api.github.com/users/dantti/gists{/gist_id}","starred_url":"https://api.github.com/users/dantti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dantti/subscriptions","organizations_url":"https://api.github.com/users/dantti/orgs","repos_url":"https://api.github.com/users/dantti/repos","events_url":"https://api.github.com/users/dantti/events{/privacy}","received_events_url":"https://api.github.com/users/dantti/received_events","type":"User","site_admin":false},"created_at":"2018-05-09T15:09:19Z","updated_at":"2018-05-09T15:09:19Z","author_association":"NONE","body":"I'm getting this error using wrk package from Ubuntu 18.04 which is also 4.0.2-2 version, did you manage to make it work?"}}
{"actor":{"display_login":"dantti"}}