public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug remote/31801] New: Protocol error: QThreadEvents (thread-events) conflicting enabled
@ 2024-05-26 16:06 dmitry.neverov at jetbrains dot com
  2024-05-26 16:07 ` [Bug remote/31801] " dmitry.neverov at jetbrains dot com
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: dmitry.neverov at jetbrains dot com @ 2024-05-26 16:06 UTC (permalink / raw)
  To: gdb-prs

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

            Bug ID: 31801
           Summary: Protocol error: QThreadEvents (thread-events)
                    conflicting enabled
           Product: gdb
           Version: HEAD
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: remote
          Assignee: unassigned at sourceware dot org
          Reporter: dmitry.neverov at jetbrains dot com
  Target Milestone: ---

This issue is extracted from
https://sourceware.org/bugzilla/show_bug.cgi?id=31727.

I get the 'Protocol error: QThreadEvents (thread-events) conflicting
enabled' error when debugging the remote arm target in mingw. 

As suggested in https://sourceware.org/bugzilla/show_bug.cgi?id=31727
the first commit where the protocol error appears is
65c459abebf70bd5a64dcee11d4d7d4a8498465f. I get an internal error on
the previous commit 26f047ce788b42b7b5f96515d119138a8ae43979. Logs for
both commits attached.

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug remote/31801] Protocol error: QThreadEvents (thread-events) conflicting enabled
  2024-05-26 16:06 [Bug remote/31801] New: Protocol error: QThreadEvents (thread-events) conflicting enabled dmitry.neverov at jetbrains dot com
@ 2024-05-26 16:07 ` dmitry.neverov at jetbrains dot com
  2024-05-26 16:07 ` dmitry.neverov at jetbrains dot com
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: dmitry.neverov at jetbrains dot com @ 2024-05-26 16:07 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #1 from Dmitry Neverov <dmitry.neverov at jetbrains dot com> ---
Created attachment 15534
  --> https://sourceware.org/bugzilla/attachment.cgi?id=15534&action=edit
no protocol error

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug remote/31801] Protocol error: QThreadEvents (thread-events) conflicting enabled
  2024-05-26 16:06 [Bug remote/31801] New: Protocol error: QThreadEvents (thread-events) conflicting enabled dmitry.neverov at jetbrains dot com
  2024-05-26 16:07 ` [Bug remote/31801] " dmitry.neverov at jetbrains dot com
@ 2024-05-26 16:07 ` dmitry.neverov at jetbrains dot com
  2024-05-26 19:56 ` tromey at sourceware dot org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: dmitry.neverov at jetbrains dot com @ 2024-05-26 16:07 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #2 from Dmitry Neverov <dmitry.neverov at jetbrains dot com> ---
Created attachment 15535
  --> https://sourceware.org/bugzilla/attachment.cgi?id=15535&action=edit
protocol error

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug remote/31801] Protocol error: QThreadEvents (thread-events) conflicting enabled
  2024-05-26 16:06 [Bug remote/31801] New: Protocol error: QThreadEvents (thread-events) conflicting enabled dmitry.neverov at jetbrains dot com
  2024-05-26 16:07 ` [Bug remote/31801] " dmitry.neverov at jetbrains dot com
  2024-05-26 16:07 ` dmitry.neverov at jetbrains dot com
@ 2024-05-26 19:56 ` tromey at sourceware dot org
  2024-05-26 21:04 ` tromey at sourceware dot org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: tromey at sourceware dot org @ 2024-05-26 19:56 UTC (permalink / raw)
  To: gdb-prs

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

Tom Tromey <tromey at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |15.1
   Last reconfirmed|                            |2024-05-26
                 CC|                            |tromey at sourceware dot org
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1

--- Comment #3 from Tom Tromey <tromey at sourceware dot org> ---
Definitely a bug, because the remote clearly does not respond
with QThreadEvents+

This is a regression in 15 I think.  I'm going to set the
target milestone.

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug remote/31801] Protocol error: QThreadEvents (thread-events) conflicting enabled
  2024-05-26 16:06 [Bug remote/31801] New: Protocol error: QThreadEvents (thread-events) conflicting enabled dmitry.neverov at jetbrains dot com
                   ` (2 preceding siblings ...)
  2024-05-26 19:56 ` tromey at sourceware dot org
@ 2024-05-26 21:04 ` tromey at sourceware dot org
  2024-06-03 14:38 ` tromey at sourceware dot org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: tromey at sourceware dot org @ 2024-05-26 21:04 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #4 from Tom Tromey <tromey at sourceware dot org> ---
I don't understand why this branch would fail:

void
remote_target::thread_events (int enable)
...
  if (m_features.packet_support (PACKET_QThreadEvents) == PACKET_DISABLE)
    return;


At least in a test build I did, if the remote doesn't include
QThreadEvents+, then this packet seems to be disabled:

(top-gdb) p m_features.packet_support(PACKET_QThreadEvents)
$15 = PACKET_DISABLE


