Welcome! Log In Create A New Profile

Advanced

nginx segment fault when it need write error log but no error file is configured

October 13, 2011 08:24AM
Hi,

During my test of nginx_udplog module, I run into a nginx segment fault.
In nginx conf file, I don't set nginx error log, I set
access_udplog 192.168.1.1 main;

but 192.168.1.1 udp port 514 is not open.

When I send a request, nginx crashed.

gdb info:


#0 0x0805a4b0 in ngx_log_error_core (level=4, log=0x812c3d4, err=111,
fmt=0x80e2437 "send() failed") at src/core/ngx_log.c:93
#1 0x080636f4 in ngx_connection_error (c=0x812fc60, err=111,
text=0x80e2437 "send() failed") at src/core/ngx_connection.c:1093
#2 0x080708e5 in ngx_unix_send (c=0x812fc60,


(gdb) frame 0
#0 0x0805a4b0 in ngx_log_error_core (level=4, log=0x812c3d4, err=111,
fmt=0x80e2437 "send() failed") at src/core/ngx_log.c:93
93 if (log->file->fd == NGX_INVALID_FILE) {
(gdb) p *log
$1 = {log_level = 4, file = 0x0, connection = 0, handler = 0, data = 0x0,
action = 0x80ebfc6 "logging"}

It seems log->file should be checked also.


If I set error log file, nginx won't crash.

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

nginx segment fault when it need write error log but no error file is configured

deltay 1787 October 13, 2011 08:24AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 93
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready