Subject: port-sparc64/15112: ntpd dies with SIGBUS signal
To: None <gnats-bugs@gnats.netbsd.org>
From: None <jarle@uninett.no>
List: netbsd-bugs
Date: 01/02/2002 17:24:50
>Number:         15112
>Category:       port-sparc64
>Synopsis:       ntpd dies with SIGBUS signal
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    port-sparc64-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jan 02 08:25:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Jarle Greipsland
>Release:        NetBSD 1.5ZA
>Organization:
UNINETT
	
>Environment:
	
	
System: NetBSD omo.urc.uninett.no 1.5ZA NetBSD 1.5ZA (OMO) #16: Wed Jan 2 10:52:47 CET 2002 jarle@omo.urc.uninett.no:/usr/src/sys/arch/sparc64/compile/OMO sparc64
Architecture: sparc64
Machine: sparc64
>Description:
For quite some time ntpd has not been able to run successfully on my sparc64
system.  It consistently dies with a SIGBUS signal.  The kernel logs
the following message:
Alignment error: pid=266 comm=ntpd dsfsr=00000000:00800001 dsfar=ffffffff:ffff91f4 isfsr=00000000:00000000 pc=10c514

	
>How-To-Repeat:
Enable ntpd on a sparc64 system.  Watch the console messages as the system
boots.  Alternatively do /usr/sbin/ntpd directly.
	
>Fix:
	
Apply patch.  For some reason I couldn't get this to work with memcpy, and
had to resort to bcopy instead.  It might have been just finger trouble
on my part, but someone might want to verify that.

--- /usr/src/dist/ntp/ntpd/ntp_io.c.orig	Wed Jan  2 17:13:12 2002
+++ /usr/src/dist/ntp/ntpd/ntp_io.c	Wed Jan  2 17:13:55 2002
@@ -447,5 +447,5 @@
 		}
 # endif /* SYS_WINNT */
-		ifreq = *ifr;
+		bcopy(ifr, &ifreq, sizeof(ifreq));
 		inter_list[i].flags = 0;
 		/* is it broadcast capable? */
>Release-Note:
>Audit-Trail:
>Unformatted: