I mean 1.1.8.<br><br><div class="gmail_quote">On Tue, Nov 15, 2011 at 11:40 AM, Ilan Berkner <span dir="ltr"><<a href="mailto:ilan@time4learning.com">ilan@time4learning.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Nice find, I think I was experiencing a similar issue with upgrading on the fly from 1.1.7 to 1.1.9.<div><div class="h5"><br><br><div class="gmail_quote">On Tue, Nov 15, 2011 at 11:38 AM, Eduardo Habkost <span dir="ltr"><<a href="mailto:ehabkost@raisama.net" target="_blank">ehabkost@raisama.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I was trying to upgrade nginx from 1.0.9 to 1.0.10 on-the-fly, using<br>
the process described on the wiki[1], but it looks like it is ignoring<br>
the SIGWINCH signal I send to it.<br>
<br>
bender:~# ps ax -H | grep nginx<br>
31603 pts/2 S+ 0:00 grep nginx<br>
32606 ? S 0:00 nginx: master process /usr/local/nginx/sbin/nginx<br>
32607 ? S 9:47 nginx: worker process<br>
31309 ? S 0:00 nginx: master process /usr/local/nginx/sbin/nginx<br>
31310 ? S 0:00 nginx: worker process<br>
bender:~# kill -WINCH 32606 # 32606 is the 1.0.9 master process, 31309<br>
is the 1.0.10 master process<br>
bender:~# ps ax -H | grep nginx<br>
31605 pts/2 S+ 0:00 grep nginx<br>
32606 ? S 0:00 nginx: master process /usr/local/nginx/sbin/nginx<br>
32607 ? S 9:47 nginx: worker process<br>
31309 ? S 0:00 nginx: master process /usr/local/nginx/sbin/nginx<br>
31310 ? S 0:00 nginx: worker process<br>
<br>
After a quick look at the code, it looks like this happened because<br>
the 1.0.9 process I am running was started during a previous<br>
1.0.7->1.0.9 on-the-fly upgrade, and the 1.0.9 master process now<br>
thinks it is not daemonized (ngx_daemonized is not set on<br>
initialization if ngx_inherited is set).<br>
<br>
I have easily reproduced it by killing nginx completely, making a<br>
on-the-fly 1.0.10->1.0.10 executable upgrade twice. On the first try,<br>
SIGWINCH works; after the first upgrade, SIGWINCH stops working. Full<br>
shell session showing the bug is pasted at the end of my message.<br>
<br>
[1] <a href="http://wiki.nginx.org/CommandLine#Upgrading_To_a_New_Binary_On_The_Fly" target="_blank">http://wiki.nginx.org/CommandLine#Upgrading_To_a_New_Binary_On_The_Fly</a><br>
<br>
--<br>
Eduardo<br>
<br>
<br>
Shell session:<br>
<br>
bender:~# ps ax -H | grep nginx<br>
31678 pts/2 S+ 0:00 script -t -a /tmp/nginx.script<br>
31679 pts/2 S+ 0:00 script -t -a /tmp/nginx.script<br>
31684 pts/5 S+ 0:00 grep nginx<br>
bender:~# /usr/local/nginx/sbin/nginx<br>
bender:~# ps ax -H | grep nginx<br>
31678 pts/2 S+ 0:00 script -t -a /tmp/nginx.script<br>
31679 pts/2 S+ 0:00 script -t -a /tmp/nginx.script<br>
31689 pts/5 S+ 0:00 grep nginx<br>
31686 ? Ss 0:00 nginx: master process /usr/local/nginx/sbin/nginx<br>
31687 ? S 0:00 nginx: worker process<br>
bender:~# kill -USR2 31686<br>
bender:~# ps ax -H | grep nginx<br>
31678 pts/2 S+ 0:00 script -t -a /tmp/nginx.script<br>
31679 pts/2 S+ 0:00 script -t -a /tmp/nginx.script<br>
31693 pts/5 S+ 0:00 grep nginx<br>
31686 ? Ss 0:00 nginx: master process /usr/local/nginx/sbin/nginx<br>
31687 ? S 0:00 nginx: worker process<br>
31690 ? S 0:00 nginx: master process /usr/local/nginx/sbin/nginx<br>
31691 ? S 0:00 nginx: worker process<br>
bender:~# kill -WINCH 31686<br>
bender:~# ps ax -H | grep nginx<br>
31678 pts/2 S+ 0:00 script -t -a /tmp/nginx.script<br>
31679 pts/2 S+ 0:00 script -t -a /tmp/nginx.script<br>
31695 pts/5 S+ 0:00 grep nginx<br>
31686 ? Ss 0:00 nginx: master process /usr/local/nginx/sbin/nginx<br>
31690 ? S 0:00 nginx: master process /usr/local/nginx/sbin/nginx<br>
31691 ? S 0:00 nginx: worker process<br>
bender:~# echo SIGWINCH worked on the first process<br>
SIGWINCH worked on the first process<br>
bender:~# kill -QUIT 31686<br>
bender:~# ps ax -H | grep nginx<br>
31678 pts/2 S+ 0:00 script -t -a /tmp/nginx.script<br>
31679 pts/2 S+ 0:00 script -t -a /tmp/nginx.script<br>
31697 pts/5 S+ 0:00 grep nginx<br>
31690 ? S 0:00 nginx: master process /usr/local/nginx/sbin/nginx<br>
31691 ? S 0:00 nginx: worker process<br>
bender:~# kill -USR2 31690<br>
bender:~# ps ax -H | grep nginx<br>
31678 pts/2 S+ 0:00 script -t -a /tmp/nginx.script<br>
31679 pts/2 S+ 0:00 script -t -a /tmp/nginx.script<br>
31705 pts/5 S+ 0:00 grep nginx<br>
31690 ? S 0:00 nginx: master process /usr/local/nginx/sbin/nginx<br>
31691 ? S 0:00 nginx: worker process<br>
31702 ? S 0:00 nginx: master process /usr/local/nginx/sbin/nginx<br>
31703 ? S 0:00 nginx: worker process<br>
bender:~# kill -WINCH 31690<br>
bender:~# ps ax -H | grep nginx<br>
31678 pts/2 S+ 0:00 script -t -a /tmp/nginx.script<br>
31679 pts/2 S+ 0:00 script -t -a /tmp/nginx.script<br>
31709 pts/5 S+ 0:00 grep nginx<br>
31690 ? S 0:00 nginx: master process /usr/local/nginx/sbin/nginx<br>
31691 ? S 0:00 nginx: worker process<br>
31702 ? S 0:00 nginx: master process /usr/local/nginx/sbin/nginx<br>
31703 ? S 0:00 nginx: worker process<br>
bender:~# kill -WINCH 31690<br>
bender:~# ps ax -H | grep nginx<br>
31678 pts/2 S+ 0:00 script -t -a /tmp/nginx.script<br>
31679 pts/2 S+ 0:00 script -t -a /tmp/nginx.script<br>
31711 pts/5 S+ 0:00 grep nginx<br>
31690 ? S 0:00 nginx: master process /usr/local/nginx/sbin/nginx<br>
31691 ? S 0:00 nginx: worker process<br>
31702 ? S 0:00 nginx: master process /usr/local/nginx/sbin/nginx<br>
31703 ? S 0:00 nginx: worker process<br>
bender:~# echo PID 31690 is ignoring SIGWINCH signals<br>
PID 31690 is ignoring SIGWINCH signals<br>
bender:~# kill -QUIT 31690<br>
bender:~# ps ax -H | grep nginx<br>
31678 pts/2 S+ 0:00 script -t -a /tmp/nginx.script<br>
31679 pts/2 S+ 0:00 script -t -a /tmp/nginx.script<br>
31713 pts/5 S+ 0:00 grep nginx<br>
31702 ? S 0:00 nginx: master process /usr/local/nginx/sbin/nginx<br>
31703 ? S 0:00 nginx: worker process<br>
<br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org" target="_blank">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
</blockquote></div><br><br clear="all"><div><br></div></div></div>-- <br><div><br></div><div>Ilan Berkner</div><div>Chief Technology Officer</div><div>Time4Learning.com</div><div><br></div><div>6300 NE 1st Ave., Suite 203</div>
<div>
Ft. Lauderdale, FL 33334</div><div><a href="tel:%28954%29%20771-0914" value="+19547710914" target="_blank">(954) 771-0914</a></div><div><br></div><div><a href="http://www.twitter.com/time4learning" target="_blank"><img src="http://www.time4learning.com/_img/buttons/addthis/twitter_32.png"></a> <a href="http://www.facebook.com/Time4Learning" target="_blank"><img src="http://www.time4learning.com/_img/buttons/addthis/facebook_32.png"></a> <br>
</div><div><br></div><div><div><a href="http://Time4Learning.com" target="_blank">Time4Learning.com</a> - Online interactive curriculum for home use, PreK-8th Grade.</div><div><a href="http://Time4Writing.com" target="_blank">Time4Writing.com</a> - Online writing tutorials for high, middle, and elementary school students.</div>
<div><a href="http://Time4Learning.net" target="_blank">Time4Learning.net</a> - A forum to chat with parents online about kids, education, parenting and more.</div><div><a href="http://spellingcity.com" target="_blank">spellingcity.com</a> - Online vocabulary and spelling activities for teachers, parents and students.</div>
</div><div><br></div><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div><br></div><div>Ilan Berkner</div><div>Chief Technology Officer</div><div>Time4Learning.com</div><div><br></div><div>6300 NE 1st Ave., Suite 203</div><div>
Ft. Lauderdale, FL 33334</div><div>(954) 771-0914</div><div><br></div><div><a href="http://www.twitter.com/time4learning" target="_blank"><img src="http://www.time4learning.com/_img/buttons/addthis/twitter_32.png"></a> <a href="http://www.facebook.com/Time4Learning" target="_blank"><img src="http://www.time4learning.com/_img/buttons/addthis/facebook_32.png"></a> <br>
</div><div><br></div><div><div><a href="http://Time4Learning.com" target="_blank">Time4Learning.com</a> - Online interactive curriculum for home use, PreK-8th Grade.</div><div><a href="http://Time4Writing.com" target="_blank">Time4Writing.com</a> - Online writing tutorials for high, middle, and elementary school students.</div>
<div><a href="http://Time4Learning.net" target="_blank">Time4Learning.net</a> - A forum to chat with parents online about kids, education, parenting and more.</div><div><a href="http://spellingcity.com" target="_blank">spellingcity.com</a> - Online vocabulary and spelling activities for teachers, parents and students.</div>
</div><div><br></div><br>