pyocd / pyocd/pyOCD

Exception caused by probe server client disconnecting from target early

Open
#1,016 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug probeserver
Dominant language
Python
Stars
1.5k
Forks
560
Avg merge
1h 41m
Merged PRs (30d)
3

Description

When a probe server client disconnects, it will perform the target disconnect procedure even if there are still other remote clients connected, or a local client using the probe (such as the gdbserver). The most important thing this does is power down debug in the DP, which causes all subsequent DP/AP accesses to fail.

Steps to reproduce using gdbserver:

  1. Start gdbserver with probe server enabled: pyocd gdb --probe-server
  2. Connect Commander to the probe server and immediately exit: pyocd cmd -uremote:localhost -c quit
  3. Type Control-C to exit gdbserver.

This will produce an exception when pyocd attempts to resume the core while disconnecting:

pyocd.core.exceptions.TransferFaultError: Memory transfer fault @ 0xe000edf0-0xe000edf3

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the probe-server flow exercised by pyocd gdb --probe-server, then reproduce the disconnect using pyocd cmd -uremote:localhost -c quit while gdbserver remains active. Trace the target disconnect and resume steps; done means an early client disconnect does not power down debug or cause the reported TransferFaultError while another client still uses the probe.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
devtools, embedded-iot
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.