Update of /export/home/ntop/ntop
In directory jabber:/tmp/cvs-serv5608
Modified Files:
acconfig.h globals-core.c initialize.c webInterface.c
configure.in globals.h main.c
Log Message:
This is a patch that is almost certainly not required for the vast majority
of ntop users. For a few, it may be critical.
Recommended:
If you aren't seeing the "mysterious death of web server" problem:
don't worry - be happy.
If you are, try running for a while with --ignore-sigpipe
If that seems to fix it, then compile with --enable-ignoressigpipe
(You can check the counter on the configuration page, info.html and
see if it's > zero).
The why:
Certain browsers - IE5.5 in a Win2K environment for sure and PERHAPS others
close the TCP/IP connection when they receive an unknown certificate. Don't
know why - perhaps they don't want to leave the connection open for the unknown
amount of time it takes the user to accept the certificate. Regardless,
unilaterally closing the pipe causes a SIGPIPE exception.
This seems to be a common problem - in fact, searching the web, many other
projects/programs have had to code around this.
And there may be other cases - this could be the cause of the great ntop
"mysterious web server death". If SIGPIPE is NOT ignored, then the thread
for the ntop web server - the web server stops responding, but ntop's other
threads show up under ps and ntop itself keeps on processing packets.
Now in many situations, SIGPIPE is simply ignored by the OS. If it isn't then
a simple sigaction(SIGPIPE, SIG_IGN) should do the trick. Basically, this
code simply counts SIGPIPEs and ignores them.
Unfortunately, it's not always that simple.
gdb - in it's infinite wisdom - sets the thread mask so that you can't setup
a SIGPIPE handler and then gdg reflects it back to the user. Speculation was
that they felt you had to know about the exception. Regardless, running
normally, SIGPIPE is no big deal, but under gdb, it causes an exception.
Because I'm not sure what the "RIGHT" answer is, I've put both a compile
time (--enable-ignoresigpipe) and run-time --ignore-sigpipe option in place.
-----Burton (ref BMS0097)
_______________________________________________
Ntop-dev mailing list
[EMAIL PROTECTED]
http://lists.ntop.org/mailman/listinfo/ntop-dev