← Back to team overview

sslug-teknik team mailing list archive

Re: linuxconf - segmation fault

 

Ulrik Mailand wrote:
> segmation fault, core dumped
> 
> Hvad kan det skyldes ?

Ku' være et memory problem. Kan du kompilere kernen/moduler uden sig11 fejl?
Hvis ikke, så prøv at sætte (især cas) mem. timings i bios lidt langsommere.

> jeg har prøvet at åbne core filen med en editor, men kan ikke se noget i
> den.

Prøv attachede 'idcore'. Placer det fx. i /usr/local/bin og eksekver det enten i
det directory du stod da du fik et coredump, eller angiv path hertil.

Beklager størrelsen af mailen...
-- 
Mogens Valentin - Mail: monz@xxxxxxxxx - Website: http://www.danbbs.dk/~monz/ 
Web, Programming, Network, Security - Guides for Linux, Xwindows, Netscape...
Skaane/Sjaelland Linux User Group (now 4500+ members!) - http://www.sslug.dk/
Get a grip, get http://www.linux.org with Gnome/Enlightment and free software
#!/bin/sh

# name:      idcore  --  identify which binary caused a core dump
# author:    c.l.s. (cspiel@xxxxxxxxxxxxxxxxxxxxx)
# last rev.: 1998-01-22  11:14
# bash ver.: 1.14.7(1)
# $Id$

# display help message
# char* disp_help(void)
function disp_help
{
	echo "usage:"
	echo "	idcore [OPTION] [[COREDUMP] ...]"
	echo
	echo "	If COREDUMP is omitted the core file in the current"
	echo "	directory is used."
	echo
	echo "	-h, --help	display this help message"
	echo "  -v, --version	show version of idcore"
	echo "	-b, --brief	brief format, i.e. filename only"
	echo "	-l, --long	long format, with filename, signal, user,"
	echo "		        date, and backtrace"
}

# retrieve name binary that caused core dump via gdb
# char* get_name(const char* mode, const char* name)
function get_name
{
	case "$1" in
		brief)
			echo q | gdb --quiet --core="$2" 2>&1 | head -1 | \
			sed -ne "s/^.*\`\(.*\)'\.$/\1/p"
			;;
		standard)
			echo q | gdb --quiet --core="$2" 2>&1 | head -2
			;;
		long)
			dump=$(echo -e "where\nq" | \
				gdb --quiet --core="$2" 2>&1)
			echo "$dump" | head -2 | sed -ne '2,2s/\.$//p'
			ls -l "$2" | \
			awk '{ print "on", $6, $7, $8, "caused by", $3 }'
			echo
			echo "backtrace:"
			echo "$dump" | sed -ne '/^(gdb) /s/^(gdb) //p'
			;;
	esac				
}
#
# start of main
#
myname=$(basename "$0")		# name of shell-script
mode=standard			# normal mode of operation

case "$1" in
	-h | --help)
		disp_help
		exit 1
		;;
	-v | --version)
	        echo "version 0.1.0"
		exit 0
		;;
	-b | --brief)
		mode=brief
		shift
		;;
	-l | --long)
		mode=long
		shift
		;;
	-* | --*)
		echo "$myname: unknown option $1"
		exit 2
		;;
esac

if [ -z "$1" ]; then
	# no argument -> look at core in the current directory
	get_name "$mode" core
else
	# process all arguments
	for c; do
		# echo file we are processing
		if [ "$mode" != "brief" ]; then
			echo "$c: "
		fi
		get_name "$mode" "$c"
	done
fi
exit 0

References