Skip to content

Random segfaults with req_raw_header #1313

@ghost

Description

Hello

We are seeing occasional segfaults using req_raw_header.

Here's how to reproduce:

local h = ngx.req.raw_header()

backtrace:

Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x0817073f in ngx_http_lua_ngx_req_raw_header ()
(gdb) bt full
#0 0x0817073f in ngx_http_lua_ngx_req_raw_header ()
No symbol table info available.
#1 0xf76b23c5 in lj_BC_FUNCC () from /usr/local/openresty/luajit/lib/libluajit-5.1.so.2
No symbol table info available.
#2 0xf76c9f25 in lua_pcall (L=0xf69f41c0, nargs=0, nresults=1, errfunc=1) at lj_api.c:1129
g = 0xf69f41f0
oldh = 0 '\000'
ef =
status =
PRETTY_FUNCTION = "lua_pcall"
#3 0x0818c00c in ngx_http_lua_header_filter_by_chunk ()
No symbol table info available.
#4 0x0818c2b2 in ngx_http_lua_header_filter_file ()
No symbol table info available.
#5 0x0818bc83 in ngx_http_lua_header_filter ()
No symbol table info available.
#6 0x081b3da8 in ngx_http_headers_more_filter ()
No symbol table info available.
#7 0x082323b9 in ngx_http_subs_header_filter ()
No symbol table info available.
#8 0x081091ad in ngx_http_not_modified_header_filter ()
No symbol table info available.
#9 0x080cbbe3 in ngx_http_send_header ()
No symbol table info available.
#10 0x080cdc45 in ngx_http_send_special_response.isra ()
---Type to continue, or q to quit---
No symbol table info available.
#11 0x080ce013 in ngx_http_special_response_handler ()
No symbol table info available.
#12 0x080d1f93 in ngx_http_finalize_request ()
No symbol table info available.
#13 0x080d3aa7 in ngx_http_process_request_line ()
No symbol table info available.
#14 0x080a993b in ngx_event_process_posted ()
No symbol table info available.
#15 0x080a922b in ngx_process_events_and_timers ()
No symbol table info available.
#16 0x080b3468 in ngx_worker_process_cycle ()
No symbol table info available.
#17 0x080b1a81 in ngx_spawn_process ()
No symbol table info available.
#18 0x080b4f74 in ngx_master_process_cycle ()
No symbol table info available.
#19 0x0807f450 in main ()
No symbol table info available.

nginx version: openresty/1.13.6.1
built with OpenSSL 1.0.1t 3 May 2016

on debian jessie

I'm not sure which requests are causing this and if it's possible to find

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions