Skip to content

Conversation

dkimitsa
Copy link
Contributor

it was crashing due following set of events:

  • app get stopped at breakpoint -- this means all threads received SUSPENDED command and has to stop on next instrumented hook;
  • thread with native frames exited and VM reported it as detached to JDWP server, where it gets removed;
  • vm continue cleaning up java part and calls ThreadGroup.removeThread where instrumented hooks are injected as well, where it hit check against SUSPENDED state, and thread suspended event is reported to JDWP
    -JDWP not able to find out internal representation for this thread (as it was reported as detached) and crashes.

Fix: suppress any further reports of any kind of events for thread once it marked as detached.

…l further possible instrumented breakpoints (such as ones in ThreadGroup.detachThread) or exceptions. As if such exception is hit or application globally under suspend state -- JDWP server will find this thread id as invalid and crash on exception
@dkimitsa dkimitsa mentioned this pull request Jun 27, 2019
3 tasks
@Tom-Ski Tom-Ski merged commit ccc869b into MobiVM:master Jun 27, 2019
@dkimitsa dkimitsa deleted the fix_383 branch July 4, 2019 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants