{"action":"created","issue":{"url":"https://api.github.com/repos/openresty/ngx_openresty/issues/127","labels_url":"https://api.github.com/repos/openresty/ngx_openresty/issues/127/labels{/name}","comments_url":"https://api.github.com/repos/openresty/ngx_openresty/issues/127/comments","events_url":"https://api.github.com/repos/openresty/ngx_openresty/issues/127/events","html_url":"https://github.com/openresty/ngx_openresty/issues/127","id":117303502,"number":127,"title":"nginx core dump in lj_gc","user":{"login":"ninesunqian","id":1024983,"avatar_url":"https://avatars.githubusercontent.com/u/1024983?v=3","gravatar_id":"","url":"https://api.github.com/users/ninesunqian","html_url":"https://github.com/ninesunqian","followers_url":"https://api.github.com/users/ninesunqian/followers","following_url":"https://api.github.com/users/ninesunqian/following{/other_user}","gists_url":"https://api.github.com/users/ninesunqian/gists{/gist_id}","starred_url":"https://api.github.com/users/ninesunqian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ninesunqian/subscriptions","organizations_url":"https://api.github.com/users/ninesunqian/orgs","repos_url":"https://api.github.com/users/ninesunqian/repos","events_url":"https://api.github.com/users/ninesunqian/events{/privacy}","received_events_url":"https://api.github.com/users/ninesunqian/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":26,"created_at":"2015-11-17T07:59:59Z","updated_at":"2015-11-27T09:15:54Z","closed_at":null,"body":"Hello!\r\n      I use nginx lua to anti-theft. Its process is verifying url and calling ngx.location.capture (subrequest).\r\nBut After I deploy nginx and lua to my server and start nginx, nginx will core dump frequently. Once \"killall -1 nginx\", coredumps will disappear.  Once \"service nginx restart\", coredumps will appear.   The backtraces are:\r\n\r\n#0  0x00007faaf0d7e372 in gc_sweep (g=0x25894a0, p=0x24df6e0, lim=2147483391) at lj_gc.c:394\r\n#1  0x00007faaf0d7efb3 in gc_onestep (L=0x2558a80) at lj_gc.c:623\r\n#2  0x00007faaf0d7f1b8 in lj_gc_step (L=0x2558a80) at lj_gc.c:676\r\n#3  0x00007faaf0d8f208 in lua_pushlstring (L=0x2558a80, str=0x5c86fe \"ETag\", len=4) at lj_api.c:586\r\n#4  0x00000000005133e5 in ngx_http_lua_handle_subreq_responses (r=0x24e5730, ctx=0x24e6ad0)\r\n    at ../ngx_lua-0.9.16/src/ngx_http_lua_subrequest.c:1309\r\n#5  0x0000000000513efd in ngx_http_lua_subrequest_resume (r=0x24e5730) at ../ngx_lua-0.9.16/src/ngx_http_lua_subrequest.c:1575\r\n#6  0x0000000000532c90 in ngx_http_lua_content_wev_handler (r=0x24e5730) at ../ngx_lua-0.9.16/src/ngx_http_lua_contentby.c:131\r\n#7  0x000000000048b111 in ngx_http_run_posted_requests (c=0x7faae9b77370) at src/http/ngx_http_request.c:2223\r\n#8  0x000000000048a894 in ngx_http_process_request (r=0x24e5730) at src/http/ngx_http_request.c:1906\r\n#9  0x00000000004892f6 in ngx_http_process_request_headers (rev=0x7faae9a86190) at src/http/ngx_http_request.c:1335\r\n#10 0x000000000048885b in ngx_http_process_request_line (rev=0x7faae9a86190) at src/http/ngx_http_request.c:1014\r\n#11 0x000000000048770e in ngx_http_wait_request_handler (rev=0x7faae9a86190) at src/http/ngx_http_request.c:500\r\n#12 0x00000000004632e8 in ngx_event_process_posted (cycle=0x24db030, posted=0x83a3b0) at src/event/ngx_event_posted.c:33\r\n#13 0x0000000000461301 in ngx_process_events_and_timers (cycle=0x24db030) at src/event/ngx_event.c:263\r\n#14 0x000000000046c214 in ngx_worker_process_cycle (cycle=0x24db030, data=0x1) at src/os/unix/ngx_process_cycle.c:769\r\n#15 0x0000000000469082 in ngx_spawn_process (cycle=0x24db030, proc=0x46c03c <ngx_worker_process_cycle>, data=0x1, \r\n    name=0x5c6ae0 \"worker process\", respawn=1) at src/os/unix/ngx_process.c:198\r\n#16 0x000000000046bc0c in ngx_reap_children (cycle=0x24db030) at src/os/unix/ngx_process_cycle.c:621\r\n#17 0x000000000046ac62 in ngx_master_process_cycle (cycle=0x24db030) at src/os/unix/ngx_process_cycle.c:174\r\n#18 0x000000000043af8c in main (argc=3, argv=0x7fffbe7dfb88) at src/core/nginx.c:415\r\n\r\n(gdb) p o->gch\r\nCannot access memory at address 0xe8d17010\r\n\r\n\r\nand:\r\n\r\n#0  0x00007faaf0d7d90d in gc_traverse_tab (g=0x25894a0, t=0x262d5a0) at lj_gc.c:194\r\n#1  0x00007faaf0d7e083 in propagatemark (g=0x25894a0) at lj_gc.c:307\r\n#2  0x00007faaf0d7ef08 in gc_onestep (L=0x262cf60) at lj_gc.c:611\r\n#3  0x00007faaf0d7f1b8 in lj_gc_step (L=0x262cf60) at lj_gc.c:676\r\n#4  0x00007faaf0d8fdb3 in lua_newuserdata (L=0x262cf60, size=3) at lj_api.c:695\r\n#5  0x0000000000516f9f in ngx_http_lua_var_get (L=0x262cf60) at ../ngx_lua-0.9.16/src/ngx_http_lua_variable.c:113\r\n#6  0x00007faaf0d7ae6b in lj_BC_FUNCC () from /opt/bravo/luajit/lib/libluajit-5.1.so.2\r\n#7  0x00007faaf0d91d70 in lua_resume (L=0x262cf60, nargs=1) at lj_api.c:1134\r\n#8  0x000000000052d23f in ngx_http_lua_run_thread (L=0x2589460, r=0x260b140, ctx=0x26210a0, nrets=1)\r\n    at ../ngx_lua-0.9.16/src/ngx_http_lua_util.c:1015\r\n#9  0x0000000000513f8b in ngx_http_lua_subrequest_resume (r=0x260b140) at ../ngx_lua-0.9.16/src/ngx_http_lua_subrequest.c:1591\r\n#10 0x0000000000532c90 in ngx_http_lua_content_wev_handler (r=0x260b140) at ../ngx_lua-0.9.16/src/ngx_http_lua_contentby.c:131\r\n#11 0x000000000048b111 in ngx_http_run_posted_requests (c=0x7faae9b77370) at src/http/ngx_http_request.c:2223\r\n#12 0x000000000048a894 in ngx_http_process_request (r=0x260b140) at src/http/ngx_http_request.c:1906\r\n#13 0x00000000004892f6 in ngx_http_process_request_headers (rev=0x7faae9a86190) at src/http/ngx_http_request.c:1335\r\n#14 0x000000000048885b in ngx_http_process_request_line (rev=0x7faae9a86190) at src/http/ngx_http_request.c:1014\r\n#15 0x000000000048770e in ngx_http_wait_request_handler (rev=0x7faae9a86190) at src/http/ngx_http_request.c:500\r\n#16 0x00000000004632e8 in ngx_event_process_posted (cycle=0x24db030, posted=0x83a3b0) at src/event/ngx_event_posted.c:33\r\n#17 0x0000000000461301 in ngx_process_events_and_timers (cycle=0x24db030) at src/event/ngx_event.c:263\r\n#18 0x000000000046c214 in ngx_worker_process_cycle (cycle=0x24db030, data=0x9) at src/os/unix/ngx_process_cycle.c:769\r\n#19 0x0000000000469082 in ngx_spawn_process (cycle=0x24db030, proc=0x46c03c <ngx_worker_process_cycle>, data=0x9, \r\n    name=0x5c6ae0 \"worker process\", respawn=-3) at src/os/unix/ngx_process.c:198\r\n#20 0x000000000046b354 in ngx_start_worker_processes (cycle=0x24db030, n=16, type=-3) at src/os/unix/ngx_process_cycle.c:358\r\n#21 0x000000000046aad7 in ngx_master_process_cycle (cycle=0x24db030) at src/os/unix/ngx_process_cycle.c:130\r\n#22 0x000000000043af8c in main (argc=3, argv=0x7fffbe7dfb88) at src/core/nginx.c:415\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/openresty/ngx_openresty/issues/comments/160083660","html_url":"https://github.com/openresty/ngx_openresty/issues/127#issuecomment-160083660","issue_url":"https://api.github.com/repos/openresty/ngx_openresty/issues/127","id":160083660,"user":{"login":"ninesunqian","id":1024983,"avatar_url":"https://avatars.githubusercontent.com/u/1024983?v=3","gravatar_id":"","url":"https://api.github.com/users/ninesunqian","html_url":"https://github.com/ninesunqian","followers_url":"https://api.github.com/users/ninesunqian/followers","following_url":"https://api.github.com/users/ninesunqian/following{/other_user}","gists_url":"https://api.github.com/users/ninesunqian/gists{/gist_id}","starred_url":"https://api.github.com/users/ninesunqian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ninesunqian/subscriptions","organizations_url":"https://api.github.com/users/ninesunqian/orgs","repos_url":"https://api.github.com/users/ninesunqian/repos","events_url":"https://api.github.com/users/ninesunqian/events{/privacy}","received_events_url":"https://api.github.com/users/ninesunqian/received_events","type":"User","site_admin":false},"created_at":"2015-11-27T09:15:54Z","updated_at":"2015-11-27T09:15:54Z","body":"OK, I will do it next monday"}}