Bug 30268 - [gdb/dap] ERROR: timeout reading json header
Summary: [gdb/dap] ERROR: timeout reading json header
Status: RESOLVED FIXED
Alias: None
Product: gdb
Classification: Unclassified
Component: gdb (show other bugs)
Version: HEAD
: P2 normal
Target Milestone: 14.1
Assignee: Tom Tromey
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-23 16:02 UTC by Tom de Vries
Modified: 2023-03-24 13:59 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments
gdb.log (4.38 KB, text/x-log)
2023-03-23 16:02 UTC, Tom de Vries
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tom de Vries 2023-03-23 16:02:36 UTC
Created attachment 14776 [details]
gdb.log

I applied a recently proposed patch "Fix race in DAP startup" to see if that would fix the instability in the dap tests I see, but I still run into problems.
Comment 1 Tom Tromey 2023-03-23 18:42:20 UTC
This trace looks a lot like the race, and:

{"type": "event", "event": "output", "body": {"category": "stdout", "output": "  File \"/data/vries/gdb/leap-15-4/build/gdb/data-directory/python/gdb/dap/server.py\", line 115, in main_loop\n"}, "seq": 7}

the line number here seems wrong, like it's from the version without
the race patch.  Did you maybe not "make" after applying?  The
test suite picks up the Python code from data-directory so a build
is needed before running the tests.
Comment 2 Tom de Vries 2023-03-23 21:50:18 UTC
(In reply to Tom Tromey from comment #1)
> This trace looks a lot like the race, and:
> 
> {"type": "event", "event": "output", "body": {"category": "stdout",
> "output": "  File
> \"/data/vries/gdb/leap-15-4/build/gdb/data-directory/python/gdb/dap/server.
> py\", line 115, in main_loop\n"}, "seq": 7}
> 
> the line number here seems wrong, like it's from the version without
> the race patch.  Did you maybe not "make" after applying?  The
> test suite picks up the Python code from data-directory so a build
> is needed before running the tests.

/me facepalms.  Yes, that's what happened, sorry for the confusion.  After rebuilding, the tests pass reliably.

So we can close this PR once the patch is committed.
Comment 3 Tom Tromey 2023-03-24 13:59:24 UTC
Should be fixed now.
I meant to stick the bug reference into the commit, but forgot.