getappmap / getappmap/appmap-java

ConcurrentAccessException on CodeObject.children

Open
#30 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
88
Forks
17
Avg merge
2d 2h
Merged PRs (30d)
1

Description

Hmm. Perhaps this is the cause, and if it is I believe the call site can be synchronized to avoid making CodeObject/CodeObjectTree thread safe:
https://github.com/applandinc/appmap-java/blob/less-mem_20200817/src/main/java/com/appland/appmap/record/Recorder.java#L110-L113

In short, writeEvent used to be synchronized. It's no longer synchronized due to the fact that we can encounter a lock when calling toString into the client application. It's certainly worth looking into. I'll defer to you @apotterri if you'd like to look into it now or as a follow on item.

Originally posted by @dustinbyrne in https://github.com/applandinc/appmap-java/pull/29#discussion_r475896188

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 Recorder.java at the writeEvent call site referenced in lines 110-113, then inspect CodeObject.children and CodeObjectTree for the reported concurrent-access path. Reproduce or otherwise confirm whether unsynchronized writeEvent causes ConcurrentAccessException, and establish a verified resolution for that failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.