NetBSD Problem Report #48293

From martin@duskware.de  Wed Oct  9 08:00:04 2013
Return-Path: <martin@duskware.de>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 89EB9725A3
	for <gnats-bugs@gnats.NetBSD.org>; Wed,  9 Oct 2013 08:00:04 +0000 (UTC)
From: martin@NetBSD.org
Reply-To: martin@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: mac68k unbootable (stack overflow?)
X-Send-Pr-Version: 3.95

>Number:         48293
>Category:       port-mac68k
>Synopsis:       mac68k unbootable (stack overflow?)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    martin
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Oct 09 08:05:00 +0000 2013
>Closed-Date:    Wed Jun 25 21:45:23 +0000 2014
>Last-Modified:  Wed Jun 25 21:45:23 +0000 2014
>Originator:     martin@NetBSD.org
>Release:        NetBSD 6.99.24
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD mac-beth.duskware.de 6.99.24 NetBSD 6.99.24 (MAC-BETH) #0: Wed Oct 9 07:06:30 CEST 2013 martin@night-porter.duskware.de:/usr/src/sys/arch/mac68k/compile/MAC-BETH mac68k
Architecture: m68k
Machine: mac68k
>Description:

With revision 1.35 of src/sys/kern_todr.c (where inittodr was changed to
call rnd_add_...) my mac68k does not boot anymore. I see symptoms of either
(random) memory corruption or stack smashing.

Backing out that single change makes it boot.

Looking at the difference in generated assembler, the only relevant
change seems to be the increased size of the inittodr stack frame
(assuming the called functions to not smash the stack, which at least
is not obvious):

 -       link.w %fp,#-48
 +       link.w %fp,#-56

A newer amiga kernel works, but amiga uses two 8k pages as UAREA, so has
a larger kernel stack. Will investigate if increasing the mac68k stack size
helps.

>How-To-Repeat:
Just try to boot -current.

>Fix:
n/a

>Release-Note:

>Audit-Trail:
From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-mac68k/48293: mac68k unbootable (stack overflow?)
Date: Wed, 9 Oct 2013 11:13:18 +0200

 On Wed, Oct 09, 2013 at 08:05:00AM +0000, martin@NetBSD.org wrote:
 > a larger kernel stack. Will investigate if increasing the mac68k stack size
 > helps.

 It does not help.

 Martin

Responsible-Changed-From-To: port-mac68k-maintainer->martin
Responsible-Changed-By: martin@NetBSD.org
Responsible-Changed-When: Wed, 25 Jun 2014 12:26:40 +0000
Responsible-Changed-Why:
Take, probably same as #48171


State-Changed-From-To: open->closed
State-Changed-By: martin@NetBSD.org
State-Changed-When: Wed, 25 Jun 2014 21:45:23 +0000
State-Changed-Why:
This either was a gcc 4.5 compiler bug, or another symptom of
#48171 - however, with gcc 4.8 it is not reproducable as
described in this PR.
Close this, track further in the other PR.


>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-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.