Can you debug gdb with your remote and find out what's going on here?
There's a loop at the end of remote_target::remote_query_supported that
should make this change.

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug remote/31801] Protocol error: QThreadEvents (thread-events) conflicting enabled
  2024-05-26 16:06 [Bug remote/31801] New: Protocol error: QThreadEvents (thread-events) conflicting enabled dmitry.neverov at jetbrains dot com
                   ` (3 preceding siblings ...)
  2024-05-26 21:04 ` tromey at sourceware dot org
@ 2024-06-03 14:38 ` tromey at sourceware dot org
  2024-06-04 13:08 ` dmitry.neverov at jetbrains dot com
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: tromey at sourceware dot org @ 2024-06-03 14:38 UTC (permalink / raw)
  To: gdb-prs

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

Tom Tromey <tromey at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |WAITING

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug remote/31801] Protocol error: QThreadEvents (thread-events) conflicting enabled
  2024-05-26 16:06 [Bug remote/31801] New: Protocol error: QThreadEvents (thread-events) conflicting enabled dmitry.neverov at jetbrains dot com
                   ` (4 preceding siblings ...)
  2024-06-03 14:38 ` tromey at sourceware dot org
@ 2024-06-04 13:08 ` dmitry.neverov at jetbrains dot com
  2024-06-04 18:13 ` tromey at sourceware dot org
  2024-06-04 18:15 ` tromey at sourceware dot org
  7 siblings, 0 replies; 9+ messages in thread
From: dmitry.neverov at jetbrains dot com @ 2024-06-04 13:08 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #5 from Dmitry Neverov <dmitry.neverov at jetbrains dot com> ---
Created attachment 15564
  --> https://sourceware.org/bugzilla/attachment.cgi?id=15564&action=edit
untruncated remote log

For me m_features.packet_support(PACKET_QThreadEvents) == PACKET_ENABLE.

I've collected untruncated remote log and it contains QThreadEvents+.

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug remote/31801] Protocol error: QThreadEvents (thread-events) conflicting enabled
  2024-05-26 16:06 [Bug remote/31801] New: Protocol error: QThreadEvents (thread-events) conflicting enabled dmitry.neverov at jetbrains dot com
                   ` (5 preceding siblings ...)
  2024-06-04 13:08 ` dmitry.neverov at jetbrains dot com
@ 2024-06-04 18:13 ` tromey at sourceware dot org
  2024-06-04 18:15 ` tromey at sourceware dot org
  7 siblings, 0 replies; 9+ messages in thread
From: tromey at sourceware dot org @ 2024-06-04 18:13 UTC (permalink / raw)
  To: gdb-prs

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

Tom Tromey <tromey at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW

--- Comment #6 from Tom Tromey <tromey at sourceware dot org> ---
Ok, in this case, gdb is correct to give an error.

What happens is that gdb sends "QThreadEvents+" in its
qSupported packet.  The remote replies "QThreadEvents+",
meaning the packet is supported.

Then later:

&"[remote] Sending packet: $QThreadEvents:1#89\n"
&"[remote] Packet received: \n"

That is, gdb asks for thread events and the remote
replies with the empty response, which means "unsupported" --
but it already said it *is* supported.

This is a bug in the remote.

Now, I do see the empty response documented in the manual.
However, I tend to think this is a cut-and-paste bug
in the manual itself, since the chart in the general
query packets node says:

     Feature Name              Value          Default   Probe
                               Required                 Allowed
...
     ‘QThreadEvents’           No             ‘-’       No

i.e., probing isn't allowed, so the empty response -- IMO --
is nonsensical.

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug remote/31801] Protocol error: QThreadEvents (thread-events) conflicting enabled
  2024-05-26 16:06 [Bug remote/31801] New: Protocol error: QThreadEvents (thread-events) conflicting enabled dmitry.neverov at jetbrains dot com
                   ` (6 preceding siblings ...)
  2024-06-04 18:13 ` tromey at sourceware dot org
@ 2024-06-04 18:15 ` tromey at sourceware dot org
  7 siblings, 0 replies; 9+ messages in thread
From: tromey at sourceware dot org @ 2024-06-04 18:15 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #7 from Tom Tromey <tromey at sourceware dot org> ---
Although there's also the possibility that I am
misunderstanding what "probe allowed" actually means,
since the docs are kind of confusing on this topic.

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-06-04 18:15 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-26 16:06 [Bug remote/31801] New: Protocol error: QThreadEvents (thread-events) conflicting enabled dmitry.neverov at jetbrains dot com
2024-05-26 16:07 ` [Bug remote/31801] " dmitry.neverov at jetbrains dot com
2024-05-26 16:07 ` dmitry.neverov at jetbrains dot com
2024-05-26 19:56 ` tromey at sourceware dot org
2024-05-26 21:04 ` tromey at sourceware dot org
2024-06-03 14:38 ` tromey at sourceware dot org
2024-06-04 13:08 ` dmitry.neverov at jetbrains dot com
2024-06-04 18:13 ` tromey at sourceware dot org
2024-06-04 18:15 ` tromey at sourceware dot org

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).