From owner-freebsd-i386@FreeBSD.ORG Wed Feb 20 16:10:05 2008 Return-Path: Delivered-To: freebsd-i386@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2D70B16A404 for ; Wed, 20 Feb 2008 16:10:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 1590013C46A for ; Wed, 20 Feb 2008 16:10:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m1KGA4DD033050 for ; Wed, 20 Feb 2008 16:10:04 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m1KGA419033049; Wed, 20 Feb 2008 16:10:04 GMT (envelope-from gnats) Date: Wed, 20 Feb 2008 16:10:04 GMT Message-Id: <200802201610.m1KGA419033049@freefall.freebsd.org> To: freebsd-i386@FreeBSD.org From: Volker Cc: Subject: Re: i386/120872: fstat exit on signall 11 X-BeenThere: freebsd-i386@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Volker List-Id: I386-specific issues for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2008 16:10:05 -0000 The following reply was made to PR i386/120872; it has been noted by GNATS. From: Volker To: Dmitry Andrianov <666.root@gmail.com> Cc: bug-followup@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@zingel:~$ fstat -M test.c > Segmentation fault: 11 > root@zingel:~$ ls -al test.c > -rw-r--r-- 1 root wheel 142B Jan 30 14:13 test.c > root@zingel:~$ perl -e "print 'A' x45" > test1.c > root@zingel:~$ fstat -M test1.c > Segmentation fault: 11 > root@zingel:~$ ls -la test1.c > -rw-r--r-- 1 root wheel 142B Feb 20 17:53 test1.c > root@zingel:~$ cat > test2.c > AAABBBCCCC > ^C > root@zingel:~$ fstat -M test2.c > fstat: cannot read IdlePTD > root@zingel:~$ ls -la test2.c > -rw-r--r-- 1 root wheel 11B Feb 20 17:55 test2.c > root@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