From nobody@FreeBSD.org  Mon Dec  6 20:55:27 2010
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 731B41065745
	for <freebsd-gnats-submit@FreeBSD.org>; Mon,  6 Dec 2010 20:55:27 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (unknown [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 482BC8FC1C
	for <freebsd-gnats-submit@FreeBSD.org>; Mon,  6 Dec 2010 20:55:27 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id oB6KtRlU065505
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 6 Dec 2010 20:55:27 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id oB6KtRIi065504;
	Mon, 6 Dec 2010 20:55:27 GMT
	(envelope-from nobody)
Message-Id: <201012062055.oB6KtRIi065504@red.freebsd.org>
Date: Mon, 6 Dec 2010 20:55:27 GMT
From: Uffe Jakobsen <uffe@uffe.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: jls coredumps
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         152873
>Category:       bin
>Synopsis:       jls(8) coredumps
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-jail
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Dec 06 21:00:18 UTC 2010
>Closed-Date:    Wed Dec 29 17:13:50 UTC 2010
>Last-Modified:  Wed Dec 29 17:13:50 UTC 2010
>Originator:     Uffe Jakobsen
>Release:        8.1-RELEASE
>Organization:
>Environment:
FreeBSD aspire1410 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Mon Jul 19 02:55:53 UTC 2010     root@almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386

>Description:

Running "jls -n" with or without active jails makes "jls" coredump 

Running "jls" works.
Running "jls -v" works.

pstack -e /usr/sbin/jls jls.core

(core file "jls.core"): /usr/sbin/jls
----------------- thread -1 (running) -----------------
 0x2817bda2 strchr (282015c0, 28201780, 2804f497, bfbfea14, 0, 1) + a
 0x281664e7 qsort (28201400, 21, 1c, 8048cc0, 202, 2808a400) + 5c7
 0x8048ebf _init (0, 1000000, 804a0e7, 0, 0, 0) + 54f
 0x8049f84 _init (0, 0, bfbfeb64, 8048c49, 2, bfbfeb6c) + 1614
 0x8048c49 _init (bfbfecac, bfbfecb0, 0, bfbfecb3, bfbfeccd, bfbfeced) + 2d9


Also running "jls -j abc" coredumps:

pstack -e /usr/sbin/jls jls.core 
(core file "jls.core"): /usr/sbin/jls
----------------- thread -1 (running) -----------------
 0x28092616 jailparam_get (28201400, 5, 0, 281804b9, 28195648, 28195ad8) + 6d6
 0x80490a3 _init (804a208, 0, 804a0e7, 0, 0, bfbfedc7) + 733
 0x8049ce3 _init (0, 0, bfbfec94, 8048c49, 3, bfbfec9c) + 1373
 0x8048c49 _init (bfbfedc0, bfbfedc4, bfbfedc7, 0, bfbfedca, bfbfede4) + 2d9


Problem is only seen on one out of two FreeBSD 8.1 systems: an Acer Aspire 1410 netbook.

I've also got a Soekris net5501 running FreeBSD-8.1 - this system does not seem to have the problem.


Acer Aspire 1410 CPU info:
CPU: Intel(R) Celeron(R) CPU          743  @ 1.30GHz (1296.76-MHz 686-class CPU)
  Origin = "GenuineIntel"  Id = 0x1067a  Family = 6  Model = 17  Stepping = 10
Features=0xafebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,TM,PBE>
  Features2=0x400e31d<SSE3,DTES64,MON,DS_CPL,TM2,SSSE3,CX16,xTPR,PDCM,XSAVE>
  AMD Features=0x20100000<NX,LM>
  AMD Features2=0x1<LAHF>
  TSC: P-state invariant


Soekris net5501 CPU info:
CPU: Geode(TM) Integrated Processor by AMD PCS (499.90-MHz 586-class CPU)
  Origin = "AuthenticAMD"  Id = 0x5a2  Family = 5  Model = a  Stepping = 2
  Features=0x88a93d<FPU,DE,PSE,TSC,MSR,CX8,SEP,PGE,CMOV,CLFLUSH,MMX>
  AMD Features=0xc0400000<MMX+,3DNow!+,3DNow!>


Just a thought - could it be NX/XD related ?


>How-To-Repeat:

Run "jls -n"


>Fix:


>Release-Note:
>Audit-Trail:

From: Uffe Jakobsen <uffe@uffe.org>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: i386/152873: jls coredumps
Date: Tue, 07 Dec 2010 02:55:30 +0100

 followup: manually building jls with CFLAGS="-g" gave a little more info:
 
 ./jls -n
 Segmentation fault: 11 (core dumped)
 
 gdb jls jls.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"...
 Core was generated by `jls'.
 Program terminated with signal 11, Segmentation fault.
 Reading symbols from /lib/libjail.so.1...done.
 Loaded symbols for /lib/libjail.so.1
 Reading symbols from /lib/libc.so.7...done.
 Loaded symbols for /lib/libc.so.7
 Reading symbols from /libexec/ld-elf.so.1...done.
 Loaded symbols for /libexec/ld-elf.so.1
 #0  0x2817bda2 in strchr () from /lib/libc.so.7
 
 (gdb) bt
 #0  0x2817bda2 in strchr () from /lib/libc.so.7
 #1  0x0804998f in sort_param (a=0x282015c0, b=0x28201780) at jls.c:283
 #2  0x281664e7 in qsort () from /lib/libc.so.7
 #3  0x08049523 in add_param (name=0x804a598 "all", value=0x0, valuelen=0, 
 source=0x0, flags=16777216) at jls.c:214
 #4  0x08048e52 in main (argc=2, argv=0xbfbfeab0) at jls.c:118
 (gdb)
 
 
 
 ./jls -j abc
    JID  IP Address      Hostname                      Path
 Segmentation fault: 11 (core dumped)
 
 gdb jls jls.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"...
 Core was generated by `jls'.
 Program terminated with signal 11, Segmentation fault.
 Reading symbols from /lib/libjail.so.1...done.
 Loaded symbols for /lib/libjail.so.1
 Reading symbols from /lib/libc.so.7...done.
 Loaded symbols for /lib/libc.so.7
 Reading symbols from /libexec/ld-elf.so.1...done.
 Loaded symbols for /libexec/ld-elf.so.1
 #0  0x28092616 in jailparam_get () from /lib/libjail.so.1
 
 (gdb) bt
 #0  0x28092616 in jailparam_get () from /lib/libjail.so.1
 #1  0x08049bb5 in print_jail (pflags=1, jflags=0) at jls.c:333
 #2  0x080493b8 in main (argc=3, argv=0xbfbfea94) at jls.c:187
 (gdb) 
 
 
Responsible-Changed-From-To: freebsd-i386->freebsd-jail 
Responsible-Changed-By: gavin 
Responsible-Changed-When: Wed Dec 8 15:14:04 UTC 2010 
Responsible-Changed-Why:  
Over to maintainer(s) 

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

From: petrosathgr@in.gr
To: bug-followup@freebsd.org, uffe@uffe.org
Date: 20 Dec 2010 10:51:34 +0200
Subject: Re: bin/152873: jls(8) coredumps

jls -j abc segfaults on my machine too (8.0-Release) and I think that
there was an issue in /lib/libjail/jail.c source. Nevertheless, I think
that it has been resolved. Please, get the latest source of jail.c
(r214434) and see if it still segfaults.

Regards

From: Uffe Jakobsen <uffe@uffe.org>
To: bug-followup@freebsd.org
Cc: uffe@uffe.org
Subject: Re: bin/152873: jls(8) coredumps
Date: Wed, 29 Dec 2010 09:52:20 +0100

 On 20/12/10 09.51, petrosathgr@in.gr wrote:
 > Jls =96j abc segfaults on my machine too (8.0-Release) and I think that=
 
 > there was an issue in /lib/libjail/jail.c source.
  >
  > I think that it has been resolved.
  > Please, get the latest source of jail.c (r214434) and see if it still =
 
 segfaults.
 >
 
 I can confirm that it is fixed in latest sources of libjail/jls.
 
 This report can be closed.
 
 Thanks.
 
State-Changed-From-To: open->closed 
State-Changed-By: linimon 
State-Changed-When: Wed Dec 29 17:13:27 UTC 2010 
State-Changed-Why:  
Submitter notes that this has been fixed in the latest sources. 

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