* 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
* Re: Netstat Unaligned Trap Errors on Alpha
[not found] <E0xEKjL-0007P3-00@paddington.london.uk.eu.org>
@ 1997-09-25 20:44 ` Steve Wills
1997-09-25 21:26 ` Stephen Zedalis
1 sibling, 0 replies; 5+ messages in thread
From: Steve Wills @ 1997-09-25 20:44 UTC (permalink / raw)
I have been following this thread as I am getting this error frequently in
my web app. Does anyone know if there is a patch for msql2.0.1 for this
problem?
steve
--
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
[not found] <E0xEKjL-0007P3-00@paddington.london.uk.eu.org>
1997-09-25 20:44 ` Steve Wills
@ 1997-09-25 21:26 ` Stephen Zedalis
1 sibling, 0 replies; 5+ messages in thread
From: Stephen Zedalis @ 1997-09-25 21:26 UTC (permalink / raw)
The reason for my message is that Redhat will not ordinarily
update their packages unless there is a documented security hole or
critical bug. Like you state below, the one in netstat could be called
"critical" and yet there is no fix issued by Redhat. Not to mention
"most" Redhat users are loathe to go out to every site to get the latest
and greatest version of software unless they have to (leave that to
Debian). Nor is the ftp site below mentioned in the README for the
net-tools package. So frankly I was not sure where to go. So, I took the
bull by the horns and fixed it myself.
Like I said, this kind of bug should have been fixed a long time ago.
Netstat isn't performance critical and a system could work perfectly fine
without using it. But if you are running an ISP, tools like netstat are
ESSENTIAL. And if it were just cosmetic, I could live with that, but
I personally have seen our alpha crash due in-part I believe to the
unaligned trap errors in the kernel code. (reading a large core file)
Whether that also had to do with netstat, I do not know.
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.
Stephen Zedalis
System Administrator - Exis Net, Inc.
On Thu, 25 Sep 1997, Philip Blundell wrote:
>>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.
>
--
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
* 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
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 --
1997-09-26 20:00 Netstat Unaligned Trap Errors on Alpha Philip Blundell
-- strict thread matches above, loose matches on Subject: below --
1997-09-25 21:41 Philip Blundell
[not found] <E0xEKjL-0007P3-00@paddington.london.uk.eu.org>
1997-09-25 20:44 ` Steve Wills
1997-09-25 21:26 ` Stephen Zedalis
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