[Samba] Re: Bug#219197: PANIC: internal error

Mike Fedyk mfedyk at matchmail.com
Fri Jan 23 19:21:40 GMT 2004


On Thu, Jan 22, 2004 at 08:19:19PM -0800, Mike Fedyk wrote:
> Got one! (This is after switching back to a 2.4 kernel -- I was on 2.6.1 for
> the last week or so, and that was the entire time I had the debugging
> version of samba runing too, so there's some kind of "child exiting before
> parent notification" that is happening in 2.6)

I wonder if 2.6 is to blame for this...

Here is the output from the hacked up panic-script attached (notice that the
same user can't read the directory of the crashed smbd in /proc):

+ '[' -z 18704 ']'
+ '[' '!' -d /proc/18704 ']'
+ ls -lhd /proc/18706
dr-xr-xr-x    3 nesquivel mmp2            0 Jan 23 10:41 /proc/18706
+ ls -lhd /proc/18704
dr-xr-xr-x    3 nesquivel mmp2            0 Jan 23 10:41 /proc/18704
+ ls -lhd /proc/18704/exe
ls: cannot read symbolic link /proc/18704/exe: Permission denied
lrwxrwxrwx    1 root     root            0 Jan 23 10:41 /proc/18704/exe
+ readlink -v /proc/18704/exe
readlink: /proc/18704/exe: Permission denied
++ readlink /proc/18704/exe
+ BINARYNAME=
+ echo 'The Samba '\''panic action'\'' script, /usr/share/samba/panic-action,'
The Samba 'panic action' script, /usr/share/samba/panic-action,
+ echo 'was called for pid 18704 ().'
was called for pid 18704 ().
+ echo

+ '[' -z '' ']'
+ echo 'This means there was a problem with the program, such as a segfault.'
This means there was a problem with the program, such as a segfault.
+ echo 'However, the executable could not be found for process 18704.'
However, the executable could not be found for process 18704.
+ echo 'It may have died unexpectedly, or you may not have permission to'
It may have died unexpectedly, or you may not have permission to
+ echo 'debug the process.'
debug the process.
+ exit 1


-------------- next part --------------
#!/bin/sh

set -x

# Redirect all output to our mail command
(
	# We must be given a pid to look at
	if [ -z "$1" ]; then
		echo "$0 called with no arguments."
		exit 1
	fi

	if [ ! -d "/proc/$1" ]; then
		echo "$0: No such process: $1"
		exit 1
	fi

	# Find out what binary we're debugging
ls -lhd "/proc/$$"
ls -lhd "/proc/$1"
ls -lhd "/proc/$1/exe"
readlink -v "/proc/$1/exe"
	BINARYNAME=`readlink "/proc/$1/exe"`
	
	# Generic header for our email
	echo "The Samba 'panic action' script, $0,"
	echo "was called for pid $1 ($BINARYNAME)."
	echo

	if [ -z "$BINARYNAME" ]; then
		echo "This means there was a problem with the program, such as a segfault."
		echo "However, the executable could not be found for process $1."
		echo "It may have died unexpectedly, or you may not have permission to"
		echo "debug the process."
		exit 1
	fi

	# No debugger
	if [ ! -x /usr/bin/gdb ]; then
		echo "This means there was a problem with the program, such as a segfault."
		echo "However, gdb was not found on your system, so the error could not be"
		echo "debugged.  Please install the gdb package so that debugging information is"
		echo "available the next time such a problem occurs."
		exit 1
	fi

	echo "Below is a backtrace for this process generated with gdb, which shows"
	echo "the state of the program at the time the error occured.  You are"
	echo "encouraged to submit this information as a bug report to Debian.  For"
	echo "information about the procedure for submitting bug reports , please see"
	echo "http://www.debian.org/Bugs/Reporting or the reportbug(1) manpage."
	echo
	gdb -x /etc/samba/gdbcommands -batch "$BINARYNAME" "$1"
) 2>&1 | mail -s "Segfault in Samba" root


More information about the samba mailing list