From owner-freebsd-sparc64@freebsd.org Sun Apr 10 22:44:27 2016 Return-Path: Delivered-To: freebsd-sparc64@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CD12EB0B7A4 for ; Sun, 10 Apr 2016 22:44:27 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BDA8A1AE4 for ; Sun, 10 Apr 2016 22:44:27 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u3AMiRr7019933 for ; Sun, 10 Apr 2016 22:44:27 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-sparc64@FreeBSD.org Subject: [Bug 207998] Panic during boot on Sparc64 11-CURRENT (r296811) Date: Sun, 10 Apr 2016 22:44:27 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 11.0-CURRENT X-Bugzilla-Keywords: regression X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: commit-hook@freebsd.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-sparc64@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Apr 2016 22:44:27 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D207998 --- Comment #2 from commit-hook@freebsd.org --- A commit references this bug: Author: marius Date: Sun Apr 10 22:43:37 UTC 2016 New revision: 297792 URL: https://svnweb.freebsd.org/changeset/base/297792 Log: Since r296250 it is no longer possible for devices to use bus space addresses exceeding 32 bit, so bump BUS_SPACE_MAXADDR to 64 bit. The whole situation is sub par, though; prior to r296250 and despite what their names imply, BUS_SPACE_MAX* were primarily, even almost exclusively used for bus_dma(9). Now these macros also have a vital role for bus_space(9). However, it does not necessarily hold that both bus DMA and space addresses universally have the same limits per platform. As for sparc64, 64 bit clearly is beyond what can be addressed via the various IOMMUs. With this change in place, we now rely on the parent bus DMA tags of the host-to-foo drivers causing the child tags to be capped as necessary. PR: 207998 Changes: head/sys/sparc64/include/bus.h --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-sparc64@freebsd.org Sun Apr 10 22:45:22 2016 Return-Path: Delivered-To: freebsd-sparc64@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 76789B0B843 for ; Sun, 10 Apr 2016 22:45:22 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 671921B1E for ; Sun, 10 Apr 2016 22:45:22 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u3AMjMLW021131 for ; Sun, 10 Apr 2016 22:45:22 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-sparc64@FreeBSD.org Subject: [Bug 207998] Panic during boot on Sparc64 11-CURRENT (r296811) Date: Sun, 10 Apr 2016 22:45:07 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 11.0-CURRENT X-Bugzilla-Keywords: regression X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: marius@FreeBSD.org X-Bugzilla-Status: Closed X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-sparc64@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: resolution bug_status cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Apr 2016 22:45:22 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D207998 Marius Strobl changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|New |Closed CC| |marius@FreeBSD.org --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-sparc64@freebsd.org Mon Apr 11 10:49:24 2016 Return-Path: Delivered-To: freebsd-sparc64@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 62D2AB0C534 for ; Mon, 11 Apr 2016 10:49:24 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 53AC011D7 for ; Mon, 11 Apr 2016 10:49:24 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u3BAnONI034113 for ; Mon, 11 Apr 2016 10:49:24 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-sparc64@FreeBSD.org Subject: [Bug 203383] [patch] mark two ports BROKEN on sparc64 Date: Mon, 11 Apr 2016 10:49:24 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: patch X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: robak@freebsd.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: robak@freebsd.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc assigned_to Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Apr 2016 10:49:24 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D203383 Bartek Rutkowski changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |robak@freebsd.org Assignee|freebsd-ports-bugs@FreeBSD. |robak@freebsd.org |org | --=20 You are receiving this mail because: You are on the CC list for the bug.= From owner-freebsd-sparc64@freebsd.org Mon Apr 11 10:56:29 2016 Return-Path: Delivered-To: freebsd-sparc64@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C0B2DB0C920 for ; Mon, 11 Apr 2016 10:56:29 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B1ABB185C for ; Mon, 11 Apr 2016 10:56:29 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u3BAuTor050432 for ; Mon, 11 Apr 2016 10:56:29 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-sparc64@FreeBSD.org Subject: [Bug 203383] [patch] mark two ports BROKEN on sparc64 Date: Mon, 11 Apr 2016 10:56:29 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: patch X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: commit-hook@freebsd.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: robak@freebsd.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Apr 2016 10:56:29 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D203383 --- Comment #1 from commit-hook@freebsd.org --- A commit references this bug: Author: robak Date: Mon Apr 11 10:56:06 UTC 2016 New revision: 413015 URL: https://svnweb.freebsd.org/changeset/ports/413015 Log: devel/dbus-qt4: Mark BROKEN_sparc64 PR: 203383 Submitted by: Mark Linimon Approved by: portmgr (blanket) Changes: head/devel/dbus-qt4/Makefile --=20 You are receiving this mail because: You are on the CC list for the bug.= From owner-freebsd-sparc64@freebsd.org Mon Apr 11 11:00:31 2016 Return-Path: Delivered-To: freebsd-sparc64@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9BB5EB0CAA5 for ; Mon, 11 Apr 2016 11:00:31 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8C9481B27 for ; Mon, 11 Apr 2016 11:00:31 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u3BB0VU9063600 for ; Mon, 11 Apr 2016 11:00:31 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-sparc64@FreeBSD.org Subject: [Bug 203383] [patch] mark two ports BROKEN on sparc64 Date: Mon, 11 Apr 2016 11:00:31 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: patch X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: commit-hook@freebsd.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: robak@freebsd.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Apr 2016 11:00:31 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D203383 --- Comment #2 from commit-hook@freebsd.org --- A commit references this bug: Author: robak Date: Mon Apr 11 10:59:48 UTC 2016 New revision: 413016 URL: https://svnweb.freebsd.org/changeset/ports/413016 Log: www/webkit-qt5: Mark BROKEN_sparc64 PR: 203383 Submitted by: Mark Linimon Approved by: portmgr (blanket) Changes: head/www/webkit-qt5/Makefile --=20 You are receiving this mail because: You are on the CC list for the bug.= From owner-freebsd-sparc64@freebsd.org Mon Apr 11 11:00:49 2016 Return-Path: Delivered-To: freebsd-sparc64@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9005DB0CADB for ; Mon, 11 Apr 2016 11:00:49 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 80D5B1BA7 for ; Mon, 11 Apr 2016 11:00:49 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u3BB0ntP070667 for ; Mon, 11 Apr 2016 11:00:49 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-sparc64@FreeBSD.org Subject: [Bug 203383] [patch] mark two ports BROKEN on sparc64 Date: Mon, 11 Apr 2016 11:00:49 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: patch X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: robak@freebsd.org X-Bugzilla-Status: Closed X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: robak@freebsd.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: resolution bug_status Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Apr 2016 11:00:49 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D203383 Bartek Rutkowski changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|New |Closed --- Comment #3 from Bartek Rutkowski --- Committed, thanks! --=20 You are receiving this mail because: You are on the CC list for the bug.= From owner-freebsd-sparc64@freebsd.org Mon Apr 11 21:57:38 2016 Return-Path: Delivered-To: freebsd-sparc64@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F241EB0C425 for ; Mon, 11 Apr 2016 21:57:38 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "alchemy.franken.de", Issuer "alchemy.franken.de" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 9D11A1E4D; Mon, 11 Apr 2016 21:57:38 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.15.2/8.15.2/ALCHEMY.FRANKEN.DE) with ESMTPS id u3BLvZUA002405 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 11 Apr 2016 23:57:35 +0200 (CEST) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.15.2/8.15.2/Submit) id u3BLvYXi002404; Mon, 11 Apr 2016 23:57:34 +0200 (CEST) (envelope-from marius) Date: Mon, 11 Apr 2016 23:57:34 +0200 From: Marius Strobl To: Shigeharu TAKENO , gabor@FreeBSD.org Cc: freebsd-sparc64@freebsd.org, Joerg Wunsch Subject: Re: /usr/bin/sort may be incorrect Message-ID: <20160411215734.GA2101@alchemy.franken.de> References: <201603250229.u2P2TVLp003567@pc98tak.iee.niit.ac.jp> <201603310446.u2V4kLGM003303@pc98tak.iee.niit.ac.jp> <20160331072303.GP53011@uriah.heep.sax.de> <201603311122.u2VBMPam007017@pc98tak.iee.niit.ac.jp> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="/NkBOFFp2J2Af1nK" Content-Disposition: inline In-Reply-To: <201603311122.u2VBMPam007017@pc98tak.iee.niit.ac.jp> User-Agent: Mutt/1.5.24 (2015-08-30) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (alchemy.franken.de [0.0.0.0]); Mon, 11 Apr 2016 23:57:35 +0200 (CEST) X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Apr 2016 21:57:39 -0000 --/NkBOFFp2J2Af1nK Content-Type: multipart/mixed; boundary="qMm9M+Fa2AknHoGS" Content-Disposition: inline --qMm9M+Fa2AknHoGS Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Mar 31, 2016 at 08:22:25PM +0900, Shigeharu TAKENO wrote: > shige 03/31 2016 > ---------------- >=20 > Thank you for your reply. >=20 > Joerg Wunsch wrote: >=20 > | struct key_value > | { > | struct bwstring *k; > | struct key_hint hint[]; > | }; > |=20 > | If that works for you, too, I think it would be the preferrable way to > | write it. >=20 > Unfortunately this does not fix the problem. >=20 >=20 > | > The k field of key_value may be overwritten by the hint field > | > in numcoll_impl(), gnumcoll() and monthcoll() (coll.c), and the > | > pointer value of k may change to incorrect value. > |=20 > | Are you saying that something like > |=20 > | struct key_value *kw; > |=20 > | ... > |=20 > | kw->hint[-1] =3D something; > |=20 > | happens? That would certainly be a bug in the code then that ought to > | be fixed, rather than worked around. >=20 > I tested under your suggestion "struct key_hint hint[]", which=20 > behaves as the same of default sort command. >=20 > % ( echo 2 5 8 ; echo 2 6 5 ) | sort -n +0 -1 +1 -2 +2 -3 >=20 >=20 > In key_coll(struct keys_array *ps1, struct keys_array *ps2,=20 > size_t offset) (in coll.c), initial pointer values are the > followings: >=20 > &(ps1->key[0]) =3D 0x40c140f8 > &(ps1->key[1]) =3D 0x40c14100 > &(ps1->key[2]) =3D 0x40c14108 > &(ps2->key[0]) =3D 0x40c14088 > &(ps2->key[1]) =3D 0x40c14090 > &(ps2->key[2]) =3D 0x40c14198 > (the pointer repeat is only 8 byte.) >=20 > ps1->key[0].k =3D 0x40c060e0 > ps1->key[1].k =3D 0x40c060f0 > ps1->key[2].k =3D 0x40c06100 > ps2->key[0].k =3D 0x40c060a0 > ps2->key[1].k =3D 0x40c060b0 > ps2->key[2].k =3D 0x40c060c0 >=20 > key_coll() calls sm->func() =3D numcoll(), and it uses > numcoll_impl(struct key_value *kv1, struct key_value *kv2) with > ps1->key[i] and ps2->key[i]. The function numcoll_impl() uses k > field and hint field of struct key_value. >=20 >=20 > For i =3D 0, the k field pointers of arguments kv1 and kv2 of=20 > numcoll_impl() are correct: >=20 > kv1->k =3D 0x40c060e0, kv2->k =3D 0x40c060a0 >=20 > but the hint field pointers of kv1, kv2 are doughtful: >=20 > &(kv1->hint) =3D 0x40c14100, &(kv2->hint) =3D 0x40c14090 >=20 > which are the same value of &(ps1->key[1]) and &(ps2->key[1]). >=20 >=20 > And for i =3D 1, the k field pointers of arguments kv1 and kv2=20 > become incorrect: >=20 > kv1->k =3D 0x140c060f0, kv2->k =3D 0x140c060b0 >=20 > which are added 0x100000000 to the original pointer value.=20 > The sort command stops where it uses the value. >=20 >=20 > If we use the definition "struct key_hint hint[1]", the repeat > of pointers of ps1->key[i] becomes 32 byte, and incorrect changes=20 > of pointers do not occur. >=20 > &(ps1->key[0]) =3D 0x40c08208 > &(ps1->key[1]) =3D 0x40c08228 > &(ps1->key[2]) =3D 0x40c08248 >=20 AFAICT is sort(1) relying on undefined behavior. It builds up an array of struct keys_array, which in turn has a zero length array (apparently unnecessary) of struct key_value, which in turn has a zero length array of struct key_hint. While sort(1) takes care to allocate space for the latter based on need_hint, it relies on the compiler to determine the correct offsets of the struct key_value elements within the array of struct keys_array. Given that the compiler isn't aware of the actual size - for essentially the same reason zero length arrays also don't contribute to the sizeof() of such a struct - of struct key_value, that doesn't work, i. e. struct key_hint isn't accounted for in the offset calculation leading to the corruption described above. I'm not exactly sure why this bug apparently doesn't affect x86 but I think that's due to its little-endian addressing avoiding corruption in practice; that's somewhat hard to think through given that struct bwstring and the use thereof are a similarly =2E.. interesting constructs. Anyway, using an accessor function for determining the correct offsets of struct key_value elements within the array of struct keys_array as in the attached patch fixes the problem for me. However, I suspect that the space savings by only allocating memory for struct key_hint when needed don't really justify all the hackery involved in that approach. At least, changing struct key_hint to be a fixed member of struct key_value and removing all parts hanging off from need_hint would make the code a lot cleaner and readable. Gabor, what do you think? Marius --qMm9M+Fa2AknHoGS Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="sort.diff" Content-Transfer-Encoding: quoted-printable Index: coll.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- coll.c (revision 297803) +++ coll.c (working copy) @@ -105,14 +105,29 @@ { =20 if (ka) { - for (size_t i =3D 0; i < keys_num; ++i) - if (ka->key[i].k && ka->key[i].k !=3D s) - bwsfree(ka->key[i].k); + for (size_t i =3D 0; i < keys_num; ++i) { + const struct key_value *kv; + + kv =3D get_key_from_keys_array(ka, i); + if (kv->k && kv->k !=3D s) + bwsfree(kv->k); + } memset(ka, 0, keys_array_size()); } } =20 /* + * Get pointer to a key value in the keys set + */ +struct key_value * +get_key_from_keys_array(struct keys_array *ka, size_t ind) +{ + + return ((struct key_value *)((caddr_t)&(ka->key[ind]) + + (key_hint_size() * ind))); +} + +/* * Set value of a key in the keys set */ void @@ -122,7 +137,7 @@ if (ka && keys_num > ind) { struct key_value *kv; =20 - kv =3D &(ka->key[ind]); + kv =3D get_key_from_keys_array(ka, ind); =20 if (kv->k && kv->k !=3D s) bwsfree(kv->k); @@ -156,9 +171,9 @@ if (si->str) ret +=3D bws_memsize(si->str); for (size_t i =3D 0; i < keys_num; ++i) { - struct key_value *kv; + const struct key_value *kv; =20 - kv =3D &(si->ka.key[i]); + kv =3D get_key_from_keys_array(&si->ka, i); =20 if (kv->k !=3D si->str) ret +=3D bws_memsize(kv->k); @@ -475,16 +490,19 @@ int key_coll(struct keys_array *ps1, struct keys_array *ps2, size_t offset) { + struct key_value *kv1, *kv2; struct sort_mods *sm; int res =3D 0; =20 for (size_t i =3D 0; i < keys_num; ++i) { + kv1 =3D get_key_from_keys_array(ps1, i); + kv2 =3D get_key_from_keys_array(ps2, i); sm =3D &(keys[i].sm); =20 if (sm->rflag) - res =3D sm->func(&(ps2->key[i]), &(ps1->key[i]), offset); + res =3D sm->func(kv2, kv1, offset); else - res =3D sm->func(&(ps1->key[i]), &(ps2->key[i]), offset); + res =3D sm->func(kv1, kv2, offset); =20 if (res) break; Index: coll.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- coll.h (revision 297803) +++ coll.h (working copy) @@ -91,7 +91,7 @@ { struct bwstring *k; /* key string */ struct key_hint hint[0]; /* key sort hint */ -}; +} __packed; =20 /* * Set of keys container object. @@ -146,6 +146,7 @@ =20 struct keys_array *keys_array_alloc(void); size_t keys_array_size(void); +struct key_value *get_key_from_keys_array(struct keys_array *ka, size_t in= d); void set_key_on_keys_array(struct keys_array *ka, struct bwstring *s, size= _t ind); void clean_keys_array(const struct bwstring *s, struct keys_array *ka); =20 Index: radixsort.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- radixsort.c (revision 297803) +++ radixsort.c (working copy) @@ -243,9 +243,11 @@ static inline int get_wc_index(struct sort_list_item *sli, size_t level) { + const struct key_value *kv; const struct bwstring *bws; =20 - bws =3D sli->ka.key[0].k; + kv =3D get_key_from_keys_array(&sli->ka, 0); + bws =3D kv->k; =20 if ((BWSLEN(bws) > level)) return (unsigned char) BWS_GET(bws,level); --qMm9M+Fa2AknHoGS-- --/NkBOFFp2J2Af1nK Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQJ8BAEBCgBmBQJXDB3JXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ1M0Q5QjQzNTVGOTU5ODBGQzVENzZCMDIy MEI3MERFMTNGMUQxRTRGAAoJECC3DeE/HR5PQYgP/jfxi7sCgIH7Nnn2ylnM3Ixx lLAYZxlqsdMp/cUAtzP1MMWtYjdobhgiXDY9+289Azf2I3S8bC6lh6STqRsP2dp3 Ouh/YkSc0sG+TeuBo28wv7EnGk4ubEDyhMLBZg/J6wouTo4QI2ioj3Lq77AJHdmo 4+UO5OC5npBRM37ICOirhSdqbEkjIdYgvdY1ZgZ2TpY8u0P/oJ0Prra1imBJ6dpL nTC6ZykAyoNvwOc9mWxjXmMQcCIDYdeljCjtSSZhGXqXiqy+FDiFVvKtDWngPcRo sfpVEVcgmjto7Tn7QncVAz7n9JYPGyeZaxLFyGGn3nDTpR8Eu4X9okpVcbQi67Hq +/3ZoB8Hm3burBENNo0h860PUymC+8an24iHfmZ/S1nOoVkgEvCddrFSCZNbtVdR 04CeBzE+Qlyx0s+0YXovfuvZZ1Mzz4GAo8z6Psj3FgJ0Nij4y0P9cnP04B1phYFA MkmOgdJu0br3iz4RkAzdgL+TN/6z9nSJUBpnADukWTizglf0PhgCj7ztUgH7A05H YKD5sB5bYp3dhrTM1kGqawDljq3u9dqIEoQfglpjiStBePAwOo45RTrx4Zh16b62 toqrwn4hZnXlWkwPUpU4alPM4/jJYACqOhoAoR/qHP0d9Vc94c6kSIUoJKeDtDRV vlpPci8CMMdMg9HehT8z =umiB -----END PGP SIGNATURE----- --/NkBOFFp2J2Af1nK-- From owner-freebsd-sparc64@freebsd.org Tue Apr 12 05:58:04 2016 Return-Path: Delivered-To: freebsd-sparc64@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3DB74B0D0A0 for ; Tue, 12 Apr 2016 05:58:04 +0000 (UTC) (envelope-from j@uriah.heep.sax.de) Received: from uriah.heep.sax.de (uriah.heep.sax.de [IPv6:2a01:170:1047::9]) by mx1.freebsd.org (Postfix) with ESMTP id 036881AAC; Tue, 12 Apr 2016 05:58:04 +0000 (UTC) (envelope-from j@uriah.heep.sax.de) Received: by uriah.heep.sax.de (Postfix, from userid 107) id C9459CD1; Tue, 12 Apr 2016 07:58:01 +0200 (CEST) Date: Tue, 12 Apr 2016 07:58:01 +0200 From: Joerg Wunsch To: freebsd-sparc64@freebsd.org Cc: Shigeharu TAKENO , gabor@FreeBSD.org, Marius Strobl Subject: Re: /usr/bin/sort may be incorrect Message-ID: <20160412055801.GV10729@uriah.heep.sax.de> Reply-To: Joerg Wunsch References: <201603250229.u2P2TVLp003567@pc98tak.iee.niit.ac.jp> <201603310446.u2V4kLGM003303@pc98tak.iee.niit.ac.jp> <20160331072303.GP53011@uriah.heep.sax.de> <201603311122.u2VBMPam007017@pc98tak.iee.niit.ac.jp> <20160411215734.GA2101@alchemy.franken.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160411215734.GA2101@alchemy.franken.de> X-Phone: +49-351-2012 669 X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E X-GPG-Fingerprint: 5E84 F980 C3CA FD4B B584 1070 F48C A81B 69A8 5873 User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Apr 2016 05:58:04 -0000 As Marius Strobl wrote: > AFAICT is sort(1) relying on undefined behavior. That matches my observation: on FreeBSD 9 (which is still installed on my sparc64 box), I could successfully build zsh without problems. Since the major difference from there to current FreeBSD/sparc64 is the change of the compiler (GCC vs. Clang), this is also a strong indication of undefined behaviour effects (I think). Alas, my attempt to install FreeBSD 10.2 on a second disk on that machine ended up with a kernel that stalled at mounting the root FS, that's why I didn't investigate further by that time. -- cheers, Joerg .-.-. --... ...-- -.. . DL8DTL http://www.sax.de/~joerg/ Never trust an operating system you don't have sources for. ;-) From owner-freebsd-sparc64@freebsd.org Tue Apr 12 08:46:29 2016 Return-Path: Delivered-To: freebsd-sparc64@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B9579B0C34D for ; Tue, 12 Apr 2016 08:46:29 +0000 (UTC) (envelope-from mark.cave-ayland@ilande.co.uk) Received: from s16892447.onlinehome-server.info (chuckie.co.uk [82.165.15.123]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7814C1A87 for ; Tue, 12 Apr 2016 08:46:28 +0000 (UTC) (envelope-from mark.cave-ayland@ilande.co.uk) Received: from host81-154-31-210.range81-154.btcentralplus.com ([81.154.31.210] helo=[192.168.1.65]) by s16892447.onlinehome-server.info with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1aptZZ-0003Tq-L0 for freebsd-sparc64@freebsd.org; Tue, 12 Apr 2016 09:21:22 +0100 To: "freebsd-sparc64@freebsd.org" From: Mark Cave-Ayland Message-ID: <570CAFD6.2010004@ilande.co.uk> Date: Tue, 12 Apr 2016 09:20:38 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.7.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 81.154.31.210 X-SA-Exim-Mail-From: mark.cave-ayland@ilande.co.uk X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on s16892447.onlinehome-server.info X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, URIBL_BLOCKED autolearn=ham version=3.3.2 Subject: qemu-system-sparc64: entering the debugger X-SA-Exim-Version: 4.2.1 (built Sun, 08 Jan 2012 02:45:44 +0000) X-SA-Exim-Scanned: Yes (on s16892447.onlinehome-server.info) X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Apr 2016 08:46:29 -0000 Hi all, I've finally got some time to start looking at this again, so I'm trying to experiment a little with ddb: FreeBSD/sparc64 bootstrap loader, Revision 1.0 (mca@freebsd, Thu Sep 24 00:27:19 BST 2015) bootpath="/pci@1fe,0/pci-ata@5/ide1@8200/cdrom@0:a" Loading /boot/defaults/loader.conf /boot/kernel/kernel data=0xd893c0+0x20ffd8 syms=[0x8+0xdc578+0x8+0xcb349] \ Hit [Enter] to boot immediately, or any other key for command prompt. Booting [/boot/kernel/kernel] in 9 seconds... Type '?' for a list of commands, 'help' for more detailed help. OK boot -d Booting... jumping to kernel entry at 0xc00b0000. GDB: no debug ports present KDB: debugger backends: ddb KDB: current backend: ddb KDB: enter: Boot flags requested debugger [ thread pid 0 tid 0 ] Stopped at 0xc0630b00 db> bt Tracing pid 0 tid 0 td 0xc0e3fb50 (null)() at 0xc09d0fc4 (null)() at 0xc00b001c FreeBSD/sparc64 bootstrap loader, Revision 1.0 (mca@freebsd, Thu Sep 24 00:27:19 BST 2015) bootpath="/pci@1fe,0/pci-ata@5/ide1@8200/cdrom@0:a" Loading /boot/defaults/loader.conf /boot/kernel/kernel data=0xd893c0+0x20ffd8 syms=[0x8+0xdc578+0x8+0xcb349] \ Hit [Enter] to boot immediately, or any other key for command prompt. Booting [/boot/kernel/kernel] in 9 seconds... Type '?' for a list of commands, 'help' for more detailed help. OK boot -d Booting... jumping to kernel entry at 0xc00b0000. GDB: no debug ports present KDB: debugger backends: ddb KDB: current backend: ddb KDB: enter: Boot flags requested debugger [ thread pid 0 tid 0 ] Stopped at 0xc0630b00 db> ps/m pid ppid pgrp uid state wmesg wchan cmd 0 0 0 0KDB: reentering KDB: stack backtrace: (null)() at 0xc063105c (null)() at 0xc09e193c (null)() at 0xc00b1078 (null)() at 0xc011bb1c KDB: reentering KDB: stack backtrace: (null)() at 0xc063105c (null)() at 0xc09e193c (null)() at 0xc00b1078 (null)() at 0xc011a050 KDB: reentering KDB: stack backtrace: (null)() at 0xc063105c (null)() at 0xc09e193c (null)() at 0xc00b1078 (null)() at 0xc011a050 ..etc.. So it looks like something has already gone wrong simply trying to dump the process map. Fortunately the number of QEMU translation blocks between the output of the "ps/m" header and the "KDB reentering" is quite small so I've uploaded it to https://www.ilande.co.uk/tmp/qemu/freebsd-tb.txt. Can anyone have a quick look at the link above and give me an idea as to roughly what the code is doing here? Many thanks, Mark. From owner-freebsd-sparc64@freebsd.org Tue Apr 12 09:06:46 2016 Return-Path: Delivered-To: freebsd-sparc64@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6388FB0CE81 for ; Tue, 12 Apr 2016 09:06:46 +0000 (UTC) (envelope-from mark.cave-ayland@ilande.co.uk) Received: from s16892447.onlinehome-server.info (chuckie.co.uk [82.165.15.123]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 28B3C1372 for ; Tue, 12 Apr 2016 09:06:45 +0000 (UTC) (envelope-from mark.cave-ayland@ilande.co.uk) Received: from host81-154-31-210.range81-154.btcentralplus.com ([81.154.31.210] helo=[192.168.1.65]) by s16892447.onlinehome-server.info with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1apuHR-0003bR-K3 for freebsd-sparc64@freebsd.org; Tue, 12 Apr 2016 10:06:43 +0100 To: "freebsd-sparc64@freebsd.org" References: <570CAFD6.2010004@ilande.co.uk> From: Mark Cave-Ayland Message-ID: <570CBA7E.2080509@ilande.co.uk> Date: Tue, 12 Apr 2016 10:06:06 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.7.0 MIME-Version: 1.0 In-Reply-To: <570CAFD6.2010004@ilande.co.uk> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 81.154.31.210 X-SA-Exim-Mail-From: mark.cave-ayland@ilande.co.uk X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on s16892447.onlinehome-server.info X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, URIBL_BLOCKED autolearn=ham version=3.3.2 Subject: Re: qemu-system-sparc64: entering the debugger X-SA-Exim-Version: 4.2.1 (built Sun, 08 Jan 2012 02:45:44 +0000) X-SA-Exim-Scanned: Yes (on s16892447.onlinehome-server.info) X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Apr 2016 09:06:46 -0000 On 12/04/16 09:20, Mark Cave-Ayland wrote: > So it looks like something has already gone wrong simply trying to dump > the process map. Fortunately the number of QEMU translation blocks > between the output of the "ps/m" header and the "KDB reentering" is > quite small so I've uploaded it to > https://www.ilande.co.uk/tmp/qemu/freebsd-tb.txt. > > Can anyone have a quick look at the link above and give me an idea as to > roughly what the code is doing here? To my FreeBSD-untrained eye, it looks like we're going okay until around this part: IN: 0x00000000c0122008: ldx [ %l2 + 0x3d8 ], %g1 0x00000000c012200c: ldx [ %g1 + 0x18 ], %g1 0x00000000c0122010: brz,pn %g1, 0xc0122050 0x00000000c0122014: nop -------------- IN: 0x00000000c00a4d1c: mov %g6, %g6 ! 0x0 0x00000000c00a4d20: sllx %g6, 0x20, %g6 0x00000000c00a4d24: sethi %hi(0xbfc00000), %g7 0x00000000c00a4d28: or %g7, %g6, %g7 0x00000000c00a4d2c: sethi %hi(0x1fc00), %g6 0x00000000c00a4d30: or %g6, 0x3ff, %g6 ! 0x1ffff 0x00000000c00a4d34: srlx %g5, 0xd, %g5 0x00000000c00a4d38: and %g5, %g6, %g6 0x00000000c00a4d3c: sllx %g6, 5, %g6 0x00000000c00a4d40: add %g6, %g7, %g6 0x00000000c00a4d44: ldda [ %g6 ] (36), %g6 0x00000000c00a4d48: brgez,pn %g7, 0xc00b0880 0x00000000c00a4d4c: srlx %g6, 2, %g6 Notice a jump to a translation block that isn't the target or continuation of the branch. Here the code at 0xc00a4d1c looks suspiciously like that in tl1_immu_miss_patch_tsb_1 which suggests we've bailed out to a trap handler due to an invalid address. ATB, Mark. From owner-freebsd-sparc64@freebsd.org Tue Apr 12 12:51:54 2016 Return-Path: Delivered-To: freebsd-sparc64@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5AD8BB0D6F4 for ; Tue, 12 Apr 2016 12:51:54 +0000 (UTC) (envelope-from mark.cave-ayland@ilande.co.uk) Received: from s16892447.onlinehome-server.info (chuckie.co.uk [82.165.15.123]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1F49B1886 for ; Tue, 12 Apr 2016 12:51:53 +0000 (UTC) (envelope-from mark.cave-ayland@ilande.co.uk) Received: from host81-154-31-210.range81-154.btcentralplus.com ([81.154.31.210] helo=[192.168.1.65]) by s16892447.onlinehome-server.info with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1apxnJ-0004OY-G8 for freebsd-sparc64@freebsd.org; Tue, 12 Apr 2016 13:51:50 +0100 To: "freebsd-sparc64@freebsd.org" References: <570CAFD6.2010004@ilande.co.uk> <570CBA7E.2080509@ilande.co.uk> From: Mark Cave-Ayland Message-ID: <570CEF42.9050400@ilande.co.uk> Date: Tue, 12 Apr 2016 13:51:14 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.7.0 MIME-Version: 1.0 In-Reply-To: <570CBA7E.2080509@ilande.co.uk> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 81.154.31.210 X-SA-Exim-Mail-From: mark.cave-ayland@ilande.co.uk X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on s16892447.onlinehome-server.info X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, URIBL_BLOCKED autolearn=ham version=3.3.2 Subject: Re: qemu-system-sparc64: entering the debugger X-SA-Exim-Version: 4.2.1 (built Sun, 08 Jan 2012 02:45:44 +0000) X-SA-Exim-Scanned: Yes (on s16892447.onlinehome-server.info) X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Apr 2016 12:51:54 -0000 On 12/04/16 10:06, Mark Cave-Ayland wrote: >> So it looks like something has already gone wrong simply trying to dump >> the process map. Fortunately the number of QEMU translation blocks >> between the output of the "ps/m" header and the "KDB reentering" is >> quite small so I've uploaded it to >> https://www.ilande.co.uk/tmp/qemu/freebsd-tb.txt. >> >> Can anyone have a quick look at the link above and give me an idea as to >> roughly what the code is doing here? It seems that if you boot directly into ddb and use ps/m then you end up with a NULL pointer dereference: FreeBSD/sparc64 bootstrap loader, Revision 1.0 (mca@freebsd, Thu Sep 24 00:27:19 BST 2015) bootpath="/pci@1fe,0/pci-ata@5/ide1@8200/cdrom@0:a" Loading /boot/defaults/loader.conf /boot/kernel/kernel data=0xd893c0+0x20ffd8 syms=[0x8+0xdc578+0x8+0xcb349] \ Hit [Enter] to boot immediately, or any other key for command prompt. Booting [/boot/kernel/kernel] in 9 seconds... Type '?' for a list of commands, 'help' for more detailed help. OK boot -d Booting... jumping to kernel entry at 0xc00b0000. GDB: no debug ports present KDB: debugger backends: ddb KDB: current backend: ddb KDB: enter: Boot flags requested debugger [ thread pid 0 tid 0 ] Stopped at 0xc0630b00 db> ps/m pid ppid pgrp uid state wmesg wchan cmd 0 0 0 0KDB: reentering KDB: stack backtrace: (null)() at 0xc063105c (null)() at 0xc09e193c (null)() at 0xc00b1078 (null)() at 0xc011bb1c The NULL pointer reference occurs here: 0x00000000c0122008: ldx [ %l2 + 0x3d8 ], %g1 ! %g1 = 0 0x00000000c012200c: ldx [ %g1 + 0x18 ], %g1 ! 0x00000000c0122010: brz,pn %g1, 0xc0122050 0x00000000c0122014: nop AFAICT the corresponding part of db_ps.c is this: if (p->p_session != NULL && SESS_LEADER(p)) strlcat(state, "s", sizeof(state)); Here p->p_session expands to p->p_pgrp->pg_session which gives us the exception because p->p_pgrp is set to NULL. So I guess this is a bug, but not the bug I'm looking for... (Note: I know this is an oldish checkout, so maybe someone else has already found and fixed this) ATB, Mark. From owner-freebsd-sparc64@freebsd.org Thu Apr 14 13:42:10 2016 Return-Path: Delivered-To: freebsd-sparc64@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A7B79B0FA9A for ; Thu, 14 Apr 2016 13:42:10 +0000 (UTC) (envelope-from mark.cave-ayland@ilande.co.uk) Received: from s16892447.onlinehome-server.info (chuckie.co.uk [82.165.15.123]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6B9251DF7 for ; Thu, 14 Apr 2016 13:42:09 +0000 (UTC) (envelope-from mark.cave-ayland@ilande.co.uk) Received: from host81-154-31-210.range81-154.btcentralplus.com ([81.154.31.210] helo=[192.168.1.65]) by s16892447.onlinehome-server.info with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1aqhWx-0000js-Ox for freebsd-sparc64@freebsd.org; Thu, 14 Apr 2016 14:42:01 +0100 To: "freebsd-sparc64@freebsd.org" References: <570CAFD6.2010004@ilande.co.uk> <570CBA7E.2080509@ilande.co.uk> <570CEF42.9050400@ilande.co.uk> From: Mark Cave-Ayland Message-ID: <570F9E05.40703@ilande.co.uk> Date: Thu, 14 Apr 2016 14:41:25 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.7.0 MIME-Version: 1.0 In-Reply-To: <570CEF42.9050400@ilande.co.uk> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 81.154.31.210 X-SA-Exim-Mail-From: mark.cave-ayland@ilande.co.uk X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on s16892447.onlinehome-server.info X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, URIBL_BLOCKED autolearn=ham version=3.3.2 Subject: Re: qemu-system-sparc64: entering the debugger X-SA-Exim-Version: 4.2.1 (built Sun, 08 Jan 2012 02:45:44 +0000) X-SA-Exim-Scanned: Yes (on s16892447.onlinehome-server.info) X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Apr 2016 13:42:10 -0000 On 12/04/16 13:51, Mark Cave-Ayland wrote: > On 12/04/16 10:06, Mark Cave-Ayland wrote: > >>> So it looks like something has already gone wrong simply trying to dump >>> the process map. Fortunately the number of QEMU translation blocks >>> between the output of the "ps/m" header and the "KDB reentering" is >>> quite small so I've uploaded it to >>> https://www.ilande.co.uk/tmp/qemu/freebsd-tb.txt. >>> >>> Can anyone have a quick look at the link above and give me an idea as to >>> roughly what the code is doing here? > > It seems that if you boot directly into ddb and use ps/m then you end up > with a NULL pointer dereference: > > FreeBSD/sparc64 bootstrap loader, Revision 1.0 > (mca@freebsd, Thu Sep 24 00:27:19 BST 2015) > bootpath="/pci@1fe,0/pci-ata@5/ide1@8200/cdrom@0:a" > Loading /boot/defaults/loader.conf > /boot/kernel/kernel data=0xd893c0+0x20ffd8 syms=[0x8+0xdc578+0x8+0xcb349] > \ > Hit [Enter] to boot immediately, or any other key for command prompt. > Booting [/boot/kernel/kernel] in 9 seconds... > > Type '?' for a list of commands, 'help' for more detailed help. > OK boot -d > Booting... > jumping to kernel entry at 0xc00b0000. > GDB: no debug ports present > KDB: debugger backends: ddb > KDB: current backend: ddb > KDB: enter: Boot flags requested debugger > [ thread pid 0 tid 0 ] > Stopped at 0xc0630b00 > db> ps/m > pid ppid pgrp uid state wmesg wchan cmd > 0 0 0 0KDB: reentering > KDB: stack backtrace: > (null)() at 0xc063105c > (null)() at 0xc09e193c > (null)() at 0xc00b1078 > (null)() at 0xc011bb1c > > The NULL pointer reference occurs here: > > 0x00000000c0122008: ldx [ %l2 + 0x3d8 ], %g1 ! %g1 = 0 > 0x00000000c012200c: ldx [ %g1 + 0x18 ], %g1 ! > 0x00000000c0122010: brz,pn %g1, 0xc0122050 > 0x00000000c0122014: nop > > AFAICT the corresponding part of db_ps.c is this: > > if (p->p_session != NULL && SESS_LEADER(p)) > strlcat(state, "s", sizeof(state)); > > Here p->p_session expands to p->p_pgrp->pg_session which gives us the > exception because p->p_pgrp is set to NULL. So I guess this is a bug, > but not the bug I'm looking for... > > (Note: I know this is an oldish checkout, so maybe someone else has > already found and fixed this) I've just tried this with the latest SPARC64 current ISO (FreeBSD-11.0-CURRENT-sparc64-20160408-r297692) and the bug is still there, plus it occurs on my amd64 image too so this isn't just a SPARC64 issue. Also trying to use continue to exit from ddb doesn't seem to work under qemu-system-sparc64 either: $ ./qemu-system-sparc64 -cdrom FreeBSD-11.0-CURRENT-sparc64-20160408-r297692-disc1.iso -boot d -m 512 -nographic OpenBIOS for Sparc64 Configuration device id QEMU version 1 machine id 0 kernel cmdline CPUs: 1 x SUNW,UltraSPARC-IIi UUID: 00000000-0000-0000-0000-000000000000 Welcome to OpenBIOS v1.1 built on Feb 26 2016 10:39 Type 'help' for detailed information Trying cdrom:f... Not a bootable ELF image Loading a.out image... Loaded 7680 bytes entry point is 0x4000 Jumping to entry point 0000000000004000 for type 0000000000000005... switching to new context: entry point 0x4000 stack 0x00000000ffe84a09 >> FreeBSD/sparc64 boot block Boot path: /pci@1fe,0/pci-ata@5/ide1@8200/cdrom@0:f Boot loader: /boot/loader Consoles: Open Firmware console FreeBSD/sparc64 bootstrap loader, Revision 1.0 (root@releng2.nyi.freebsd.org, Fri Apr 8 06:07:07 UTC 2016) bootpath="/pci@1fe,0/pci-ata@5/ide1@8200/cdrom@0:a" Loading /boot/defaults/loader.conf /boot/kernel/kernel data=0xd1cc40+0x2137d8 syms=[0x8+0xdf260+0x8+0xcddb9] \ Hit [Enter] to boot immediately, or any other key for command prompt. Booting [/boot/kernel/kernel] in 9 seconds... Type '?' for a list of commands, 'help' for more detailed help. OK boot -d Booting... jumping to kernel entry at 0xc00b0000. GDB: no debug ports present KDB: debugger backends: ddb KDB: current backend: ddb KDB: enter: Boot flags requested debugger [ thread pid 0 tid 0 ] Stopped at 0xc062b5e0 db> continue db> Can anyone confirm whether or not this works on real hardware or whether it is another QEMU bug? ATB, Mark. From owner-freebsd-sparc64@freebsd.org Thu Apr 14 14:07:55 2016 Return-Path: Delivered-To: freebsd-sparc64@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0077DB10272 for ; Thu, 14 Apr 2016 14:07:55 +0000 (UTC) (envelope-from mark.cave-ayland@ilande.co.uk) Received: from s16892447.onlinehome-server.info (chuckie.co.uk [82.165.15.123]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9C96F197F for ; Thu, 14 Apr 2016 14:07:54 +0000 (UTC) (envelope-from mark.cave-ayland@ilande.co.uk) Received: from host81-154-31-210.range81-154.btcentralplus.com ([81.154.31.210] helo=[192.168.1.65]) by s16892447.onlinehome-server.info with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1aqhvu-0000qd-Ka for freebsd-sparc64@freebsd.org; Thu, 14 Apr 2016 15:07:52 +0100 To: "freebsd-sparc64@freebsd.org" From: Mark Cave-Ayland Message-ID: <570FA410.5020408@ilande.co.uk> Date: Thu, 14 Apr 2016 15:07:12 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.7.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 81.154.31.210 X-SA-Exim-Mail-From: mark.cave-ayland@ilande.co.uk X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on s16892447.onlinehome-server.info X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, URIBL_BLOCKED autolearn=ham version=3.3.2 Subject: qemu-system-sparc64 can boot FreeBSD 10.3! X-SA-Exim-Version: 4.2.1 (built Sun, 08 Jan 2012 02:45:44 +0000) X-SA-Exim-Scanned: Yes (on s16892447.onlinehome-server.info) X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Apr 2016 14:07:55 -0000 Hi all, So while I've been working on this, it seems that Artyom has beaten me to it: http://tyom.blogspot.co.uk/2016/04/freebsd-103sparc64-under-qemu.html. A copy of QEMU git master along with https://lists.nongnu.org/archive/html/qemu-devel/2016-04/msg02284.html and https://lists.nongnu.org/archive/html/qemu-devel/2016-04/msg02285.html can boot the FreeBSD 10.3 release: $ ./qemu-system-sparc64 -cdrom FreeBSD-10.3-RELEASE-sparc64-bootonly.iso -boot d -m 512 -nographic OpenBIOS for Sparc64 Configuration device id QEMU version 1 machine id 0 kernel cmdline CPUs: 1 x SUNW,UltraSPARC-IIi UUID: 00000000-0000-0000-0000-000000000000 Welcome to OpenBIOS v1.1 built on Feb 26 2016 10:39 Type 'help' for detailed information Trying cdrom:f... Not a bootable ELF image Loading a.out image... Loaded 7680 bytes entry point is 0x4000 Jumping to entry point 0000000000004000 for type 0000000000000005... switching to new context: entry point 0x4000 stack 0x00000000ffe84a09 >> FreeBSD/sparc64 boot block Boot path: /pci@1fe,0/pci-ata@5/ide1@8200/cdrom@0:f Boot loader: /boot/loader Consoles: Open Firmware console FreeBSD/sparc64 bootstrap loader, Revision 1.0 (root@releng1.nyi.freebsd.org, Fri Mar 25 06:23:20 UTC 2016) bootpath="/pci@1fe,0/pci-ata@5/ide1@8200/cdrom@0:a" Loading /boot/defaults/loader.conf /boot/kernel/kernel data=0xbc4540+0xe62a0 syms=[0x8+0xcc060+0x8+0xbe0ae] Hit [Enter] to boot immediately, or any other key for command prompt. Booting [/boot/kernel/kernel]... jumping to kernel entry at 0xc00a8000. Copyright (c) 1992-2016 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 10.3-RELEASE #0 r297264: Fri Mar 25 06:26:08 UTC 2016 root@releng1.nyi.freebsd.org:/usr/obj/sparc64.sparc64/usr/src/sys/GENERIC sparc64 gcc version 4.2.1 20070831 patched [FreeBSD] real memory = 536870912 (512 MB) avail memory = 501080064 (477 MB) cpu0: Sun Microsystems UltraSparc-IIi Processor (100.00 MHz CPU) random: initialized kbd0 at kbdmux0 nexus0: nexus0: : incomplete pcib0: mem 0x1fe00000000-0x1fe01ffffff irq 2032,2030,2031,2021 on nexus0 pcib0: Sabre, impl 0, version 0, IGN 0x1f, bus A, 33MHz pcib0: DVMA map: 0xc0000000 to 0xc3ffffff 8192 entries pcib0: [GIANT-LOCKED] pci0: on pcib0 pcib1: at device 1.0 on pci0 pci1: on pcib1 pcib2: at device 1.1 on pci0 pci2: on pcib2 ebus0: port 0x4000-0x7fff mem 0x3000000-0x3ffffff at device 3.0 on pci0 vgapci0: mem 0x1000000-0x1ffffff,0x2000000-0x2000fff at device 2.0 on pci0 vgapci0: Boot video device eeprom0: addr 0x1400002000-0x1400003fff on ebus0 eeprom0: model mk48t59 ebus0: addr 0 (no driver attached) uart0: <16550 or compatible> addr 0x14000003f8-0x14000003ff irq 43 on ebus0 uart0: console (9600,n,8,1) ebus0: addr 0x1400000060-0x1400000067 (no driver attached) pci0: at device 4.0 (no driver attached) atapci0: port 0x8100-0x8107,0x8180-0x8183,0x8200-0x8207,0x8280-0x8283,0x8300-0x830f at device 5.0 on pci0 ata2: at channel 0 on atapci0 ata3: at channel 1 on atapci0 nexus0: type unknown (no driver attached) Timecounter "tick" frequency 100000000 Hz quality 1000 Event timer "tick" frequency 100000000 Hz quality 1000 Timecounters tick every 1.000 msec cd0 at ata3 bus 0 scbus1 target 0 lun 0 cd0: Removable CD-ROM SCSI device cd0: Serial Number QM00003 cd0: 33.300MB/s transfers (UDMA2, ATAPI 12bytes, PIO 65534bytes) cd0: 193MB (99200 2048 byte sectors) random: unblocking device. Trying to mount root from cd9660:/dev/iso9660/10_3_RELEASE_SPARC64_BO [ro]... Entropy harvesting: interrupts ethernet point_to_point swi. Starting file system checks: Mounting local file systems:. Writing entropy file:. /etc/rc: WARNING: $hostname is not set -- see rc.conf(5). Starting Network: lo0. lo0: flags=8049 metric 0 mtu 16384 options=600003 inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 inet 127.0.0.1 netmask 0xff000000 nd6 options=21 Starting devd. add net fe80::: gateway ::1 add net ff02::: gateway ::1 add net ::ffff:0.0.0.0: gateway ::1 add net ::0.0.0.0: gateway ::1 Generating host.conf. eval: cannot create /etc/host.conf: Read-only file system eval: cannot create /etc/host.conf: Read-only file system eval: cannot create /etc/host.conf: Read-only file system Creating and/or trimming log files. Starting syslogd. ELF ldconfig path: /lib /usr/lib /usr/lib/compat Clearing /tmp (X related). Starting local daemons: Welcome to FreeBSD! Please choose the appropriate terminal type for your system. Common console types are: ansi Standard ANSI terminal vt100 VT100 or compatible terminal xterm xterm terminal emulator (or compatible) cons25w cons25w terminal Console type [vt100]: Sadly though it seems the latest 11.0-CURRENT-sparc64-20160408-r297692 doesn't boot because https://reviews.freebsd.org/D2791 hasn't yet been applied to the 11.0 tree: $ ./qemu-system-sparc64 -cdrom FreeBSD-11.0-CURRENT-sparc64-20160408-r297692-disc1.iso -boot d -m 512 -nographic OpenBIOS for Sparc64 Configuration device id QEMU version 1 machine id 0 kernel cmdline CPUs: 1 x SUNW,UltraSPARC-IIi UUID: 00000000-0000-0000-0000-000000000000 Welcome to OpenBIOS v1.1 built on Feb 26 2016 10:39 Type 'help' for detailed information Trying cdrom:f... Not a bootable ELF image Loading a.out image... Loaded 7680 bytes entry point is 0x4000 Jumping to entry point 0000000000004000 for type 0000000000000005... switching to new context: entry point 0x4000 stack 0x00000000ffe84a09 >> FreeBSD/sparc64 boot block Boot path: /pci@1fe,0/pci-ata@5/ide1@8200/cdrom@0:f Boot loader: /boot/loader Consoles: Open Firmware console FreeBSD/sparc64 bootstrap loader, Revision 1.0 (root@releng2.nyi.freebsd.org, Fri Apr 8 06:07:07 UTC 2016) bootpath="/pci@1fe,0/pci-ata@5/ide1@8200/cdrom@0:a" Loading /boot/defaults/loader.conf /boot/kernel/kernel data=0xd1cc40+0x2137d8 syms=[0x8+0xdf260+0x8+0xcddb9] \ Hit [Enter] to boot immediately, or any other key for command prompt. Booting [/boot/kernel/kernel]... jumping to kernel entry at 0xc00b0000. GDB: no debug ports present KDB: debugger backends: ddb KDB: current backend: ddb Copyright (c) 1992-2016 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 11.0-CURRENT #0 r297692: Fri Apr 8 06:10:15 UTC 2016 root@releng2.nyi.freebsd.org:/usr/obj/sparc64.sparc64/usr/src/sys/GENERIC sparc64 gcc version 4.2.1 20070831 patched [FreeBSD] WARNING: WITNESS option enabled, expect reduced performance. VT: init without driver. real memory = 536870912 (512 MB) avail memory = 493920256 (471 MB) cpu0: Sun Microsystems UltraSparc-IIi Processor (100.00 MHz CPU) random: entropy device external interface kbd0 at kbdmux0 nexus0: nexus0: : incomplete pcib0: mem 0x1fe00000000-0x1fe01ffffff irq 2032,2030,2031,2021 on nexus0 panic: psycho_attach: could not allocate registers cpuid = 0 KDB: stack backtrace: vpanic() at vpanic+0x1b4 panic() at panic+0x20 psycho_attach() at psycho_attach+0x1a0 device_attach() at device_attach+0x5a8 device_probe_and_attach() at device_probe_and_attach+0x64 bus_generic_attach() at bus_generic_attach+0x10 nexus_attach() at nexus_attach+0x590 device_attach() at device_attach+0x5a8 device_probe_and_attach() at device_probe_and_attach+0x64 bus_generic_new_pass() at bus_generic_new_pass+0x11c bus_set_pass() at bus_set_pass+0xf8 root_bus_configure() at root_bus_configure+0x8 configure() at configure+0x4 mi_startup() at mi_startup+0x1d0 btext() at btext+0x28 KDB: enter: panic [ thread pid 0 tid 100000 ] Stopped at kdb_enter+0x80: ta %xcc, 1 db> ATB, Mark. From owner-freebsd-sparc64@freebsd.org Thu Apr 14 21:36:15 2016 Return-Path: Delivered-To: freebsd-sparc64@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 35B3FAEC020 for ; Thu, 14 Apr 2016 21:36:15 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "alchemy.franken.de", Issuer "alchemy.franken.de" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id BF17E1497 for ; Thu, 14 Apr 2016 21:36:14 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.15.2/8.15.2/ALCHEMY.FRANKEN.DE) with ESMTPS id u3ELa4l8024370 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 14 Apr 2016 23:36:05 +0200 (CEST) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.15.2/8.15.2/Submit) id u3ELa4FI024369; Thu, 14 Apr 2016 23:36:04 +0200 (CEST) (envelope-from marius) Date: Thu, 14 Apr 2016 23:36:04 +0200 From: Marius Strobl To: Mark Cave-Ayland Cc: "freebsd-sparc64@freebsd.org" Subject: Re: qemu-system-sparc64 can boot FreeBSD 10.3! Message-ID: <20160414213604.GA23985@alchemy.franken.de> References: <570FA410.5020408@ilande.co.uk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="9jxsPFA5p3P2qPhR" Content-Disposition: inline In-Reply-To: <570FA410.5020408@ilande.co.uk> User-Agent: Mutt/1.5.24 (2015-08-30) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (alchemy.franken.de [0.0.0.0]); Thu, 14 Apr 2016 23:36:05 +0200 (CEST) X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Apr 2016 21:36:15 -0000 --9jxsPFA5p3P2qPhR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Apr 14, 2016 at 03:07:12PM +0100, Mark Cave-Ayland wrote: >=20 > Sadly though it seems the latest 11.0-CURRENT-sparc64-20160408-r297692 > doesn't boot because https://reviews.freebsd.org/D2791 hasn't yet been > applied to the 11.0 tree: No, that's a different problem fixed in r297792. Marius --9jxsPFA5p3P2qPhR Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQJ8BAEBCgBmBQJXEA0/XxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ1M0Q5QjQzNTVGOTU5ODBGQzVENzZCMDIy MEI3MERFMTNGMUQxRTRGAAoJECC3DeE/HR5PI1cP/0fakSsT4n0ZrH5tTiMh9fkh qTwCPbRPrXo3da23fkiOpN6g8+vOS75OYNhM6CGhtLDvY4x1qFOvw+XHxFVIeVE7 gRLWa4MMIfySt7KXD/ZFiMSELES//SAukso/QKZcqwIYvYaU6sI0mXcfdJhexqiD n6XcD5oNDoCIOXQE5B0CYnlaoWgcdvec3EKoKNxiPtHadMAcNxwDkPS8FHCoubSp Pne0WjYnV8i+uSbtnN/LxdRCAQHYNdSFQbTyrOPFVIUWCXng9KNnDmLQKGbMKIcV AWhs5weCQp0LHlDkomiRxXUUGIzuKXaM0y4CePJEev+g59/P0Cc88+nn/cRAW/SG jPFiXijK1z37Y7z8qv31/9yx5YPYUMNRy5n56lU0NLqkYtMoKPPKIbSyA6TpE6MN v9SQDftJQprnExbhyhqaak46/OBTLtnmGeYdJBhvY2vcj1vc4mfTMc0zr55P+asj NVRRhZ/akGKzFq4CVHU6Yjdfy8ulKHJ6icIt98WBZsb0YmsBmE6JallNgew1/JHL WwRmQKFTJWZO6HRqQamJdMZuj9RfVhrryvaUIEQI1fgx0H4U56X7ck05sdVnF1x3 5msuyHcSvs0N5C7Aa0utpKn2lClvrhusYjo4wKjjXdYkj+9q8vRu/Jcxw/Bj6SIt JLD6l9Qg3hq+T/5nKNfC =GhPr -----END PGP SIGNATURE----- --9jxsPFA5p3P2qPhR-- From owner-freebsd-sparc64@freebsd.org Fri Apr 15 08:16:27 2016 Return-Path: Delivered-To: freebsd-sparc64@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A124DAEC95C for ; Fri, 15 Apr 2016 08:16:27 +0000 (UTC) (envelope-from mark.cave-ayland@ilande.co.uk) Received: from s16892447.onlinehome-server.info (chuckie.co.uk [82.165.15.123]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 646DD1EA6; Fri, 15 Apr 2016 08:16:26 +0000 (UTC) (envelope-from mark.cave-ayland@ilande.co.uk) Received: from host81-154-31-210.range81-154.btcentralplus.com ([81.154.31.210] helo=[192.168.1.65]) by s16892447.onlinehome-server.info with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1aqyvN-0005i7-Qf; Fri, 15 Apr 2016 09:16:22 +0100 To: Marius Strobl References: <570FA410.5020408@ilande.co.uk> <20160414213604.GA23985@alchemy.franken.de> Cc: "freebsd-sparc64@freebsd.org" From: Mark Cave-Ayland Message-ID: <5710A330.2090005@ilande.co.uk> Date: Fri, 15 Apr 2016 09:15:44 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.7.0 MIME-Version: 1.0 In-Reply-To: <20160414213604.GA23985@alchemy.franken.de> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 81.154.31.210 X-SA-Exim-Mail-From: mark.cave-ayland@ilande.co.uk X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on s16892447.onlinehome-server.info X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.3.2 Subject: Re: qemu-system-sparc64 can boot FreeBSD 10.3! X-SA-Exim-Version: 4.2.1 (built Sun, 08 Jan 2012 02:45:44 +0000) X-SA-Exim-Scanned: Yes (on s16892447.onlinehome-server.info) X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Apr 2016 08:16:27 -0000 On 14/04/16 22:36, Marius Strobl wrote: > On Thu, Apr 14, 2016 at 03:07:12PM +0100, Mark Cave-Ayland wrote: >> >> Sadly though it seems the latest 11.0-CURRENT-sparc64-20160408-r297692 >> doesn't boot because https://reviews.freebsd.org/D2791 hasn't yet been >> applied to the 11.0 tree: > > No, that's a different problem fixed in r297792. Ah okay. In that case I'll just wait until the next ISO is generated and add it to my QEMU/OpenBIOS release test suite. Thanks again for all of your help with this. ATB, Mark. From owner-freebsd-sparc64@freebsd.org Fri Apr 15 08:58:21 2016 Return-Path: Delivered-To: freebsd-sparc64@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8B954AEDB78 for ; Fri, 15 Apr 2016 08:58:21 +0000 (UTC) (envelope-from atar4qemu@gmail.com) Received: from mail-lf0-x231.google.com (mail-lf0-x231.google.com [IPv6:2a00:1450:4010:c07::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 10781103A for ; Fri, 15 Apr 2016 08:58:21 +0000 (UTC) (envelope-from atar4qemu@gmail.com) Received: by mail-lf0-x231.google.com with SMTP id g184so137803197lfb.3 for ; Fri, 15 Apr 2016 01:58:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=A/QGjtkiY3mqGuwxdDOXTsGygORBNIB+4eWdmx3U2rM=; b=e42iZH5hHm6WpvFmRrcWPlJfRMfkIRFcFjJ/q4vFiVeFfW/ISwDvLrmv0Qhn54b6/d fNPqGKPpWF6A086eu2eNVNXsxXI+k7+CO27hk847M4qVt5zJ0bf9xfvPDXw3GPmXpn3O C/Cfn0TRvr3LEr5amLB7Qw84XQsHIs6/g05BEs6LOYMBmJ0DEBheOJnDrnRkAx4EteP3 9lpAyv1skX64WHEZN38dZqvZDUzUC8qm145arWOH+SPcd9dt7FcIdlEtx//SCIm5crKG kBTYEuvGSN/rBqk7kofaSjgEWSr3k2CGVLeZQJQkfHJKgAiIh/V5V6325odDzlHwGLi7 eLsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=A/QGjtkiY3mqGuwxdDOXTsGygORBNIB+4eWdmx3U2rM=; b=mUMnRP+1J8mfS4nxZu2yfu6jzn71EJX6hMuWty38c7HdonGn3QBkW6wxjv6LavtMbZ omQhoSPxS9Ghp3t6lIlK1HOd/HirkY+1PEtVqVQnOs8dt4c3pcFpClmqWloSWU7qqAES 0QUhXBKeLTJc60cEr622SGsD5bDTcKLX3hnFj/CJARABMa5ZjGrE924CDWvU6hapHNHO D860X69HTan3PHSRnwyAMwzkl1kCbfX9rDf0ATzS0DtqprM7bMkk6r596lUv1u6QQJsn sN/pF42ai5XB5HjyZYc/RYk5NlVeD7wKnEIOTJKVxmhDbtZMkUvCF//ZR1OvrA4zhZYa E1ew== X-Gm-Message-State: AOPr4FWvAhdIU7CbNiSPPaFeKulr8KodofV6eoUi5ceJaJnydXVuwsgSfrIBD7SXEPAQHcDZcJ0csCcmSIusIQ== X-Received: by 10.112.84.202 with SMTP id b10mr8106923lbz.41.1460710699188; Fri, 15 Apr 2016 01:58:19 -0700 (PDT) MIME-Version: 1.0 Received: by 10.114.187.177 with HTTP; Fri, 15 Apr 2016 01:57:59 -0700 (PDT) From: Artyom Tarasenko Date: Fri, 15 Apr 2016 10:57:59 +0200 Message-ID: Subject: freebsd-sun4v status To: "freebsd-sparc64@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Apr 2016 08:58:21 -0000 Hi, looking for the next test case for qemu-system-sparc64, I wonder what happened to the sun4v port of FreeBSD. Is merged into the freebsd-sparc64 tree or abandoned? The freebsd-sun4v mailing list archives seem to be nearly empty. I've tried 7.0-20061112-SNAP-sun4v-disc1.iso, but the OpenSPARC OBP does not recognize its disk label. -- Regards, Artyom Tarasenko SPARC and PPC PReP under qemu blog: http://tyom.blogspot.com/search/label/qemu From owner-freebsd-sparc64@freebsd.org Fri Apr 15 09:13:52 2016 Return-Path: Delivered-To: freebsd-sparc64@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C55A8AEC293 for ; Fri, 15 Apr 2016 09:13:52 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 609B71AF5 for ; Fri, 15 Apr 2016 09:13:52 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id u3F9Dltw051516 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Fri, 15 Apr 2016 12:13:47 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua u3F9Dltw051516 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id u3F9DlPS051515; Fri, 15 Apr 2016 12:13:47 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 15 Apr 2016 12:13:47 +0300 From: Konstantin Belousov To: Mark Cave-Ayland Cc: "freebsd-sparc64@freebsd.org" Subject: Re: qemu-system-sparc64: entering the debugger Message-ID: <20160415091347.GG2422@kib.kiev.ua> References: <570CAFD6.2010004@ilande.co.uk> <570CBA7E.2080509@ilande.co.uk> <570CEF42.9050400@ilande.co.uk> <570F9E05.40703@ilande.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <570F9E05.40703@ilande.co.uk> User-Agent: Mutt/1.6.0 (2016-04-01) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Apr 2016 09:13:52 -0000 On Thu, Apr 14, 2016 at 02:41:25PM +0100, Mark Cave-Ayland wrote: > On 12/04/16 13:51, Mark Cave-Ayland wrote: > > The NULL pointer reference occurs here: > > > > 0x00000000c0122008: ldx [ %l2 + 0x3d8 ], %g1 ! %g1 = 0 > > 0x00000000c012200c: ldx [ %g1 + 0x18 ], %g1 ! > > 0x00000000c0122010: brz,pn %g1, 0xc0122050 > > 0x00000000c0122014: nop > > > > AFAICT the corresponding part of db_ps.c is this: > > > > if (p->p_session != NULL && SESS_LEADER(p)) > > strlcat(state, "s", sizeof(state)); > > > > Here p->p_session expands to p->p_pgrp->pg_session which gives us the > > exception because p->p_pgrp is set to NULL. So I guess this is a bug, > > but not the bug I'm looking for... I fixed this in r298043, thank you for the report. From owner-freebsd-sparc64@freebsd.org Fri Apr 15 13:03:58 2016 Return-Path: Delivered-To: freebsd-sparc64@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9C521AEC208 for ; Fri, 15 Apr 2016 13:03:58 +0000 (UTC) (envelope-from lidl@pix.net) Received: from hydra.pix.net (hydra.pix.net [IPv6:2001:470:e254::4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.pix.net", Issuer "Pix.Com Technologies, LLC CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 6B9871689 for ; Fri, 15 Apr 2016 13:03:58 +0000 (UTC) (envelope-from lidl@pix.net) Received: from torb.pix.net (torb.pix.net [192.168.16.32]) (authenticated bits=0) by hydra.pix.net (8.15.2/8.15.2) with ESMTPA id u3FD3vgl073670; Fri, 15 Apr 2016 09:03:57 -0400 (EDT) (envelope-from lidl@pix.net) Subject: Re: freebsd-sun4v status To: freebsd-sparc64@freebsd.org References: From: Kurt Lidl Message-ID: <5710E6BD.4060900@pix.net> Date: Fri, 15 Apr 2016 09:03:57 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Apr 2016 13:03:58 -0000 On 4/15/16 4:57 AM, Artyom Tarasenko wrote: > Hi, > > looking for the next test case for qemu-system-sparc64, I wonder what > happened to the sun4v port of FreeBSD. Is merged into the > freebsd-sparc64 tree or abandoned? > The freebsd-sun4v mailing list archives seem to be nearly empty. > > I've tried 7.0-20061112-SNAP-sun4v-disc1.iso, but the OpenSPARC OBP > does not recognize its disk label. > It was abandoned. https://wiki.freebsd.org/FreeBSD/sun4v -Kurt