janiussyafiq commented on issue #13200:
URL: https://github.com/apache/apisix/issues/13200#issuecomment-4240824069
Hi @jens-skribble, thanks for reporting the bug.
I was able to reproduce the bug in both scenarios:
1. Using provided reproduce.sh script.
2. MRE from local APISIX (traditional mode)
a. Configure `config.yaml`
```
apisix:
tracing: true
ssl:
enable: true
listen:
- port: 9443
deployment:
role: traditional
role_traditional:
config_provider: etcd
admin:
admin_key:
- name: admin
key: <redacted>
role: admin
```
b. Run `make run`
c. Configure SSL cert and key (can generate thru openssl, i just copied
the one provided in reproduce.zip)
```
curl http://127.0.0.1:9180/apisix/admin/ssls/1 -H 'X-API-KEY: <redacted>' \
-X PUT -d "{
\"snis\": [\"localhost\"],
\"cert\": \"$(cat /path/to/server.crt)\",
\"key\": \"$(cat /path/to/server.key)\"
}"
```
d. Create route
```
curl http://127.0.0.1:9180/apisix/admin/routes/1 \
-H 'X-API-KEY: <redacted>' \
-X PUT -d '{
"uri": "/*",
"upstream": {
"type": "roundrobin",
"nodes": {"httpbin.org:80": 1}
}
}'
```
e. Trigger the crash (two requests on same TLS connection):
```
curl -sk \
-o /dev/null -w "%{http_code} " https://localhost:9443/get \
-o /dev/null -w "%{http_code}" https://localhost:9443/get
```
f. Check `error.log`
```
2026/04/13 17:23:55 [error] 179311#179311: *45028 lua entry thread aborted:
runtime error: /home/janiussyafiq/GitHub/apisix/apisix/utils/span.lua:62: bad
argument #1 to 'insert' (table expected, got nil)
stack traceback:
coroutine 0:
[C]: in function 'insert'
/home/janiussyafiq/GitHub/apisix/apisix/utils/span.lua:62: in function
'new'
/home/janiussyafiq/GitHub/apisix/apisix/tracer.lua:53: in function
'start'
/home/janiussyafiq/GitHub/apisix/apisix/init.lua:698: in function
'http_access_phase'
access_by_lua(nginx.conf:370):2: in main chunk, client: 127.0.0.1,
server: _, request: "GET /get HTTP/2.0", host: "localhost:9443", request_id:
"ebf545017724304f723182a819c476ec"
2026/04/13 17:23:55 [error] 179311#179311: *45028 failed to run
header_filter_by_lua*:
/home/janiussyafiq/GitHub/apisix/apisix/utils/span.lua:62: bad argument #1 to
'insert' (table expected, got nil)
stack traceback:
[C]: in function 'insert'
/home/janiussyafiq/GitHub/apisix/apisix/utils/span.lua:62: in function
'new'
/home/janiussyafiq/GitHub/apisix/apisix/tracer.lua:53: in function
'start'
/home/janiussyafiq/GitHub/apisix/apisix/init.lua:904: in function
'http_header_filter_phase'
header_filter_by_lua(nginx.conf:414):2: in main chunk, client:
127.0.0.1, server: _, request: "GET /get HTTP/2.0", host: "localhost:9443",
request_id: "ebf545017724304f723182a819c476ec"
2026/04/13 17:23:55 [error] 179311#179311: *45028 failed to run log_by_lua*:
/home/janiussyafiq/GitHub/apisix/apisix/tracer.lua:80: bad argument #1 to
'ipairs' (table expected, got nil)
stack traceback:
[C]: in function 'ipairs'
/home/janiussyafiq/GitHub/apisix/apisix/tracer.lua:80: in function
'release'
/home/janiussyafiq/GitHub/apisix/apisix/init.lua:1111: in function
'http_log_phase'
log_by_lua(nginx.conf:422):2: in main chunk while logging request,
client: 127.0.0.1, server: _, request: "GET /get HTTP/2.0", host:
"localhost:9443", request_id: "ebf545017724304f723182a819c476ec"
```
However the proposed solution didn't seem to fix the issue in my case. I
still get the same errors.
```
tablepool.release("tracing", tracing)
ctx.tracing = nil -- add this
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]