From kappa@capella.park.rambler.ru  Mon Jul 17 09:40:16 2006
Return-Path: <kappa@capella.park.rambler.ru>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 6E5E716A4DE
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 17 Jul 2006 09:40:16 +0000 (UTC)
	(envelope-from kappa@capella.park.rambler.ru)
Received: from relay0.rambler.ru (relay0.rambler.ru [81.19.66.187])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 67ED443D64
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 17 Jul 2006 09:40:15 +0000 (GMT)
	(envelope-from kappa@capella.park.rambler.ru)
Received: from relay0.rambler.ru (localhost [127.0.0.1])
	by relay0.rambler.ru (Postfix) with ESMTP id 849B86019
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 17 Jul 2006 13:40:09 +0400 (MSD)
Received: from capella.park.rambler.ru (capella.park.rambler.ru [81.19.65.30])
	by relay0.rambler.ru (Postfix) with ESMTP id 628BD6014
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 17 Jul 2006 13:40:09 +0400 (MSD)
Received: by capella.park.rambler.ru (Postfix, from userid 1001)
	id 34BB7421E; Mon, 17 Jul 2006 13:43:07 +0400 (MSD)
Message-Id: <20060717094307.34BB7421E@capella.park.rambler.ru>
Date: Mon, 17 Jul 2006 13:43:07 +0400 (MSD)
From: Alex Kapranoff <kappa@rambler-co.ru>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: awk(1) dumps core
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         100429
>Category:       bin
>Synopsis:       awk(1) dumps core
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jul 17 09:50:13 GMT 2006
>Closed-Date:    Tue Jul 18 12:45:43 GMT 2006
>Last-Modified:  Tue Jul 18 19:40:16 GMT 2006
>Originator:     Alex Kapranoff
>Release:        FreeBSD 6.1-PRERELEASE i386
>Organization:
Rambler
>Environment:
FreeBSD capella.park.rambler.ru 6.1-STABLE FreeBSD 6.1-STABLE #0: Tue Jul 11 17:06:35 MSD 2006     root@capella.park.rambler.ru:/usr/obj/usr/src/sys/CAPELLA2  i386

This could be related to locale, so I have these envars set:

