Skip to contentSkip to conversation

clone or ptrace bug?

DISCUSSION Ulrich Drepper 1 participant 1 message Mar 24, 2003

lore
Share & tools
lore
#0 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Using strace on an MT application I see strange output from restarted clone() calls. Something like this:

[pid 17862]
clone(CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID|CLONE_DETACHED
-> child_stack=0x41147ab0,
flags=CLONE_FILES|CLONE_IDLETASK|CLONE_PTRACE|CLONE_VFORK|CLONE_PARENT|CLONE_THREAD|CLONE_NEWNS|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID|CLONE_DETACHED|CLONE_UNTRACED|CLONE_CHILD_SETTID|0xbe0000f8, [17884], {entry_number:6, base_addr:0x41147d40, limit:1048575,
seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1,
seg_not_present:0, useable:1}, 0x41147d88) = 17884

This is the output of a hacked version of strace. The part before the "->" is printed when the syscall enters the kernel. Normally nothing gets printed at that time.

The problem is that the flags word is different after the syscall. This /might/ not cause any real problems in this case but what happens if the syscall gets restarted?

In any case, the parameters should be modified.

This is with the 2.5 BK kernel from yesterady or the day before with gcc 3.2.2-5.

- --
- --------------. ,-. 444 Castro Street
Ulrich Drepper \ ,-----------------' \ Mountain View, CA 94041 USA
Red Hat --' drepper at redhat.com ---------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+f4UF2ijCOnn/RHQRAuYzAKCpVPRV8rG+NetG3REIC9OrIZLBwQCgsNt6 S5xj6kjpbKCwZl6WVuadcrA=
=tvm4
-----END PGP SIGNATURE-----