NetBSD Problem Report #52962

From paul@whooppee.com  Mon Jan 29 09:34:40 2018
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 D9ADF7A16F
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 29 Jan 2018 09:34:40 +0000 (UTC)
Message-Id: <20180129093437.F17F916E48@speedy.whooppee.com>
Date: Mon, 29 Jan 2018 17:34:37 +0800 (+08)
From: paul@whooppee.com
Reply-To: paul@whooppee.com
To: gnats-bugs@NetBSD.org
Subject: sysutils/memtestplus fails when built on -current
X-Send-Pr-Version: 3.95

>Number:         52962
>Category:       pkg
>Synopsis:       sysutils/memtestplus fails when build on -current
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jan 29 09:35:00 +0000 2018
>Closed-Date:    Tue Jan 30 05:59:28 +0000 2018
>Last-Modified:  Thu Feb 08 22:05:00 +0000 2018
>Originator:     Paul Goyette
>Release:        NetBSD 8.99.7
>Organization:
+------------------+--------------------------+----------------------------+
| Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:          |
| (Retired)        | FA29 0E3B 35AF E8AE 6651 | paul at whooppee dot com   |
| Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd dot org |
+------------------+--------------------------+----------------------------+
>Environment:


System: NetBSD speedy.whooppee.com 8.99.7 NetBSD 8.99.7 (SPEEDY 2017-11-29 22:03:05 UTC) #0: Wed Nov 29 23:14:50 UTC 2017 paul@speedy.whooppee.com:/build/netbsd-local/obj/amd64/sys/arch/amd64/compile/SPEEDY amd64
Architecture: x86_64
Machine: amd64
>Description:
When building sysutils/memtestplus package on a -current system (at least,
all 8.99.* and any 7.99.* from the last two years!), the resulting image
won't run.  It either hangs or crashes within seconds after starting the
tests.  Running in "Safe Mode" (single-CPU core?) does not help.

Building the same package on any 6.x system produces a working image!

Someone else (I forget who) had a suspicion that the problem was introduced
with the most recent upgrade of gcc, but I cannot confirm.

>How-To-Repeat:
Build the package on a 8.99.x system, boot the image, and watch it fail.
Repeat on 6.0 or 6.1 and it succeeds.

>Fix:
Not known.


>Release-Note:

>Audit-Trail:
From: "Maya Rashish" <maya@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/52962 CVS commit: pkgsrc/sysutils/memtestplus
Date: Mon, 29 Jan 2018 11:52:11 +0000

 Module Name:	pkgsrc
 Committed By:	maya
 Date:		Mon Jan 29 11:52:11 UTC 2018

 Modified Files:
 	pkgsrc/sysutils/memtestplus: Makefile distinfo
 Added Files:
 	pkgsrc/sysutils/memtestplus/patches: patch-controller.c

 Log Message:
 memtestplus: spell arraycount correctly and avoid UB.

 might help PR pkg/52962: memtestplus doesn't work if built with recent
 compilers.

 PKGREVISION++


 To generate a diff of this commit:
 cvs rdiff -u -r1.22 -r1.23 pkgsrc/sysutils/memtestplus/Makefile
 cvs rdiff -u -r1.12 -r1.13 pkgsrc/sysutils/memtestplus/distinfo
 cvs rdiff -u -r0 -r1.1 pkgsrc/sysutils/memtestplus/patches/patch-controller.c

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

From: "Maya Rashish" <maya@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/52962 CVS commit: pkgsrc/sysutils/memtestplus
Date: Mon, 29 Jan 2018 13:55:30 +0000

 Module Name:	pkgsrc
 Committed By:	maya
 Date:		Mon Jan 29 13:55:30 UTC 2018

 Modified Files:
 	pkgsrc/sysutils/memtestplus: Makefile distinfo
 	pkgsrc/sysutils/memtestplus/patches: patch-main.c

 Log Message:
 memtestplus: disable 'Block move' test as a hack.

 The setup of this test causes hangs and reboots.
 I'm not sure if it's working, because time doesn't appear to be moving.

 Helps PR pkg/52962: memtestplus doesn't work if built with recent
 compilers.


 To generate a diff of this commit:
 cvs rdiff -u -r1.23 -r1.24 pkgsrc/sysutils/memtestplus/Makefile
 cvs rdiff -u -r1.13 -r1.14 pkgsrc/sysutils/memtestplus/distinfo
 cvs rdiff -u -r1.1 -r1.2 pkgsrc/sysutils/memtestplus/patches/patch-main.c

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