>Description:
awk(1) sometimes dumps core when called by `make search' in /usr/ports.
It worked ok before I built and installed world and kernel on 11.07.2006.

>How-To-Repeat:
% cd /usr/ports
% make search=perl5
Bus error (core dumped)
*** Error code 138

Trace from gdb:
#0  indirect (a=0x8060000, n=347) at run.c:724
724             x->ctype = OCELL;       /* BUG?  why are these needed?
*/
(gdb) where
#0  indirect (a=0x8060000, n=347) at run.c:724
#1  0x08051d04 in execute (u=0x8060000) at run.c:156
#2  0x08055253 in bltin (a=0x807edf0, n=289) at run.c:1473
#3  0x08051d04 in execute (u=0x8060000) at run.c:156
#4  0x08054e95 in condexpr (a=0x807ee70, n=324) at run.c:1346
#5  0x08051d04 in execute (u=0x8060000) at run.c:156
#6  0x08052eeb in matchop (a=0x807eef0, n=266) at run.c:581
#7  0x08051d04 in execute (u=0x8060000) at run.c:156
#8  0x0805317c in relop (a=0x807ef10, n=286) at run.c:648
#9  0x08051d04 in execute (u=0x8060000) at run.c:156
#10 0x08054ed4 in ifstat (a=0x807ef50, n=300) at run.c:1358
#11 0x08051d04 in execute (u=0x8060000) at run.c:156
#12 0x08055198 in instat (a=0x807ef70, n=287) at run.c:1447
#13 0x08051d04 in execute (u=0x8060000) at run.c:156
#14 0x0805473a in pastat (a=0x8086d30, n=259) at run.c:1173
#15 0x08051d04 in execute (u=0x8060000) at run.c:156
#16 0x08051e00 in program (a=0x8086d50, n=258) at run.c:188
#17 0x08051d04 in execute (u=0x8060000) at run.c:156
#18 0x08051c46 in run (a=0x8060000) at run.c:131
#19 0x08051460 in main (argc=2, argv=0xbfbfdd9c) at main.c:159

>Fix:

	

>Release-Note:
>Audit-Trail:

From: Piotr Gnyp <toread@discordia.pl>
To: bug-followup@FreeBSD.org, kappa@rambler-co.ru
Cc:  
Subject: Re: bin/100429: awk(1) dumps core
Date: Mon, 17 Jul 2006 12:58:29 +0200

 uname -pr
 6.1-RELEASE-p2 i386
 
 the search:
  cd /usr/ports/
  make search key=rtf
 
 result:
 Bus error
 *** Error code 138
 
 Stop in /usr/ports.
 
 in messages:
 kernel: pid 98553 (awk), uid 1001: exited on signal 10
 
 gdb:
 (gdb) where
 #0  0x080534e5 in ?? ()
 #1  0x00000000 in ?? ()
 #2  0x00000004 in ?? ()
 #3  0x0000000c in ?? ()
 #4  0x2817e428 in ?? () from /lib/libc.so.6
 #5  0x00000000 in ?? ()
 #6  0x00000000 in ?? ()
 #7  0xbfbfd7d8 in ?? ()
 #8  0x0807fc80 in ?? ()
 #9  0x0807fdb0 in ?? ()
 #10 0x0000000d in ?? ()
 #11 0xbfbfd738 in ?? ()
 #12 0x0805205e in ?? ()
 #13 0x0807fc90 in ?? ()
 #14 0x0000015b in ?? ()
 #15 0x00000000 in ?? ()
 #16 0x08056c94 in ?? ()
 #17 0x0807fcb0 in ?? ()
 #18 0x0807fdb0 in ?? ()
 #19 0xbfbfd798 in ?? ()
 #20 0x08055743 in ?? ()
 #21 0x0807fc80 in ?? ()
 #22 0xbfbfd784 in ?? ()
 #23 0x2806affc in symlook_obj () from /libexec/ld-elf.so.1
 Previous frame inner to this frame (corrupt stack?)
 
 
 -- 
 Toread@IRCNet::GT#Toread PL::gg#23475::DSA#BEC9A444::http://42.pl/u/hjF
 In God we Trust -- all others must submit an X.509 certificate.

From: Alex Kapranoff <kappa@rambler-co.ru>
To: FreeBSD-gnats-submit@FreeBSD.org, freebsd-bugs@FreeBSD.org
Cc:  
Subject: Re: bin/100429: awk(1) dumps core
Date: Mon, 17 Jul 2006 15:06:22 +0400

 My PR referred to my locale environment vars but did not include them.
 Mea culpa. Here they are:
 
 MM_CHARSET=KOI8-R
 LANG=ru_RU.KOI8-R
 
 -- 
 Alex Kapranoff,
 $n=["1another7Perl213Just3hacker49"=~/\d|\D*/g];
 $$n[0]={grep/\d/,@$n};print"@$n{1..4}\n"

From: Alex Kapranoff <kappa@rambler-co.ru>
To: FreeBSD-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: bin/100429: awk(1) dumps core
Date: Mon, 17 Jul 2006 15:08:55 +0400

 I need to sleep more, definitely. Sorry, section "How-To-Repeat"
 contains invalid command `make search=perl5'. That should read of
 course as `make search name=perl5'. Sorry for confusion.
 
 -- 
 Alex Kapranoff,
 $n=["1another7Perl213Just3hacker49"=~/\d|\D*/g];
 $$n[0]={grep/\d/,@$n};print"@$n{1..4}\n"
State-Changed-From-To: open->closed 
State-Changed-By: maxim 
State-Changed-When: Tue Jul 18 12:43:21 UTC 2006 
State-Changed-Why:  
Closed in favour of bin/100443 with the same problem and verbose 
how to repeat receipt. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=100429 

From: John Ross <jhr@fenks.org>
To: bug-followup@FreeBSD.org, kappa@rambler-co.ru
Cc:  
Subject: Re: bin/100429: awk(1) dumps core
Date: Tue, 18 Jul 2006 15:35:18 -0400 (EDT)

 This seems to be related to the length of a line in the ports INDEX file.
 
 To work-around it it, I simply removed the "p5-Task-Catalyst-1.90" port 
 from INDEX and INDEX-5 (I bet INDEX and INDEX-6 for you)
 
 grep ^p5-Task-Catalyst-1.90 INDEX | wc -c
      8199
 
 -- 
 John Ross
 jhr@fenks.org
 
 There's plenty of room for all God's creatures.
 Right next to the mashed potatoes.
  	- Billboard ad for Saskatoon Restaurant
  		Greenville, SC
>Unformatted:
