Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 10 additions & 12 deletions docs/SquidFaq/BugReporting.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,11 @@ checks. If one of those checks fail, Squid calls abort() to generate a
core dump.

If you have a core dump file, then use gdb to extract a stack trace from
the core using a "bt full" command (if supported) or a "backtrace"
command (can be typed as "bt" and is always supported, but gives less
information):
the core using a `backtrace full` command (if supported) or a `backtrace`
command (always supported, but gives less information):

% gdb /usr/local/squid/sbin/squid core
gdb> backtrace
gdb> backtrace full

Many people report that Squid doesn't leave a coredump anywhere. This
may be due to one of the following reasons:
Expand Down Expand Up @@ -67,7 +66,7 @@ may be due to one of the following reasons:
Core was generated by `(squid) -D'.
Program terminated with signal 6, Aborted.

(gdb) bt
(gdb) backtrace full
#0 0x006ad7a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1 0x006ed7a5 in raise () from /lib/tls/libc.so.6
#2 0x006ef209 in abort () from /lib/tls/libc.so.6
Expand Down Expand Up @@ -163,7 +162,7 @@ Once you have located the core dump file, use a debugger such as *dbx*
or *gdb* to generate a stack trace:

% gdb /usr/local/squid/sbin/squid core
gdb> backtrace
gdb> backtrace full

If possible, you might keep the coredump file around for a day or two.
It is often helpful if we can ask you to send additional debugger
Expand Down Expand Up @@ -225,7 +224,7 @@ handle SIGSEGV stop
handle SIGABRT stop
run -NYCX
[wait for crash]
backtrace
backtrace full
quit
```

Expand All @@ -248,7 +247,7 @@ handle SIGKILL pass
handle SIGSEGV stop
handle SIGABRT stop
run -NYCd3
backtrace
backtrace full
quit
EOF
while sleep 2; do
Expand Down Expand Up @@ -283,7 +282,7 @@ handle SIGABRT stop

attach [worker PID]
[wait for crash]
backtrace
backtrace full
detach
quit
```
Expand All @@ -296,11 +295,10 @@ stuck in a busy loop, and/or you want to know what your Squid is doing

1. To dump the current stack using gdb:
```
sudo gdb -n -batch -ex backtrace -pid <PID>
sudo gdb -n -batch -ex 'backtrace full' -pid <PID>
```
You may not need/want the `-n` (i.e. do not load gdb initialization
files) option. Using `'backtrace full'` instead of `backtrace` will
give even more info but might be a tad slower.
files) option.
1. To dump the current stack using pstack(1):
```
sudo pstack <PID>
Expand Down