Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* Re: Netstat Unaligned Trap Errors on Alpha
@ 1997-09-26 20:00 Philip Blundell
  0 siblings, 0 replies; 5+ messages in thread
From: Philip Blundell @ 1997-09-26 20:00 UTC (permalink / raw)


>Thank you very much for the response, hopefully the latest version
>of net-tools will be in the Redhat 5.0 release (tbird), and in the
>meantime, Redhat will release an update RPM for Alpha users so that 
>this problem is corrected for them.

That would certainly be good.  The latest version is 1.432, and I think that 
will be the last version for a little while.  All the bugs that I know of are 
out, and Bernd and I are now trying to merge some work he's been doing for 
net-tools 1.50.  It should compile out of the box for Alpha these days, so the 
RPM ought to be easy to create.

p.

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

^ permalink raw reply	[flat|nested] 5+ messages in thread
* Re: Netstat Unaligned Trap Errors on Alpha
@ 1997-09-25 21:41 Philip Blundell
  0 siblings, 0 replies; 5+ messages in thread
From: Philip Blundell @ 1997-09-25 21:41 UTC (permalink / raw)


>I was perturbed to find out that a high profile diagnostic and
>administration tool like "netstat" was giving these unaligned trap errors,
>and surprised to find out it got through RedHat's normally superb 
>QA.  On examination of one of the patches in Redhat's source rpm, I found

It's been fixed in net-tools since version 1.40 or so.  You can currently get 
the latest version at

	ftp://ftp.cs-ipv6.lancs.ac.uk/pub/Code/Linux/Net_Tools

The unaligned traps are harmless in themselves, and netstat isn't precisely 
performance-critical so it ought not to be a big deal.  However, the 
particular bug that was in netstat was a bit worse than that because it could 
actually cause a crash under some circumstances.

p.

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

^ permalink raw reply	[flat|nested] 5+ messages in thread
* Netstat Unaligned Trap Errors on Alpha
@ 1997-09-25 15:35 Stephen Zedalis
  0 siblings, 0 replies; 5+ messages in thread
From: Stephen Zedalis @ 1997-09-25 15:35 UTC (permalink / raw)


Problem summary:  There have been several reports of unaligned trap errors
on DEC Alpha machines on various user programs.  One program that is
susceptible is netstat provided in Redhat 4.2 for Alpha.  The specific
net-tools version is 1.32-alpha, rpm installed is based on
net-tools-1.3.2.alpha-2.src.rpm.  I am running kernel 2.0.31-pre9 on a DEC
PC164 (Durango) 500 Mhz 21164 machine with 256 MB of RAM.

I was perturbed to find out that a high profile diagnostic and
administration tool like "netstat" was giving these unaligned trap errors,
and surprised to find out it got through RedHat's normally superb 
QA.  On examination of one of the patches in Redhat's source rpm, I found
that some of the necessary fixes were made but not all of them.  The fix
involves replacing pointer type casts such as (unsigned long*)&xxxxx with
a copy of the address to the variable involved.

The patches provided with Redhat fixed 2 of 3 occurrences of this bug.
(fixing the udp and UNIX domain socket output) Unfortunately this still
resulted in unaligned trap errors printed to the screen and in the syslog
just before the tcp socket output messages.  I have taken the liberty of
patching the offending code and now I get zero unaligned trap errors when
using netstat.  I have provided the patch required below...  Hopefully,
this will be provided to alpha users who may still be experiencing this
problem.

Stephen Zedalis
System Administrator - Exis Net, Inc.  

Here is my net-tools-1.32-alpha-axp2.patch:

*** net-tools-1.32-alpha.orig/netstat.c	Thu Sep 25 09:07:15 1997
--- net-tools-1.32-alpha/netstat.c	Thu Sep 25 09:13:43 1997
***************
*** 308,322 ****
  	}
    }
    (void) fclose(procinfo);
    lnr--; lnr--;
    while (lnr >= 0) {
  	num = sscanf(line[lnr--],
  		"%d: %lX:%X %lX:%X %X %lX:%lX %X:%lX %lX %d\n",
! 		&d, (unsigned long*)&localaddr.sin_addr.s_addr, &local_port,
! 		(unsigned long*)&remaddr.sin_addr.s_addr, &rem_port, &state,
  		&txq, &rxq, &timer_run, &time_len, &retr, &uid);
  	if (flag_deb) fprintf(stderr, NLS_CATGETS(catfd, netstatSet, netstat_args,
  						  "%s -> %d args"), line[lnr+1], num);
  	if (num < 11) continue;		/* 13 ? */
  	localaddr.sin_family = AF_INET;
  	remaddr.sin_family = AF_INET;
--- 308,325 ----
  	}
    }
    (void) fclose(procinfo);
    lnr--; lnr--;
    while (lnr >= 0) {
+ 	unsigned long laddr, raddr;
  	num = sscanf(line[lnr--],
  		"%d: %lX:%X %lX:%X %X %lX:%lX %X:%lX %lX %d\n",
! 		&d, &laddr, &local_port,
! 		&raddr, &rem_port, &state,
  		&txq, &rxq, &timer_run, &time_len, &retr, &uid);
+ 		localaddr.sin_addr.s_addr = laddr;
+ 		remaddr.sin_addr.s_addr = raddr;
  	if (flag_deb) fprintf(stderr, NLS_CATGETS(catfd, netstatSet, netstat_args,
  						  "%s -> %d args"), line[lnr+1], num);
  	if (num < 11) continue;		/* 13 ? */
  	localaddr.sin_family = AF_INET;
  	remaddr.sin_family = AF_INET;

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~1997-09-26 20:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <E0xEKjL-0007P3-00@paddington.london.uk.eu.org>
1997-09-25 20:44 ` Netstat Unaligned Trap Errors on Alpha Steve Wills
1997-09-25 21:26 ` Stephen Zedalis
1997-09-26 20:00 Philip Blundell
  -- strict thread matches above, loose matches on Subject: below --
1997-09-25 21:41 Philip Blundell
1997-09-25 15:35 Stephen Zedalis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox