NetBSD Problem Report #50342

From www@NetBSD.org  Sun Oct 18 01:52:23 2015
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id C6F49A65B7
	for <gnats-bugs@gnats.NetBSD.org>; Sun, 18 Oct 2015 01:52:23 +0000 (UTC)
Message-Id: <20151018015222.9992CA65E5@mollari.NetBSD.org>
Date: Sun, 18 Oct 2015 01:52:22 +0000 (UTC)
From: peter@tobler.cc
Reply-To: peter@tobler.cc
To: gnats-bugs@NetBSD.org
Subject: Segfault in sysinst when trying to change timezone
X-Send-Pr-Version: www-1.0

>Number:         50342
>Category:       bin
>Synopsis:       Segfault in sysinst when trying to change timezone
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    martin
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Oct 18 01:55:00 +0000 2015
>Closed-Date:    Thu Aug 17 18:51:36 +0000 2017
>Last-Modified:  Thu Aug 17 18:51:36 +0000 2017
>Originator:     Peter
>Release:        -
>Organization:
-
>Environment:
NetBSD rpi 7.0 NetBSD 7.0 (RPI.201509250726Z)
>Description:
sysinst causes a segmentation fault caused by the function target_already_root() when trying to change the timezone post-installation.
>How-To-Repeat:
# sysinst
# Utility menu -> Change timezone

=> Segfault
>Fix:
Not known

>Release-Note:

>Audit-Trail:
From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/50342 CVS commit: src/usr.sbin/sysinst
Date: Sun, 18 Oct 2015 09:21:55 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Sun Oct 18 09:21:55 UTC 2015

 Modified Files:
 	src/usr.sbin/sysinst: target.c

 Log Message:
 PR 50342: if there is no current partition manage, assume we are running
 from an already installed system.


 To generate a diff of this commit:
 cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/sysinst/target.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

Responsible-Changed-From-To: port-evbarm-maintainer->martin
Responsible-Changed-By: martin@NetBSD.org
Responsible-Changed-When: Sun, 18 Oct 2015 09:26:20 +0000
Responsible-Changed-Why:
I fixed it


State-Changed-From-To: open->pending-pullups
State-Changed-By: martin@NetBSD.org
State-Changed-When: Sun, 18 Oct 2015 09:26:57 +0000
State-Changed-Why:
Waiting for [pullup-7 #1008]


From: "Jeff Rizzo" <riz@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/50342 CVS commit: [netbsd-7] src/usr.sbin/sysinst
Date: Sun, 8 Nov 2015 00:21:35 +0000

 Module Name:	src
 Committed By:	riz
 Date:		Sun Nov  8 00:21:35 UTC 2015

 Modified Files:
 	src/usr.sbin/sysinst [netbsd-7]: target.c

 Log Message:
 Pull up following revision(s) (requested by martin in ticket #1008):
 	usr.sbin/sysinst/target.c: revision 1.3
 PR 50342: if there is no current partition manage, assume we are running
 from an already installed system.


 To generate a diff of this commit:
 cvs rdiff -u -r1.2 -r1.2.4.1 src/usr.sbin/sysinst/target.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: Patrick Welche <prlw1@cam.ac.uk>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: bin/50342 Segfault in sysinst when trying to change timezone
Date: Thu, 16 Jun 2016 00:21:59 +0100

 I just did a fresh install with NetBSD/amd64 7.0.1 sets, and appear
 to see this bug, even though the fix was pulled up to 7...
 -current/amd64 seems fine.

 Trying to use sysinst after having done a manual disklabel / installboot /
 untar sets, reboot.

 Run sysinst,
  e: Utility menu
  b: Set timezone

 Program received signal SIGSEGV, Segmentation fault. |
 0x0000000000410bca in target_already_root ()sk       |
     at /home/prlw1/src/usr/src/usr.sbin/sysinst/arch/amd64/../../target.c:156
 156             if (strcmp(pm->diskdev, "") == 0)    |
 (gdb) bt                 | g: Halt the system        |
 #0  0x0000000000410bca in target_already_root ()     |
     at /home/prlw1/src/usr/src/usr.sbin/sysinst/arch/amd64/../../target.c:156
 #1  0x0000000000410beb in target_prefix ()
     at /home/prlw1/src/usr/src/usr.sbin/sysinst/arch/amd64/../../target.c:209
 #2  0x0000000000410c5b in target_expand (
     tgtpath=0x424a53 "/usr/share/zoneinfo/")
     at /home/prlw1/src/usr/src/usr.sbin/sysinst/arch/amd64/../../target.c:254
 #3  0x000000000040ef34 in set_timezone ()
     at /home/prlw1/src/usr/src/usr.sbin/sysinst/arch/amd64/../../util.c:1417

 (gdb) print *pm
 Cannot access memory at address 0x0

 So it is the same bug...

 AFAICT NetBSD 7.0.1 was released 22 May 2016, and the pull-up applied
 on 8 Nov 2015, so what happened?

From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc: martin@NetBSD.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org,
	peter@tobler.cc
Subject: Re: bin/50342 Segfault in sysinst when trying to change timezone
Date: Thu, 16 Jun 2016 08:42:10 +0200

 On Wed, Jun 15, 2016 at 11:25:01PM +0000, Patrick Welche wrote:
 >  AFAICT NetBSD 7.0.1 was released 22 May 2016, and the pull-up applied
 >  on 8 Nov 2015, so what happened?

 It only got pulled up to netbsd-7, not the 7.0 branch.

 Martin

State-Changed-From-To: pending-pullups->closed
State-Changed-By: jdolecek@NetBSD.org
State-Changed-When: Thu, 17 Aug 2017 18:51:36 +0000
State-Changed-Why:
Pulled to netbsd-7 and ended up in 7.1. Thank you.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.