Subject: port-sparc64/15112: ntpd dies with SIGBUS signal
To: None <>
From: None <>
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
>Originator:     Jarle Greipsland
>Release:        NetBSD 1.5ZA
System: NetBSD 1.5ZA NetBSD 1.5ZA (OMO) #16: Wed Jan 2 10:52:47 CET 2002 sparc64
Architecture: sparc64
Machine: sparc64
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

Enable ntpd on a sparc64 system.  Watch the console messages as the system
boots.  Alternatively do /usr/sbin/ntpd directly.
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? */