Cherokee SIGHUP handling #170

Closed
Borkason opened this Issue Mar 24, 2013 · 15 comments

1 participant

@Borkason
Cherokee Project member

Original author: alobbs (August 31, 2008 09:59:16)

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: http://code.google.com/p/cherokee/issues/detail?id=105

@Borkason
Cherokee Project member

From alobbs on August 31, 2008 18:52:31
This is a pure aesthetic issue. It isn't a real problem but a few checks printing
warning because of an unusual situation.

@Borkason
Cherokee Project member

From alobbs on September 01, 2008 17:43:55
After working on this for a while, I doubt we will be able to "fix" it without doing
something nasty.

@Borkason
Cherokee Project member

From skar...@gmail.com on September 23, 2008 23:10:34
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

@Borkason
Cherokee Project member

From skar...@gmail.com on September 26, 2008 19:04:24
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]
25759 ? Sl 0:00 /usr/local/sbin/cherokee-worker
25790 pts/2 S+ 0:00 grep chero
$

@Borkason
Cherokee Project member

From skar...@gmail.com on October 14, 2008 08:10:10
Zombie processes problem fixed on r2171

@Borkason
Cherokee Project member

From alobbs on October 14, 2008 08:14:53
Great job! :-)

@Borkason
Cherokee Project member

From skar...@gmail.com on October 14, 2008 15:20:55
Fixed?... Uhmmm... There are no zombie processes, but Cherokee still "feels panic" on
SIGHUP :)

@Borkason
Cherokee Project member

From alobbs on October 14, 2008 15:22:58
Uhhhh.. really? Oops! I did not see that.
I'm reopening it then..

@Borkason
Cherokee Project member

From alobbs on October 14, 2008 15:52:28
I have just checked, and it does not crash for me any longer..
Antonio? :-?

@Borkason
Cherokee Project member

From skar...@gmail.com on October 14, 2008 16:10:32
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

@Borkason
Cherokee Project member

From alobbs on October 14, 2008 16:17:58
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..

@Borkason
Cherokee Project member

From skar...@gmail.com on October 14, 2008 16:24:54
I don't think so, because I'm testing on my desktop pc.

@Borkason
Cherokee Project member

From skar...@gmail.com on October 15, 2008 19:34:44
Can we close it now or wait until the aesthetic issue will be fixed?

@Borkason
Cherokee Project member

From alobbs on October 16, 2008 11:21:42
Let's close it now.. :)

Great job Antonio!

@Borkason
Cherokee Project member

From abdulmaj...@gmail.com on February 19, 2009 09:12:10
too bad

@Borkason Borkason closed this Mar 24, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment