diff options
author | Roland Levillain <rpl@google.com> | 2018-02-27 17:18:55 +0000 |
---|---|---|
committer | Roland Levillain <rpl@google.com> | 2018-02-27 17:23:42 +0000 |
commit | e45b3b18c97ba00ec2c0b79c9cda9f05799189f3 (patch) | |
tree | 5804de06630ecf7d5fe33f41fd17333410b98010 /compiler/optimizing/graph_visualizer.cc | |
parent | 0bdc1fc702b5c9e45df93f92a052f0c0b1c26733 (diff) |
Fix a dead lock between garbage colletion and sample-based tracing.
We have been observing some rare deadlock in run-test 099-vmdebug
between
- a thread doing garbage collection, which had disabled weak
references access and was trying to (re-)acquire the mutator
lock;
- a sampling profiling thread used in sample-based tracing, which
had acquired the mutator lock exclusively and was blocking on a
condition variable regarding weak references access.
This change prevents garbage collection from occurring when
sampling the thread stacks in order to avoid this deadlock.
Test: for i in $(seq 1 10); do art/test/testrunner/testrunner.py --ndebuggable --debuggable --host --64 --verbose --debug --ndebug --gcstress -t 099-vmdebug; done
Bug: 73624630
Change-Id: I73272c2b1d7aa2554a88bb128d3646193bd1db04
Diffstat (limited to 'compiler/optimizing/graph_visualizer.cc')
0 files changed, 0 insertions, 0 deletions