Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 03-30-2010, 01:39 PM   #1
LQ Newbie
Registered: Feb 2010
Location: London
Distribution: CentOS Redhat
Posts: 15

Rep: Reputation: 0
"netstat -l" gives "segmentation fault"


I typed "netstat -l" to see what ports are in use. The commands works fine on all the other CentOS systems I have. But on this one, it just replies "Segmentation fault".

I just could not think what might cause that and eventually wondered if it was a memory problem. I ran "memtest" but the memory was fine. I then decided to upgrade the firmware, which I did. I know that was a bit drastic, but I really could not think of anything better to do! It did NOT fix the problem.

Does anyone have a better idea I could try?
Many thanks!
Old 03-30-2010, 02:03 PM   #2
LQ Guru
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled,15011543
Because version 1.60 netstat segmentation faults on more than one of our boxes, and the way I fix it is to edit netstat.c and change "int inode" to "unsigned int inode" in the three places that is used, and recompile.

It coredumps because the hash function hashes a negative inode number to a negative hash array number.
There's a few patches out there that distros are applying though. Some for 2.6 systems, gcc3.4 and some others.
1 members found this post helpful.
Old 03-31-2010, 04:12 PM   #3
LQ Newbie
Registered: Feb 2010
Location: London
Distribution: CentOS Redhat
Posts: 15

Original Poster
Rep: Reputation: 0
That is an excellent answer. Glad I posted my question, it is the first one I have ever actually posted! The solution is a little advanced for me, but it will be interesting trying to do this as you say. I will let you know how it goes, and let you know if I need to ask any further details. Just thought I would write this as an intermediate reply, so you know I have read the response.


netstat, ports

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Courious "unknown" entries in "netstat" output Sheridan Linux - Networking 5 09-01-2009 09:09 AM
5.2. Toolchain Technical Notes "segmentation fault" on ALL bz2 Majin_Buu Linux From Scratch 0 08-20-2008 04:39 AM
sunbird 0.3 does not start, error: Segmentation fault : "$prog" ${1+"$@"} polemon Ubuntu 8 01-08-2007 04:22 AM
why iam getting problems like "...too many files opened" or "segmentation fault" naren_0101bits Linux - Newbie 2 07-19-2004 12:20 PM
"segmentation error" when issuing "useradd" command through terminal with RH 9.0 kaihuang Linux - General 0 10-21-2003 11:47 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:11 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration