Kernel 2.4.2 command execution hangs and then succeded after 2 minutes....!? STRACE-DUMP

Kernel 2.4.2 command execution hangs and then succeded after 2 minutes....!? STRACE-DUMP

Post by Andrea Barisan » Thu, 08 Mar 2001 23:20:04



On Wed, 7 Mar 2001, Manfred Spraul wrote:
> Could you use strace and check what the apps are doing during these 2
> minutes?

> Perhaps it's a variation of the nis hang:
> 2.4 doesn't forword udp error messages to the user space app, and thus a
> nis query to a nonexistant nis server blocks until the udp packets time
> out.

Here are the three traces (mc,pine,tar)
The system hangs for minutes in the last part, before the interrupt
Sorry for the size of this email...:)

execve("/usr/bin/mc", ["mc"], [/* 24 vars */]) = 0
brk(0)                                  = 0x80b2a0c
open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 4
fstat(4, {st_dev=makedev(3, 6), st_ino=18436, st_mode=S_IFREG|0644, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=8, st_size=3807, st_atime=2001/03/03-01:53:49, st_mtime=2001/03/03-01:53:20, st_ctime=2001/03/03-01:53:20}) = 0
old_mmap(NULL, 3807, PROT_READ, MAP_PRIVATE, 4, 0) = 0x4000b000
close(4)                                = 0
open("/lib/libcrypt.so.1", O_RDONLY)    = 4
old_mmap(NULL, 4096, PROT_READ, MAP_PRIVATE, 4, 0) = 0x4000c000
munmap(0x4000c000, 4096)                = 0
old_mmap(NULL, 181644, PROT_READ|PROT_EXEC, MAP_PRIVATE, 4, 0) = 0x4000c000
mprotect(0x40011000, 161164, PROT_NONE) = 0
old_mmap(0x40011000, 135168, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 4, 0x4000) = 0x40011000
old_mmap(0x40032000, 25996, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40032000
close(4)                                = 0
open("/lib/libtermcap.so.2", O_RDONLY)  = 4
old_mmap(NULL, 4096, PROT_READ, MAP_PRIVATE, 4, 0) = 0x40039000
munmap(0x40039000, 4096)                = 0
old_mmap(NULL, 12000, PROT_READ|PROT_EXEC, MAP_PRIVATE, 4, 0) = 0x40039000
mprotect(0x4003b000, 3808, PROT_NONE)   = 0
old_mmap(0x4003b000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 4, 0x1000) = 0x4003b000
close(4)                                = 0
open("/usr/lib/libgpm.so.1", O_RDONLY)  = 4
old_mmap(NULL, 4096, PROT_READ, MAP_PRIVATE, 4, 0) = 0x4003c000
munmap(0x4003c000, 4096)                = 0
old_mmap(NULL, 16280, PROT_READ|PROT_EXEC, MAP_PRIVATE, 4, 0) = 0x4003c000
mprotect(0x4003f000, 3992, PROT_NONE)   = 0
old_mmap(0x4003f000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 4, 0x2000) = 0x4003f000
close(4)                                = 0
open("/lib/libdl.so.2", O_RDONLY)       = 4
old_mmap(NULL, 4096, PROT_READ, MAP_PRIVATE, 4, 0) = 0x40040000
munmap(0x40040000, 4096)                = 0
old_mmap(NULL, 9256, PROT_READ|PROT_EXEC, MAP_PRIVATE, 4, 0) = 0x40040000
mprotect(0x40042000, 1064, PROT_NONE)   = 0
old_mmap(0x40042000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 4, 0x1000) = 0x40042000
close(4)                                = 0
open("/usr/lib/libslang.so.0", O_RDONLY) = 4
old_mmap(NULL, 4096, PROT_READ, MAP_PRIVATE, 4, 0) = 0x40043000
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40044000
munmap(0x40043000, 4096)                = 0
old_mmap(NULL, 293800, PROT_READ|PROT_EXEC, MAP_PRIVATE, 4, 0) = 0x40045000
mprotect(0x40064000, 166824, PROT_NONE) = 0
old_mmap(0x40064000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 4, 0x1e000) = 0x40064000
old_mmap(0x40068000, 150440, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40068000
close(4)                                = 0
open("/lib/libc.so.6", O_RDONLY)        = 4
old_mmap(NULL, 4096, PROT_READ, MAP_PRIVATE, 4, 0) = 0x40043000
munmap(0x40043000, 4096)                = 0
old_mmap(NULL, 667860, PROT_READ|PROT_EXEC, MAP_PRIVATE, 4, 0) = 0x4008d000
mprotect(0x4011d000, 78036, PROT_NONE)  = 0
old_mmap(0x4011d000, 32768, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 4, 0x8f000) = 0x4011d000
old_mmap(0x40125000, 45268, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40125000
close(4)                                = 0
open("/lib/libcurses.so.1", O_RDONLY)   = 4
old_mmap(NULL, 4096, PROT_READ, MAP_PRIVATE, 4, 0) = 0x40043000
munmap(0x40043000, 4096)                = 0
old_mmap(NULL, 53020, PROT_READ|PROT_EXEC, MAP_PRIVATE, 4, 0) = 0x40131000
mprotect(0x4013b000, 12060, PROT_NONE)  = 0
old_mmap(0x4013b000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 4, 0x9000) = 0x4013b000
old_mmap(0x4013d000, 3868, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4013d000
close(4)                                = 0
open("/lib/libm.so.6", O_RDONLY)        = 4
old_mmap(NULL, 4096, PROT_READ, MAP_PRIVATE, 4, 0) = 0x40043000
munmap(0x40043000, 4096)                = 0
old_mmap(NULL, 100360, PROT_READ|PROT_EXEC, MAP_PRIVATE, 4, 0) = 0x4013e000
mprotect(0x40156000, 2056, PROT_NONE)   = 0
old_mmap(0x40156000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 4, 0x17000) = 0x40156000
close(4)                                = 0
mprotect(0x4013e000, 98304, PROT_READ|PROT_WRITE) = 0
mprotect(0x4013e000, 98304, PROT_READ|PROT_EXEC) = 0
mprotect(0x40131000, 40960, PROT_READ|PROT_WRITE) = 0
mprotect(0x40131000, 40960, PROT_READ|PROT_EXEC) = 0
mprotect(0x4008d000, 589824, PROT_READ|PROT_WRITE) = 0
mprotect(0x4008d000, 589824, PROT_READ|PROT_EXEC) = 0
mprotect(0x4000c000, 20480, PROT_READ|PROT_WRITE) = 0
mprotect(0x4000c000, 20480, PROT_READ|PROT_EXEC) = 0
personality(PER_LINUX)                  = 0
getpid()                                = 112
getuid()                                = 0
setuid(0)                               = 0
time(NULL)                              = 983584429
brk(0)                                  = 0x80b2a0c
brk(0x80b2a34)                          = 0x80b2a34
brk(0x80b3000)                          = 0x80b3000
open("/etc/localtime", O_RDONLY)        = -1 ENOENT (No such file or directory)
sigaction(SIGPIPE, {0x808c330, [], 0}, NULL, 0x3) = 0
open("/usr/lib/mc/extfs/extfs.ini", O_RDONLY) = 4
fstat(4, {st_dev=makedev(3, 6), st_ino=272390, st_mode=S_IFREG|0755, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=2, st_size=192, st_atime=2001/03/07-11:36:05, st_mtime=1997/11/01-17:47:10, st_ctime=2000/12/08-05:55:42}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40043000
read(4, "\n[extfs]\nzip=.zip .ZIP\nzoo=.zoo\n"..., 4096) = 192
read(4, "", 4096)                       = 0
close(4)                                = 0
munmap(0x40043000, 4096)                = 0
brk(0x80b4000)                          = 0x80b4000
lstat(".", {st_dev=makedev(3, 6), st_ino=159856, st_mode=S_IFDIR|0755, st_nlink=7, st_uid=3532, st_gid=800, st_blksize=4096, st_blocks=4, st_size=2048, st_atime=2001/03/03-01:53:40, st_mtime=2001/03/07-14:48:23, st_ctime=2001/03/07-14:48:23}) = 0
lstat("/", {st_dev=makedev(3, 6), st_ino=2, st_mode=S_IFDIR|0755, st_nlink=17, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=2, st_size=1024, st_atime=2001/03/03-01:53:27, st_mtime=2001/02/28-12:52:21, st_ctime=2001/02/28-12:52:21}) = 0
lstat("..", {st_dev=makedev(3, 6), st_ino=256003, st_mode=S_IFDIR|0755, st_nlink=7, st_uid=716, st_gid=10, st_blksize=4096, st_blocks=6, st_size=3072, st_atime=2001/03/03-01:53:37, st_mtime=2001/03/03-01:53:49, st_ctime=2001/03/03-01:53:49}) = 0
open("..", O_RDONLY|O_NONBLOCK)         = 4
fcntl(4, F_SETFD, FD_CLOEXEC)           = 0
fstat(4, {st_dev=makedev(3, 6), st_ino=256003, st_mode=S_IFDIR|0755, st_nlink=7, st_uid=716, st_gid=10, st_blksize=4096, st_blocks=6, st_size=3072, st_atime=2001/03/03-01:53:37, st_mtime=2001/03/03-01:53:49, st_ctime=2001/03/03-01:53:49}) = 0
brk(0x80b6000)                          = 0x80b6000
lseek(4, 0, SEEK_CUR)                   = 0
getdents(4, {{d_ino=256003, d_off=12, d_reclen=12, d_name="."} {d_ino=129025, d_off=24, d_reclen=16, d_name=".."} {d_ino=274435, d_off=40, d_reclen=20, d_name="backup"} {d_ino=28712, d_off=52, d_reclen=16, d_name="copy"} {d_ino=296964, d_off=68, d_reclen=16, d_name="trash"} {d_ino=256060, d_off=96, d_reclen=28, d_name="strace-4.2.tar.gz"} {d_ino=159856, d_off=116, d_reclen=24, d_name="strace-4.2"} {d_ino=256073, d_off=156, d_reclen=20, d_name="trace-mc"} {d_ino=86136, d_off=1024, d_reclen=20, d_name="compile"}}, 3933) = 172
lstat("../strace-4.2", {st_dev=makedev(3, 6), st_ino=159856, st_mode=S_IFDIR|0755, st_nlink=7, st_uid=3532, st_gid=800, st_blksize=4096, st_blocks=4, st_size=2048, st_atime=2001/03/03-01:53:40, st_mtime=2001/03/07-14:48:23, st_ctime=2001/03/07-14:48:23}) = 0
close(4)                                = 0
lstat("../..", {st_dev=makedev(3, 6), st_ino=129025, st_mode=S_IFDIR|0755, st_nlink=14, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=2, st_size=1024, st_atime=2001/03/03-01:53:44, st_mtime=2001/02/28-11:28:17, st_ctime=2001/02/28-11:28:17}) = 0
open("../..", O_RDONLY|O_NONBLOCK)      = 4
fcntl(4, F_SETFD, FD_CLOEXEC)           = 0
fstat(4, {st_dev=makedev(3, 6), st_ino=129025, st_mode=S_IFDIR|0755, st_nlink=14, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=2, st_size=1024, st_atime=2001/03/03-01:53:44, st_mtime=2001/02/28-11:28:17, st_ctime=2001/02/28-11:28:17}) = 0
lseek(4, 0, SEEK_CUR)                   = 0
getdents(4, {{d_ino=129025, d_off=12, d_reclen=12, d_name="."} {d_ino=2, d_off=24, d_reclen=16, d_name=".."} {d_ino=131073, d_off=36, d_reclen=16, d_name="bin"} {d_ino=137217, d_off=48, d_reclen=16, d_name="lib"} {d_ino=190466, d_off=60, d_reclen=16, d_name="sbin"} {d_ino=129029, d_off=72, d_reclen=16, d_name="adm"} {d_ino=194562, d_off=84, d_reclen=16, d_name="doc"} {d_ino=235522, d_off=96, d_reclen=16, d_name="man"} {d_ino=256002, d_off=112, d_reclen=16, d_name="local"} {d_ino=256003, d_off=124, d_reclen=16, d_name="temp"} {d_ino=296963, d_off=140, d_reclen=20, d_name="libexec"} {d_ino=307203, d_off=156, d_reclen=16, d_name="share"} {d_ino=30726, d_off=168, d_reclen=16, d_name="src"} {d_ino=81927, d_off=184, d_reclen=20, d_name="include"} {d_ino=69639, d_off=1024, d_reclen=16, d_name="etc"}}, 3933) = 244
lstat("../../temp", {st_dev=makedev(3, 6), st_ino=256003, st_mode=S_IFDIR|0755, st_nlink=7, st_uid=716, st_gid=10, ...

read more »

 
 
 

Kernel 2.4.2 command execution hangs and then succeded after 2 minutes....!? STRACE-DUMP

Post by Manfred Sprau » Fri, 09 Mar 2001 01:10:03


----- Original Message -----



Sent: Wednesday, March 07, 2001 3:03 PM
Subject: Re: Kernel 2.4.2 command execution hangs and then succeded
after 2 minutes....!? STRACE-DUMP


> > Could you use strace and check what the apps are doing during these
2
> > minutes?

> > Perhaps it's a variation of the nis hang:
> > 2.4 doesn't forword udp error messages to the user space app, and
thus a
> > nis query to a nonexistant nis server blocks until the udp packets
time
> > out.

> Here are the three traces (mc,pine,tar)
> The system hangs for minutes in the last part, before the interrupt
> Sorry for the size of this email...:)

I got a new DSL connection last week, and right now I have a flat rate
:-)

> sendto(5,
";\255Cn\0\0\0\0\0\0\0\2\0\1\206\240\0\0\0\2\0\0\0\3\0\0"..., 56, 0,
{sin_family=AF_INET, sin_port=htons(111),
sin_addr=inet_addr("127.0.0.1")}}, 16) = 56
That's the problem:
NIS is configured and tries to connect to the NIS server on localhost.
It uses portmap to locate the server, but portmap is not running.
2.2 just forwarded the error message to the application, but 2.4
silently ignores the error message because these error messages caused
spurious application faults.

Check your nis configuration (afaik /etc/nsswitch.conf)

--
    Manfred

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


 
 
 

Kernel 2.4.2 command execution hangs and then succeded after 2 minutes....!? STRACE-DUMP

Post by Andrea Barisan » Fri, 09 Mar 2001 03:20:04




> > Could you use strace and check what the apps are doing during these 2
> > minutes?

> > Perhaps it's a variation of the nis hang:
> > 2.4 doesn't forword udp error messages to the user space app, and thus a
> > nis query to a nonexistant nis server blocks until the udp packets time
> > out.

Ok!

I've removed all nis reference in /etc/nsswitch.conf and now there are no
more hangs...I have to admit, learning that thew execution process of tar
is somehow related to nis,portmap is a little weird :) (but that's part of
the fun isn't it?).

Thanks again for the help

Bye

P.S.
Does anyone think that this kind of problem must be documentated in
the kernel documentation?

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

1. Kernel 2.4.2 command execution hangs and then succeded after 2 minutes....!?

Hi, I've compiled and installd 2.4.2 on a my self-made linux distribution
based on glibc-2.0 and a strange thing happens. When I invoke some
binaries (for examples mc,pine,tar) for at least 2 minutes nothing
happens, the execution appaerntly hangs but then the command start as
normal. This happens only with a few set of commands that apparently have
nothing in common, they are linked against the same libraries of many
other commands that are working. I don't know what to think, I've used a
kernel compiled on an other machine (that is known to build correctly
2.4.x kernels) but the problem remains so it is not my gcc-2.95 fault.

Does anyone has some ideas?

Bye

-----------------------------------------------------------
NE&T               Network Administrator & Security Officer
Area Science Park - S.S. 14 Km 163.5 Basovizza (TS) - Italy

-----------------------------------------------------------
"How would you know I'm mad?" said Alice.
"You must be,'said the Cat,'or you wouldn't have come here"
-----------------------------------------------------------

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

2. Which board for Linux?

3. command file, delete the command after execution

4. mitsumi quad speed ide cdrom. HELP!

5. Help: Netscape core dump (strace attached)

6. SLIP problem

7. almost succeded in kernel compilation!!

8. SB PCI 64 and SuSE: Getting Wavs and Midi to Play??

9. 2.4.19-pre3-ac6 kernel hang and stack dump

10. automatic unattended execution of dump

11. how to pass command line arguments to strace?

12. Continue execution after core dump?

13. Automatic Execution of Dump, Backup, Tar, Cpio, etc.