i386/120872: fstat exit on signall 11

Volker volker at vwsoft.com
Wed Feb 20 16:10:05 UTC 2008


The following reply was made to PR i386/120872; it has been noted by GNATS.

From: Volker <volker at vwsoft.com>
To: Dmitry Andrianov <666.root at gmail.com>
Cc: bug-followup at FreeBSD.org
Subject: Re: i386/120872: fstat exit on signall 11
Date: Wed, 20 Feb 2008 17:03:24 +0100

 On 02/20/08 16:33, Dmitry Andrianov wrote:
 > Possibly, followings lines to you it will be helped something:
 > 
 > root at zingel:~$ fstat -M test.c
 > Segmentation fault: 11
 > root at zingel:~$ ls -al test.c
 > -rw-r--r--  1 root  wheel   142B Jan 30 14:13 test.c
 > root at zingel:~$ perl -e "print 'A' x45" > test1.c
 > root at zingel:~$ fstat -M test1.c
 > Segmentation fault: 11
 > root at zingel:~$ ls -la test1.c
 > -rw-r--r--  1 root  wheel   142B Feb 20 17:53 test1.c
 > root at zingel:~$ cat > test2.c
 > AAABBBCCCC
 > ^C
 > root at zingel:~$ fstat -M test2.c
 > fstat: cannot read IdlePTD
 > root at zingel:~$ ls -la test2.c
 > -rw-r--r--  1 root  wheel    11B Feb 20 17:55 test2.c
 > root at zingel:~$
 
 Dmitry,
 
 I still don't get the picutre. Can you try to explain what you are going
 to try? The -M parameter requires a core dump file to be given. If
 given, fstat tries to list you all opened files of a process at the time
 the process was getting killed.
 
 I agree, it's not nice to have it failing with a segfault but while
 looking at the code, I'm not quite sure if the error message can be
 changed easily.
 
 fstat needs to check if the file given as -M (core) is really a core
 dump file before it's getting processed. That's an extra sanity check
 that would be needed to suppress that message and fail with a better
 message earlier. I'll leave this to the developers if they'll implement
 that extra check and if it's possible to check that at all.
 
 PS: Please followup to the PR


More information about the freebsd-i386 mailing list