Skip to content

bug: attempt to index local 'opentracing' (a nil value) when using zipkin plugin #10590

Description

@junhao69535

Description

this situation is rarely triggered, approximately tens of millions of occurrences only occur a few times. more likely to occur when the request is a websocket.

error msg:
51#51: 4824 failed to run log_by_lua: ...ocal/apisix/plugins/apisix/plugins/zipkin.lua:268: attempt to index local 'opentracing' (a nil value)
stack traceback:
...ocal/apisix/plugins/apisix/plugins/log-zipkin.lua:268: in function 'phase_func'
/usr/local/apisix/apisix/plugin.lua:1139: in function 'run_plugin'
/usr/local/apisix/apisix/plugin.lua:1172: in function 'run_global_rules'
/usr/local/apisix/apisix/init.lua:461: in function 'common_phase'
/usr/local/apisix/apisix/init.lua:870: in function 'http_log_phase'
log_by_lua(nginx.conf:417):2: in main chunk while logging request, client: 10.255.217.88, server: _, request: "GET / HTTP/1.1", upstream: "http://10.212.166.227:9082/", host: "xxx.com"

Environment

  • APISIX version (run apisix version): 2.14.1
  • Operating system (run uname -a): Linux apisix-b7d9c6fd4-5tn2r 4.19.0-10-amd64 change: added doc of how to load plugin. #1 SMP Debian 4.19.132-1 (2020-07-24) x86_64 GNU/Linux
  • OpenResty / Nginx version (run openresty -V or nginx -V): openresty/1.21.4.2
  • etcd version, if relevant (run curl http://127.0.0.1:9090/v1/server_info): 3.4.0
  • APISIX Dashboard version, if relevant: 3.0.1
  • Plugin runner version, for issues related to plugin runners:
  • LuaRocks version, for installation issues (run luarocks --version):

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status
    ✅ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions