I’m working on ubuntu
Posted at Nginx Forum:
I’m working on ubuntu
Posted at Nginx Forum:
On piÄ…, cze 26, 2009 at 06:10:19 -0400, meto wrote:
I’m still geting same coredumps and .deb package itself is bigger about 20kb. /usr/sbin/nginx is about 800kb when orginal is aprox. 500kb. But still i cant get any more details in coredupms. Could there be other problem? For example packages?
Try commenting out (or removing) any mentions of dh_strip in
debian/rules file.
Best regards,
Grzegorz N.
On sob, cze 27, 2009 at 06:02:00 -0400, meto wrote:
cln = (ngx_http_cleanup_t *) 0x76a3f0 u = (ngx_http_upstream_t *) 0x769d20 clcf = (ngx_http_core_loc_conf_t *) 0x755610 uscf = (ngx_http_upstream_srv_conf_t *) 0x0 uscfp = (ngx_http_upstream_srv_conf_t **) 0x6f61d0 umcf = (ngx_http_upstream_main_conf_t *) 0x30
What does
p *u
and
p *(u->conf)
say (in gdb)?
Why do all pointers on amd64 Linux look like portions of ASCII
strings…
Care to post your config? Are you using any recently added features?
Try turning caching off and see what happens.
Best regards,
Grzegorz N.
Ok, grate! Without dh_strip package weighs 14MB and current coredumps
became readable. Here it is:
warning: .dynamic section for “/usr/lib/libcrypto.so.0.9.8” is not at
the expected address (wrong library or version mismatch?)
Reading symbols from /lib/libcrypt.so.1…done.
Loaded symbols for /lib/libcrypt.so.1
Reading symbols from /usr/lib/libpcre.so.3…done.
Loaded symbols for /usr/lib/libpcre.so.3
Reading symbols from /usr/lib/libssl.so.0.9.8…done.
Loaded symbols for /usr/lib/libssl.so.0.9.8
Reading symbols from /usr/lib/libcrypto.so.0.9.8…done.
Loaded symbols for /usr/lib/libcrypto.so.0.9.8
Reading symbols from /lib/libdl.so.2…done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /usr/lib/libz.so.1…done.
Loaded symbols for /usr/lib/libz.so.1
Reading symbols from /lib/libc.so.6…done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/ld-linux-x86-64.so.2…done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
Reading symbols from /lib/libnss_compat.so.2…done.
Loaded symbols for /lib/libnss_compat.so.2
Reading symbols from /lib/libnsl.so.1…done.
Loaded symbols for /lib/libnsl.so.1
Reading symbols from /lib/libnss_nis.so.2…done.
Loaded symbols for /lib/libnss_nis.so.2
Reading symbols from /lib/libnss_files.so.2…done.
Loaded symbols for /lib/libnss_files.so.2
Core was generated by `nginx: worker pr’.
Program terminated with signal 11, Segmentation fault.
#0 0x000000000045dae4 in ngx_http_upstream_init (r=0x767b80) at
src/http/ngx_http_upstream.c:537
537 src/http/ngx_http_upstream.c: No such file or directory.
in src/http/ngx_http_upstream.c
(gdb) bt
#0 0x000000000045dae4 in ngx_http_upstream_init (r=0x767b80) at
src/http/ngx_http_upstream.c:537
#1 0x0000000000454a00 in ngx_http_read_client_request_body (r=0x767b80,
post_handler=0x45d414 )
at src/http/ngx_http_request_body.c:57
#2 0x000000000049386d in ngx_http_fastcgi_handler (r=0x767b80) at
src/http/modules/ngx_http_fastcgi_module.c:600
#3 0x000000000043e7b4 in ngx_http_core_content_phase (r=0x767b80,
ph=0x96db98) at src/http/ngx_http_core_module.c:1257
#4 0x000000000043d56c in ngx_http_core_run_phases (r=0x767b80) at
src/http/ngx_http_core_module.c:796
#5 0x000000000043d4e8 in ngx_http_handler (r=0x767b80) at
src/http/ngx_http_core_module.c:779
#6 0x000000000044a87e in ngx_http_process_request (r=0x767b80) at
src/http/ngx_http_request.c:1560
#7 0x00000000004492b3 in ngx_http_process_request_headers
(rev=0x9aa210) at src/http/ngx_http_request.c:1022
#8 0x0000000000448ac3 in ngx_http_process_request_line (rev=0x9aa210)
at src/http/ngx_http_request.c:832
#9 0x0000000000447f9e in ngx_http_init_request (rev=0x9aa210) at
src/http/ngx_http_request.c:508
#10 0x0000000000427aec in ngx_event_process_posted (cycle=0x6e9090,
posted=0x6c86a8) at src/event/ngx_event_posted.c:39
#11 0x00000000004258a9 in ngx_process_events_and_timers (cycle=0x6e9090)
at src/event/ngx_event.c:272
#12 0x0000000000431caa in ngx_worker_process_cycle (cycle=0x6e9090,
data=0x0) at src/os/unix/ngx_process_cycle.c:775
#13 0x000000000042eb31 in ngx_spawn_process (cycle=0x6e9090,
proc=0x431b2d , data=0x0, name=0x4a0100 “worker process”, respawn=3)
at src/os/unix/ngx_process.c:194
#14 0x000000000043166e in ngx_reap_children (cycle=0x6e9090) at
src/os/unix/ngx_process_cycle.c:577
#15 0x000000000043047c in ngx_master_process_cycle (cycle=0x6e9090) at
src/os/unix/ngx_process_cycle.c:161
#16 0x00000000004054ee in main (argc=1, argv=0x7fff3970f7d8) at
src/core/nginx.c:382
(gdb) bt full
#0 0x000000000045dae4 in ngx_http_upstream_init (r=0x767b80) at
src/http/ngx_http_upstream.c:537
host = (ngx_str_t *) 0x6f7198
i = 7773440
c = (ngx_connection_t *) 0x97d600
ctx = (ngx_resolver_ctx_t *) 0x30
temp = {next = 0x7fff3970ee60, resolver = 0xff0a000000000000,
udp_connection = 0x0, ident = 139814882679264, state = 4096, type = 0,
name = {
len = 140734157092816, data = 0x0}, naddrs = 0, addrs =
0x7f29303c2360, addr = 190, handler = 0x7fff3970ee80, data = 0x0,
timeout = 4375161,
quick = 9053088, recursion = 4096, event = 0x6f6e10}
cln = (ngx_http_cleanup_t *) 0x76a3f0
u = (ngx_http_upstream_t *) 0x769d20
clcf = (ngx_http_core_loc_conf_t *) 0x755610
uscf = (ngx_http_upstream_srv_conf_t *) 0x0
uscfp = (ngx_http_upstream_srv_conf_t **) 0x6f61d0
umcf = (ngx_http_upstream_main_conf_t *) 0x30
#1 0x0000000000454a00 in ngx_http_read_client_request_body (r=0x767b80,
post_handler=0x45d414 )
at src/http/ngx_http_request_body.c:57
preread = 7690488
size = 7299536
b = (ngx_buf_t *) 0x100
cl = (ngx_chain_t *) 0x408763
next = (ngx_chain_t **) 0x7fff3970ef50
tf = (ngx_temp_file_t *) 0x6f7098
rb = (ngx_http_request_body_t *) 0x6f7198
clcf = (ngx_http_core_loc_conf_t *) 0x6f61d0
#2 0x000000000049386d in ngx_http_fastcgi_handler (r=0x767b80) at
src/http/modules/ngx_http_fastcgi_module.c:600
rc = 7680928
u = (ngx_http_upstream_t *) 0x769d20
f = (ngx_http_fastcgi_ctx_t *) 0x6f7038
flcf = (ngx_http_fastcgi_loc_conf_t *) 0x755c10
#3 0x000000000043e7b4 in ngx_http_core_content_phase (r=0x767b80,
ph=0x96db98) at src/http/ngx_http_core_module.c:1257
root = 7764864
rc = 9886592
path = {len = 9886568, data = 0xfffffffffffffffe }
#4 0x000000000043d56c in ngx_http_core_run_phases (r=0x767b80) at
src/http/ngx_http_core_module.c:796
rc = -2
ph = (ngx_http_phase_handler_t *) 0x96da90
cmcf = (ngx_http_core_main_conf_t *) 0x6ea250
#5 0x000000000043d4e8 in ngx_http_handler (r=0x767b80) at
src/http/ngx_http_core_module.c:779
cmcf = (ngx_http_core_main_conf_t *) 0x7f293170a380
#6 0x000000000044a87e in ngx_http_process_request (r=0x767b80) at
src/http/ngx_http_request.c:1560
c = (ngx_connection_t *) 0x97d600
#7 0x00000000004492b3 in ngx_http_process_request_headers
(rev=0x9aa210) at src/http/ngx_http_request.c:1022
n = 153
rc = 0
rv = 0
—Type to continue, or q to quit—
header = {len = 256, data = 0x6f6c90 “-jo”}
h = (ngx_table_elt_t *) 0x6f6930
c = (ngx_connection_t *) 0x97d600
hh = (ngx_http_header_t *) 0x6bd9e0
r = (ngx_http_request_t *) 0x767b80
cscf = (ngx_http_core_srv_conf_t *) 0x702ed0
cmcf = (ngx_http_core_main_conf_t *) 0x6ea250
#8 0x0000000000448ac3 in ngx_http_process_request_line (rev=0x9aa210)
at src/http/ngx_http_request.c:832
n = 190
rc = 0
rv = 7299536
c = (ngx_connection_t *) 0x97d600
r = (ngx_http_request_t *) 0x767b80
cscf = (ngx_http_core_srv_conf_t *) 0x7fff3970f170
#9 0x0000000000447f9e in ngx_http_init_request (rev=0x9aa210) at
src/http/ngx_http_request.c:508
tp = (ngx_time_t *) 0x6c6658
i = 0
c = (ngx_connection_t *) 0x97d600
r = (ngx_http_request_t *) 0x767b80
sin = (struct sockaddr_in *) 0x6e9090
port = (ngx_http_port_t *) 0x96e108
addr = (ngx_http_in_addr_t *) 0x96e118
ctx = (ngx_http_log_ctx_t *) 0x8a23e0
addr_conf = (ngx_http_addr_conf_t *) 0x96e120
hc = (ngx_http_connection_t *) 0x8a23f8
cscf = (ngx_http_core_srv_conf_t *) 0x702ed0
clcf = (ngx_http_core_loc_conf_t *) 0x702f88
cmcf = (ngx_http_core_main_conf_t *) 0x6ea250
#10 0x0000000000427aec in ngx_event_process_posted (cycle=0x6e9090,
posted=0x6c86a8) at src/event/ngx_event_posted.c:39
ev = (ngx_event_t *) 0x9aa210
#11 0x00000000004258a9 in ngx_process_events_and_timers (cycle=0x6e9090)
at src/event/ngx_event.c:272
flags = 3
timer = 5736
delta = 0
#12 0x0000000000431caa in ngx_worker_process_cycle (cycle=0x6e9090,
data=0x0) at src/os/unix/ngx_process_cycle.c:775
i = 0
c = (ngx_connection_t *) 0x7fff3970f7d0
#13 0x000000000042eb31 in ngx_spawn_process (cycle=0x6e9090,
proc=0x431b2d , data=0x0, name=0x4a0100 “worker process”, respawn=3)
at src/os/unix/ngx_process.c:194
on = 1
pid = 0
s = 3
#14 0x000000000043166e in ngx_reap_children (cycle=0x6e9090) at
src/os/unix/ngx_process_cycle.c:577
i = 3
n = 4
—Type to continue, or q to quit—
live = 1
ch = {command = 2, pid = 948, slot = 3, fd = -1}
ccf = (ngx_core_conf_t *) 0x4a451d96
#15 0x000000000043047c in ngx_master_process_cycle (cycle=0x6e9090) at
src/os/unix/ngx_process_cycle.c:161
title = 0x96e3e6 “master process /usr/sbin/nginx”
p = (u_char *) 0x96e404 “”
size = 31
i = 1
n = 139814879976144
set = {__val = {0 }}
itv = {it_interval = {tv_sec = 1, tv_usec = 0}, it_value =
{tv_sec = 0, tv_usec = 6}}
live = 1
delay = 0
ls = (ngx_listening_t *) 0x7fff3970f6f0
ccf = (ngx_core_conf_t *) 0x6e9b30
#16 0x00000000004054ee in main (argc=1, argv=0x7fff3970f7d8) at
src/core/nginx.c:382
i = 46
log = (ngx_log_t *) 0x6c6400
cycle = (ngx_cycle_t *) 0x6e9090
init_cycle = {conf_ctx = 0x0, pool = 0x6e82d0, log = 0x6c6400,
new_log = {log_level = 0, file = 0x0, connection = 0, handler = 0, data
= 0x0,
action = 0x0}, files = 0x0, free_connections = 0x0,
free_connection_n = 0, listening = {elts = 0x6e8900, nelts = 4, size =
184, nalloc = 10,
pool = 0x6e82d0}, pathes = {elts = 0x0, nelts = 0, size = 0, nalloc
= 0, pool = 0x0}, open_files = {last = 0x0, part = {elts = 0x0, nelts =
0,
next = 0x0}, size = 0, nalloc = 0, pool = 0x0}, shared_memory =
{last = 0x0, part = {elts = 0x0, nelts = 0, next = 0x0}, size = 0,
nalloc = 0,
pool = 0x0}, connection_n = 0, files_n = 0, connections = 0x0,
read_events = 0x0, write_events = 0x0, old_cycle = 0x0, conf_file = {len
= 21,
data = 0x49c83e “/etc/nginx/nginx.conf”}, conf_param = {len = 0,
data = 0x0}, conf_prefix = {len = 11, data = 0x49c83e
“/etc/nginx/nginx.conf”},
prefix = {len = 17, data = 0x49c82c “/usr/local/nginx/”}, lock_file =
{len = 0, data = 0x0}, hostname = {len = 0, data = 0x0}}
ccf = (ngx_core_conf_t *) 0x6e9b30
(gdb)
Posted at Nginx Forum:
This part I have added recently, but as I recall it wasn’t parallel to
this bug(?).
#anti-slowloris
client_body_timeout 10;
client_header_timeout 10;
keepalive_timeout 10;
keepalive_requests 250;
send_timeout 10;
limit_zone limit_per_ip $binary_remote_addr 1m;
#end slowloris
#cache for performance?
open_file_cache max=1000 inactive=20s;
open_file_cache_valid 30s;
open_file_cache_min_uses 2;
open_file_cache_errors on;
#end cache
Posted at Nginx Forum:
(gdb) p *u
$1 = {read_event_handler = 0, write_event_handler = 0, peer =
{connection = 0x0, sockaddr = 0x0, socklen = 0, name = 0x0, tries = 0,
get = 0, free = 0,
data = 0x0, set_session = 0, save_session = 0, rcvbuf = 0, log =
0x8a23a0, cached = 0, log_error = 1}, pipe = 0x6f7098, request_bufs =
0x76a380,
output = {buf = 0x0, in = 0x0, free = 0x0, busy = 0x0, sendfile = 0,
directio = 0, unaligned = 0, need_in_memory = 0, need_in_temp = 0, pool
= 0x6f61d0,
allocated = 0, bufs = {num = 1, size = 8192}, tag = 0x6c5220,
output_filter = 0x40c815 , filter_ctx = 0x769e18}, writer = {out = 0x0,
last = 0x0, connection = 0x0, pool = 0x6f61d0, limit = 0}, conf =
0x755c10, headers_in = {headers = {last = 0x0, part = {elts = 0x0, nelts
= 0,
next = 0x0}, size = 0, nalloc = 0, pool = 0x0}, status_n = 0,
status_line = {len = 0, data = 0x0}, status = 0x0, date = 0x0, server =
0x0,
connection = 0x0, expires = 0x0, etag = 0x0, x_accel_expires = 0x0,
x_accel_redirect = 0x0, x_accel_limit_rate = 0x0, content_type = 0x0,
content_length = 0x0, last_modified = 0x0, location = 0x0,
accept_ranges = 0x0, www_authenticate = 0x0, content_encoding = 0x0,
content_length_n = 0,
cache_control = {elts = 0x0, nelts = 0, size = 0, nalloc = 0, pool =
0x0}}, resolved = 0x0, buffer = {pos = 0x0, last = 0x0, file_pos = 0,
file_last = 0, start = 0x0, end = 0x0, tag = 0x0, file = 0x0, shadow
= 0x0, temporary = 0, memory = 0, mmap = 0, recycled = 0, in_file = 0,
flush = 0,
sync = 0, last_buf = 0, last_in_chain = 0, last_shadow = 0,
temp_file = 0, num = 0}, length = 0, out_bufs = 0x0, busy_bufs = 0x0,
free_bufs = 0x0,
input_filter_init = 0, input_filter = 0, input_filter_ctx = 0x0,
create_key = 0x493b77 ,
create_request = 0x493bff , reinit_request = 0x494afa ,
process_header = 0x494b55 , abort_request = 0x496728 ,
finalize_request = 0x496774 , rewrite_redirect = 0, timeout = 0, state
= 0x0, method = {len = 0, data = 0x0},
schema = {len = 10, data = 0x4a9946 “fastcgi://”}, uri = {len = 0,
data = 0x0}, cleanup = 0x76a3f0, store = 0, cacheable = 0, accel = 0,
ssl = 0,
cache_status = 0, buffering = 1, request_sent = 0, header_sent = 0}
(gdb) p *(u->conf)
$2 = {upstream = 0x0, connect_timeout = 60000, send_timeout = 60000,
read_timeout = 60000, timeout = 0, send_lowat = 0, buffer_size = 4096,
busy_buffers_size = 8192, max_temp_file_size = 1073741824,
temp_file_write_size = 8192, busy_buffers_size_conf =
18446744073709551615,
max_temp_file_size_conf = 18446744073709551615,
temp_file_write_size_conf = 18446744073709551615, bufs = {num = 8, size
= 4096}, ignore_headers = 1,
next_upstream = 7, store_access = 384, buffering = 1,
pass_request_headers = 1, pass_request_body = 1, ignore_client_abort =
0, intercept_errors = 1,
cyclic_temp_file = 0, temp_path = 0x8a7608, hide_headers_hash =
{buckets = 0x8d2450, size = 15}, hide_headers = 0xffffffffffffffff,
pass_headers = 0xffffffffffffffff, cache = 0x0, cache_min_uses = 1,
cache_use_stale = 2147483649, cache_methods = 6, cache_valid = 0x0,
store_lengths = 0x0, store_values = 0x0, store = 0, intercept_404 = 0,
change_buffering = 0, ssl = 0x0, ssl_session_reuse = 0}
My config:
user www-data www-data;
worker_processes 4;
worker_rlimit_core 100m;
working_directory /var/lib/nginx/core;
worker_cpu_affinity 0001 0010 0100 1000;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
#keepalive_timeout 300;
#anti-slowloris
client_body_timeout 10;
client_header_timeout 10;
keepalive_timeout 10;
keepalive_requests 250;
send_timeout 10;
limit_zone limit_per_ip $binary_remote_addr 1m;
#end slowloris
#cache for performance?
open_file_cache max=1000 inactive=20s;
open_file_cache_valid 30s;
open_file_cache_min_uses 2;
open_file_cache_errors on;
#end cache
#limit_req_zone $binary_remote_addr zone=one:10m rate=5r/s;
#limit_req zone=one burst=20;
#if ( $request_filename ~* ^.+.(jpg|jpeg|gif|png|ico|css|js)$ ) {
#expires max;
#}
server_names_hash_bucket_size 33;
log_format main '$remote_addr - $remote_user [$time_local] $status
’
'“$request” $body_bytes_sent “$http_referer” ’
‘“$http_user_agent” “http_x_forwarded_for”’;
log_not_found off;
open_log_file_cache max=1000 inactive=20s min_uses=2 valid=1m;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
client_max_body_size 100M;
#gzip
gzip on;
gzip_min_length 1000;
gzip_proxied any;
gzip_vary on;
gzip_buffers 16 8k;
gzip_types text/plain application/xmltext/html text/xml
text/css application/x-javascript application/xhtml+xml;
#upstream_fair_shm_size 128k;
upstream php {
#ip_hash;
#fair weight_mode=idle no_rr;
server 127.0.0.1:9000 max_fails=0; # link to HAproxy
#server 127.0.0.1:9001 weight=40 max_fails=0;# fail_timeout=1s;
#server s1.xgame.pl:9001 weight=20 max_fails=10 fail_timeout=1s;
#server s4.xgame.pl:9001 weight=10 max_fails=10 fail_timeout=1s;
}
upstream php2 {
#ip_hash;
server 127.0.0.1:9001 weight=20 max_fails=4 fail_timeout=20s;
#server s4.xgame.pl:9001 weight=20 max_fails=4 fail_timeout=20s;
}
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}
Posted at Nginx Forum:
Skoro i tak rozmowa jest miedzy nami, to postaramy się to ogarnąć przez
maila, jabber albo gg a później feedback wrzuci się na mailingliste.
Mail/JID : [email protected] gg:1701610
Since it’s conversation between me and you, we could cope with this
through mail or communicator and then put some feedback here? Mail/JID :
[email protected] gg:1701610.
Regards
Maciek
Posted at Nginx Forum:
Have You came up with any conclusion?
Not yet, Grzogorz didn’t write to me anything so it’s still open
discussion…
Posted at Nginx Forum:
Hello!
On Sat, Jun 27, 2009 at 07:34:06AM -0400, meto wrote:
[…]
include /etc/nginx/conf.d/*.conf; include /etc/nginx/sites-enabled/*;
}
fr 2
p *r
p *flcf
And could you please show [at least relevant] include files? The
config above isn’t complete without ‘/etc/nginx/conf.d/.conf’ and
'/etc/nginx/sites-enabled/’.
Maxim D.
fr 2
#2 0x000000000049386d in ngx_http_fastcgi_handler (r=0x9d94f0) at
src/http/modules/ngx_http_fastcgi_module.c:600
600 src/http/modules/ngx_http_fastcgi_module.c: No such file or
directory.
in src/http/modules/ngx_http_fastcgi_module.c
p *r
(gdb) p *r
$1 = {signature = 1347703880, connection = 0x845128, ctx = 0x730970,
main_conf = 0x767de8, srv_conf = 0xa07d28, loc_conf = 0xa109a0,
read_event_handler = 0x45e536 ,
write_event_handler = 0x45e559 , cache = 0x0, upstream = 0x7254c0,
upstream_states = 0x725ec0,
pool = 0x730560, header_in = 0xb0e680, headers_in = {headers = {last =
0x9d9560, part = {elts = 0x730c60, nelts = 10, next = 0x0}, size = 48,
nalloc = 20, pool = 0x730560}, host = 0x730c60, connection = 0x0,
if_modified_since = 0x0, user_agent = 0x730c90, referer = 0x730de0,
content_length = 0x0, content_type = 0x0, range = 0x0, if_range =
0x0, transfer_encoding = 0x0, expect = 0x0, accept_encoding = 0x730d20,
via = 0x0,
authorization = 0x0, keep_alive = 0x730d80, x_forwarded_for = 0x0,
x_real_ip = 0x0, depth = 0x0, destination = 0x0, overwrite = 0x0, date =
0x0,
user = {len = 0, data = 0x0}, passwd = {len = 0, data = 0x0},
cookies = {elts = 0x731020, nelts = 1, size = 8, nalloc = 2, pool =
0x730560}, server = {
len = 10, data = 0x9d7dc8 “ipersia.eu”}, content_length_n = -1,
keep_alive_n = 300, connection_type = 2, msie = 0, msie4 = 0, msie6 = 0,
opera = 0,
gecko = 1, konqueror = 0}, headers_out = {headers = {last =
0x9d96b0, part = {elts = 0x7305b0, nelts = 0, next = 0x0}, size = 48,
nalloc = 20,
pool = 0x730560}, status = 0, status_line = {len = 0, data = 0x0},
server = 0x0, date = 0x0, content_length = 0x0, content_encoding = 0x0,
location = 0x0, refresh = 0x0, last_modified = 0x0, content_range =
0x0, accept_ranges = 0x0, www_authenticate = 0x0, expires = 0x0, etag =
0x0,
override_charset = 0x0, content_type_len = 0, content_type = {len =
0, data = 0x0}, charset = {len = 0, data = 0x0}, content_type_lowcase =
0x0,
content_type_hash = 0, cache_control = {elts = 0x0, nelts = 0, size
= 0, nalloc = 0, pool = 0x0}, content_length_n = -1, date_time = 0,
last_modified_time = -1}, request_body = 0x725900, lingering_time =
0, start_sec = 1246203875, start_msec = 650, method = 2, http_version =
1001,
request_line = {len = 48, data = 0x9d7d90 “GET
/images/photoalbum/image.php_t1.jpg HTTP/1.1\r\nHost”}, uri = {len = 35,
data = 0x9d7d94 “/images/photoalbum/image.php_t1.jpg
HTTP/1.1\r\nHost”}, args = {len = 0, data = 0x0}, exten = {len = 3,
data = 0x9d7db4 “jpg HTTP/1.1\r\nHost”}, unparsed_uri = {len = 35,
data = 0x9d7d94 “/images/photoalbum/image.php_t1.jpg HTTP/1.1\r\nHost”},
method_name = {len = 3, data = 0x9d7d90 “GET
/images/photoalbum/image.php_t1.jpg HTTP/1.1\r\nHost”}, http_protocol =
{len = 8,
data = 0x9d7db8 “HTTP/1.1\r\nHost”}, out = 0x0, main = 0x9d94f0,
parent = 0x0, postponed = 0x0, post_subrequest = 0x0, posted_requests =
0x0,
virtual_names = 0xbdfea0, phase_handler = 11, content_handler =
0x49360c , access_code = 0, variables = 0x730aa0,
ncaptures = 6, captures = 0x7311d8, captures_data = 0x7253e0
“/var/www/vhosts/ipersia.eu/httpdocs/images/photoalbum/image.php_t1.jpg”,
limit_rate = 0,
header_size = 0, request_length = 698, err_status = 0, http_connection
= 0x72d428, log_handler = 0x44d4ff ,
cleanup = 0x725f20, http_state = 2, complex_uri = 0, quoted_uri = 0,
plus_in_uri = 0, zero_in_uri = 0, invalid_header = 0, valid_location =
1,
valid_unparsed_uri = 1, uri_changed = 0, uri_changes = 11,
request_body_in_single_buf = 0, request_body_in_file_only = 0,
request_body_in_persistent_file = 0, request_body_in_clean_file = 0,
request_body_file_group_access = 0, request_body_file_log_level = 5,
subrequest_in_memory = 0, waited = 0, cached = 0, gzip = 0, proxy = 0,
bypass_cache = 0, no_cache = 0, limit_zone_set = 0, limit_req_set = 0,
pipeline = 0, plain_http = 0, chunked = 0, header_only = 0, zero_body
= 0, keepalive = 1, lingering_close = 0, discard_body = 0, internal = 0,
error_page = 0, ignore_content_encoding = 0, filter_finalize = 0,
post_action = 0, request_complete = 0, request_output = 0, header_sent =
0,
expect_tested = 0, root_tested = 0, done = 0, logged = 0, buffered =
0, main_filter_need_in_memory = 0, filter_need_in_memory = 0,
filter_need_temporary = 0, allow_ranges = 0, stat_reading = 0,
stat_writing = 1, subrequests = 51, state = 0,
uri_start = 0x9d7d94 “/images/photoalbum/image.php_t1.jpg
HTTP/1.1\r\nHost”, uri_end = 0x9d7db7 " HTTP/1.1\r\nHost",
uri_ext = 0x9d7db4 “jpg HTTP/1.1\r\nHost”, args_start = 0x0,
request_start = 0x9d7d90 “GET /images/photoalbum/image.php_t1.jpg
HTTP/1.1\r\nHost”,
request_end = 0x9d7dc0 “\r\nHost”, method_end = 0x9d7d92 “T
/images/photoalbum/image.php_t1.jpg HTTP/1.1\r\nHost”, schema_start =
0x0, schema_end = 0x0,
host_start = 0x0, host_end = 0x0, port_start = 0x0, port_end = 0x0,
header_name_start = 0x9d7f48 “Cookie”, header_name_end = 0x9d7f4e “”,
header_start = 0x9d7f50 “fusion_visited=yes;
__utma=28977764.3622015001431640600.1246203663.1246203663.1246203663.1;
__utmb=28977764.12.10.1246203663; __utmc=28977764;
__utmz=28977764.1246203663.1.1.utmcsr=images.google.pl|ut”…,
header_end = 0x9d8048 “\r\nyle_images/rooq/css_pp_header.gif”,
http_minor = 1,
http_major = 1, header_hash = 2940209764, lowcase_index = 6,
lowcase_header = “cookierionrsetg”, ‘\0’ }
p *flcf
(gdb) p *flcf
$2 = {upstream = {upstream = 0x0, connect_timeout = 60000, send_timeout
= 60000, read_timeout = 60000, timeout = 0, send_lowat = 0, buffer_size
= 4096,
busy_buffers_size = 8192, max_temp_file_size = 1073741824,
temp_file_write_size = 8192, busy_buffers_size_conf =
18446744073709551615,
max_temp_file_size_conf = 18446744073709551615,
temp_file_write_size_conf = 18446744073709551615, bufs = {num = 8, size
= 4096}, ignore_headers = 1,
next_upstream = 7, store_access = 384, buffering = 1,
pass_request_headers = 1, pass_request_body = 1, ignore_client_abort =
0, intercept_errors = 1,
cyclic_temp_file = 0, temp_path = 0xb16ef8, hide_headers_hash =
{buckets = 0xb63450, size = 15}, hide_headers = 0xffffffffffffffff,
pass_headers = 0xffffffffffffffff, cache = 0x0, cache_min_uses = 1,
cache_use_stale = 2147483649, cache_methods = 6, cache_valid = 0x0,
store_lengths = 0x0, store_values = 0x0, store = 0, intercept_404 =
0, change_buffering = 0, ssl = 0x0, ssl_session_reuse = 0}, index = {len
= 9,
data = 0xa0fdf8 “index.php”}, flushes = 0xb638d8, params_len =
0xb68ef0, params = 0xb697a0, params_source = 0xa0fe48, catch_stderr =
0x0,
fastcgi_lengths = 0x0, fastcgi_values = 0x0, cache_key = {value = {len
= 0, data = 0x0}, flushes = 0x0, lengths = 0x0, values = 0x0},
split_regex = 0x0,
split_name = {len = 0, data = 0x0}}
conf.d is empty, and sites-enabled contains vhosts with nothing really
relevant (vhost+rewrites+php@fastcgi) + proxy to apache with some proxy
settings.
Posted at Nginx Forum:
Hello!
On Mon, Jun 29, 2009 at 09:43:20AM -0400, meto wrote:
$1 = {signature = 1347703880, connection = 0x845128, ctx = 0x730970, main_conf = 0x767de8, srv_conf = 0xa07d28, loc_conf = 0xa109a0,
location = 0x0, refresh = 0x0, last_modified = 0x0, content_range = 0x0, accept_ranges = 0x0, www_authenticate = 0x0, expires = 0x0, etag = 0x0,
header_size = 0, request_length = 698, err_status = 0, http_connection = 0x72d428, log_handler = 0x44d4ff ,
request_end = 0x9d7dc0 “\r\nHost”, method_end = 0x9d7d92 “T /images/photoalbum/image.php_t1.jpg HTTP/1.1\r\nHost”, schema_start = 0x0, schema_end = 0x0,
max_temp_file_size_conf = 18446744073709551615, temp_file_write_size_conf = 18446744073709551615, bufs = {num = 8, size = 4096}, ignore_headers = 1,
next_upstream = 7, store_access = 384, buffering = 1, pass_request_headers = 1, pass_request_body = 1, ignore_client_abort = 0, intercept_errors = 1,
cyclic_temp_file = 0, temp_path = 0xb16ef8, hide_headers_hash = {buckets = 0xb63450, size = 15}, hide_headers = 0xffffffffffffffff,
pass_headers = 0xffffffffffffffff, cache = 0x0, cache_min_uses = 1, cache_use_stale = 2147483649, cache_methods = 6, cache_valid = 0x0,
store_lengths = 0x0, store_values = 0x0, store = 0, intercept_404 = 0, change_buffering = 0, ssl = 0x0, ssl_session_reuse = 0}, index = {len = 9,
data = 0xa0fdf8 “index.php”}, flushes = 0xb638d8, params_len = 0xb68ef0, params = 0xb697a0, params_source = 0xa0fe48, catch_stderr = 0x0,
fastcgi_lengths = 0x0, fastcgi_values = 0x0, cache_key = {value = {len = 0, data = 0x0}, flushes = 0x0, lengths = 0x0, values = 0x0}, split_regex = 0x0,
split_name = {len = 0, data = 0x0}}conf.d is empty, and sites-enabled contains vhosts with nothing really relevant (vhost+rewrites+php@fastcgi) + proxy to apache with some proxy settings.
Could you please:
Check if requesting /images/photoalbum/image.php_t1.jpg under
ipersia.eu server always produces coredump.
Post full config for ipersia.eu server.
Maxim D.
I have my candidate for this failure. To enable php for many directories
in a domain with different root dirs i use if for php not sugested
location. By the way it’s grate and take me a while to figure
#php support
if ( $request_filename ~* .php(.*)$ ) { # is it php?
fastcgi_pass 127.0.0.1:9000;
expires off;
}
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
I used if ( $request_filename ~* .php(.*)$ ) { for capability with
apache which inderstands /index.php/someargs as a php file with
/someargs arguments - this is used by SMF option to remove ? from
adress.
Apparently this led to some bogus queries with images extensions that
where passed to fastcgi.
Tu sum up i disabled that option and i’m waiting to see if there are any
results. But it shows that we have to work on the way nginx reads the
real name of the files. Examples of such links you can see on
Posted at Nginx Forum:
One other thing - my config was working correctly till 0.7.60
Posted at Nginx Forum:
Hello!
On Mon, Jun 29, 2009 at 10:18:27AM -0400, meto wrote:
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;I used if ( $request_filename ~* .php(.*)$ ) { for capability with apache which inderstands /index.php/someargs as a php file with /someargs arguments - this is used by SMF option to remove ? from adress.
Apparently this led to some bogus queries with images extensions that where passed to fastcgi.
Using if() on $request_uri/$request_filename suggests that config
should be rewritten, but anyway nginx shouldn’t coredump.
It still doesn’t clear for me what caused such wierd behaviour.
Probably some if’s confused the config parsing code, but the
snipped above isn’t enough to reproduce problem.
Tu sum up i disabled that option and i’m waiting to see if there are any results. But it shows that we have to work on the way nginx reads the real name of the files. Examples of such links you can see on http://www.gimpuj.info/index.php
By the way, nginx itself doesn’t try to “read the real name of the
files”. It’s up to config author to instruct it what to do.
Maxim D.
Hello!
On Mon, Jun 29, 2009 at 11:34:35AM -0400, meto wrote:
One other thing - my config was working correctly till 0.7.60
You still refuse to show it despite being asked at least 3 times,
so there is nothing to talk about.
Maxim D.
aparently THIS IS A JPEG… I look through some others coredups and its
always images treated as a php and passed to PHP. Strangely enough this
seams to be killing nginx not php processes.
So i think we’ve nailed the problem, i’ll wait 24h to se if everything
is ok and report here.
But this should rise discussion about recognition of php files by nginx
and $fastcgi_script_name doesnt do the trick. I have to do rewrites for
SMF to make it compatible with apache.
it’s doable but multiple ifs are needed to check if full request name
exists and then pass “file.php/blabla.a44.ext” as a php script:
if ( !-f $request_filename && $request_filename ~* .php(.*)$ ) - that
should work as supposed (apache compatible).
Posted at Nginx Forum:
server {
listen 94.23.96.82:80;
server_name gimpuj.info www.gimpuj.info
gimpuj.org www.gimpuj.org
gimpuj.net www.gimpuj.net;
if ($host != www.gimpuj.info)
{
rewrite ^(.*)$ http://www.gimpuj.info$1 permanent;
}
access_log
/var/www/vhosts/gimpuj.info/statistics/logs/access_log combined
buffer=32k;
location = / {
rewrite / index.php?action=glowna permanent;
}
location / {
index index.html index.php;
root /var/www/vhosts/gimpuj.info/httpdocs;
include php_support;
if ( !-e $request_filename ) {
# rewrites
rewrite ^/avatar/(.*)\.png
/avatar/index.php?user=$1 last;
…
some rewrites
…
rewrite ^/index.php/(.*)
/index.php?$1;
# end rewrites
}
}
# PLESK statistics below
location ^~ /plesk-stat/ {
autoindex on;
alias /var/www/vhosts/gimpuj.info/statistics/;
}
# End of PLESK statistics
include settings;
}
every domain is built with such config template
php_support
#php support
if ( $request_filename ~* .php(.*)$ ) { # is it php?
fastcgi_pass 127.0.0.1:9000;
expires off;
}
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
settings
#limit conns for ddos and slowloris
limit_conn limit_per_ip 25;
#errors
error_page 404 /errors_pages/404.html;
location ^~ /errors_pages {
alias /var/www/errors_pages;
}
#Phpmyadmin
location ^~ /phpmyadmin {
index index.php;
root /usr/share;
include php_support2;
}
#xcache-admin
location ^~ /xcache-admin {
index index.php;
alias /usr/share/xcache/admin;
#root /usr/share/xcache/admin;
include php_support2;
fastcgi_param SCRIPT_FILENAME $request_filename;
}
location ^~ /awstats-icon/ {
alias /usr/share/awstats/icon/;
}
location ~ /.ht {
deny all;
}
php_support2 is same as php_support but passes queries only to local
PHP.
Here you have it. As I said nothing special here.
Using if() on $request_uri/$request_filename suggests that config
should be rewritten, but anyway nginx shouldn’t coredump.
Why? I know that if is in rewrite module in docs but can’t we use it in
other places?
Do you suggest to use nested location rather than if() in that case? But
still (and dont yell) - it worked before.
Posted at Nginx Forum:
Yes, separate normal locations or nested ones is
the way to go.Maxim D.
I read documentation for further details and that’s what i found:
if: “Checks the truth of a condition. If the condition evaluates to
true, then the code indicated in the curly braces is carried out and the
request is processed in accordance with the configuration within the
following block.”
location: “While nested locations are allowed by the configuration file
parser, their use is discouraged and may produce unexpected results.”
Module ngx_http_rewrite_module In examples we can
clearly see that it is used with proxy_pass, which is similar
fastcgi_pass.
I’ll add the break, but as I said try passing JPG files to fastcgi -
this seams to be a problem in my case. Because in some cases
fastcgi_pass was the last if() in location and still it led to the
crash.
Posted at Nginx Forum:
Hello!
On Mon, Jun 29, 2009 at 03:27:32PM -0400, meto wrote:
Module ngx_http_rewrite_module In examples we can clearly see that it is used with proxy_pass, which is similar fastcgi_pass.
Looks like you assume that wiki == documentation. It’s simply not
true.
Yes, nested locations have drawbacks due to some inheritance bugs
(and hence they still aren’t documented in official docs). But
if’s are in fact nested locations under the hood - and they have
the same bugs, plus problems itroduced by the mentioned imperative
nature.
I’m not saying you can’t use if’s. Just warn. It’s up to you to
decide.
I’ll add the break, but as I said try passing JPG files to fastcgi - this seams to be a problem in my case.
This is problem in your config, but not in nginx itself. Feel the
difference.
I believe checking for “.php(/.)?$" instead of ".php(.)$”
should fix your problem with jpg files (at least if you control
your directory names).
Because in some cases fastcgi_pass was the last if() in location and still it led to the crash.
Could you please provide an example config with fastcgi_pass in
last matched if() that results in nginx crash? Note that only
matched if() matters.
Maxim D.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs