NetBSD Problem Report #55155

From paul@whooppee.com  Wed Apr  8 16:42:59 2020
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 "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 5E46B1AEB87
	for <gnats-bugs@gnats.NetBSD.org>; Wed,  8 Apr 2020 16:42:59 +0000 (UTC)
Message-Id: <20200408164258.1A2B430F2C4@speedy.whooppee.com>
Date: Wed,  8 Apr 2020 09:42:58 -0700 (PDT)
From: paul@whooppee.com
Reply-To: paul@whooppee.com
To: gnats-bugs@NetBSD.org
Subject: kernel linker errors on macppc GENERIC kernel in qemu
X-Send-Pr-Version: 3.95

>Number:         55155
>Category:       kern
>Synopsis:       kernel linker errors on macppc GENERIC kernel in qemu
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Apr 08 16:45:00 +0000 2020
>Last-Modified:  Sun Apr 26 23:05:01 +0000 2020
>Originator:     Paul Goyette
>Release:        NetBSD 9.99.52
>Organization:
+--------------------+--------------------------+-----------------------+
| Paul Goyette       | PGP Key fingerprint:     | E-mail addresses:     |
| (Retired)          | FA29 0E3B 35AF E8AE 6651 | paul@whooppee.com     |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoyette@netbsd.org   |
+--------------------+--------------------------+-----------------------+
>Environment:


System: NetBSD 9.99.55 (GENERIC) #2: Wed Apr  8 15:00:08 UTC 2020 paul@speedy.whooppee.com:/build/netbsd-compat/obj/macppc/sys/arch/macppc/compile/GENERIC
Architecture: macppc
Machine: macppc
>Description:
When booting a GENERIC macppc kernel, the startup sequence (/etc/rc.d)
attempts to load the crypto module (which depends on the built-in
opencrypto module).  The kernel loader fails to resolve dozens of
symbols, and the crypto module is not loaded.

This happens reliably in qemu ; unsure if it also occurs on bare-metal
since I don't have any.

>How-To-Repeat:
See above.  Install using anita, and boot.

>Fix:


>Audit-Trail:
From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: kern/55155: kernel linker errors on macppc GENERIC kernel in qemu
Date: Wed, 8 Apr 2020 19:25:24 +0200

 On Wed, Apr 08, 2020 at 04:45:00PM +0000, paul@whooppee.com wrote:
 > When booting a GENERIC macppc kernel, the startup sequence (/etc/rc.d)
 > attempts to load the crypto module (which depends on the built-in
 > opencrypto module).  The kernel loader fails to resolve dozens of
 > symbols, and the crypto module is not loaded.

 Can you provide a list of symbols?
 Anything special in rc.conf you need for this?

 Martin

From: matthew green <mrg@eterna.com.au>
To: gnats-bugs@netbsd.org
Cc: kern-bug-people@netbsd.org, gnats-admin@netbsd.org,
    netbsd-bugs@netbsd.org
Subject: re: kern/55155: kernel linker errors on macppc GENERIC kernel in qemu
Date: Thu, 09 Apr 2020 03:36:03 +1000

 why is a default kernel attempting to load modules?

From: Paul Goyette <paul@whooppee.com>
To: gnats-bugs@netbsd.org
Cc: kern-bug-people@netbsd.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
Subject: Re: kern/55155: kernel linker errors on macppc GENERIC kernel in
 qemu
Date: Wed, 8 Apr 2020 10:49:51 -0700 (PDT)

 On Wed, 8 Apr 2020, Martin Husemann wrote:

 > Can you provide a list of symbols?

 See http://www.gson.org/netbsd/bugs/build/macppc/2017/2017.06.04.07.12.09/test.log
   or http://www.gson.org/netbsd/bugs/build/macppc/2020/2020.03.16.21.20.13/test.log

 The problem has been around for quite some time...  :)

 > Anything special in rc.conf you need for this?

 No.  Just a simple anita install for macppc.


 +--------------------+--------------------------+-----------------------+
 | Paul Goyette       | PGP Key fingerprint:     | E-mail addresses:     |
 | (Retired)          | FA29 0E3B 35AF E8AE 6651 | paul@whooppee.com     |
 | Software Developer | 0786 F758 55DE 53BA 7731 | pgoyette@netbsd.org   |
 +--------------------+--------------------------+-----------------------+

From: Paul Goyette <paul@whooppee.com>
To: matthew green <mrg@eterna.com.au>
Cc: gnats-bugs@netbsd.org, kern-bug-people@netbsd.org, gnats-admin@netbsd.org, 
    netbsd-bugs@netbsd.org
Subject: re: kern/55155: kernel linker errors on macppc GENERIC kernel in
 qemu
Date: Wed, 8 Apr 2020 10:51:10 -0700 (PDT)

 On Thu, 9 Apr 2020, matthew green wrote:

 > why is a default kernel attempting to load modules?

 Something in /etc/rc.d touches /dev/crypto and /dev/crypto is not part
 of the macppc GENERIC kernel.


 +--------------------+--------------------------+-----------------------+
 | Paul Goyette       | PGP Key fingerprint:     | E-mail addresses:     |
 | (Retired)          | FA29 0E3B 35AF E8AE 6651 | paul@whooppee.com     |
 | Software Developer | 0786 F758 55DE 53BA 7731 | pgoyette@netbsd.org   |
 +--------------------+--------------------------+-----------------------+

From: Martin Husemann <martin@duskware.de>
To: Paul Goyette <paul@whooppee.com>
Cc: gnats-bugs@netbsd.org
Subject: Re: kern/55155: kernel linker errors on macppc GENERIC kernel in qemu
Date: Wed, 8 Apr 2020 19:53:48 +0200

 On Wed, Apr 08, 2020 at 10:49:51AM -0700, Paul Goyette wrote:
 > On Wed, 8 Apr 2020, Martin Husemann wrote:
 > 
 > > Can you provide a list of symbols?
 > 
 > See http://www.gson.org/netbsd/bugs/build/macppc/2017/2017.06.04.07.12.09/test.log
 >  or http://www.gson.org/netbsd/bugs/build/macppc/2020/2020.03.16.21.20.13/test.log

 That does not match your description - I am confused.
 The only kobj errors in that log are from running module tests.

 Martin

From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/55155: kernel linker errors on macppc GENERIC kernel in qemu
Date: Wed, 8 Apr 2020 20:16:46 +0200

 On Wed, Apr 08, 2020 at 08:14:26PM +0200, Martin Husemann wrote:
 > This sounds like a bootloader issue (and not passing symbols to the kernel),
 > it is probably qemu specific.

 Specifically:

 [these are from open bios:]
 Trying cd:,netbsd-GENERIC...
 >> switching to new context:
 [and these are from the kernel:]
 [   1.0000000] mem region 0 start=0 size=10000000
 [   1.0000000] avail region 0 start=0x1000 size=0xff000
 [   1.0000000] avail region 1 start=0xbc6004 size=0x3439ffc
 [   1.0000000] avail region 2 start=0x4800000 size=0xb458000
 [   1.0000000] avail region 3 start=0xfe10000 size=0xf0000
 [   1.0000000] [ Kernel symbol table invalid! ]


 Note the last line, and on real machine setups you would see ofwboot.xcf
 messages between OF and ther kernel.

 Martin

From: Paul Goyette <paul@whooppee.com>
To: Martin Husemann <martin@duskware.de>
Cc: gnats-bugs@netbsd.org
Subject: Re: kern/55155: kernel linker errors on macppc GENERIC kernel in
 qemu
Date: Wed, 8 Apr 2020 11:23:39 -0700 (PDT)

 On Wed, 8 Apr 2020, Martin Husemann wrote:

 > On Wed, Apr 08, 2020 at 10:49:51AM -0700, Paul Goyette wrote:
 >> On Wed, 8 Apr 2020, Martin Husemann wrote:
 >>
 >>> Can you provide a list of symbols?
 >>
 >> See http://www.gson.org/netbsd/bugs/build/macppc/2017/2017.06.04.07.12.09/test.log
 >>  or http://www.gson.org/netbsd/bugs/build/macppc/2020/2020.03.16.21.20.13/test.log
 >
 > That does not match your description - I am confused.
 > The only kobj errors in that log are from running module tests.

 Ignore the 2017 log....  the 2020 log starts with

 Building databases: dev, utmp, utmpx, services.
 Starting syslogd.
 [  20.4065879] kobj_checksyms, 988: [crypto]: linker error: symbol 
 `enc_xform_aes_ctr' not found
 [  20.4065879] kobj_checksyms, 988: [crypto]: linker error: symbol 
 `crypto_dispatch' not found
 [  20.4065879] kobj_checksyms, 988: [crypto]: linker error: symbol 
 `fnullop_restart' not found
 [  20.4065879] kobj_checksyms, 988: [crypto]: linker error: symbol 
 `printf' not found
 [  20.4065879] kobj_checksyms, 988: [crypto]: linker error: symbol 
 `kmem_alloc' not found
 [  20.4065879] kobj_checksyms, 988: [crypto]: linker error: symbol 
 `crypto_getfeat' not found
 [  20.4065879] kobj_checksyms, 988: [crypto]: linker error: symbol 
 `fnullop_fcntl' not found
 [  20.4065879] kobj_checksyms, 988: [crypto]: linker error: symbol 
 `pool_init' not found
 [  20.4065879] kobj_checksyms, 988: [crypto]: linker error: symbol 
 `pool_put' not found


 +--------------------+--------------------------+-----------------------+
 | Paul Goyette       | PGP Key fingerprint:     | E-mail addresses:     |
 | (Retired)          | FA29 0E3B 35AF E8AE 6651 | paul@whooppee.com     |
 | Software Developer | 0786 F758 55DE 53BA 7731 | pgoyette@netbsd.org   |
 +--------------------+--------------------------+-----------------------+

From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: kern/55155: kernel linker errors on macppc GENERIC kernel in qemu
Date: Wed, 8 Apr 2020 20:26:25 +0200

 Maybe we should disallow any module loads when no kernel symbols are
 present - should be pretty trivial.

 Martin

From: Paul Goyette <paul@whooppee.com>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: kern/55155: kernel linker errors on macppc GENERIC kernel in
 qemu
Date: Fri, 10 Apr 2020 05:52:25 -0700 (PDT)

 Please also see additional discussion on this in PR kern/55154 ...


 +--------------------+--------------------------+-----------------------+
 | Paul Goyette       | PGP Key fingerprint:     | E-mail addresses:     |
 | (Retired)          | FA29 0E3B 35AF E8AE 6651 | paul@whooppee.com     |
 | Software Developer | 0786 F758 55DE 53BA 7731 | pgoyette@netbsd.org   |
 +--------------------+--------------------------+-----------------------+

From: Paul Goyette <paul@whooppee.com>
To: Martin Husemann <martin@duskware.de>
Cc: gnats-bugs@netbsd.org, joerg@NetBSD.org
Subject: Re: kern/55155 (kernel linker errors on macppc GENERIC kernel in
 qemu)
Date: Fri, 10 Apr 2020 09:57:17 -0700 (PDT)

 (Redirecting this thread to the proper PR kern/55155)


 On Thu, 9 Apr 2020, Paul Goyette wrote:

 >> Perhaps we should update the macppc GENERIC configuration files to
 >> include /dev/crypto as a built-in module rather than letting it be
 >> auto-loaded.
 >
 > Based on comments in macppc's GENERIC config file, this might not be
 > possible:
 >
 > ...
 > # PCI cryptographic devices
 > # (disabled, requires opencrypto framework which requires generic softints
 > #hifn*  at pci? dev ? function ?        # Hifn 7755/7811/795x
 > #ubsec* at pci? dev ? function ?        # Broadcom 5501/5601/580x/582x
 > ...
 > #pseudo-device  crypto                  # /dev/crypto device
 >                                        # (disabled, requires generic 
 > softints)
 > #pseudo-device  swcrypto                # software crypto implementation
 > ...

 Re-enabling crypto and swcrypto seems to work.  I ran

  	# cd /usr/tests/crypto
  	# atf-run | atf-report

 and only one test case (libcrypto/t_ciphers:evp) fails.  (Also, the
 opencrypto/t_opencrypto:arc4 test case is skipped, since arc4 is not
 implemented by swcrypto.)



 +--------------------+--------------------------+-----------------------+
 | Paul Goyette       | PGP Key fingerprint:     | E-mail addresses:     |
 | (Retired)          | FA29 0E3B 35AF E8AE 6651 | paul@whooppee.com     |
 | Software Developer | 0786 F758 55DE 53BA 7731 | pgoyette@netbsd.org   |
 +--------------------+--------------------------+-----------------------+

From: "Paul Goyette" <pgoyette@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/55155 CVS commit: src/sys/arch/macppc/conf
Date: Sun, 26 Apr 2020 23:03:37 +0000

 Module Name:	src
 Committed By:	pgoyette
 Date:		Sun Apr 26 23:03:37 UTC 2020

 Modified Files:
 	src/sys/arch/macppc/conf: GENERIC

 Log Message:
 Re-enable crypto and swcrypto - "generic softints" have been available
 for quite some time, so no need to disable.

 This is a work-around for PR kern/55155.  The root problem, failure to
 load modules due to missing kernel symbol table, still exists.


 To generate a diff of this commit:
 cvs rdiff -u -r1.367 -r1.368 src/sys/arch/macppc/conf/GENERIC

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

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.