From: "Maya Rashish" <maya@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/52962 CVS commit: pkgsrc/sysutils/memtestplus
Date: Mon, 29 Jan 2018 14:23:26 +0000

 Module Name:	pkgsrc
 Committed By:	maya
 Date:		Mon Jan 29 14:23:26 UTC 2018

 Modified Files:
 	pkgsrc/sysutils/memtestplus: Makefile distinfo
 	pkgsrc/sysutils/memtestplus/patches: patch-aa patch-main.c

 Log Message:
 memtestplus: revert previous, disable optimization.

 Hack to fix PR pkg/52962. Now memtestplus functions correctly for sure.
 Inspired by opensuse package.


 To generate a diff of this commit:
 cvs rdiff -u -r1.24 -r1.25 pkgsrc/sysutils/memtestplus/Makefile
 cvs rdiff -u -r1.14 -r1.15 pkgsrc/sysutils/memtestplus/distinfo
 cvs rdiff -u -r1.6 -r1.7 pkgsrc/sysutils/memtestplus/patches/patch-aa
 cvs rdiff -u -r1.2 -r1.3 pkgsrc/sysutils/memtestplus/patches/patch-main.c

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

From: "John D. Baker" <jdbaker@mylinuxisp.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/52962: sysutils/memtestplus fails when built on -current
Date: Mon, 29 Jan 2018 12:10:18 -0600 (CST)

 Following these commits:

   http://mail-index.netbsd.org/pkgsrc-changes/2018/01/29/msg170021.html
   http://mail-index.netbsd.org/pkgsrc-changes/2018/01/29/msg170028.html
   http://mail-index.netbsd.org/pkgsrc-changes/2018/01/29/msg170031.html

 I updated "sysutils/memtestplus" to HEAD.  Unfortunately, the build
 on an amd64-8.0_BETA host fails with:

 [...]
 gcc -Wall -march=i486 -m32 -O0 -fomit-frame-pointer -fno-builtin -ffreestanding -fPIC  -fno-stack-protector    -c -o vmem.o vmem.c
 gcc -c -Wall -march=i486 -m32 -O3 -fomit-frame-pointer -fno-builtin -ffreestanding random.c
 ld --allow-multiple-definition --warn-constructors --warn-common -static -T memtest_shared.lds \
  -o memtest_shared head.o reloc.o main.o test.o init.o lib.o patn.o screen_buffer.o config.o cpuid.o linuxbios.o pci.o memsize.o spd.o error.o dmi.o controller.o smp.o vmem.o random.o && \
 ld --allow-multiple-definition -shared -Bsymbolic -T memtest_shared.lds -o memtest_shared head.o reloc.o main.o test.o init.o lib.o patn.o screen_buffer.o config.o cpuid.o linuxbios.o pci.o memsize.o spd.o error.o dmi.o controller.o smp.o vmem.o random.o
 lib.o: In function `dprint':
 lib.c:(.text+0xe67): undefined reference to `__stack_chk_guard'
 lib.c:(.text+0x1077): undefined reference to `__stack_chk_guard'
 lib.c:(.text+0x1084): undefined reference to `__stack_chk_fail_local'
 lib.o: In function `hprint2':
 lib.c:(.text+0x109e): undefined reference to `__stack_chk_guard'
 lib.c:(.text+0x11a6): undefined reference to `__stack_chk_guard'
 lib.c:(.text+0x11b3): undefined reference to `__stack_chk_fail_local'
 lib.o: In function `hprint3':
 lib.c:(.text+0x11cd): undefined reference to `__stack_chk_guard'
 lib.c:(.text+0x12a3): undefined reference to `__stack_chk_guard'
 lib.c:(.text+0x12b0): undefined reference to `__stack_chk_fail_local'
 lib.o: In function `getval':
 lib.c:(.text+0x1b0e): undefined reference to `__stack_chk_guard'
 lib.c:(.text+0x1fa9): undefined reference to `__stack_chk_guard'
 lib.c:(.text+0x1fb6): undefined reference to `__stack_chk_fail_local'
 config.o: In function `get_config':
 config.c:(.text+0x11): undefined reference to `__stack_chk_guard'
 config.c:(.text+0xc47): undefined reference to `__stack_chk_guard'
 config.c:(.text+0xc54): undefined reference to `__stack_chk_fail_local'
 Makefile:29: recipe for target 'memtest_shared' failed
 make[1]: *** [memtest_shared] Error 1
 make[1]: Leaving directory '/tmp/pkgsrc/sysutils/memtestplus/work/memtest86+-5.01'
 Makefile:73: recipe for target 'iso' failed
 gmake: *** [iso] Error 2
 *** Error code 2

 Stop.
 make[1]: stopped in /x/pkgsrc/sysutils/memtestplus
 *** Error code 1

 Stop.
 make: stopped in /x/pkgsrc/sysutils/memtestplus


 -- 
 |/"\ John D. Baker, KN5UKS               NetBSD     Darwin/MacOS X
 |\ / jdbaker[snail]mylinuxisp[flyspeck]com    OpenBSD            FreeBSD
 | X  No HTML/proprietary data in email.   BSD just sits there and works!
 |/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645

From: "John D. Baker" <jdbaker@mylinuxisp.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/52962: sysutils/memtestplus fails when built on -current
Date: Mon, 29 Jan 2018 13:42:21 -0600 (CST)

 Same failure on amd64-8.99.12.

 In case it matters, the rest of my pkgsrc tree is pkgsrc-2017Q4.  Perhaps
 the build fails because it expects some infrastructure/machinery changes
 made since the branch?

 -- 
 |/"\ John D. Baker, KN5UKS               NetBSD     Darwin/MacOS X
 |\ / jdbaker[snail]mylinuxisp[flyspeck]com    OpenBSD            FreeBSD
 | X  No HTML/proprietary data in email.   BSD just sits there and works!
 |/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645

