nginx 0.8.45-0.8.49 segfault bug

zhijianpeng nginx-forum at nginx.us
Wed Sep 1 20:19:55 MSD 2010


Sorry,I forgot about that my friend patch 0.8.47 for me.

Let's forget about it,  and [b]0.8.49 is clean[/b]
here is my conf:
[code]
#user  nobody;
worker_processes  1;

#daemon off;
#master_process off;

#error_log  logs/error.log;
#error_log  logs/error.log  notice;
error_log  logs/error.log  debug;

#pid        logs/nginx.pid;


events {
    worker_connections  1024;
}


http {
        [b]client_header_buffer_size       8k;[/b]


    server {
        listen       80;
        server_name  localhost;
        root    /opt/www;
        [b]proxy_ignore_client_abort       on;[/b]

        location / {
                        proxy_pass http://81.19.68.137;

                }

        }

}
[/code]

and my test shell:
[code]
# telnet localhost 80
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
[b]POST /aa/bb HTTP/1.1
Host: www.nginx.net
Content-Length: 5

aa=11[/b]
[color=#FF0000][b]Connection closed by foreign host.[/b][/color]
[/code]

and the debug log
[code]
2010/09/02 00:14:51 [debug] 15807#0: epoll: fd:6 ev:0001
d:00002B77E3EDC010
2010/09/02 00:14:51 [debug] 15807#0: accept on 0.0.0.0:80, ready: 0
2010/09/02 00:14:51 [debug] 15807#0: posix_memalign:
000000001025AF10:256 @16
2010/09/02 00:14:51 [debug] 15807#0: *3 accept: 127.0.0.1 fd:3
2010/09/02 00:14:51 [debug] 15807#0: *3 event timer add: 3:
60000:1283357751685
2010/09/02 00:14:51 [debug] 15807#0: *3 epoll add event: fd:3 op:1
ev:80000001
2010/09/02 00:14:51 [debug] 15807#0: timer delta: 18645
2010/09/02 00:14:51 [debug] 15807#0: posted events 0000000000000000
2010/09/02 00:14:51 [debug] 15807#0: worker cycle
2010/09/02 00:14:51 [debug] 15807#0: epoll timer: 60000
2010/09/02 00:14:52 [debug] 15807#0: epoll: fd:3 ev:0001
d:00002B77E3EDC160
2010/09/02 00:14:52 [debug] 15807#0: *3 malloc: 000000001025D300:1248
2010/09/02 00:14:52 [debug] 15807#0: *3 posix_memalign:
0000000010252360:256 @16
2010/09/02 00:14:52 [debug] 15807#0: *3 malloc: 0000000010256AF0:8192
2010/09/02 00:14:52 [debug] 15807#0: *3 posix_memalign:
000000001025D7F0:4096 @16
2010/09/02 00:14:52 [debug] 15807#0: *3 http process request line
2010/09/02 00:14:52 [debug] 15807#0: *3 recv: fd:3 22 of 8192
2010/09/02 00:14:52 [debug] 15807#0: *3 http request line: "POST /aa/bb
HTTP/1.1"
2010/09/02 00:14:52 [debug] 15807#0: *3 http uri: "/aa/bb"
2010/09/02 00:14:52 [debug] 15807#0: *3 http args: ""
2010/09/02 00:14:52 [debug] 15807#0: *3 http exten: ""
2010/09/02 00:14:52 [debug] 15807#0: *3 http process request header
line
2010/09/02 00:14:52 [debug] 15807#0: *3 recv: fd:3 -1 of 8170
2010/09/02 00:14:52 [debug] 15807#0: *3 recv() not ready (11: Resource
temporarily unavailable)
2010/09/02 00:14:52 [debug] 15807#0: timer delta: 651
2010/09/02 00:14:52 [debug] 15807#0: posted events 0000000000000000
2010/09/02 00:14:52 [debug] 15807#0: worker cycle
2010/09/02 00:14:52 [debug] 15807#0: epoll timer: 59349
2010/09/02 00:14:52 [debug] 15807#0: epoll: fd:3 ev:0001
d:00002B77E3EDC160
2010/09/02 00:14:52 [debug] 15807#0: *3 http process request header
line
2010/09/02 00:14:52 [debug] 15807#0: *3 recv: fd:3 21 of 8170
2010/09/02 00:14:52 [debug] 15807#0: *3 http header: "Host:
www.nginx.net"
2010/09/02 00:14:52 [debug] 15807#0: *3 recv: fd:3 -1 of 8149
2010/09/02 00:14:52 [debug] 15807#0: *3 recv() not ready (11: Resource
temporarily unavailable)
2010/09/02 00:14:52 [debug] 15807#0: timer delta: 6
2010/09/02 00:14:52 [debug] 15807#0: posted events 0000000000000000
2010/09/02 00:14:52 [debug] 15807#0: worker cycle
2010/09/02 00:14:52 [debug] 15807#0: epoll timer: 59343
2010/09/02 00:14:52 [debug] 15807#0: epoll: fd:3 ev:0001
d:00002B77E3EDC160
2010/09/02 00:14:52 [debug] 15807#0: *3 http process request header
line
2010/09/02 00:14:52 [debug] 15807#0: *3 recv: fd:3 19 of 8149
2010/09/02 00:14:52 [debug] 15807#0: *3 http header: "Content-Length:
5"
2010/09/02 00:14:52 [debug] 15807#0: *3 recv: fd:3 -1 of 8130
2010/09/02 00:14:52 [debug] 15807#0: *3 recv() not ready (11: Resource
temporarily unavailable)
2010/09/02 00:14:52 [debug] 15807#0: timer delta: 4
2010/09/02 00:14:52 [debug] 15807#0: posted events 0000000000000000
2010/09/02 00:14:52 [debug] 15807#0: worker cycle
2010/09/02 00:14:52 [debug] 15807#0: epoll timer: 59339
2010/09/02 00:14:52 [debug] 15807#0: epoll: fd:3 ev:0001
d:00002B77E3EDC160
2010/09/02 00:14:52 [debug] 15807#0: *3 http process request header
line
2010/09/02 00:14:52 [debug] 15807#0: *3 recv: fd:3 2 of 8130
2010/09/02 00:14:52 [debug] 15807#0: *3 http header done
2010/09/02 00:14:52 [debug] 15807#0: *3 event timer del: 3:
1283357751685
2010/09/02 00:14:52 [debug] 15807#0: *3 rewrite phase: 0
2010/09/02 00:14:52 [debug] 15807#0: *3 test location: "/"
2010/09/02 00:14:52 [debug] 15807#0: *3 using configuration "/"
2010/09/02 00:14:52 [debug] 15807#0: *3 http cl:5 max:1048576
2010/09/02 00:14:52 [debug] 15807#0: *3 rewrite phase: 2
2010/09/02 00:14:52 [debug] 15807#0: *3 post rewrite phase: 3
2010/09/02 00:14:52 [debug] 15807#0: *3 generic phase: 4
2010/09/02 00:14:52 [debug] 15807#0: *3 generic phase: 5
2010/09/02 00:14:52 [debug] 15807#0: *3 access phase: 6
2010/09/02 00:14:52 [debug] 15807#0: *3 access phase: 7
2010/09/02 00:14:52 [debug] 15807#0: *3 post access phase: 8
2010/09/02 00:14:52 [debug] 15807#0: *3 http read client request body
2010/09/02 00:14:52 [debug] 15807#0: *3 recv: fd:3 -1 of 5
2010/09/02 00:14:52 [debug] 15807#0: *3 recv() not ready (11: Resource
temporarily unavailable)
2010/09/02 00:14:52 [debug] 15807#0: *3 http client request body recv
-2
2010/09/02 00:14:52 [debug] 15807#0: *3 http client request body rest 5
2010/09/02 00:14:52 [debug] 15807#0: *3 event timer add: 3:
60000:1283357752356
2010/09/02 00:14:52 [debug] 15807#0: *3 http finalize request: -4,
"/aa/bb?" a:1, c:2
2010/09/02 00:14:52 [debug] 15807#0: *3 http request count:2 blk:0
2010/09/02 00:14:52 [debug] 15807#0: timer delta: 10
2010/09/02 00:14:52 [debug] 15807#0: posted events 0000000000000000
2010/09/02 00:14:52 [debug] 15807#0: worker cycle
2010/09/02 00:14:52 [debug] 15807#0: epoll timer: 60000
2010/09/02 00:14:53 [debug] 15807#0: epoll: fd:3 ev:0001
d:00002B77E3EDC160
2010/09/02 00:14:53 [debug] 15807#0: *3 http run request: "/aa/bb?"
2010/09/02 00:14:53 [debug] 15807#0: *3 http read client request body
2010/09/02 00:14:53 [debug] 15807#0: *3 recv: fd:3 5 of 5
2010/09/02 00:14:53 [debug] 15807#0: *3 http client request body recv 5
2010/09/02 00:14:53 [debug] 15807#0: *3 http client request body rest 0
2010/09/02 00:14:53 [debug] 15807#0: *3 event timer del: 3:
1283357752356
2010/09/02 00:14:53 [debug] 15807#0: *3 http init upstream, client
timer: 0
2010/09/02 00:14:53 [debug] 15807#0: *3 epoll add event: fd:3 op:3
ev:80000005
2010/09/02 00:14:53 [debug] 15807#0: *3 http script copy: "Host: "
2010/09/02 00:14:53 [debug] 15807#0: *3 http script var: "81.19.68.137"
2010/09/02 00:14:53 [debug] 15807#0: *3 http script copy: "
"
2010/09/02 00:14:53 [debug] 15807#0: *3 http script copy: "Connection:
close
"
2010/09/02 00:14:53 [debug] 15807#0: *3 http proxy header:
"Content-Length: 5"
2010/09/02 00:14:53 [debug] 15807#0: *3 http proxy header:
"POST /aa/bb HTTP/1.0
Host: 81.19.68.137
Connection: close
Content-Length: 5

"
2010/09/02 00:14:53 [debug] 15807#0: *3 posix_memalign:
0000000010258B00:4096 @16
2010/09/02 00:14:53 [debug] 15807#0: *3 http cleanup add:
0000000010258B80
2010/09/02 00:14:53 [debug] 15807#0: *3 get rr peer, try: 1
2010/09/02 00:14:53 [debug] 15807#0: *3 socket 9
2010/09/02 00:14:53 [debug] 15807#0: *3 epoll add connection: fd:9
ev:80000005
2010/09/02 00:14:53 [debug] 15807#0: *3 connect to 81.19.68.137:80, fd:9
#4
2010/09/02 00:14:53 [debug] 15807#0: *3 http upstream connect: -2
2010/09/02 00:14:53 [debug] 15807#0: *3 event timer add: 9:
60000:1283357753347
2010/09/02 00:14:53 [debug] 15807#0: timer delta: 991
2010/09/02 00:14:53 [debug] 15807#0: posted events 0000000000000000
2010/09/02 00:14:53 [debug] 15807#0: worker cycle
2010/09/02 00:14:53 [debug] 15807#0: epoll timer: 60000
2010/09/02 00:14:53 [debug] 15807#0: epoll: fd:3 ev:0005
d:00002B77E3EDC160
2010/09/02 00:14:53 [debug] 15807#0: *3 http run request: "/aa/bb?"
2010/09/02 00:14:53 [debug] 15807#0: *3 http read client request body
2010/09/02 00:14:53 [debug] 15807#0: *3 add cleanup: 0000000010258CE0
2010/09/02 00:14:53 [debug] 15807#0: *3 hashed path:
/opt/itc/vmsnginx/client_body_temp/0000000002
2010/09/02 00:14:53 [debug] 15807#0: *3 temp fd:10
2010/09/02 00:14:53 [warn] 15807#0: *3 a client request body is buffered
to a temporary file /opt/itc/vmsnginx/client_body_temp/0000000002 while
connecting to upstream, client: 127.0.0.1, server: localhost, request:
"POST /aa/bb HTTP/1.1", upstream: "http://81.19.68.137:80/aa/bb", host:
"www.nginx.net"
2010/09/02 00:14:53 [debug] 15807#0: *3 write: 10, 000000001025E6B0, 5,
0
2010/09/02 00:14:53 [debug] 15807#0: *3 recv: fd:3 0 of 0
2010/09/02 00:14:53 [debug] 15807#0: *3 http client request body recv 0
2010/09/02 00:14:53 [info] 15807#0: *3 client closed prematurely
connection while connecting to upstream, client: 127.0.0.1, server:
localhost, request: "POST /aa/bb HTTP/1.1", upstream:
"http://81.19.68.137:80/aa/bb", host: "www.nginx.net"
2010/09/02 00:14:53 [debug] 15807#0: *3 http finalize request: 400,
"/aa/bb?" a:1, c:1
2010/09/02 00:14:53 [debug] 15807#0: *3 http terminate request count:1
2010/09/02 00:14:53 [debug] 15807#0: *3 cleanup http upstream request:
"/aa/bb"
2010/09/02 00:14:53 [debug] 15807#0: *3 finalize http upstream request:
-4
2010/09/02 00:14:53 [debug] 15807#0: *3 finalize http proxy request
2010/09/02 00:14:53 [debug] 15807#0: *3 free rr peer 1 0
2010/09/02 00:14:53 [debug] 15807#0: *3 close http upstream connection:
9
2010/09/02 00:14:53 [debug] 15807#0: *3 event timer del: 9:
1283357753347
2010/09/02 00:14:53 [debug] 15807#0: *3 http finalize request: -4,
"/aa/bb?" a:1, c:1
2010/09/02 00:14:53 [debug] 15807#0: *3 set http keepalive handler
2010/09/02 00:14:53 [debug] 15807#0: *3 http close request
2010/09/02 00:14:53 [debug] 15807#0: *3 http log handler
2010/09/02 00:14:53 [debug] 15807#0: *3 run cleanup: 0000000010258CE0
2010/09/02 00:14:53 [debug] 15807#0: *3 file cleanup: fd:10
2010/09/02 00:14:53 [debug] 15807#0: *3 free: 000000001025D7F0, unused:
16
2010/09/02 00:14:53 [debug] 15807#0: *3 free: 0000000010258B00, unused:
3469
2010/09/02 00:14:53 [debug] 15807#0: *3 event timer add: 3:
75000:1283357768347
2010/09/02 00:14:53 [debug] 15807#0: *3 free: 000000001025D300
2010/09/02 00:14:53 [debug] 15807#0: *3 free: 0000000010256AF0
2010/09/02 00:14:53 [debug] 15807#0: *3 hc free: 0000000000000000 0
2010/09/02 00:14:53 [debug] 15807#0: *3 hc busy: 0000000000000000 0
2010/09/02 00:14:53 [debug] 15807#0: *3 tcp_nodelay
[b][color=#FF0000]2010/09/02 00:14:53 [notice] 15803#0: signal 17
(SIGCHLD) received
2010/09/02 00:14:53 [alert] 15803#0: worker process 15807 exited on
signal 11[/color][/b]
2010/09/02 00:14:53 [debug] 15803#0: wake up, sigio 0
2010/09/02 00:14:53 [debug] 15803#0: reap children
2010/09/02 00:14:53 [debug] 15803#0: child: 0 15807 e:0 t:1 d:0 r:1 j:0
2010/09/02 00:14:53 [debug] 15803#0: channel 3:7
2010/09/02 00:14:53 [debug] 15811#0: malloc: 000000001025BAF0:6144
2010/09/02 00:14:53 [debug] 15811#0: malloc: 00002B77E3EDC010:172032
2010/09/02 00:14:53 [debug] 15811#0: malloc: 000000001026A8D0:106496
2010/09/02 00:14:53 [debug] 15811#0: malloc: 00000000102848E0:106496
2010/09/02 00:14:53 [debug] 15811#0: epoll add event: fd:6 op:1
ev:00000001
2010/09/02 00:14:53 [debug] 15811#0: epoll add event: fd:7 op:1
ev:00000001
2010/09/02 00:14:53 [debug] 15811#0: setproctitle: "nginx: worker
process"
2010/09/02 00:14:53 [debug] 15811#0: worker cycle
2010/09/02 00:14:53 [debug] 15811#0: epoll timer: -1
2010/09/02 00:14:53 [notice] 15803#0: start worker process 15811
2010/09/02 00:14:53 [debug] 15803#0: sigsuspend
[/code]

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,125959,126051#msg-126051




More information about the nginx mailing list