Project

General

Profile

Bug #2876 » lighttpd-gdb.txt

arekm, 2018-03-15 18:44

 
(gdb) r
Starting program: /usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x00000000004323e8 in sock_addr_from_str_hints (srv=0x646260, saddr=saddr@entry=0x7fffffffd790, len=len@entry=0x7fffffffd78c, str=0x0, family=family@entry=0, port=9000) at sock_addr.c:385
385 if (0 == strcmp(str, "localhost")) {
(gdb) bt
#0 0x00000000004323e8 in sock_addr_from_str_hints (srv=0x646260, saddr=saddr@entry=0x7fffffffd790, len=len@entry=0x7fffffffd78c, str=0x0, family=family@entry=0, port=9000)
at sock_addr.c:385
#1 0x000000000041ef4e in gw_proc_sockaddr_init (srv=srv@entry=0x646260, proc=proc@entry=0x754bf0, host=<optimized out>, host=<optimized out>) at gw_backend.c:391
#2 0x00000000004216c3 in gw_set_defaults_backend (srv=srv@entry=0x646260, p=p@entry=0x712f70, du=0x6aded0, i=i@entry=0, sh_exec=sh_exec@entry=0) at gw_backend.c:1495
#3 0x00007ffff61005c1 in mod_fastcgi_set_defaults (srv=0x646260, p_d=0x712f70) at mod_fastcgi.c:80
#4 0x0000000000424ea6 in plugins_call_set_defaults (srv=srv@entry=0x646260) at plugin.c:384
#5 0x00000000004095df in server_main (srv=srv@entry=0x646260, argc=argc@entry=4, argv=argv@entry=0x7fffffffe008) at server.c:1430
#6 0x000000000040811f in main (argc=4, argv=0x7fffffffe008) at server.c:2055
(gdb) frame 1
#1 0x000000000041ef4e in gw_proc_sockaddr_init (srv=srv@entry=0x646260, proc=proc@entry=0x754bf0, host=<optimized out>, host=<optimized out>) at gw_backend.c:391
391 if (1 != sock_addr_from_str_hints(srv, &addr, &addrlen,
(gdb) print srv
$1 = (server *) 0x646260
(gdb) frame 2
#2 0x00000000004216c3 in gw_set_defaults_backend (srv=srv@entry=0x646260, p=p@entry=0x712f70, du=0x6aded0, i=i@entry=0, sh_exec=sh_exec@entry=0) at gw_backend.c:1495
1495 if (0 != gw_proc_sockaddr_init(srv, host, proc)) {
(gdb) print srv
$2 = (server *) 0x646260
(gdb) print host
$3 = (gw_host *) 0x754870
(gdb) print *host
$4 = {
id = 0x754940,
first = 0x0,
unused_procs = 0x0,
min_procs = 2,
max_procs = 5,
num_procs = 1,
active_procs = 0,
max_load_per_proc = 1,
idle_timeout = 60,
disable_time = 0,
max_requests_per_proc = 0,
host = 0x754960,
port = 9000,
family = 2,
unixsocket = 0x754980,
bin_path = 0x7549c0,
bin_env = 0x7549e0,
bin_env_copy = 0x754a10,
docroot = 0x7549a0,
check_local = 0,
break_scriptfilename_for_php = 0,
fix_root_path_name = 1,
xsendfile_allow = 0,
xsendfile_docroot = 0x754a60,
load = 0,
max_id = 1,
strip_request_uri = 0x754a40,
kill_signal = 15,
listen_backlog = 1024,
refcount = 0,
args = {
ptr = 0x754b30,
size = 16,
used = 2
}
}
(gdb) print host->host
$5 = (buffer *) 0x754960
(gdb) print *host->host
$6 = {
ptr = 0x0,
used = 0,
size = 0
}
(gdb)
(1-1/2)