benluteijn / cherokee

Automatically exported from code.google.com/p/cherokee
0 stars 1 forks source link

Cherokee SIGHUP handling #105

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
As reported by Antonio Pérez <aplistas@skarcha.com>:

  http://lists.octality.com/pipermail/cherokee/2008-August/008842.html

=============
Cherokee Web Server 0.9.0b1909 (Aug 30 2008): Listening on port 8888, TLS
disabled, IPv6 enabled, using epoll, 1024 fds system limit, max. 505
connections, 5 threads, 101 connections per thread, standard scheduling
policy

Handling HUP signal..
fdpoll-epoll.c:139: epoll_ctl(9, EPOLL_CTL_DEL, 4): 'Bad file descriptor'
file thread.c:1608 (step_MULTI_THREAD_block): this should not happen
fdpoll-epoll.c:113: epoll_ctl(8, EPOLL_CTL_ADD, 4): 'Bad file descriptor'
fdpoll-epoll.c:113: epoll_ctl(7, EPOLL_CTL_ADD, 4): 'Bad file descriptor'
fdpoll-epoll.c:113: epoll_ctl(6, EPOLL_CTL_ADD, 4): 'Bad file descriptor'
=============

Original issue reported on code.google.com by alobbs on 31 Aug 2008 at 9:59

GoogleCodeExporter commented 9 years ago
This is a pure aesthetic issue. It isn't a real problem but a few checks 
printing
warning because of an unusual situation.

Original comment by alobbs on 31 Aug 2008 at 6:52

GoogleCodeExporter commented 9 years ago
After working on this for a while, I doubt we will be able to "fix" it without  
doing
something nasty.

Original comment by alobbs on 1 Sep 2008 at 5:43

GoogleCodeExporter commented 9 years ago
I think this is not a Graceful Restart :).

$ sudo /usr/local/sbin/cherokee
Cherokee Web Server 0.9.0 (Sep 23 2008): Listening on port 80, TLS disabled,
IPv6 enabled, using epoll, 1024 fds system limit, max. 505 connections, 10  
threads, 50 connections per thread, standard scheduling policy              
Server PID=9574 exited re=0                                                 
Handling Graceful Restart..                                                 
fdpoll-epoll.c:139: epoll_ctl(10, EPOLL_CTL_DEL, 3): 'Bad file descriptor'  
file thread.c:1676 (step_MULTI_THREAD_nonblock): this should not happen     
fdpoll-epoll.c:113: epoll_ctl(11, EPOLL_CTL_ADD, 3): 'Bad file descriptor'  
fdpoll-epoll.c:113: epoll_ctl(15, EPOLL_CTL_ADD, 3): 'Bad file descriptor'  
fdpoll-epoll.c:113: epoll_ctl(14, EPOLL_CTL_ADD, 3): 'Operation not permitted'
fdpoll-epoll.c:113: epoll_ctl(16, EPOLL_CTL_ADD, 3): 'Operation not permitted'
fdpoll-epoll.c:113: epoll_ctl(19, EPOLL_CTL_ADD, 3): 'Operation not permitted'
fdpoll-epoll.c:113: epoll_ctl(17, EPOLL_CTL_ADD, 3): 'Bad file descriptor'
fdpoll-epoll.c:113: epoll_ctl(18, EPOLL_CTL_ADD, 3): 'Bad file descriptor'
fdpoll-epoll.c:113: epoll_ctl(13, EPOLL_CTL_ADD, 3): 'Bad file descriptor'
fdpoll-epoll.c:113: epoll_ctl(12, EPOLL_CTL_ADD, 3): 'Bad file descriptor'
Cherokee feels panic!
The Cherokee 'panic action' script, /usr/local/bin/cherokee-panic,
was called for pid 9574 ().

Below is a backtrace for this process generated with gdb, which shows
the state of the program at the time the error occured.  You are
encouraged to submit this information as a bug report in the Cherokee
bug traq system:  http://bugs.cherokee-project.com

Operating System: Linux theone 2.6.24-19-generic #1 SMP Fri Jul 11 23:41:49 UTC 
2008
i686 GNU/Linux
Debugger: /usr/bin/gdb

ptrace: Operation not permitted.
/tmp/tmp.Yeosux9668:1: Error in sourced command file:
No symbol table is loaded.  Use the "file" command.
server.c:1794: PANIC: re-panic: '/usr/local/bin/cherokee-panic 9574', status 255
Server PID=9574 received a signal=6
Cherokee Web Server 0.9.0 (Sep 23 2008): Listening on port 80, TLS disabled,
IPv6 enabled, using epoll, 1024 fds system limit, max. 505 connections, 10
threads, 50 connections per thread, standard scheduling policy

Original comment by skar...@gmail.com on 23 Sep 2008 at 11:10

GoogleCodeExporter commented 9 years ago
Launching cherokee using init.d script, we get zombie processes... :(

$ sudo /etc/init.d/cherokee start
Starting cherokee web server: cherokee.         
$ ps xa | grep chero             
25730 ?        S      0:00 /usr/local/sbin/cherokee
25733 ?        Sl     0:00 /usr/local/sbin/cherokee-worker
25745 pts/2    R+     0:00 grep chero                     
$ sudo kill -HUP 25730
$ ps xa | grep chero
25730 ?        S      0:00 /usr/local/sbin/cherokee
25733 ?        Z      0:00 [cherokee-worker] <defunct>
25759 ?        Sl     0:00 /usr/local/sbin/cherokee-worker
25790 pts/2    S+     0:00 grep chero
$

Original comment by skar...@gmail.com on 26 Sep 2008 at 7:04

GoogleCodeExporter commented 9 years ago
Zombie processes problem fixed on r2171

Original comment by skar...@gmail.com on 14 Oct 2008 at 8:10

GoogleCodeExporter commented 9 years ago
Great job! :-)

Original comment by alobbs on 14 Oct 2008 at 8:14

GoogleCodeExporter commented 9 years ago
Fixed?... Uhmmm... There are no zombie processes, but Cherokee still "feels 
panic" on
SIGHUP :)

Original comment by skar...@gmail.com on 14 Oct 2008 at 3:20

GoogleCodeExporter commented 9 years ago
Uhhhh.. really?   Oops! I did not see that.
I'm reopening it then..

Original comment by alobbs on 14 Oct 2008 at 3:22

GoogleCodeExporter commented 9 years ago
I have just checked, and it does not crash for me any longer.. 
Antonio? :-?

Original comment by alobbs on 14 Oct 2008 at 3:52

GoogleCodeExporter commented 9 years ago
Crash for me:

$ sudo cherokee                                                          
Cherokee Web Server 0.10.0 (Oct 14 2008): Listening on port 80, TLS disabled,   

IPv6 enabled, using epoll, 1024 fds system limit, max. 505 connections, 10      

threads, 50 connections per thread, standard scheduling policy                  

Handling Graceful Restart..                                                     

fdpoll-epoll.c:139: epoll_ctl(17, EPOLL_CTL_DEL, 3): 'Bad file descriptor'      

file thread.c:1626 (step_MULTI_THREAD_block): this should not happen            

fdpoll-epoll.c:113: epoll_ctl(15, EPOLL_CTL_ADD, 3): 'Bad file descriptor'      

fdpoll-epoll.c:113: epoll_ctl(14, EPOLL_CTL_ADD, 3): 'Bad file descriptor'      

fdpoll-epoll.c:113: epoll_ctl(13, EPOLL_CTL_ADD, 3): 'Bad file descriptor'      

fdpoll-epoll.c:113: epoll_ctl(20, EPOLL_CTL_ADD, 3): 'Bad file descriptor'
fdpoll-epoll.c:113: epoll_ctl(19, EPOLL_CTL_ADD, 3): 'Bad file descriptor'
fdpoll-epoll.c:113: epoll_ctl(21, EPOLL_CTL_ADD, 3): 'Bad file descriptor'
fdpoll-epoll.c:113: epoll_ctl(18, EPOLL_CTL_ADD, 3): 'Bad file descriptor'
fdpoll-epoll.c:113: epoll_ctl(16, EPOLL_CTL_ADD, 3): 'Bad file descriptor'
Cherokee feels panic!
The Cherokee 'panic action' script, /usr/local/bin/cherokee-panic,
was called for pid 1605 ().

Below is a backtrace for this process generated with gdb, which shows
the state of the program at the time the error occured.  You are
encouraged to submit this information as a bug report in the Cherokee
bug traq system:  http://bugs.cherokee-project.com

Operating System: Linux theone 2.6.24-19-generic #1 SMP Fri Jul 11 23:41:49 UTC 
2008
i686 GNU/Linux
Debugger: /usr/bin/gdb

ptrace: Operation not permitted.
/tmp/tmp.tbZlOB1627:1: Error in sourced command file:
No symbol table is loaded.  Use the "file" command.
Server PID=1605 received a signal=6
Server PID=1605 exited re=0
Cherokee Web Server 0.10.0 (Oct 14 2008): Listening on port 80, TLS disabled,
IPv6 enabled, using epoll, 1024 fds system limit, max. 505 connections, 10
threads, 50 connections per thread, standard scheduling policy

Original comment by skar...@gmail.com on 14 Oct 2008 at 4:10

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
No, I'm tested it on OS X.. but I don't think that's the reason. :-m
I'm going to test it again under a bigger load. It might be because of that..

Original comment by alobbs on 14 Oct 2008 at 4:17

GoogleCodeExporter commented 9 years ago
I don't think so, because I'm testing on my desktop pc.

Original comment by skar...@gmail.com on 14 Oct 2008 at 4:24

GoogleCodeExporter commented 9 years ago
Can we close it now or wait until the aesthetic issue will be fixed?

Original comment by skar...@gmail.com on 15 Oct 2008 at 7:34

GoogleCodeExporter commented 9 years ago
Let's close it now.. :)

Great job Antonio!

Original comment by alobbs on 16 Oct 2008 at 11:21

GoogleCodeExporter commented 9 years ago
too bad

Original comment by abdulmaj...@gmail.com on 19 Feb 2009 at 9:12