public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "thiago.bauermann at linaro dot org" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug threads/31512] New: gdb.threads/attach-many-short-lived-threads.exp sometimes fails with "process 2689792 is already traced by process 2039527"
Date: Tue, 19 Mar 2024 18:17:56 +0000	[thread overview]
Message-ID: <bug-31512-4717@http.sourceware.org/bugzilla/> (raw)

https://sourceware.org/bugzilla/show_bug.cgi?id=31512

            Bug ID: 31512
           Summary: gdb.threads/attach-many-short-lived-threads.exp
                    sometimes fails with "process 2689792 is already
                    traced by process 2039527"
           Product: gdb
           Version: HEAD
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: threads
          Assignee: unassigned at sourceware dot org
          Reporter: thiago.bauermann at linaro dot org
  Target Milestone: ---

When running gdb.threads/attach-many-short-lived-threads.exp in a loop, very
rarely an attach command can fail with:

   (gdb) attach 2039552
   Attaching to process 2039552
   Cannot attach to lwp 2689792: Operation not permitted (1), process 2689792
is already traced by process 2039527

PID 2039552 is the testcase inferior, and 2039527 is GDB. GDB didn't report any
success in attaching to the process so the message is surprising.

I was also able to reproduce by doing manually what the testcase does: running
the attach-many-short-lived-threads test program in one terminal and then
repeatedly trying to attach to it from GDB in another terminal

This is hard to reproduce though. In thousands of testcase runs, I saw it only
twice.

Probably not relevant, but I saw this on aarch64-linux running Ubuntu 22.04.3
LTS and kernel 5.4.0-131-generic.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

             reply	other threads:[~2024-03-19 18:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-19 18:17 thiago.bauermann at linaro dot org [this message]
2024-03-19 18:28 ` [Bug threads/31512] " thiago.bauermann at linaro dot org
2024-03-19 18:54 ` thiago.bauermann at linaro dot org

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=bug-31512-4717@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).