From nobody@FreeBSD.org  Fri Oct  5 23:18:23 2007
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D009D16A41A
	for <freebsd-gnats-submit@FreeBSD.org>; Fri,  5 Oct 2007 23:18:23 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id AE0A113C468
	for <freebsd-gnats-submit@FreeBSD.org>; Fri,  5 Oct 2007 23:18:23 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.1/8.14.1) with ESMTP id l95NINMs061052
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 5 Oct 2007 23:18:23 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.1/8.14.1/Submit) id l95NINvZ061051;
	Fri, 5 Oct 2007 23:18:23 GMT
	(envelope-from nobody)
Message-Id: <200710052318.l95NINvZ061051@www.freebsd.org>
Date: Fri, 5 Oct 2007 23:18:23 GMT
From: Abdullah Ibn Hamad Al-Marri <almarrie@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: grep -R  * cores right away
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         116962
>Category:       bin
>Synopsis:       grep -R  * cores right away
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Oct 05 23:20:06 GMT 2007
>Closed-Date:    Tue Dec 25 12:00:28 UTC 2007
>Last-Modified:  Tue Dec 25 12:00:28 UTC 2007
>Originator:     Abdullah Ibn Hamad Al-Marri
>Release:        6.2-STABLE
>Organization:
Arab Portal Network
>Environment:
FreeBSD 6.2-STABLE #0: Fri Oct  5 21:13:11 UTC 2007 i386
>Description:
fresh buildwork, kernel ..etc, this UP box, not SMP.

/usr/home/ircd/bahamut-release/src

[22:39](ircd@noc)[~/bahamut-release/src]> grep -R cidr *
Bad system call (core dumped)

[22:52](ircd@noc)[~/bahamut-release/src]> gdb grep grep.core
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-marcel-freebsd"...(no debugging symbols found)...
Core was generated by `grep'.
Program terminated with signal 12, Bad system call.
Reading symbols from /usr/lib/libgnuregex.so.2...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libgnuregex.so.2
Reading symbols from /lib/libz.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/libz.so.2
Reading symbols from /usr/lib/libc.so.4...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libc.so.4
Reading symbols from /usr/libexec/ld-elf.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/libexec/ld-elf.so.1
#0  0x280d5f98 in fstatfs () from /usr/lib/libc.so.4
(gdb) bt
#0  0x280d5f98 in fstatfs () from /usr/lib/libc.so.4
#1  0x28103e3c in __opendir2 () from /usr/lib/libc.so.4
#2  0x28103d04 in opendir () from /usr/lib/libc.so.4
#3  0x08051452 in getopt ()
#4  0x0804f501 in getopt ()
#5  0x0804ef6c in getopt ()
#6  0x0804f3a4 in getopt ()
#7  0x080500cc in getopt ()
#8  0x08049046 in ?? ()
#9  0x00000075 in ?? ()
#10 0xbfbfe6f0 in ?? ()
#11 0xbfbfe8c8 in ?? ()
#12 0xbfbfe6e8 in ?? ()
#13 0x08048c7e in _init ()
#14 0x0804902f in ?? ()
#15 0x08052334 in __divdi3 ()
#16 0x00000075 in ?? ()
(gdb) bt full
#0  0x280d5f98 in fstatfs () from /usr/lib/libc.so.4
No symbol table info available.
#1  0x28103e3c in __opendir2 () from /usr/lib/libc.so.4
No symbol table info available.
#2  0x28103d04 in opendir () from /usr/lib/libc.so.4
No symbol table info available.
#3  0x08051452 in getopt ()
No symbol table info available.
#4  0x0804f501 in getopt ()
No symbol table info available.
#5  0x0804ef6c in getopt ()
No symbol table info available.
#6  0x0804f3a4 in getopt ()
No symbol table info available.
#7  0x080500cc in getopt ()
No symbol table info available.
#8  0x08049046 in ?? ()
No symbol table info available.
#9  0x00000075 in ?? ()
No symbol table info available.
#10 0xbfbfe6f0 in ?? ()
No symbol table info available.
#11 0xbfbfe8c8 in ?? ()
No symbol table info available.
#12 0xbfbfe6e8 in ?? ()
No symbol table info available.
#13 0x08048c7e in _init ()
No symbol table info available.
#14 0x0804902f in ?? ()
No symbol table info available.
#15 0x08052334 in __divdi3 ()
No symbol table info available.
#16 0x00000075 in ?? ()
No symbol table info available.
>How-To-Repeat:
easy to repeat.
>Fix:
I don't know.

>Release-Note:
>Audit-Trail:

From: Bob Van Zant <bvanzant@ironport.com>
To: <bug-followup@FreeBSD.org>,
	<almarrie@gmail.com>
Cc:  
Subject: Re: bin/116962: grep -R  * cores right away
Date: Tue, 09 Oct 2007 20:53:47 +0530

 I've seen this happen before when the application I'm trying to run was
 compiled for a different version of the kernel. In this case I'm wondering
 if you forgot to do installworld (or installkernel)? Or maybe there is some
 old version of grep in your PATH?
 
 This is working fine on my system.
 
 -Bob
 

From: Kris Kennaway <kris@FreeBSD.org>
To: Abdullah Ibn Hamad Al-Marri <almarrie@gmail.com>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: bin/116962: grep -R  * cores right away
Date: Tue, 25 Dec 2007 12:59:37 +0100

 Abdullah Ibn Hamad Al-Marri wrote:
 
 >> Environment:
 > FreeBSD 6.2-STABLE #0: Fri Oct  5 21:13:11 UTC 2007 i386
 
 
 > #0  0x280d5f98 in fstatfs () from /usr/lib/libc.so.4
                                               ^^^^^^^^^
 This is a FreeBSD 4.x binary that you are running on your 6.x system. 
 You presumably don't have the 4.x compatibility option enabled in your 
 kernel, but the real problem is why you have this ancient grep binary in 
 your path.
 
 Kris
 
State-Changed-From-To: open->closed 
State-Changed-By: kris 
State-Changed-When: Tue Dec 25 12:00:06 UTC 2007 
State-Changed-Why:  
Submitter is running a FreeBSD 4.x binary without kernel compatibility 
enabled. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=116962 
>Unformatted:
