"Segmentation fault" on push_stream_message_template
Closed this issue · 6 comments
Hi ! I am trying to install nginx with nginx-push-stream-module for a project. It compiled flawlessly and worked with the default nginx config file. But when i tried the nginx-push-stream-module config setting i ran in to "Segmentation fault" error. Tracing back the settings i found when I set something to "push_stream_message_template" i get the error.
Initially i thought the is the problem of windows 7 and cygwin setting so i switched to fedora 14 but still get the same error.
Other method i tried is setting the value directly in the source code and not setting it in the config, but still the same problem.
I use nginx 1.0.4. and both the OS (windows 7 and fedora 14) are 32bit.
Other than that this is a great add-on. Have a nice day...
P.S. Please inform if I am at fault (like 64bit OS or something).
Hi,
Can you send me the configuration file you used? And what version of module
you have tested?
With this information I can check if the problem is the config, the module
or operational system or all of them.
Thanks for the report.
On Thu, Jul 21, 2011 at 12:24 AM, sujitkumardora <
reply@reply.github.com>wrote:
Hi ! I am trying to install nginx with nginx-push-stream-module for a
project. It compiled flawlessly and worked with the default nginx config
file. But when i tried the nginx-push-stream-module config setting i ran in
to "Segmentation fault" error. Tracing back the settings i found when I set
something to "push_stream_message_template" i get the error.Initially i thought the is the problem of windows 7 and cygwin setting so i
switched to fedora 14 but still get the same error.Other method i tried is setting the value directly in the source code and
not setting it in the config, but still the same problem.I use nginx 1.0.4. and both the OS (windows 7 and fedora 14) are 32bit.
Other than that this is a great add-on. Have a nice day...
P.S. Please inform if I am at fault (like 64bit OS or something).
Reply to this email directly or view it on GitHub:
#3
I am using the 0.2.4 version, downloaded 2 days ago (19 July).
here's the nginx.conf file
worker_processes 1;
events {
worker_connections 64;
}
http {
include mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
#access_log logs/access.log main;
error_log logs/nginx-http_error.log debug;
#sendfile on;
#tcp_nopush on;
tcp_nopush off;
tcp_nodelay on;
keepalive_timeout 10;
send_timeout 10;
client_body_timeout 10;
client_header_timeout 10;
sendfile on;
client_header_buffer_size 1k;
large_client_header_buffers 2 4k;
client_max_body_size 1k;
client_body_buffer_size 1k;
ignore_invalid_headers on;
client_body_in_single_buffer on;
push_stream_max_reserved_memory 10m;
#keepalive_timeout 0;
#keepalive_timeout 65;
#gzip on;
server {
listen 80;
server_name localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root html;
index index.html index.htm;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
location /channels-stats {
# activate channels statistics mode for this location
push_stream_channels_statistics;
# query string based channel id
set $push_stream_channel_id $arg_id;
}
location /pub {
# activate publisher mode for this location
push_stream_publisher;
# query string based channel id
set $push_stream_channel_id $arg_id;
push_stream_max_channel_id_length 200;
# store messages in memory
push_stream_store_messages on;
# max messages to store in memory
push_stream_max_message_buffer_length 20;
# message ttl
push_stream_min_message_buffer_timeout 5m;
# Message size limit
# client_max_body_size MUST be equal to client_body_buffer_size or
# you will be sorry.
client_max_body_size 32k;
client_body_buffer_size 32k;
}
location ~ /sub/(.*) {
# activate subscriber mode for this location
push_stream_subscriber;
# positional channel path
set $push_stream_channels_path $1;
push_stream_max_channel_id_length 200;
# header to be sent when receiving new subscriber connection
push_stream_header_template "<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\r\n<meta http-equiv=\"Cache-Control\" content=\"no-store\">\r\n<meta http-equiv=\"Cache-Control\" content=\"no-cache\">\r\n<meta http-equiv=\"Pragma\" content=\"no-cache\">\r\n<meta http-equiv=\"Expires\" content=\"Thu, 1 Jan 1970 00:00:00 GMT\">\r\n<script type=\"text/javascript\">\r\nwindow.onError = null;\r\ndocument.domain = 'localhost';\r\nparent.PushStream.register(this);\r\n</script>\r\n</head>\r\n<body onload=\"try { parent.PushStream.reset(this) } catch (e) {}\">";
# message template
push_stream_message_template "<script>p(~id~,'~channel~','~text~');</script>";
# content-type
push_stream_content_type "text/html; charset=utf-8";
# subscriber may create channels on demand or only authorized
# (publisher) may do it?
push_stream_authorized_channels_only off;
# ping frequency
push_stream_ping_message_interval 10s;
# connection ttl to enable recycle
push_stream_subscriber_connection_timeout 15m;
# broadcast
push_stream_broadcast_channel_prefix "broad_";
push_stream_broadcast_channel_max_qtd 3;
}
}
}
Hi,
I just tried 0.2.3 version with nginx 1.0.4 on windows 7 with the same conf file above, it worked fine.
May be something got missed out in 0.2.4. :)
Thanks for did this test.
I will take a look and try to reproduce the problem here.
As soon as I solve the problem I will sent a message to you asking to test
again.
Regards,
Wandenberg
On Thu, Jul 21, 2011 at 2:59 AM, sujitkumardora <
reply@reply.github.com>wrote:
Hi,
I just tried 0.2.3 version with nginx 1.0.4 on windows 7 with the same conf
file above, it worked fine.May be something got missed out in 0.2.4. :)
Reply to this email directly or view it on GitHub:
Hi,
I fixed this bug.
The fix is on master branch.
Could you take a look to see if everything is ok?
Regards,
Wandenberg
Hi,
I tried the latest version (0.2.4) and it works perfectly. No more issue. Thank you.
Regards,
Sujit