On Mon, 28 Sep 1998, Henrik Nordstrom wrote:
> If your cache is a production machine then adding a automated stack
> trace may help you (I assume that you do not like to manually restart it
> if it crashes on a production machine).
> 1. Create a modified RunCache that starts "gdb squid" with no options
> instead of "squid -sY"
> 2. Create a .gdbinit file in the directory from where you start
> RunCache, containing the following lines (without linenumber:)
> 1: handle SIGUSR1 nostop noprint
> 2: handle SIGUSR2 nostop noprint
> 3: r -CsY
> 4: bt
> 5: quit
> 3. Start Squid using your modified RunCache..
> 4. Stack traces should be seen in squid.out (assuming you kept the
> redirection from original RunCache script)
Thank you Henrik, this would help a lot. BTW, since newer version of squid
(1.2b24 and up) use SIGTRAP and SIGQUIT instead of SIGUSR1 and SIGUSR2, to
debug them line 1 and 2 above should change accordingly, right?
One thing to note, currently I have modified RunCache to something like
this
--- cd /squid ulimit -c unlimited while : ; do echo "Running: squid -sY $conf >> $logdir/squid.out 2>&1" squid -sY $conf >> $logdir/squid.out 2>&1 /usr/local/bin/pager xxxxxx "squid on proxy1 is dead" ... done --- When squid got an assertion, I can see assertion message in squid.out. What strange is that I never see a message from the system to my pager when squid got an assertion. (/usr/local/bin/pager use to send a message to my pager). On the other hand, I got a message instantly when manually shutdown squid with 'squid -k shutdown' and RunCache happily restart squid shortly after that. I'm not sure if running squid under gdb will behave the same, if so (is this a bug?) I think we don't get any stack trace. I'll try and report back again. Regards, -- aetReceived on Mon Sep 28 1998 - 21:51:19 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:42:12 MST