From nobody@FreeBSD.org  Tue Feb  3 15:26:55 2004
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 65EAB16A56B
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  3 Feb 2004 15:26:53 -0800 (PST)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id DD1BD43D41
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  3 Feb 2004 15:26:51 -0800 (PST)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.12.10/8.12.10) with ESMTP id i13NQpdL017726
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 3 Feb 2004 15:26:51 -0800 (PST)
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.12.10/8.12.10/Submit) id i13NQpYb017725;
	Tue, 3 Feb 2004 15:26:51 -0800 (PST)
	(envelope-from nobody)
Message-Id: <200402032326.i13NQpYb017725@www.freebsd.org>
Date: Tue, 3 Feb 2004 15:26:51 -0800 (PST)
From: Sten Spans <sten@blinkenlights.nl>
To: freebsd-gnats-submit@FreeBSD.org
Subject: ntpd gives unaligned access errors on alpha
X-Send-Pr-Version: www-2.0

>Number:         62321
>Category:       alpha
>Synopsis:       ntpd gives unaligned access errors on alpha
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    roberto
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Feb 03 15:30:01 PST 2004
>Closed-Date:    Fri Jul 23 13:13:35 GMT 2004
>Last-Modified:  Fri Jul 23 13:13:35 GMT 2004
>Originator:     Sten Spans
>Release:        5.2-CURRENT
>Organization:
>Environment:
FreeBSD deepthought.blinkenlights.nl 5.2-CURRENT FreeBSD 5.2-CURRENT #1: Tue Feb  3 14:43:41 CET 2004     root@deepthought.blinkenlights.nl:/usr/obj/usr/src/sys/DEEPTHOUGHT  alpha

>Description:
running ntpd -n ( nofork ) produces unaligned access errors on alpha.
The problem is present in ntpd/ntp_io.c line 449. where nasty things
are being done. This problem is fixed in ntp 4.2.0 ( from ports ).

I found that netbsd had this problem as well and has a oneliner which fixes the problem.
>How-To-Repeat:
run ntpd -n on an alpha,
ntpd -d -d -d -d -n will give nice debugging info.
>Fix:
http://mail-index.netbsd.org/netbsd-bugs/2002/01/02/0001.html

--- /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:

From: Sten Spans <sten@blinkenlights.nl>
To: freebsd-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: alpha/62321: ntpd gives unaligned access errors on alpha
Date: Wed, 4 Feb 2004 00:32:37 +0100 (CET)

 http://www.netbsd.org/cgi-bin/query-pr-single.pl?number=15112
 suggest a more elaborate fix would be needed,
 
 something like this:
 http://cvsweb.netbsd.org/bsdweb.cgi/src/dist/ntp/ntpd/ntp_io.c.diff?r1=1.5&r2=1.6
 
 or an import of ntp 4.2.0, which would me nice too
 but I'm not quite sure how this would fit into
 the release schedule.
 
 -- 
 Sten Spans
 
 "There is a crack in everything, that's how the light gets in."
 Leonard Cohen - Anthem
State-Changed-From-To: open->feedback 
State-Changed-By: arved 
State-Changed-When: Fri Jul 23 12:09:24 GMT 2004 
State-Changed-Why:  
ntp 4.2.0 has been imported, so i think this problem should be fixed 


Responsible-Changed-From-To: freebsd-alpha->roberto 
Responsible-Changed-By: arved 
Responsible-Changed-When: Fri Jul 23 12:09:24 GMT 2004 
Responsible-Changed-Why:  
Over to ntp maintainer 

http://www.freebsd.org/cgi/query-pr.cgi?pr=62321 

From: Sten Spans <sten@blinkenlights.nl>
To: freebsd-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: alpha/62321: ntpd gives unaligned access errors on alpha
Date: Fri, 23 Jul 2004 14:51:50 +0200 (CEST)

 The pr can be closed, this particular problem is fixed in 4.2.0.
 
 -- 
 Sten Spans
 
 "There is a crack in everything, that's how the light gets in."
 Leonard Cohen - Anthem
State-Changed-From-To: feedback->closed 
State-Changed-By: roberto 
State-Changed-When: Fri Jul 23 13:13:09 GMT 2004 
State-Changed-Why:  
Fixed by the update to 4.2.0. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=62321 
>Unformatted:
