openresty / openresty/lua-nginx-module

init_worker_by_lua workers stuck on gc_traverse_tab

Open
#2,445 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
11.8k
Forks
2.1k
Avg merge
6h 1m
Merged PRs (30d)
6

Description

Howdy.
Anyone ever encountered something like this?
It's not something I can reproduce unfortunately but I encountrred it several timer now.

#0  0x00007f12771747ae in gc_traverse_tab (t=0x7edcdddc5a28, g=0x7f1276be73f0) at lj_gc.c:217
#1  propagatemark (g=0x7f1276be73f0) at lj_gc.c:333
#2  0x00007f1277175798 in lj_gc_fullgc (L=0x7f1276be7380) at lj_gc.c:804
#3  0x00007f127718763d in lua_gc (L=L@entry=0x7f1276be7380, what=what@entry=2, data=data@entry=0) at lj_api.c:1300
#4  0x00005625f14a8e57 in ngx_http_lua_report (log=<optimized out>, L=0x7f1276be7380, status=<optimized out>, prefix=<optimized out>) at gcore/modules/ngx_http_lua_module/src/ngx_http_lua_util.c:4514
#5  0x00005625f14c16fe in ngx_http_lua_init_worker (cycle=0x56285cd1e058) at gcore/modules/ngx_http_lua_module/src/ngx_http_lua_initworkerby.c:298
#6  0x00005625f13ac05e in ngx_worker_process_init (cycle=cycle@entry=0x56285cd1e058, worker=worker@entry=1) at src/os/unix/ngx_process_cycle.c:1150
#7  0x00005625f13ac59d in ngx_worker_process_cycle (cycle=cycle@entry=0x56285cd1e058, data=data@entry=0x1) at src/os/unix/ngx_process_cycle.c:922
#8  0x00005625f13aa5d5 in ngx_spawn_process (cycle=cycle@entry=0x56285cd1e058, proc=proc@entry=0x5625f13ac560 <ngx_worker_process_cycle>, data=data@entry=0x1, name=name@entry=0x5625f188ddbe "worker process", respawn=respawn@entry=-4) at src/os/unix/ngx_process.c:203
#9  0x00005625f13abc48 in ngx_start_worker_processes (cycle=cycle@entry=0x56285cd1e058, n=20, type=type@entry=-4) at src/os/unix/ngx_process_cycle.c:533
#10 0x00005625f13ae2cc in ngx_master_process_cycle (cycle=0x56285cd1e058) at src/os/unix/ngx_process_cycle.c:419
#11 0x00005625f13796da in main (argc=<optimized out>, argv=<optimized out>) at src/core/nginx.c:489
[Inferior 1 (process 2740) detached]

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading ngx_http_lua_init_worker in gcore/modules/ngx_http_lua_module/src/ngx_http_lua_initworkerby.c and the ngx_http_lua_report call in ngx_http_lua_util.c, then compare them with the LuaJIT frames in lj_gc.c and lj_api.c. Attempt to reproduce the worker stall around init_worker_by_lua; done means the cause is identified and a documented next step is available.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, lua, nginx
Domain
backend
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
18/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.