public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ulrich Drepper <drepper@redhat.com>
To: Linux Kernel <linux-kernel@vger.kernel.org>
Subject: clone or ptrace bug?
Date: Mon, 24 Mar 2003 14:21:57 -0800	[thread overview]
Message-ID: <3E7F8505.8020708@redhat.com> (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-----


                 reply	other threads:[~2003-03-24 22:11 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3E7F8505.8020708@redhat.com \
    --to=drepper@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox