Project

General

Profile

Bug #1138

mod_proxy_core crashed for X-Rewrite-* feature

Added by qhy over 12 years ago. Updated over 12 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
Category:
mod_proxy_core
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Missing in 1.5.x:

Description

lighttpd 1.5.0 r1820(from svn)

config file


server.modules = (
        "mod_status",
        "mod_access",
        "mod_proxy_core",
        "mod_proxy_backend_http" 
)

proxy-core.balancer = "round-robin" 
proxy-core.protocol = "http" 
proxy-core.max-pool-size = 256
proxy-core.max-keep-alive-requests = 0
proxy-core.allow-x-rewrite = "enable" 
proxy-core.backends = ( "x.x.x.242")

$HTTP["host"] == "x.x.x.246" {
        proxy-core.backends = ( "x.x.x.246")
}

$HTTP["host"] == "x.x.x.244" {
        proxy-core.backends = ( "x.x.x.244")
}

$HTTP["host"] == "x.x.x.243" {
        proxy-core.backends = ( "x.x.x.243")
}

$HTTP["host"] == "x.x.x.245" {
        proxy-core.backends = ( "x.x.x.245")
}

'''x.x.x.242 output:'''[BR]


HTTP/1.1 302 Found
Location: http://x.x.x.243/2007-04/23/0100643AA2462C5E5BCED40005A8D16B168024-4C2D-67BB-AEA3-4CFD632A1400.flv
X-Rewrite-Host: x.x.x.243
X-Rewrite-URI: /2007-04/23/0100643AA2462C5E5BCED40005A8D16B168024-4C2D-67BB-AEA3-4CFD632A1400.flv
X-Rewrite-Backend: x.x.x.243
Content-Length: 0
Connection: close
Date: Mon, 23 Apr 2007 10:24:37 GMT
Server: lighttpd/1.5.0

'''first gdb:'''[BR]
'''(gdb) r -D -f /usr/local/etc/lighttpd.conf'''[BR]


Starting program: /usr/t/lighttpd-1.5.0/src/lighttpd -D -f /usr/local/etc/lighttpd.conf
[Thread debugging using libthread_db enabled]
[New Thread 182894091072 (LWP 7985)]
mod_proxy_core_address.c.158: (trace) resolving x.x.x.242 on port 80
mod_proxy_core_address.c.63: (trace) adding x.x.x.242:80 to the address-pool
mod_proxy_core_address.c.158: (trace) resolving x.x.x.246 on port 80
mod_proxy_core_address.c.63: (trace) adding x.x.x.246:80 to the address-pool
mod_proxy_core_address.c.158: (trace) resolving x.x.x.244 on port 80
mod_proxy_core_address.c.63: (trace) adding x.x.x.244:80 to the address-pool
mod_proxy_core_address.c.158: (trace) resolving x.x.x.243 on port 80
mod_proxy_core_address.c.63: (trace) adding x.x.x.243:80 to the address-pool
mod_proxy_core_address.c.158: (trace) resolving x.x.x.245 on port 80
mod_proxy_core_address.c.63: (trace) adding x.x.x.245:80 to the address-pool
[New Thread 1084229984 (LWP 7986)]
[New Thread 1094719840 (LWP 7987)]
[New Thread 1105209696 (LWP 7988)]
[New Thread 1115699552 (LWP 7989)]
[New Thread 1115769184 (LWP 7990)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 182894091072 (LWP 7985)]
fdevent_linux_sysepoll_event_add (ev=0x54b3b0, sock=0x0, events=1) at fdevent_linux_sysepoll.c:51
51              if (sock->fde_ndx == -1) add = 1;
(gdb) bt
#0  fdevent_linux_sysepoll_event_add (ev=0x54b3b0, sock=0x0, events=1) at fdevent_linux_sysepoll.c:51
#1  0x0000000000417639 in fdevent_event_add (ev=Variable "ev" is not available.
) at fdevent.c:239
#2  0x0000002a95875ae1 in proxy_handle_fdevent (s=0x5330d0, ctx=0x17a0400, revents=4) at mod_proxy_core.c:1040
#3  0x00000000004081cd in lighty_mainloop (srv=0x5330d0) at server.c:943
#4  0x0000000000409742 in main (argc=5481232, argv=Variable "argv" is not available.
) at server.c:1710
(gdb) frame 0
#0  fdevent_linux_sysepoll_event_add (ev=0x54b3b0, sock=0x0, events=1) at fdevent_linux_sysepoll.c:51
51              if (sock->fde_ndx == -1) add = 1;
(gdb) p sock
$3 = (iosocket *) 0x0
(gdb) frame 1
#1  0x0000000000417639 in fdevent_event_add (ev=Variable "ev" is not available.
) at fdevent.c:239
239             if (ev->event_add) ev->event_add(ev, sock, events);
(gdb) p sock
Variable "sock" is not available.
(gdb) frame 2
#2  0x0000002a95875ae1 in proxy_handle_fdevent (s=0x5330d0, ctx=0x17a0400, revents=4) at mod_proxy_core.c:1040
1040                    fdevent_event_add(srv->ev, proxy_con->sock, FDEVENT_IN);
(gdb) p proxy_con
$4 = (proxy_connection *) 0x189e690
(gdb) p proxy_con->sock
$5 = (iosocket *) 0x0
(gdb) p *proxy_con
$6 = {sock = 0x0, request_count = 16465, last_read = 236528535192, last_write = 24773616, address = 0xfdaac94691827eb8, 
  protocol = 0x35fd93a644eea6fe, protocol_data = 0x4e3ccbc9ea674416, send = 0xfc728c71d3d472aa, recv = 0xc160ac973e200f60, 
  state = 2408967786, state_ts = 7232340849705130679, proxy_sess = 0x8f4cec31551d4fda}

'''second gdb:'''[BR]
'''(gdb) r -D -f /usr/local/etc/lighttpd.conf'''[BR]


Starting program: /usr/t/lighttpd-1.5.0/src/lighttpd -D -f /usr/local/etc/lighttpd.conf
[Thread debugging using libthread_db enabled]
[New Thread 182894091072 (LWP 7970)]
mod_proxy_core_address.c.158: (trace) resolving x.x.x.242 on port 80
mod_proxy_core_address.c.63: (trace) adding x.x.x.242:80 to the address-pool
mod_proxy_core_address.c.158: (trace) resolving x.x.x.246 on port 80
mod_proxy_core_address.c.63: (trace) adding x.x.x.246:80 to the address-pool
mod_proxy_core_address.c.158: (trace) resolving x.x.x.244 on port 80
mod_proxy_core_address.c.63: (trace) adding x.x.x.244:80 to the address-pool
mod_proxy_core_address.c.158: (trace) resolving x.x.x.243 on port 80
mod_proxy_core_address.c.63: (trace) adding x.x.x.243:80 to the address-pool
mod_proxy_core_address.c.158: (trace) resolving x.x.x.245 on port 80
mod_proxy_core_address.c.63: (trace) adding x.x.x.245:80 to the address-pool
[New Thread 1084229984 (LWP 7971)]
[New Thread 1094719840 (LWP 7972)]
[New Thread 1105209696 (LWP 7973)]
[New Thread 1115699552 (LWP 7974)]
[New Thread 1115769184 (LWP 7975)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 182894091072 (LWP 7970)]
0x0000002a95875ad4 in proxy_handle_fdevent (s=0x5330d0, ctx=0x762ae0, revents=4) at mod_proxy_core.c:1040
1040                    fdevent_event_add(srv->ev, proxy_con->sock, FDEVENT_IN);
(gdb) bt
#0  0x0000002a95875ad4 in proxy_handle_fdevent (s=0x5330d0, ctx=0x762ae0, revents=4) at mod_proxy_core.c:1040
#1  0x00000000004081cd in lighty_mainloop (srv=0x5330d0) at server.c:943
#2  0x0000000000409742 in main (argc=5481232, argv=Variable "argv" is not available.
) at server.c:1710
(gdb) frame 0
#0  0x0000002a95875ad4 in proxy_handle_fdevent (s=0x5330d0, ctx=0x762ae0, revents=4) at mod_proxy_core.c:1040
1040                    fdevent_event_add(srv->ev, proxy_con->sock, FDEVENT_IN);
(gdb) p sess
Variable "sess" is not available.
(gdb) p proxy_con
$1 = (proxy_connection *) 0x1
mod_proxy_core.patch (763 Bytes) mod_proxy_core.patch patch to fix the bug qhy, 2007-04-24 03:01

History

#1

Updated by qhy over 12 years ago

OS is CentOS 4.3(X64)
Linux b01 2.6.9-34.ELsmp #1 SMP Thu Mar 9 06:23:23 GMT 2006 x86_64 x86_64 x86_64 GNU/Linux

#2

Updated by darix over 12 years ago

  • Status changed from New to Fixed
  • Resolution set to fixed

patch applied in 1856

Also available in: Atom