LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 06-30-2010, 04:36 AM   #1
belond
LQ Newbie
 
Registered: Jun 2010
Posts: 3

Rep: Reputation: 0
useradd: Segmentation fault


Hello everybody,

Yesterday I have got a problem what till now I cound not solve. I used google, I have read a lot of forum but I could not find the answer.
If I would like to add a new user with useradd (on Debian 4.0), I get the message Segmentation fault. I made a strace, that says:
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
I have read maybe the libc6 is missing or damaged, so I installed it again (apt-get install libc6, install was successfull), but the problem is still there. I touched it (touch /etc/ld.so.nohwcap), doesn't help.
Could somebody tell me something what can be the problem?
 
Old 06-30-2010, 06:17 AM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,610

Rep: Reputation: 518Reputation: 518Reputation: 518Reputation: 518Reputation: 518Reputation: 518
Drop caches and try again,
Code:
echo 3 > /proc/sys/vm/drop_caches
If that fixes it, a cosmic ray flipped a bit in your RAM.

Else try reinstalling the 'passwd' package.
 
Old 06-30-2010, 07:19 AM   #3
belond
LQ Newbie
 
Registered: Jun 2010
Posts: 3

Original Poster
Rep: Reputation: 0
Hello,

thanks for the fast reply and for your help. The echo 3 > /proc/sys/vm/drop_caches did nothing, but the passwd reinstall solved the problem. Thanks a lot!
How could it happen? Nobody disturbed the server and from one day to the other...?
 
Old 06-30-2010, 07:51 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 26,991
Blog Entries: 54

Rep: Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743
The straces /etc/ld.so.nohwcap ENOENT does or should not relate to your problem (man ld.so). It's best to attach a complete strace instead of picking out arbitrary lines. The segmentation fault error message means the application tried to access or change part of memory it did not have rights to. (If the previous version of useradd left a core file you could have then run 'gdb useradd core', then type "bt" for the stack trace.) So in the absence of information any questions about segfaulting can only lead to speculation...
 
Old 06-30-2010, 11:31 AM   #5
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,610

Rep: Reputation: 518Reputation: 518Reputation: 518Reputation: 518Reputation: 518Reputation: 518
Possibly bit corruption. It happens, though it's rare on a hard drive.
 
Old 06-30-2010, 06:00 PM   #6
unSpawn
Moderator
 
Registered: May 2001
Posts: 26,991
Blog Entries: 54

Rep: Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743
Quote:
Originally Posted by AlucardZero View Post
Possibly bit corruption. It happens, though it's rare on a hard drive.
Like I said already: speculation ;-p
 
Old 06-30-2010, 11:50 PM   #7
belond
LQ Newbie
 
Registered: Jun 2010
Posts: 3

Original Poster
Rep: Reputation: 0
Here's the original (full) output:

execve("/usr/sbin/useradd", ["useradd", "evilparameters"], [/* 16 vars */]) = 0
uname({sys="Linux", node="Mailserv", ...}) = 0
brk(0) = 0x805f000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f88000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=19972, ...}) = 0
mmap2(NULL, 19972, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7f83000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/tls/i686/cmov/libcrypt.so.1", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0@\10\0\000"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=21868, ...}) = 0
mmap2(NULL, 184636, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7f55000
mmap2(0xb7f5a000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x4) = 0xb7f5a000
mmap2(0xb7f5c000, 155964, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7f5c000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/libselinux.so.1", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0P8\0\000"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=79368, ...}) = 0
mmap2(NULL, 84884, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7f40000
mmap2(0xb7f53000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x12) = 0xb7f53000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/tls/i686/cmov/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\240O\1"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=1241392, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f3f000
mmap2(NULL, 1247388, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7e0e000
mmap2(0xb7f35000, 28672, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x127) = 0xb7f35000
mmap2(0xb7f3c000, 10396, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7f3c000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/tls/i686/cmov/libdl.so.2", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\20\f\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=9592, ...}) = 0
mmap2(NULL, 12404, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7e0a000
mmap2(0xb7e0c000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1) = 0xb7e0c000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/libsepol.so.1", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\0200\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=219824, ...}) = 0

The /etc/ld.so.preload-problem was fixed by libc6 reinstall.

Last edited by belond; 06-30-2010 at 11:52 PM.
 
Old 07-01-2010, 03:53 AM   #8
unSpawn
Moderator
 
Registered: May 2001
Posts: 26,991
Blog Entries: 54

Rep: Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743
Quote:
Originally Posted by belond View Post
Here's the original (full) output:
Thanks but I don't see it segfaulting anywhere.


Quote:
Originally Posted by belond View Post
The /etc/ld.so.preload-problem was fixed by libc6 reinstall.
Don't say it's a "/etc/ld.so.preload problem" because it isn't. Again some files not existing is no reason for it to segfault and /etc/ld.so.preload is one of them ('man ld.so again').
 
  


Reply

Tags
fault, segmentation fault, useradd


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
yast segmentation fault, system freezing - nvidia driver at fault? BaltikaTroika Suse/Novell 2 12-02-2005 09:34 AM
useradd segmentation fault joelsolanki Red Hat 3 09-07-2005 10:58 PM
Segmentation Fault rupesh_pulikool Linux - Software 7 01-07-2005 05:55 AM
segmentation fault... perdesiz Linux - Software 1 08-18-2003 01:55 AM
useradd - segmentation fault neorex Linux - Software 1 08-01-2003 04:36 AM


All times are GMT -5. The time now is 06:57 AM.

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