Project

General

Profile

Actions

Bug #3094

closed

Lighttpd crashes after access to SCGI application

Added by rei-de-barulho over 3 years ago. Updated over 3 years ago.

Status:
Duplicate
Priority:
Normal
Category:
core
Target version:
ASK QUESTIONS IN Forums:
No

Description

Lighttpd version 1.4.58 crashes after HTTP request is done from web browser to an SCGI application. Requesting static resources of FCGI applications still works good.

Program receives signal SIGSEGV.

Backtrace:

0x0000555555571801 in gw_host_get (r=<optimized out>, extension=<optimized out>, balance=<optimized out>, debug=1)
    at /usr/src/debug/lighttpd-1.4.58-1.2.x86_64/src/gw_backend.c:941
941                 log_error(r->conf.errh, __FILE__, __LINE__,
Missing separate debuginfos, use: zypper install libpcre1-debuginfo-8.44-3.3.x86_64
(gdb) bt
#0  0x0000555555571801 in gw_host_get (r=<optimized out>, extension=<optimized out>, balance=<optimized out>, debug=1)
    at /usr/src/debug/lighttpd-1.4.58-1.2.x86_64/src/gw_backend.c:941
#1  0x000055555558e978 in gw_check_extension (r=r@entry=0x5555555d1c50, p=p@entry=0x55555562f100, uri_path_handler=uri_path_handler@entry=0, hctx_sz=hctx_sz@entry=0)
    at /usr/src/debug/lighttpd-1.4.58-1.2.x86_64/src/gw_backend.c:2460
#2  0x00007ffff7a06ad0 in scgi_check_extension (r=0x5555555d1c50, p_d=0x55555562f100, uri_path_handler=0)
    at /usr/src/debug/lighttpd-1.4.58-1.2.x86_64/src/mod_scgi.c:289
#3  0x0000555555576248 in plugins_call_fn_req_data (r=0x5555555d1c50, e=<optimized out>) at /usr/src/debug/lighttpd-1.4.58-1.2.x86_64/src/plugin.c:276
#4  0x0000555555577be0 in plugins_call_handle_subrequest_start (r=0x5555555d1c50) at /usr/src/debug/lighttpd-1.4.58-1.2.x86_64/src/plugin.c:330
#5  http_response_prepare (r=<optimized out>) at /usr/src/debug/lighttpd-1.4.58-1.2.x86_64/src/response.c:623
#6  http_response_handler (r=0x5555555d1c50) at /usr/src/debug/lighttpd-1.4.58-1.2.x86_64/src/response.c:1025
#7  0x000055555557affb in connection_state_machine_loop (r=0x5555555d1c50, con=0x5555555d1c50) at /usr/src/debug/lighttpd-1.4.58-1.2.x86_64/src/connections.c:1097
#8  0x000055555557b6e5 in connection_state_machine_h1 (con=0x5555555d1c50, r=0x5555555d1c50) at /usr/src/debug/lighttpd-1.4.58-1.2.x86_64/src/connections.c:1416
#9  connection_state_machine (con=0x5555555d1c50) at /usr/src/debug/lighttpd-1.4.58-1.2.x86_64/src/connections.c:1434
#10 0x000055555557610c in server_run_con_queue (joblist=<optimized out>) at /usr/src/debug/lighttpd-1.4.58-1.2.x86_64/src/server.c:1864
#11 server_main_loop (srv=0x5555555cf9d0) at /usr/src/debug/lighttpd-1.4.58-1.2.x86_64/src/server.c:1926
#12 0x00005555555661dc in main (argc=4, argv=0x7fffffffe268) at /usr/src/debug/lighttpd-1.4.58-1.2.x86_64/src/server.c:1960

The problem happens here:

940             if (debug) {
941                 log_error(r->conf.errh, __FILE__, __LINE__,
942                   "gw - found a host %s %hu", host->host->ptr, host->port);
943             }

Most of variables are optimized out, but I could find out that host->host is null.

Actions #1

Updated by rei-de-barulho over 3 years ago

Excerpt from the configuration:

####################### Simple Common Gateway Interface ########################
server.modules += ( "mod_scgi" )
index-file.names += ( "index.scgi" )
scgi.server = (
    ".scgi" => (
        "scgi-local" => (
            "socket"    => socket_dir + "/scgi-" + PID + ".socket",
            "bin-path"  => "/usr/local/bin/webplatform-container",
            "max-procs" => 1,
            "broken-scriptfilename" => "enable",
            "idle-timeout"  =>  10
        )
    )
)
scgi.debug = 1

Actions #2

Updated by gstrauss over 3 years ago

  • Status changed from New to Duplicate

Already fixed 6 months ago in lighttpd 1.4.59. See #3052

Actions

Also available in: Atom