From: Paul Goyette <paul@whooppee.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/52962: sysutils/memtestplus fails when built on -current
Date: Tue, 30 Jan 2018 11:28:34 +0800 (+08)

 I can confirm that the latest updatese to this package were successful.

 I have built, installed, and executed the latest version.

 Thanks!


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

From: coypu@sdf.org
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/52962: sysutils/memtestplus fails when built on -current
Date: Tue, 30 Jan 2018 05:52:30 +0000

 Yes, it doesn't apply cleanly, jperkin changed all the PKGSRC_USE_SSP to
 SSP_SUPPORTED and so on.

 You will need to cvs update pkgsrc/mk as well.
 I'll prepare a pullup with a patch only.

State-Changed-From-To: open->closed
State-Changed-By: maya@NetBSD.org
State-Changed-When: Tue, 30 Jan 2018 05:59:28 +0000
State-Changed-Why:
pullup-pkgsrc #5698


From: "S.P.Zeidler" <spz@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/52962 CVS commit: [pkgsrc-2017Q4] pkgsrc/sysutils/memtestplus
Date: Thu, 8 Feb 2018 22:00:59 +0000

 Module Name:	pkgsrc
 Committed By:	spz
 Date:		Thu Feb  8 22:00:59 UTC 2018

 Modified Files:
 	pkgsrc/sysutils/memtestplus [pkgsrc-2017Q4]: Makefile distinfo
 	pkgsrc/sysutils/memtestplus/patches [pkgsrc-2017Q4]: patch-aa
 	    patch-main.c
 Added Files:
 	pkgsrc/sysutils/memtestplus/patches [pkgsrc-2017Q4]: patch-controller.c

 Log Message:
 Pullup ticket #5698 - requested by maya
 sysutils/memtestplus: build fix

 Revisions pulled up:
 - sysutils/memtestplus/Makefile                                 1.25,1.23
 - sysutils/memtestplus/distinfo                                 1.15,1.13
 - sysutils/memtestplus/patches/patch-aa                         1.7
 - sysutils/memtestplus/patches/patch-controller.c               1.1
 - sysutils/memtestplus/patches/patch-main.c                     1.3

 -------------------------------------------------------------------
    Module Name:    pkgsrc
    Committed By:   maya
    Date:           Mon Jan 29 14:23:26 UTC 2018

    Modified Files:
            pkgsrc/sysutils/memtestplus: Makefile distinfo
            pkgsrc/sysutils/memtestplus/patches: patch-aa patch-main.c

    Log Message:
    memtestplus: revert previous, disable optimization.

    Hack to fix PR pkg/52962. Now memtestplus functions correctly for sure.
    Inspired by opensuse package.

    To generate a diff of this commit:
    cvs rdiff -u -r1.24 -r1.25 pkgsrc/sysutils/memtestplus/Makefile
    cvs rdiff -u -r1.14 -r1.15 pkgsrc/sysutils/memtestplus/distinfo
    cvs rdiff -u -r1.6 -r1.7 pkgsrc/sysutils/memtestplus/patches/patch-aa
    cvs rdiff -u -r1.2 -r1.3 pkgsrc/sysutils/memtestplus/patches/patch-main.c

 -------------------------------------------------------------------
    Module Name:    pkgsrc
    Committed By:   maya
    Date:           Mon Jan 29 11:52:11 UTC 2018

    Modified Files:
            pkgsrc/sysutils/memtestplus: Makefile distinfo
    Added Files:
            pkgsrc/sysutils/memtestplus/patches: patch-controller.c

    Log Message:
    memtestplus: spell arraycount correctly and avoid UB.

    might help PR pkg/52962: memtestplus doesn't work if built with recent
    compilers.

    PKGREVISION++

    To generate a diff of this commit:
    cvs rdiff -u -r1.22 -r1.23 pkgsrc/sysutils/memtestplus/Makefile
    cvs rdiff -u -r1.12 -r1.13 pkgsrc/sysutils/memtestplus/distinfo
    cvs rdiff -u -r0 -r1.1 pkgsrc/sysutils/memtestplus/patches/patch-controller.c


 To generate a diff of this commit:
 cvs rdiff -u -r1.21 -r1.21.6.1 pkgsrc/sysutils/memtestplus/Makefile
 cvs rdiff -u -r1.12 -r1.12.20.1 pkgsrc/sysutils/memtestplus/distinfo
 cvs rdiff -u -r1.6 -r1.6.26.1 pkgsrc/sysutils/memtestplus/patches/patch-aa
 cvs rdiff -u -r0 -r1.1.2.2 \
     pkgsrc/sysutils/memtestplus/patches/patch-controller.c
 cvs rdiff -u -r1.1 -r1.1.26.1 \
     pkgsrc/sysutils/memtestplus/patches/patch-main.c

 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.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.