NetBSD Problem Report #51265

From paul@whooppee.com  Thu Jun 23 00:58:53 2016
Return-Path: <paul@whooppee.com>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(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 971337A110
	for <gnats-bugs@gnats.NetBSD.org>; Thu, 23 Jun 2016 00:58:53 +0000 (UTC)
Message-Id: <20160623005850.7688D16E5F@pokey.whooppee.com>
Date: Thu, 23 Jun 2016 08:58:50 +0800 (PHT)
From: paul@whooppee.com
Reply-To: paul@whooppee.com
To: gnats-bugs@NetBSD.org
Subject: dtrace redefines global symbol vpanic
X-Send-Pr-Version: 3.95

>Number:         51265
>Category:       kern
>Synopsis:       dtrace module redefines global symbol 'vpanic'
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    pgoyette
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jun 23 01:00:01 +0000 2016
>Closed-Date:    Sun Jul 10 10:27:04 +0000 2016
>Last-Modified:  Sun Jul 10 10:27:04 +0000 2016
>Originator:     Paul Goyette
>Release:        NetBSD 7.99.30
>Organization:
+------------------+--------------------------+------------------------+
| Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:      |
| (Retired)        | FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com   |
| Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd.org |
+------------------+--------------------------+------------------------+
>Environment:


System: NetBSD pokey.whooppee.com 7.99.30 NetBSD 7.99.30 (POKEY 2016-06-14 11:43:31) #0: Tue Jun 14 23:37:31 PHT 2016 paul@pokey.whooppee.com:/build/netbsd-local/obj/amd64/sys/arch/amd64/compile/POKEY amd64
Architecture: x86_64
Machine: amd64
>Description:
	In the machine-specific dev/dtrace/*/dtrace_asm.S a duplicate
	definition of vpanic() is provided.  It's not clear to me if
	this needs to override the standard system definition of
	vpanic().  However, with the recent fix of PR kern/45125 we
	now properly detect the redefinition of the global symbol, and
	fail to load the module.

	Since dtrace is available _only_ as a module, this effectively
	renders dtrace inoperative.

>How-To-Repeat:
	On -current, with the fix for PR kern/45125, try to load the
	dtrace module (either via a boot-loader 'load dtrace' command,
	or after boot with modload(8)).

>Fix:
	Unknown.

	Possibly rename the assembler routines, although there seems to
	already be a dtrace_vpanic() wrapper.


>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: kern-bug-people->pgoyette
Responsible-Changed-By: pgoyette@NetBSD.org
Responsible-Changed-When: Thu, 23 Jun 2016 01:59:01 +0000
Responsible-Changed-Why:
I'll take care of importing the fix from FreeBSD


State-Changed-From-To: open->analyzed
State-Changed-By: pgoyette@NetBSD.org
State-Changed-When: Thu, 23 Jun 2016 01:59:01 +0000
State-Changed-Why:
Based on discussions on irc, we need to import fix from FreeBSD

    https://svnweb.freebsd.org/base?view=revision&revision=281916



From: "Paul Goyette" <pgoyette@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/51265 CVS commit: src/external/cddl/osnet/sys/kern
Date: Thu, 23 Jun 2016 05:19:42 +0000

 Module Name:	src
 Committed By:	pgoyette
 Date:		Thu Jun 23 05:19:42 UTC 2016

 Modified Files:
 	src/external/cddl/osnet/sys/kern: string.c

 Log Message:
 On NetBSD we already have strpbrk() in libkern, so we don't need to
 provide another copy in the module.  Removes another 'redefined symbol'
 error when loading the module.

 Related to PR kern/51265


 To generate a diff of this commit:
 cvs rdiff -u -r1.2 -r1.3 src/external/cddl/osnet/sys/kern/string.c

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

From: "Paul Goyette" <pgoyette@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/51265 CVS commit: src/external/cddl/osnet/dev/dtrace
Date: Thu, 23 Jun 2016 06:44:53 +0000

 Module Name:	src
 Committed By:	pgoyette
 Date:		Thu Jun 23 06:44:52 UTC 2016

 Modified Files:
 	src/external/cddl/osnet/dev/dtrace: dtrace_hacks.c

 Log Message:
 One more removal of a redefined symbol while loading dtrace module.

 Should finish the issues with PR kern/51265


 To generate a diff of this commit:
 cvs rdiff -u -r1.4 -r1.5 src/external/cddl/osnet/dev/dtrace/dtrace_hacks.c

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

State-Changed-From-To: analyzed->pending-pullups
State-Changed-By: pgoyette@NetBSD.org
State-Changed-When: Thu, 23 Jun 2016 06:52:26 +0000
State-Changed-Why:
Fixed in -current.  Waiting for pullup-7 ticket #1189


From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/51265 CVS commit: [netbsd-7] src/external/cddl/osnet
Date: Sun, 10 Jul 2016 10:00:21 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Sun Jul 10 10:00:20 UTC 2016

 Modified Files:
 	src/external/cddl/osnet/dev/dtrace [netbsd-7]: dtrace_hacks.c
 	src/external/cddl/osnet/dev/dtrace/amd64 [netbsd-7]: dtrace_asm.S
 	src/external/cddl/osnet/dist/uts/common/dtrace [netbsd-7]: dtrace.c
 	src/external/cddl/osnet/sys/kern [netbsd-7]: string.c

 Log Message:
 Pull up following revision(s) (requested by pgoyette in ticket #1189):
 	external/cddl/osnet/sys/kern/string.c: revision 1.3
 	external/cddl/osnet/dev/dtrace/dtrace_hacks.c: revision 1.5
 	external/cddl/osnet/dist/uts/common/dtrace/dtrace.c: revision 1.32
 	external/cddl/osnet/dev/dtrace/amd64/dtrace_asm.S: revision 1.6
 Import fix from FreeBSD - see [1], [2] references below...
 Fix DTrace's panic() action.
 It would previously call into some unfinished Solaris compatibility code
 and return without actually calling panic(9). The compatibility code is
 unneeded, however, so just remove it and have dtrace_panic() call
 vpanic(9)
 directly.
 Fixes immediate problem in PR-51265.  However, this now reveals another
 redefined symbol 'strpbrk' in the required module "solaris".
 [1] https://svnweb.freebsd.org/changeset/base/281916
 [2] http://lists.freebsd.org/pipermail/svn-src-head/2015-April/071019.html
 On NetBSD we already have strpbrk() in libkern, so we don't need to
 provide another copy in the module.  Removes another 'redefined symbol'
 error when loading the module.
 Related to PR kern/51265
 One more removal of a redefined symbol while loading dtrace module.
 Should finish the issues with PR kern/51265


 To generate a diff of this commit:
 cvs rdiff -u -r1.3 -r1.3.24.1 \
     src/external/cddl/osnet/dev/dtrace/dtrace_hacks.c
 cvs rdiff -u -r1.4 -r1.4.10.1 \
     src/external/cddl/osnet/dev/dtrace/amd64/dtrace_asm.S
 cvs rdiff -u -r1.28 -r1.28.2.1 \
     src/external/cddl/osnet/dist/uts/common/dtrace/dtrace.c
 cvs rdiff -u -r1.2 -r1.2.24.1 src/external/cddl/osnet/sys/kern/string.c

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

State-Changed-From-To: pending-pullups->closed
State-Changed-By: pgoyette@NetBSD.org
State-Changed-When: Sun, 10 Jul 2016 10:27:04 +0000
State-Changed-Why:
pullups complete


>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.