Project

General

Profile

Bug #2876 » lighttpd-gdb.txt

arekm, 2018-03-15 18:44

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

    
6
Program received signal SIGSEGV, Segmentation fault.                                                                                                                                         
7
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  
8
385             if (0 == strcmp(str, "localhost")) {                                                                                                                                         
9
(gdb) bt                                                                                                                                                                                     
10
#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)                 
11
    at sock_addr.c:385                                                                                                                                                                       
12
#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                           
13
#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                       
14
#3  0x00007ffff61005c1 in mod_fastcgi_set_defaults (srv=0x646260, p_d=0x712f70) at mod_fastcgi.c:80                                                                                          
15
#4  0x0000000000424ea6 in plugins_call_set_defaults (srv=srv@entry=0x646260) at plugin.c:384                                                                                                 
16
#5  0x00000000004095df in server_main (srv=srv@entry=0x646260, argc=argc@entry=4, argv=argv@entry=0x7fffffffe008) at server.c:1430                                                           
17
#6  0x000000000040811f in main (argc=4, argv=0x7fffffffe008) at server.c:2055                                                                                                                
18
(gdb) frame 1                                                                                                                                                                                
19
#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                           
20
391             if (1 != sock_addr_from_str_hints(srv, &addr, &addrlen,                                                                                                                      
21
(gdb) print srv                                                                                                                                                                              
22
$1 = (server *) 0x646260                                                                                                                                                                     
23
(gdb) frame 2                                                                                                                                                                                
24
#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                       
25
1495                        if (0 != gw_proc_sockaddr_init(srv, host, proc)) {                                                                                                               
26
(gdb) print srv
27
$2 = (server *) 0x646260
28
(gdb) print host
29
$3 = (gw_host *) 0x754870
30
(gdb) print *host
31
$4 = {
32
  id = 0x754940, 
33
  first = 0x0, 
34
  unused_procs = 0x0, 
35
  min_procs = 2, 
36
  max_procs = 5, 
37
  num_procs = 1, 
38
  active_procs = 0, 
39
  max_load_per_proc = 1, 
40
  idle_timeout = 60, 
41
  disable_time = 0, 
42
  max_requests_per_proc = 0, 
43
  host = 0x754960, 
44
  port = 9000, 
45
  family = 2, 
46
  unixsocket = 0x754980, 
47
  bin_path = 0x7549c0, 
48
  bin_env = 0x7549e0, 
49
  bin_env_copy = 0x754a10, 
50
  docroot = 0x7549a0, 
51
  check_local = 0, 
52
  break_scriptfilename_for_php = 0, 
53
  fix_root_path_name = 1, 
54
  xsendfile_allow = 0, 
55
  xsendfile_docroot = 0x754a60, 
56
  load = 0, 
57
  max_id = 1, 
58
  strip_request_uri = 0x754a40, 
59
  kill_signal = 15, 
60
  listen_backlog = 1024, 
61
  refcount = 0, 
62
  args = {
63
    ptr = 0x754b30, 
64
    size = 16, 
65
    used = 2
66
  }
67
}
68
(gdb) print host->host
69
$5 = (buffer *) 0x754960
70
(gdb) print *host->host
71
$6 = {
72
  ptr = 0x0, 
73
  used = 0, 
74
  size = 0
75
}
76
(gdb) 
(1-1/2)