strace hangs waiting for lock

From: Jens Schweikhardt <schweikh_at_schweikhardt.net>
Date: Tue, 6 Jan 2004 21:43:06 +0100
hello, world\n

it appears the devel/strace port's strace utility does not work anymore
(haven't tried for a long time, so this could be long standing issue).
To reproduce:

schweikh_at_hal9000:~ 1 $ strace -V
strace -- version 4.5.1
schweikh_at_hal9000:~ $ uname -a
FreeBSD hal9000.schweikhardt.net 5.2-CURRENT FreeBSD 5.2-CURRENT #0: Mon Dec 22 15:03:45 CET 2003     toor_at_hal9000.schweikhardt.net:/usr/obj/usr/src/sys/HAL9000  i386
schweikh_at_hal9000:~ $ strace ls       # does nothing, just waits.
^C

During this, ps ax shows:
schweikh_at_hal9000:~ $ psg strace
  UID   PID  PPID CPU PRI NI   VSZ  RSS MWCHAN STAT  TT       TIME COMMAND
 1001  2630   866   0   8  0  1356  828 pioctl I+    p1    0:00.00 strace ls
 1001  2631  2630   0  96  0  1356  784 -      TL+   p1    0:00.00 strace ls

ps(1) says "L       Marks a process that is waiting to acquire a lock."

For some reason, the lock is never acquired.
If however, I use ktrace *in addition*, everything works:

schweikh_at_hal9000:~ 130 $ ktrace strace ls
execve(0xbfbfe1fc, [0xbfbfe6c0], [/* 0 vars */]) = 0
mmap(0, 3568, PROT_READ|PROT_WRITE, MAP_ANON, -1, 0) = 0x2806f000
munmap(0x2806f000, 3568)                = 0
__sysctl([...], 0x2806d46c, 0xbfbfe4a4, NULL, 0) = 0
mmap(0, 32768, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, -1, 0) = 0x2806f000
issetugid(0x2804d000)                   = 0
open("/etc/libmap.conf", O_RDONLY)      = -1 ENOENT (No such file or directory)
open("/var/run/ld-elf.so.hints", O_RDONLY) = 3
read(3, " file version\0%s: unsupported fi"..., 128) = 128
lseek(3, 128, SEEK_SET)                 = 128
[...]


Regards,

	Jens
-- 
Jens Schweikhardt http://www.schweikhardt.net/
SIGSIG -- signature too long (core dumped)
Received on Tue Jan 06 2004 - 11:43:22 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:36 UTC