Upload Kmake

This commit is contained in:
Gorochu
2026-05-26 23:36:42 -07:00
parent ba051b2f74
commit 555ec72358
41615 changed files with 13344630 additions and 1 deletions

View File

@ -0,0 +1,3 @@
# Copyright 2018 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

View File

@ -0,0 +1,183 @@
# Copyright 2018 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Pipeline
Test processors are chained together and communicate with each other by
calling previous/next processor in the chain.
----next_test()----> ----next_test()---->
Proc1 Proc2 Proc3
<---result_for()---- <---result_for()----
For every next_test there is exactly one result_for call.
If processor ignores the test it has to return SkippedResult.
If it created multiple subtests for one test and wants to pass all of them to
the previous processor it can enclose them in GroupedResult.
Subtests
When test processor needs to modify the test or create some variants of the
test it creates subtests and sends them to the next processor.
Each subtest has:
- procid - globally unique id that should contain id of the parent test and
some suffix given by test processor, e.g. its name + subtest type.
- processor - which created it
- origin - pointer to the parent (sub)test
"""
DROP_RESULT = 0
DROP_OUTPUT = 1
DROP_PASS_OUTPUT = 2
DROP_PASS_STDOUT = 3
class TestProc(object):
def __init__(self):
self._prev_proc = None
self._next_proc = None
self._stopped = False
self._requirement = DROP_RESULT
def connect_to(self, next_proc):
"""Puts `next_proc` after itself in the chain."""
next_proc._prev_proc = self
self._next_proc = next_proc
def next_test(self, test):
"""
Method called by previous processor whenever it produces new test.
This method shouldn't be called by anyone except previous processor.
Returns a boolean value to signal whether the test was loaded into the
execution queue successfully or not.
"""
raise NotImplementedError()
def result_for(self, test, result):
"""
Method called by next processor whenever it has result for some test.
This method shouldn't be called by anyone except next processor.
"""
raise NotImplementedError()
def heartbeat(self):
if self._prev_proc:
self._prev_proc.heartbeat()
def stop(self):
if not self._stopped:
self._stopped = True
if self._prev_proc:
self._prev_proc.stop()
if self._next_proc:
self._next_proc.stop()
@property
def is_stopped(self):
return self._stopped
### Communication
def notify_previous(self, event):
self._on_event(event)
if self._prev_proc:
self._prev_proc.notify_previous(event)
def _on_event(self, event):
"""Called when processors to the right signal events, e.g. termination.
Args:
event: A text describing the signalled event.
"""
pass
def _send_test(self, test):
"""Helper method for sending test to the next processor."""
return self._next_proc.next_test(test)
def _send_result(self, test, result):
"""Helper method for sending result to the previous processor."""
self._prev_proc.result_for(test, result)
class TestProcObserver(TestProc):
"""Processor used for observing the data."""
def __init__(self):
super(TestProcObserver, self).__init__()
def next_test(self, test):
self._on_next_test(test)
return self._send_test(test)
def result_for(self, test, result):
self._on_result_for(test, result)
self._send_result(test, result)
def heartbeat(self):
self._on_heartbeat()
super(TestProcObserver, self).heartbeat()
def _on_next_test(self, test):
"""Method called after receiving test from previous processor but before
sending it to the next one."""
pass
def _on_result_for(self, test, result):
"""Method called after receiving result from next processor but before
sending it to the previous one."""
pass
def _on_heartbeat(self):
pass
class TestProcProducer(TestProc):
"""Processor for creating subtests."""
def __init__(self, name):
super(TestProcProducer, self).__init__()
self.name = name
def next_test(self, test):
return self._next_test(test)
def result_for(self, subtest, result):
self._result_for(subtest.origin, subtest, result)
### Implementation
def _next_test(self, test):
raise NotImplementedError()
def _result_for(self, test, subtest, result):
"""
result_for method extended with `subtest` parameter.
Args
test: test used by current processor to create the subtest.
subtest: test for which the `result` is.
result: subtest execution result created by the output processor.
"""
raise NotImplementedError()
def test_suffix(self, test):
"""Default implementation of rdb test id suffix generated by a producer"""
return None
class TestProcFilter(TestProc):
"""Processor for filtering tests."""
def next_test(self, test):
if self._filter(test):
return False
return self._send_test(test)
def result_for(self, test, result):
self._send_result(test, result)
def _filter(self, test):
"""Returns whether test should be filtered out."""
raise NotImplementedError()

View File

@ -0,0 +1,122 @@
# Copyright 2018 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from collections import defaultdict
from . import base
class CombinerProc(base.TestProc):
@staticmethod
def create(options):
if not options.combine_tests:
return None
return CombinerProc(options.fuzzer_rng(), options.combine_min, options.combine_max,
options.tests_count)
def __init__(self, rng, min_group_size, max_group_size, count):
"""
Args:
rng: random number generator
min_group_size: minimum number of tests to combine
max_group_size: maximum number of tests to combine
count: how many tests to generate. 0 means infinite running
"""
super(CombinerProc, self).__init__()
self._requirement = base.DROP_RESULT
self._rng = rng
self._min_size = min_group_size
self._max_size = max_group_size
self._count = count
# Index of the last generated test
self._current_num = 0
# {suite name: instance of TestGroups}
self._groups = defaultdict(TestGroups)
# {suite name: instance of TestCombiner}
self._combiners = {}
def next_test(self, test):
group_key = self._get_group_key(test)
if not group_key:
# Test not suitable for combining
return False
self._groups[test.suite.name].add_test(group_key, test)
return True
def _get_group_key(self, test):
combiner = self._get_combiner(test.suite)
if not combiner:
print ('>>> Warning: There is no combiner for %s testsuite' %
test.suite.name)
return None
return combiner.get_group_key(test)
def result_for(self, test, result):
self._send_next_test()
def generate_initial_tests(self, num=1):
for _ in range(0, num):
self._send_next_test()
def _send_next_test(self):
if self.is_stopped:
return False
if self._count and self._current_num >= self._count:
return False
combined_test = self._create_new_test()
if not combined_test:
# Not enough tests
return False
return self._send_test(combined_test)
def _create_new_test(self):
suite, combiner = self._select_suite()
groups = self._groups[suite]
max_size = self._rng.randint(self._min_size, self._max_size)
sample = groups.sample(self._rng, max_size)
if not sample:
return None
self._current_num += 1
return combiner.combine('%s-%d' % (suite, self._current_num), sample)
def _select_suite(self):
"""Returns pair (suite name, combiner)."""
selected = self._rng.randint(0, len(self._groups) - 1)
for n, suite in enumerate(self._groups):
if n == selected:
return suite, self._combiners[suite]
def _get_combiner(self, suite):
combiner = self._combiners.get(suite.name)
if not combiner:
combiner = suite.get_test_combiner()
self._combiners[suite.name] = combiner
return combiner
class TestGroups(object):
def __init__(self):
self._groups = defaultdict(list)
self._keys = []
def add_test(self, key, test):
self._groups[key].append(test)
self._keys.append(key)
def sample(self, rng, max_size):
# Not enough tests
if not self._groups:
return None
group_key = rng.choice(self._keys)
tests = self._groups[group_key]
return [rng.choice(tests) for _ in range(0, max_size)]

View File

@ -0,0 +1,77 @@
# Copyright 2018 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import collections
from . import base
JobResult = collections.namedtuple('JobResult', ['id', 'result'])
class Job(object):
def __init__(self, test_id, cmd, outproc, keep_output):
self.test_id = test_id
self.cmd = cmd
self.outproc = outproc
self.keep_output = keep_output
def run(self, process_ctx):
output = self.cmd.execute()
reduction = process_ctx.result_reduction if not self.keep_output else None
result = self.outproc.process(output, reduction)
return JobResult(self.test_id, result)
class ExecutionProc(base.TestProc):
"""Last processor in the chain. Instead of passing tests further it creates
commands and output processors, executes them in multiple worker processes and
sends results to the previous processor.
"""
def __init__(self, ctx, jobs, outproc_factory=None):
super(ExecutionProc, self).__init__()
self.ctx = ctx
self.ctx.pool.init(jobs, notify_function=self.notify_previous)
self._outproc_factory = outproc_factory or (lambda t: t.output_proc)
self._tests = {}
def connect_to(self, next_proc):
assert False, \
'ExecutionProc cannot be connected to anything' # pragma: no cover
def run(self, requirement=None):
for pool_result in self.ctx.pool.results(requirement):
self._unpack_result(pool_result)
def next_test(self, test):
if self.is_stopped:
return False
test_id = test.procid
cmd = test.get_command(self.ctx)
self._tests[test_id] = test, cmd
outproc = self._outproc_factory(test)
self.ctx.pool.add_jobs([Job(test_id, cmd, outproc, test.keep_output)])
return True
def result_for(self, test, result):
assert False, \
'ExecutionProc cannot receive results' # pragma: no cover
def stop(self):
super(ExecutionProc, self).stop()
self.ctx.pool.abort()
def _unpack_result(self, pool_result):
if pool_result.heartbeat:
self.heartbeat()
return
job_result = pool_result.value
test_id, result = job_result
test, result.cmd = self._tests[test_id]
del self._tests[test_id]
self._send_result(test, result)

View File

@ -0,0 +1,19 @@
# Copyright 2018 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from . import base
class ExpectationProc(base.TestProcProducer):
"""Test processor passing tests and results through and forgiving timeouts."""
def __init__(self):
super(ExpectationProc, self).__init__('no-timeout')
def _next_test(self, test):
subtest = test.create_subtest(self, 'no_timeout')
subtest.allow_timeouts()
subtest.allow_pass()
return self._send_test(subtest)
def _result_for(self, test, subtest, result):
self._send_result(test, result)

View File

@ -0,0 +1,85 @@
# Copyright 2018 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from collections import defaultdict
import fnmatch
import os
from . import base
class StatusFileFilterProc(base.TestProcFilter):
"""Filters tests by outcomes from status file.
Status file has to be loaded before using this function.
Args:
slow_tests_mode: What to do with slow tests.
pass_fail_tests_mode: What to do with pass or fail tests.
Mode options:
None (default): don't skip
"skip": skip if slow/pass_fail
"run": skip if not slow/pass_fail
"""
def __init__(self, slow_tests_mode, pass_fail_tests_mode):
super(StatusFileFilterProc, self).__init__()
self._slow_tests_mode = slow_tests_mode
self._pass_fail_tests_mode = pass_fail_tests_mode
def _filter(self, test):
return (
test.do_skip or
self._skip_slow(test.is_slow) or
self._skip_pass_fail(test.is_pass_or_fail)
)
def _skip_slow(self, is_slow):
return (
(self._slow_tests_mode == 'run' and not is_slow) or
(self._slow_tests_mode == 'skip' and is_slow)
)
def _skip_pass_fail(self, is_pass_fail):
return (
(self._pass_fail_tests_mode == 'run' and not is_pass_fail) or
(self._pass_fail_tests_mode == 'skip' and is_pass_fail)
)
class NameFilterProc(base.TestProcFilter):
"""Filters tests based on command-line arguments.
args can be a glob: asterisks in any position of the name
represent zero or more characters. Without asterisks, only exact matches
will be used with the exeption of the test-suite name as argument.
"""
def __init__(self, args):
super(NameFilterProc, self).__init__()
self._globs = defaultdict(list)
self._exact_matches = defaultdict(dict)
for a in args:
argpath = a.split('/')
suitename = argpath[0]
path = '/'.join(argpath[1:]) or '*'
if '*' in path:
self._globs[suitename].append(path)
else:
self._exact_matches[suitename][path] = True
for s, globs in list(self._globs.items()):
if not globs or '*' in globs:
self._globs[s] = ['*']
def _filter(self, test):
globs = self._globs.get(test.suite.name, [])
for g in globs:
if g == '*': return False
if fnmatch.fnmatch(test.name, g):
return False
exact_matches = self._exact_matches.get(test.suite.name, {})
return test.name not in exact_matches

View File

@ -0,0 +1,421 @@
# Copyright 2018 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from . import base
# Extra flags randomly added to all fuzz tests with numfuzz. List of tuples
# (probability, flag).
EXTRA_FLAGS = [
(0.1, '--always-turbofan'),
(0.1, '--assert-types'),
(0.1, '--cache=code'),
(0.1, '--force-slow-path'),
(0.2, '--future'),
(0.5, '--harmony'),
# TODO(v8:13524): Enable when issue is fixed
# TODO(v8:13528): Enable when issue is fixed
# (0.1, '--harmony-struct'),
(0.1, '--jit-fuzzing'),
(0.5, '--js-staging'),
(0.1, '--liftoff'),
(0.1, '--maglev'),
(0.1, '--maglev-future'),
(0.1, '--minor-ms'),
(0.2, '--no-analyze-environment-liveness'),
# TODO(machenbach): Enable when it doesn't collide with crashing on missing
# simd features.
#(0.1, '--no-enable-sse3'),
#(0.1, '--no-enable-ssse3'),
#(0.1, '--no-enable-sse4_1'),
(0.1, '--no-enable-sse4_2'),
(0.1, '--no-enable-sahf'),
(0.1, '--no-enable-avx'),
(0.1, '--no-enable-fma3'),
(0.1, '--no-enable-bmi1'),
(0.1, '--no-enable-bmi2'),
(0.1, '--no-enable-lzcnt'),
(0.1, '--no-enable-popcnt'),
(0.3, '--no-lazy-feedback-allocation'),
(0.1, '--no-liftoff'),
(0.1, '--no-turbofan'),
(0.1, '--no-wasm-tier-up'),
(0.5, '--optimize-on-next-call-optimizes-to-maglev'),
(0.1, '--regexp-interpret-all'),
(0.1, '--regexp-tier-up-ticks=0'),
(0.1, '--regexp-tier-up-ticks=10'),
(0.1, '--regexp-tier-up-ticks=100'),
(0.1, '--shared-string-table'),
(0.1, '--shared-heap'),
(0.1, '--stress-background-compile'),
(0.1, '--stress-flush-code'),
(0.1, '--stress-lazy-source-positions'),
(0.1, '--stress-maglev'),
(0.1, '--stress-wasm-code-gc'),
(0.2, '--turboshaft'),
(0.1, '--turbolev'),
(0.1, '--turbo-instruction-scheduling'),
(0.1, '--turbo-stress-instruction-scheduling'),
(0.1, '--stress-wasm-memory-moving'),
(0.1, '--stress-scavenger-conservative-object-pinning-random'),
(0.1, '--precise-object-pinning'),
(0.25, '--wasm-staging'),
(0.1, '--ephemeron-fixpoint-iterations=0'),
]
MIN_DEOPT = 1
MAX_DEOPT = 10**9
ANALYSIS_SUFFIX = 'analysis'
def random_extra_flags(rng):
"""Returns a random list of flags chosen from the configurations in
EXTRA_FLAGS.
"""
return [flag for prob, flag in EXTRA_FLAGS if rng.random() < prob]
def _flag_prefix(flag):
"""Returns the flag part before an equal sign."""
if '=' not in flag:
return flag
else:
return flag[0:flag.index('=')]
def _invert_flag(flag):
"""Flips a --flag and its --no-flag counterpart."""
assert flag.startswith('--')
if flag.startswith('--no-'):
return '--' + flag[len('--no-'):]
else:
return '--no-' + flag[2:]
def _drop_contradictory_flags(new_flags, existing_flags):
"""Drops flags that have a simple contradiction with an existing flag.
Contradictions checked for:
- Repetition: --flag --flag
- Repetition with param: --flag=foo --flag=bar
- Negation: --flag --no-flag
- Inverse negation: --no-flag --flag
- For simplicity also drops combinations of negation and param, which don't
occur in practice.
Args:
new_flags: new flags to filter from
existing_flags: existing flags checked against
Returns: A list of flags without contradictions.
"""
existing_flag_prefixes = set(_flag_prefix(flag) for flag in existing_flags)
def contradictory_flag(flag):
flag_prefix = _flag_prefix(flag)
return (flag_prefix in existing_flag_prefixes or
_invert_flag(flag_prefix) in existing_flag_prefixes)
return [flag for flag in new_flags if not contradictory_flag(flag)]
class FuzzerConfig(object):
def __init__(self, probability, analyzer, fuzzer):
"""
Args:
probability: of choosing this fuzzer (0; 10]
analyzer: instance of Analyzer class, can be None if no analysis is needed
fuzzer: instance of Fuzzer class
"""
assert probability > 0 and probability <= 10
self.probability = probability
self.analyzer = analyzer
self.fuzzer = fuzzer
class Analyzer(object):
def get_analysis_flags(self):
raise NotImplementedError()
def do_analysis(self, result):
raise NotImplementedError()
class Fuzzer(object):
def create_flags_generator(self, rng, test, analysis_value):
"""
Args:
rng: random number generator
test: test for which to create flags
analysis_value: value returned by the analyzer. None if there is no
corresponding analyzer to this fuzzer or the analysis phase is disabled
"""
raise NotImplementedError()
# TODO(majeski): Allow multiple subtests to run at once.
class FuzzerProc(base.TestProcProducer):
@staticmethod
def create(options):
return FuzzerProc(
options.fuzzer_rng(),
options.fuzzer_tests_count(),
options.fuzzer_configs(),
options.combine_tests,
)
def __init__(self, rng, count, fuzzers, disable_analysis=False):
"""
Args:
rng: random number generator used to select flags and values for them
count: number of tests to generate based on each base test
fuzzers: list of FuzzerConfig instances
disable_analysis: disable analysis phase and filtering base on it. When
set, processor passes None as analysis result to fuzzers
"""
super(FuzzerProc, self).__init__('Fuzzer')
self._rng = rng
self._count = count
self._fuzzer_configs = fuzzers
self._disable_analysis = disable_analysis
self._gens = {}
def test_suffix(self, test):
return test.subtest_id
def _next_test(self, test):
if self.is_stopped:
return False
analysis_subtest = self._create_analysis_subtest(test)
if analysis_subtest:
return self._send_test(analysis_subtest)
self._gens[test.procid] = self._create_gen(test)
return self._try_send_next_test(test)
def _create_analysis_subtest(self, test):
if self._disable_analysis:
return None
analysis_flags = []
for fuzzer_config in self._fuzzer_configs:
if fuzzer_config.analyzer:
analysis_flags += fuzzer_config.analyzer.get_analysis_flags()
if analysis_flags:
analysis_flags = list(set(analysis_flags))
return test.create_subtest(
self, ANALYSIS_SUFFIX, flags=analysis_flags, keep_output=True)
def _result_for(self, test, subtest, result):
if not self._disable_analysis:
if result is not None and subtest.procid.endswith(
f'{self.name}-{ANALYSIS_SUFFIX}'):
# Analysis phase, for fuzzing we drop the result.
if result.has_unexpected_output:
self._send_result(test, None)
return
self._gens[test.procid] = self._create_gen(test, result)
self._try_send_next_test(test)
def _create_gen(self, test, analysis_result=None):
# It will be called with analysis_result==None only when there is no
# analysis phase at all, so no fuzzer has it's own analyzer.
gens = []
indexes = []
for fuzzer_config in self._fuzzer_configs:
analysis_value = None
if analysis_result and fuzzer_config.analyzer:
analysis_value = fuzzer_config.analyzer.do_analysis(analysis_result)
if not analysis_value:
# Skip fuzzer for this test since it doesn't have analysis data
continue
p = fuzzer_config.probability
flag_gen = fuzzer_config.fuzzer.create_flags_generator(self._rng, test,
analysis_value)
indexes += [len(gens)] * p
gens.append((p, flag_gen))
if not gens:
# No fuzzers for this test, skip it
return
i = 0
while not self._count or i < self._count:
main_index = self._rng.choice(indexes)
_, main_gen = gens[main_index]
flags = random_extra_flags(self._rng) + next(main_gen)
for index, (p, gen) in enumerate(gens):
if index == main_index:
continue
if self._rng.randint(1, 10) <= p:
flags += next(gen)
flags.append('--fuzzer-random-seed=%s' % self._next_seed())
flags = _drop_contradictory_flags(flags, test.get_flags())
yield test.create_subtest(self, str(i), flags=flags)
i += 1
def _try_send_next_test(self, test):
for subtest in self._gens[test.procid]:
if self._send_test(subtest):
return True
elif self.is_stopped:
return False
del self._gens[test.procid]
return False
def _next_seed(self):
seed = None
while not seed:
seed = self._rng.randint(-2147483648, 2147483647)
return seed
class ScavengeAnalyzer(Analyzer):
def get_analysis_flags(self):
return ['--fuzzer-gc-analysis']
def do_analysis(self, result):
for line in reversed(result.output.stdout.splitlines()):
if line.startswith('### Maximum new space size reached = '):
return int(float(line.split()[7]))
class ScavengeFuzzer(Fuzzer):
def create_flags_generator(self, rng, test, analysis_value):
while True:
yield ['--stress-scavenge=%d' % (analysis_value or 100)]
class MarkingAnalyzer(Analyzer):
def get_analysis_flags(self):
return ['--fuzzer-gc-analysis']
def do_analysis(self, result):
for line in reversed(result.output.stdout.splitlines()):
if line.startswith('### Maximum marking limit reached = '):
return int(float(line.split()[6]))
class MarkingFuzzer(Fuzzer):
def create_flags_generator(self, rng, test, analysis_value):
while True:
yield ['--stress-marking=%d' % (analysis_value or 100)]
class GcIntervalAnalyzer(Analyzer):
def get_analysis_flags(self):
return ['--fuzzer-gc-analysis']
def do_analysis(self, result):
for line in reversed(result.output.stdout.splitlines()):
if line.startswith('### Allocations = '):
return int(float(line.split()[3][:-1]))
class GcIntervalFuzzer(Fuzzer):
def create_flags_generator(self, rng, test, analysis_value):
if analysis_value:
value = analysis_value // 10
else:
value = 10000
while True:
yield ['--random-gc-interval=%d' % value]
class CompactionFuzzer(Fuzzer):
def create_flags_generator(self, rng, test, analysis_value):
while True:
yield ['--stress-compaction-random']
class InterruptBudgetFuzzer(Fuzzer):
def create_flags_generator(self, rng, test, analysis_value):
while True:
# Half with, half without lazy feedback allocation. The first flag
# overwrites potential flag negations from the extra flags list.
flag1 = rng.choice(
['--lazy-feedback-allocation', '--no-lazy-feedback-allocation'])
flag2 = '--invocation-count-for-turbofan=%d' % rng.randint(0, 240)
flag3 = '--invocation-count-for-maglev=%d' % rng.randint(0, 120)
flag4 = '--invocation-count-for-feedback-allocation=%d' % rng.randint(
0, 8)
yield [flag1, flag2, flag3, flag4]
class StackSizeFuzzer(Fuzzer):
def create_flags_generator(self, rng, test, analysis_value):
while True:
yield ['--stack-size=%d' % rng.randint(54, 983)]
class TaskDelayFuzzer(Fuzzer):
def create_flags_generator(self, rng, test, analysis_value):
while True:
yield ['--stress-delay-tasks']
class ThreadPoolSizeFuzzer(Fuzzer):
def create_flags_generator(self, rng, test, analysis_value):
while True:
yield ['--thread-pool-size=%d' % rng.randint(1, 8)]
class DeoptAnalyzer(Analyzer):
def get_analysis_flags(self):
return ['--deopt-every-n-times=%d' % MAX_DEOPT,
'--print-deopt-stress']
def do_analysis(self, result):
for line in reversed(result.output.stdout.splitlines()):
if line.startswith('=== Stress deopt counter: '):
counter = MAX_DEOPT - int(line.split(' ')[-1])
if counter < MIN_DEOPT:
# Skip this test since we won't generate any meaningful interval with
# given minimum.
return None
return counter
class DeoptFuzzer(Fuzzer):
def create_flags_generator(self, rng, test, analysis_value):
while True:
if analysis_value:
value = analysis_value // 2
else:
value = 10000
interval = rng.randint(MIN_DEOPT, max(value, MIN_DEOPT))
yield ['--deopt-every-n-times=%d' % interval]
FUZZERS = {
'compaction': (None, CompactionFuzzer),
'delay': (None, TaskDelayFuzzer),
'deopt': (DeoptAnalyzer, DeoptFuzzer),
'gc_interval': (GcIntervalAnalyzer, GcIntervalFuzzer),
'interrupt': (None, InterruptBudgetFuzzer),
'marking': (MarkingAnalyzer, MarkingFuzzer),
'scavenge': (ScavengeAnalyzer, ScavengeFuzzer),
'stack': (None, StackSizeFuzzer),
'threads': (None, ThreadPoolSizeFuzzer),
}
def create_fuzzer_config(name, probability, *args, **kwargs):
analyzer_class, fuzzer_class = FUZZERS[name]
return FuzzerConfig(
probability,
analyzer_class(*args, **kwargs) if analyzer_class else None,
fuzzer_class(*args, **kwargs),
)

View File

@ -0,0 +1,51 @@
#!/usr/bin/env python3
# Copyright 2022 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Test functionality used by the fuzzer test processor.
"""
import os
import sys
import unittest
# Needed because the test runner contains relative imports.
TOOLS_PATH = os.path.dirname(
os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
sys.path.append(TOOLS_PATH)
from testrunner.testproc import fuzzer
class TestFuzzerProcHelpers(unittest.TestCase):
def test_invert_flag(self):
self.assertEqual(fuzzer._invert_flag('--no-flag'), '--flag')
self.assertEqual(fuzzer._invert_flag('--flag'), '--no-flag')
def test_flag_prefix(self):
self.assertEqual(fuzzer._flag_prefix('--flag'), '--flag')
self.assertEqual(fuzzer._flag_prefix('--flag=42'), '--flag')
def test_contradictory_flags(self):
def check(new_flags, old_flags, expected_flags):
actual = fuzzer._drop_contradictory_flags(new_flags, old_flags)
self.assertEqual(actual, expected_flags)
old_flags = ['--foo-bar', '--no-bar', '--baz', '--doom-melon=42', '--flag']
check([], old_flags, [])
check(['--flag', '--no-baz', '--bar'], old_flags, [])
check(['--foo-bar=42', '--doom-melon=0'], old_flags, [])
check(['--flag', '--something', '--bar'], old_flags, ['--something'])
check(['--something', '--doom-melon=0'], old_flags, ['--something'])
check(old_flags, old_flags, [])
check(['--a', '--b'], old_flags, ['--a', '--b'])
old_flags = []
check(['--flag', '--no-baz'], old_flags, ['--flag', '--no-baz'])
if __name__ == '__main__':
unittest.main()

View File

@ -0,0 +1,479 @@
# Copyright 2022 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import datetime
import json
import logging
import platform
import sys
import time
from . import base
from . import util
from .stack_utils import stack_analyzer_util
TRACK_N_HEAVY_TESTS = 20
def print_failure_header(test, is_flaky=False):
text = [test.full_name]
if test.output_proc.negative:
text.append('[negative]')
if is_flaky:
text.append('(flaky)')
output = '=== %s ===' % ' '.join(text)
encoding = sys.stdout.encoding or 'utf-8'
print(output.encode(encoding, errors='replace').decode(encoding))
def formatted_result_output(result, relative=False):
lines = []
if result.output.stderr:
lines.append("--- stderr ---")
lines.append(result.output.stderr.strip())
if result.output.stdout:
lines.append("--- stdout ---")
lines.append(result.output.stdout.strip())
lines.append("Command: %s" % result.cmd.to_string(relative))
if result.output.HasCrashed():
lines.append("exit code: %s" % result.output.exit_code_string)
lines.append("--- CRASHED ---")
if result.output.HasTimedOut():
lines.append("--- TIMEOUT ---")
return '\n'.join(lines)
class ProgressIndicator():
def __init__(self, context, options, test_count):
self.options = None
self.options = options
self._total = test_count
self.context = context
def on_test_result(self, test, result):
pass
def finished(self):
pass
def on_heartbeat(self):
pass
def on_event(self, event):
pass
class SimpleProgressIndicator(ProgressIndicator):
def __init__(self, context, options, test_count):
super(SimpleProgressIndicator, self).__init__(context, options, test_count)
self._requirement = base.DROP_PASS_OUTPUT
self._failed = []
def on_test_result(self, test, result):
# TODO(majeski): Support for dummy/grouped results
if result.has_unexpected_output:
self._failed.append((test, result, False))
elif result.is_rerun:
# Print only the first result of a flaky failure that was rerun.
self._failed.append((test, result.results[0], True))
def finished(self):
crashed = 0
flaky = 0
print()
for test, result, is_flaky in self._failed:
flaky += int(is_flaky)
print_failure_header(test, is_flaky=is_flaky)
print(formatted_result_output(result))
if len(self._failed) == 0:
print("===")
print("=== All tests succeeded")
print("===")
else:
print()
print("===")
print("=== %d tests failed" % len(self._failed))
if flaky > 0:
print("=== %d tests were flaky" % flaky)
if crashed > 0:
print("=== %d tests CRASHED" % crashed)
print("===")
class StreamProgressIndicator(ProgressIndicator):
def __init__(self, context, options, test_count):
super(StreamProgressIndicator, self).__init__(context, options, test_count)
self._requirement = base.DROP_PASS_OUTPUT
def on_test_result(self, test, result):
if not result.has_unexpected_output:
self.print('PASS', test)
elif result.output.HasCrashed():
self.print("CRASH", test)
elif result.output.HasTimedOut():
self.print("TIMEOUT", test)
else:
if test.is_fail:
self.print("UNEXPECTED PASS", test)
else:
self.print("FAIL", test)
def print(self, prefix, test):
print('%s: %ss' % (prefix, test))
sys.stdout.flush()
class VerboseProgressIndicator(SimpleProgressIndicator):
def __init__(self, context, options, test_count):
super(VerboseProgressIndicator, self).__init__(context, options, test_count)
self._last_printed_time = time.time()
def _print(self, text):
encoding = sys.stdout.encoding or 'utf-8'
print(text.encode(encoding, errors='replace').decode(encoding))
sys.stdout.flush()
self._last_printed_time = time.time()
def _message(self, test, result):
return '%s %s: %s' % (test, test.variant or 'default', result.status())
def on_test_result(self, test, result):
super(VerboseProgressIndicator, self).on_test_result(test, result)
self._print(self._message(test, result))
# TODO(machenbach): Remove this platform specific hack and implement a proper
# feedback channel from the workers, providing which tests are currently run.
def _log_processes(self):
procs = self.context.list_processes()
if procs:
logging.info('List of processes:')
for pid, cmd in self.context.list_processes():
# Show command with pid, but other process info cut off.
logging.info('pid: %d cmd: %s', pid, cmd)
def _ensure_delay(self, delay):
return time.time() - self._last_printed_time > delay
def on_heartbeat(self):
if self._ensure_delay(30):
# Print something every 30 seconds to not get killed by an output
# timeout.
self._print('Still working...')
self._log_processes()
def on_event(self, event):
logging.info(event)
self._log_processes()
class CIProgressIndicator(VerboseProgressIndicator):
def on_test_result(self, context, test, result):
super(VerboseProgressIndicator, self).on_test_result(context, test, result)
if self.options.ci_test_completion:
with open(self.options.ci_test_completion, "a") as f:
f.write(self._message(test, result) + "\n")
self._output_feedback()
def _output_feedback(self):
"""Reduced the verbosity leads to getting killed by an ouput timeout.
We ensure output every minute.
"""
if self._ensure_delay(60):
dt = time.time()
st = datetime.datetime.fromtimestamp(dt).strftime('%Y-%m-%d %H:%M:%S')
self._print(st)
class DotsProgressIndicator(SimpleProgressIndicator):
def __init__(self, context, options, test_count):
super(DotsProgressIndicator, self).__init__(context, options, test_count)
self._count = 0
def on_test_result(self, test, result):
super(DotsProgressIndicator, self).on_test_result(test, result)
# TODO(majeski): Support for dummy/grouped results
self._count += 1
if self._count > 1 and self._count % 50 == 1:
sys.stdout.write('\n')
if result.has_unexpected_output:
if result.output.HasCrashed():
sys.stdout.write('C')
sys.stdout.flush()
elif result.output.HasTimedOut():
sys.stdout.write('T')
sys.stdout.flush()
else:
sys.stdout.write('F')
sys.stdout.flush()
else:
sys.stdout.write('.')
sys.stdout.flush()
class CompactProgressIndicator(ProgressIndicator):
def __init__(self, context, options, test_count, templates):
super(CompactProgressIndicator, self).__init__(context, options, test_count)
self._requirement = base.DROP_PASS_OUTPUT
self._templates = templates
self._last_status_length = 0
self._start_time = time.time()
self._passed = 0
self._failed = 0
def on_test_result(self, test, result):
# TODO(majeski): Support for dummy/grouped results
if result.has_unexpected_output:
self._failed += 1
else:
self._passed += 1
self._print_progress(test.full_name)
if result.has_unexpected_output:
output = result.output
stdout = output.stdout.strip()
stderr = output.stderr.strip()
self._clear_line(self._last_status_length)
print_failure_header(test)
if len(stdout):
self.printFormatted('stdout', stdout)
if len(stderr):
self.printFormatted('stderr', stderr)
if result.error_details:
self.printFormatted('failure', result.error_details)
self.printFormatted('command',
"Command: %s" % result.cmd.to_string(relative=True))
if output.HasCrashed():
self.printFormatted('failure',
"exit code: %s" % output.exit_code_string)
self.printFormatted('failure', "--- CRASHED ---")
elif output.HasTimedOut():
self.printFormatted('failure', "--- TIMEOUT ---")
else:
if test.is_fail:
self.printFormatted('failure', "--- UNEXPECTED PASS ---")
if test.expected_failure_reason is not None:
self.printFormatted('failure', test.expected_failure_reason)
else:
self.printFormatted('failure', "--- FAILED ---")
def finished(self):
self._print_progress('Done')
print()
def _print_progress(self, name):
self._clear_line(self._last_status_length)
elapsed = time.time() - self._start_time
if self._total:
progress = (self._passed + self._failed) * 100 // self._total
else:
progress = 0
status = self._templates['status_line'] % {
'passed': self._passed,
'progress': progress,
'failed': self._failed,
'test': name,
'mins': int(elapsed) // 60,
'secs': int(elapsed) % 60
}
status = self._truncateStatusLine(status, 78)
self._last_status_length = len(status)
print(status, end='')
sys.stdout.flush()
def _truncateStatusLine(self, string, length):
if length and len(string) > (length - 3):
return string[:(length - 3)] + "..."
else:
return string
def _clear_line(self, last_length):
raise NotImplementedError()
class ColorProgressIndicator(CompactProgressIndicator):
def __init__(self, context, options, test_count):
templates = {
'status_line': ("[%(mins)02i:%(secs)02i|"
"\033[34m%%%(progress) 4d\033[0m|"
"\033[32m+%(passed) 4d\033[0m|"
"\033[31m-%(failed) 4d\033[0m]: %(test)s"),
'stdout': "\033[1m%s\033[0m",
'stderr': "\033[31m%s\033[0m",
'failure': "\033[1;31m%s\033[0m",
'command': "\033[33m%s\033[0m",
}
super(ColorProgressIndicator, self).__init__(context, options, test_count,
templates)
def printFormatted(self, format, string):
print(self._templates[format] % string)
def _truncateStatusLine(self, string, length):
# Add some slack for the color control chars
return super(ColorProgressIndicator,
self)._truncateStatusLine(string, length + 3 * 9)
def _clear_line(self, last_length):
print("\033[1K\r", end='')
class MonochromeProgressIndicator(CompactProgressIndicator):
def __init__(self, context, options, test_count):
templates = {
'status_line': ("[%(mins)02i:%(secs)02i|%%%(progress) 4d|"
"+%(passed) 4d|-%(failed) 4d]: %(test)s"),
}
super(MonochromeProgressIndicator, self).__init__(context, options,
test_count, templates)
def printFormatted(self, format, string):
print(string)
def _clear_line(self, last_length):
print(("\r" + (" " * last_length) + "\r"), end='')
class JsonTestProgressIndicator(ProgressIndicator):
def __init__(self, context, options, test_count):
super(JsonTestProgressIndicator, self).__init__(context, options,
test_count)
self.slowest_tests = util.FixedSizeTopList(
self.options.slow_tests_cutoff, key=lambda rec: rec['duration'])
self.max_rss_tests = util.FixedSizeTopList(
TRACK_N_HEAVY_TESTS, key=lambda rec: rec['max_rss'])
self.max_vms_tests = util.FixedSizeTopList(
TRACK_N_HEAVY_TESTS, key=lambda rec: rec['max_vms'])
# We want to drop stdout/err for all passed tests on the first try, but we
# need to get outputs for all runs after the first one. To accommodate that,
# reruns are set to keep the result no matter what requirement says, i.e.
# keep_output set to True in the RerunProc.
self._requirement = base.DROP_PASS_STDOUT
self.results = []
self.duration_sum = 0
self.test_count = 0
self.stack_parser = stack_analyzer_util.create_stack_parser()
def on_test_result(self, test, result):
self.process_results(test, result.as_list)
def process_results(self, test, results):
for run, result in enumerate(results):
# TODO(majeski): Support for dummy/grouped results
output = result.output
self._buffer_top_tests(test, result, output, run)
# Omit tests that run as expected on the first try.
# Everything that happens after the first run is included in the output
# even if it flakily passes.
if not result.has_unexpected_output and run == 0:
continue
record = self._test_record(test, result, run)
record.update({
"result": test.output_proc.get_outcome(output),
"stdout": output.stdout,
"stderr": output.stderr,
"error_details": result.error_details,
})
record.update(self.stack_parser.analyze_crash(output.stderr))
self.results.append(record)
def _buffer_top_tests(self, test, result, output, run):
def result_value(test, result, output):
if not result.has_unexpected_output:
return ""
return test.output_proc.get_outcome(output)
record = self._test_record(test, result, run)
record.update(
result=result_value(test, result, output),
marked_slow=test.is_slow,
marked_heavy=test.is_heavy,
)
self.slowest_tests.add(record)
self.max_rss_tests.add(record)
self.max_vms_tests.add(record)
self.duration_sum += record['duration']
self.test_count += 1
def _test_record(self, test, result, run):
record = util.base_test_record(test, result, run)
record.update(
command=result.cmd.to_string(relative=True),
)
return record
def finished(self):
duration_mean = None
if self.test_count:
duration_mean = self.duration_sum / self.test_count
result = {
'results': self.results,
'max_rss_tests': self.max_rss_tests.as_list(),
'max_vms_tests': self.max_vms_tests.as_list(),
'slowest_tests': self.slowest_tests.as_list(),
'duration_mean': duration_mean,
'test_total': self.test_count,
}
with open(self.options.json_test_results, "w") as f:
json.dump(result, f)
class TestScheduleIndicator(ProgressIndicator):
"""Indicator the logs the start:end interval as timestamps for each
executed test. Reruns and variants are accounted for separately.
"""
def __init__(self, context, options, test_count):
super(TestScheduleIndicator, self).__init__(
context, options, test_count)
self._requirement = base.DROP_PASS_STDOUT
self.handle = open(self.options.log_test_schedule, 'w')
def on_test_result(self, test, result):
encoding = sys.stdout.encoding or 'utf-8'
for r in result.as_list:
# TODO(v8-infra): Ideally the full_name should already be encoded
# correctly. This takes care of one test with unicode characters in
# the file name.
name = test.full_name.encode(encoding, errors='replace').decode(encoding)
print(f'{name} {test.variant or "default"}: {r.status()} '
f'({r.output.start_time}:{r.output.end_time})',
file=self.handle)
def finished(self):
self.handle.close()
PROGRESS_INDICATORS = {
'verbose': VerboseProgressIndicator,
'ci': CIProgressIndicator,
'dots': DotsProgressIndicator,
'color': ColorProgressIndicator,
'mono': MonochromeProgressIndicator,
'stream': StreamProgressIndicator,
}

View File

@ -0,0 +1,36 @@
# Copyright 2018 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from . import base
class LoadProc(base.TestProc):
"""First processor in the chain that passes all tests to the next processor.
"""
def __init__(self, tests, initial_batch_size=float('inf')):
super(LoadProc, self).__init__()
self.tests = tests
self.initial_batch_size = initial_batch_size
def load_initial_tests(self):
"""Send an initial batch of tests down to executor"""
if not self.initial_batch_size:
return
to_load = self.initial_batch_size
for t in self.tests:
if self._send_test(t):
to_load -= 1
if not to_load:
break
def next_test(self, test):
assert False, \
'Nothing can be connected to the LoadProc' # pragma: no cover
def result_for(self, test, result):
for t in self.tests:
if self._send_test(t):
break

View File

@ -0,0 +1,75 @@
#!/usr/bin/env python3
# Copyright 2022 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
import sys
import unittest
from unittest.mock import patch
from contextlib import contextmanager
TOOLS_PATH = os.path.dirname(
os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
sys.path.append(TOOLS_PATH)
from testrunner.testproc.loader import LoadProc
class LoadProcTest(unittest.TestCase):
# TODO(liviurau): test interaction between load_initialtests and results_for.
def setUp(self):
self.loader = LoadProc(iter(range(4)), 2)
@contextmanager
def send_test_return_values(self, l):
def do_pop(*args):
return l.pop()
with patch(
'testrunner.testproc.loader.LoadProc._send_test', side_effect=do_pop):
yield
def test_react_to_2_results(self):
with self.send_test_return_values([True] * 2):
self.loader.result_for(None, None)
self.loader.result_for(None, None)
self.assertEqual(2, next(self.loader.tests))
def test_react_to_result_but_fail_to_send(self):
with self.send_test_return_values([False] * 4):
self.loader.result_for(None, None)
self.assertEqual("empty", next(self.loader.tests, "empty"))
def test_init(self):
with self.send_test_return_values([True] * 4):
self.loader.load_initial_tests()
self.assertEqual(2, next(self.loader.tests))
def test_init_fully_filtered(self):
with self.send_test_return_values([False] * 4):
self.loader.load_initial_tests()
self.assertEqual("empty", next(self.loader.tests, "empty"))
def test_init_filter_1(self):
with self.send_test_return_values([True, False, True]):
self.loader.load_initial_tests()
self.assertEqual(3, next(self.loader.tests))
def test_init_infinity(self):
self.loader = LoadProc(iter(range(500)))
with self.send_test_return_values(([False] * 100) + ([True] * 400)):
self.loader.load_initial_tests()
self.assertEqual("empty", next(self.loader.tests, "empty"))
def test_init_0(self):
self.loader = LoadProc(iter(range(10)), 0)
with self.send_test_return_values([]): # _send_test never gets called
self.loader.load_initial_tests()
self.assertEqual(0, next(self.loader.tests))
if __name__ == '__main__':
unittest.main()

View File

@ -0,0 +1,94 @@
# Copyright 2018 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from . import base
from testrunner.local import utils
from testrunner.testproc.indicators import (
JsonTestProgressIndicator, TestScheduleIndicator, PROGRESS_INDICATORS)
from testrunner.testproc.resultdb import rdb_sink, ResultDBIndicator
class ResultsTracker(base.TestProcObserver):
@staticmethod
def create(options):
return ResultsTracker(options.exit_after_n_failures)
"""Tracks number of results and stops to run tests if max_failures reached."""
def __init__(self, max_failures):
super(ResultsTracker, self).__init__()
self._requirement = base.DROP_OUTPUT
self.failed = 0
self.remaining = 0
self.total = 0
self.max_failures = max_failures
def _on_next_test(self, test):
self.total += 1
self.remaining += 1
def _on_result_for(self, test, result):
self.remaining -= 1
# Count failures - treat flakes as failures, too.
if result.has_unexpected_output or result.is_rerun:
self.failed += 1
if self.max_failures and self.failed >= self.max_failures:
print('>>> Too many failures, exiting...')
self.stop()
def standard_show(self, tests):
if tests.test_count_estimate:
percentage = float(self.total) / tests.test_count_estimate * 100
else:
percentage = 0
print(('>>> %d base tests produced %d (%d%s)'
' non-filtered tests') %
(tests.test_count_estimate, self.total, percentage, '%'))
print('>>> %d tests ran' % (self.total - self.remaining))
def exit_code(self):
exit_code = utils.EXIT_CODE_PASS
if self.failed:
exit_code = utils.EXIT_CODE_FAILURES
if not self.total:
exit_code = utils.EXIT_CODE_NO_TESTS
return exit_code
class ProgressProc(base.TestProcObserver):
def __init__(self, context, options, test_count):
super(ProgressProc, self).__init__()
self.procs = [
PROGRESS_INDICATORS[options.progress](context, options, test_count)
]
if options.log_test_schedule:
self.procs.insert(
0,
TestScheduleIndicator(context, options, test_count))
if options.json_test_results:
self.procs.insert(
0,
JsonTestProgressIndicator(context, options, test_count))
sink = rdb_sink()
if sink:
self.procs.append(ResultDBIndicator(context, options, test_count, sink))
self._requirement = max(proc._requirement for proc in self.procs)
def _on_result_for(self, test, result):
for proc in self.procs:
proc.on_test_result(test, result)
def finished(self):
for proc in self.procs:
proc.finished()
def _on_heartbeat(self):
for proc in self.procs:
proc.on_heartbeat()
def _on_event(self, event):
for proc in self.procs:
proc.on_event(event)

View File

@ -0,0 +1,66 @@
# Copyright 2018 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import collections
from . import base
from .result import RerunResult
class RerunProc(base.TestProcProducer):
@staticmethod
def create(options):
if not options.rerun_failures_count:
return None
return RerunProc(options.rerun_failures_count,
options.rerun_failures_max)
def __init__(self, rerun_max, rerun_max_total=None):
super(RerunProc, self).__init__('Rerun')
self._requirement = base.DROP_OUTPUT
self._rerun = {}
self._results = collections.defaultdict(list)
self._rerun_max = rerun_max
self._rerun_total_left = rerun_max_total
def _next_test(self, test):
return self._send_next_subtest(test)
def _result_for(self, test, subtest, result):
# First result
if subtest.procid[-2:] == '-1':
# Passed, no reruns
if not result.has_unexpected_output:
self._send_result(test, result)
return
self._rerun[test.procid] = 0
results = self._results[test.procid]
results.append(result)
if not self.is_stopped and self._needs_rerun(test, result):
self._rerun[test.procid] += 1
if self._rerun_total_left is not None:
self._rerun_total_left -= 1
self._send_next_subtest(test, self._rerun[test.procid])
else:
result = RerunResult.create(results)
self._finalize_test(test)
self._send_result(test, result)
def _needs_rerun(self, test, result):
# TODO(majeski): Limit reruns count for slow tests.
return ((self._rerun_total_left is None or self._rerun_total_left > 0) and
self._rerun[test.procid] < self._rerun_max and
result.has_unexpected_output)
def _send_next_subtest(self, test, run=0):
subtest = test.create_subtest(self, str(run + 1), keep_output=(run != 0))
return self._send_test(subtest)
def _finalize_test(self, test):
del self._rerun[test.procid]
del self._results[test.procid]

View File

@ -0,0 +1,124 @@
# Copyright 2018 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
class ResultBase(object):
@property
def is_skipped(self):
return False
@property
def is_grouped(self):
return False
@property
def is_rerun(self):
return False
@property
def as_list(self):
return [self]
class Result(ResultBase):
"""Result created by the output processor."""
def __init__(self,
has_unexpected_output,
output,
cmd=None,
error_details=None):
self.has_unexpected_output = has_unexpected_output
self.output = output
self.cmd = cmd
self.error_details = error_details
def status(self):
if self.has_unexpected_output:
if not hasattr(self.output, "HasCrashed"):
raise Exception(type(self))
if self.output.HasCrashed():
return 'CRASH'
else:
return 'FAIL'
else:
return 'PASS'
class GroupedResult(ResultBase):
"""Result consisting of multiple results. It can be used by processors that
create multiple subtests for each test and want to pass all results back.
"""
@staticmethod
def create(results):
"""Create grouped result from the list of results. It filters out skipped
results. If all results are skipped results it returns skipped result.
Args:
results: list of pairs (test, result)
"""
results = [(t, r) for (t, r) in results if not r.is_skipped]
if not results:
return SKIPPED
return GroupedResult(results)
def __init__(self, results):
self.results = results
@property
def is_grouped(self):
return True
class SkippedResult(ResultBase):
"""Result without any meaningful value. Used primarily to inform the test
processor that it's test wasn't executed.
"""
@property
def is_skipped(self):
return True
SKIPPED = SkippedResult()
class RerunResult(Result):
"""Result generated from several reruns of the same test. It's a subclass of
Result since the result of rerun is result of the last run. In addition to
normal result it contains results of all reruns.
"""
@staticmethod
def create(results):
"""Create RerunResult based on list of results. List cannot be empty. If it
has only one element it's returned as a result.
"""
assert results
if len(results) == 1:
return results[0]
return RerunResult(results)
def __init__(self, results):
"""Has unexpected output and the output itself of the RerunResult equals to
the last result in the passed list.
"""
assert results
last = results[-1]
super(RerunResult, self).__init__(last.has_unexpected_output, last.output,
last.cmd)
self.results = results
@property
def is_rerun(self):
return True
@property
def as_list(self):
return self.results
def status(self):
return ' '.join(r.status() for r in self.results)

View File

@ -0,0 +1,143 @@
# Copyright 2022 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import json
import logging
import os
import re
import tempfile
from . import base
from .indicators import (
formatted_result_output,
ProgressIndicator,
)
from .util import base_test_record
class ResultDBIndicator(ProgressIndicator):
def __init__(self, context, options, test_count, sink):
super(ResultDBIndicator, self).__init__(context, options, test_count)
self._requirement = base.DROP_PASS_OUTPUT
self.rpc = ResultDB_RPC(sink)
def on_test_result(self, test, result):
for run, sub_result in enumerate(result.as_list):
self.send_result(test, sub_result, run)
def send_result(self, test, result, run):
# We need to recalculate the observed (but lost) test behaviour.
# `result.has_unexpected_output` indicates that the run behaviour of the
# test matches the expected behaviour irrespective of passing or failing.
if test.skip_rdb(result):
return
result_expected = not result.has_unexpected_output
test_should_pass = not test.is_fail
run_passed = (result_expected == test_should_pass)
rdb_result = {
'testId': strip_ascii_control_characters(test.rdb_test_id),
'status': 'PASS' if run_passed else 'FAIL',
'expected': result_expected,
}
if result.output and result.output.duration:
rdb_result.update(duration=f'{result.output.duration:f}s')
if result.has_unexpected_output:
formated_output = formatted_result_output(result, relative=True)
relative_cmd = result.cmd.to_string(relative=True)
artifacts = {
'output' : write_artifact(formated_output),
'cmd' : write_artifact(relative_cmd)
}
rdb_result.update(artifacts=artifacts)
summary = '<p><text-artifact artifact-id="output"></p>'
summary += '<p><text-artifact artifact-id="cmd"></p>'
rdb_result.update(summary_html=summary)
record = base_test_record(test, result, run)
record.update(
processor=test.processor_name,
subtest_id=test.subtest_id,
path=test.path)
rdb_result.update(tags=extract_tags(record))
self.rpc.send(rdb_result)
def write_artifact(value):
with tempfile.NamedTemporaryFile(
mode='w', delete=False, encoding='utf-8') as tmp:
tmp.write(value)
return { 'filePath': tmp.name }
def extract_tags(record):
tags = []
for k, v in record.items():
if not v:
continue
if type(v) == list:
tags += [sanitized_kv_dict(k, e) for e in v]
else:
tags.append(sanitized_kv_dict(k, v))
return tags
def sanitized_kv_dict(k, v):
return dict(key=k, value=strip_ascii_control_characters(v))
def strip_ascii_control_characters(unicode_string):
return re.sub(r'[^\x20-\x7E]', '?', str(unicode_string))
TESTING_SINK = None
def rdb_sink():
try:
import requests
except:
log_instantiation_failure('Failed to import requests module.')
return None
if TESTING_SINK:
return TESTING_SINK
luci_context = os.environ.get('LUCI_CONTEXT')
if not luci_context:
log_instantiation_failure('No LUCI_CONTEXT found.')
return None
with open(luci_context, mode="r", encoding="utf-8") as f:
config = json.load(f)
sink = config.get('result_sink', None)
if not sink:
log_instantiation_failure('No ResultDB sink found.')
return None
return sink
def log_instantiation_failure(error_message):
logging.info(f'{error_message} No results will be sent to ResultDB.')
class ResultDB_RPC:
def __init__(self, sink):
import requests
self.session = requests.Session()
self.session.headers = {
'Authorization': f'ResultSink {sink.get("auth_token")}',
}
self.url = f'http://{sink.get("address")}/prpc/luci.resultsink.v1.Sink/ReportTestResults'
def send(self, result):
payload = dict(testResults=[result])
try:
self.session.post(self.url, json=payload).raise_for_status()
except Exception as e:
logging.error(f'Request failed: {payload}')
raise e
def __del__(self):
self.session.close()

View File

@ -0,0 +1,46 @@
# Copyright 2023 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from http.server import BaseHTTPRequestHandler, HTTPServer
from threading import Thread
import requests
import socket
class RDBRequestHandler(BaseHTTPRequestHandler):
def do_POST(self):
content_length = int(self.headers['Content-Length'])
post_data = self.rfile.read(content_length)
self.server.register_post_data(post_data)
self.send_response(requests.codes.ok)
self.end_headers()
return
def get_free_port():
s = socket.socket(socket.AF_INET, type=socket.SOCK_STREAM)
s.bind(('localhost', 0))
_, port = s.getsockname()
s.close()
return port
class RDBMockServer(HTTPServer):
def __init__(self) -> None:
self.port = get_free_port()
super().__init__(('localhost', self.port), RDBRequestHandler)
self.thread = Thread(target=self.serve_forever)
self.thread.daemon = True
self.thread.start()
self.post_data = []
def register_post_data(self, data):
self.post_data.append(data)
@property
def address(self):
return f'localhost:{self.port}'

View File

@ -0,0 +1,105 @@
# Copyright 2023 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from collections import namedtuple
from pyfakefs import fake_filesystem_unittest
import json
import os
import sys
import unittest
# Needed because the test runner contains relative imports.
TOOLS_PATH = os.path.dirname(
os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
sys.path.append(TOOLS_PATH)
# Standard library imports...
from testrunner.testproc.resultdb import ResultDBIndicator, write_artifact
from testrunner.testproc.resultdb_server_mock import RDBMockServer
from testrunner.local.command import BaseCommand
from testrunner.objects.output import Output
def mock_test262(is_fail, rdb_test_id):
Test = namedtuple('Test', [
'is_fail', 'rdb_test_id', 'expected_outcomes', 'framework_name',
'full_name', 'random_seed', 'shard_id', 'shard_count', 'shell', 'variant',
'variant_flags', 'processor_name', 'subtest_id', 'path', 'skip_rdb'
])
def skip_if_expected(result):
return not result.has_unexpected_output
return Test(is_fail, rdb_test_id, [], 'unittest', 'test-123', 0, 1, 2, '',
'default', [], 'none', None, '/tmp/test/some_test.js',
skip_if_expected)
def mock_result(is_fail, duration=0):
Result = namedtuple('Result', ['has_unexpected_output', 'output', 'cmd'])
return Result(
is_fail,
Output(start_time=100.0, end_time=100.0 + duration),
BaseCommand('echo'))
class TestResultDBIndicator(unittest.TestCase):
def test_send(self):
def assert_sent_count(count):
self.assertEqual(len(server.post_data), count)
server = RDBMockServer()
self.rdb = ResultDBIndicator(
context=None,
options=None,
test_count=0,
sink=dict(auth_token='none', address=server.address))
self.rdb.send_result(
mock_test262(True, 'expected2fail-fail'), mock_result(False), 0)
assert_sent_count(0)
self.rdb.send_result(
mock_test262(True, 'expected2fail-pass'), mock_result(True), 0)
assert_sent_count(1)
self.rdb.send_result(
mock_test262(False, 'expected2pass-fail'), mock_result(True), 0)
assert_sent_count(2)
self.rdb.send_result(
mock_test262(False, 'expected2pass-pass'), mock_result(False), 0)
assert_sent_count(2)
self.rdb.send_result(
mock_test262(True, 'fast'), mock_result(True, duration=0.00001), 0)
assert_sent_count(3)
def assert_testid_at_index(testid, idx):
data = json.loads(server.post_data[idx])
self.assertEqual(data['testResults'][0]['testId'], testid)
def assert_duration_at_index(duration_str, idx):
data = json.loads(server.post_data[idx])
self.assertEqual(data['testResults'][0]['duration'], duration_str)
assert_testid_at_index('expected2fail-pass', 0)
assert_testid_at_index('expected2pass-fail', 1)
assert_duration_at_index('0.000010s', 2)
class TestFileOutput(fake_filesystem_unittest.TestCase):
def test_write_artifact_encoded(self):
"""Test that characters mapping to utf-8 encoding work."""
self.setUpPyfakefs(allow_root_user=True)
with open(write_artifact('\u0394')['filePath']) as f:
self.assertEqual('\u0394', f.read())
if __name__ == '__main__':
unittest.main()

View File

@ -0,0 +1,57 @@
# Copyright 2018 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from collections import defaultdict
from . import base
from ..utils import random_utils
class SeedProc(base.TestProcProducer):
def __init__(self, count, seed=None, parallel_subtests=1):
"""
Args:
count: How many subtests with different seeds to create for each test.
0 means infinite.
seed: seed to use. None means random seed for each subtest.
parallel_subtests: How many subtest of each test to run at the same time.
"""
super(SeedProc, self).__init__('Seed')
self._requirement = base.DROP_RESULT
self._count = count
self._seed = seed
self._last_idx = defaultdict(int)
self._todo = defaultdict(int)
self._parallel_subtests = parallel_subtests
if count:
self._parallel_subtests = min(self._parallel_subtests, count)
def _next_test(self, test):
is_loaded = False
for _ in range(0, self._parallel_subtests):
is_loaded |= self._try_send_next_test(test)
return is_loaded
def _result_for(self, test, subtest, result):
self._todo[test.procid] -= 1
if not self._try_send_next_test(test):
if not self._todo.get(test.procid):
del self._last_idx[test.procid]
del self._todo[test.procid]
self._send_result(test, None)
def _try_send_next_test(self, test):
def create_subtest(idx):
seed = self._seed or random_utils.random_seed()
return test.create_subtest(self, idx, random_seed=seed)
num = self._last_idx[test.procid]
if not self._count or num < self._count:
num += 1
self._todo[test.procid] += 1
self._last_idx[test.procid] = num
return self._send_test(create_subtest(num))
return False

View File

@ -0,0 +1,59 @@
# Copyright 2021 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from collections import deque
from . import base
class SequenceProc(base.TestProc):
"""Processor ensuring heavy tests are sent sequentially into the execution
pipeline.
The class keeps track of the number of tests in the pipeline marked heavy
and permits only a configurable amount. An excess amount is queued and sent
as soon as other heavy tests return.
"""
def __init__(self, max_heavy):
"""Initialize the processor.
Args:
max_heavy: The maximum number of heavy tests that will be sent further
down the pipeline simultaneously.
"""
super(SequenceProc, self).__init__()
assert max_heavy > 0
self.max_heavy = max_heavy
self.n_heavy = 0
self.buffer = deque()
def next_test(self, test):
if test.is_heavy:
if self.n_heavy < self.max_heavy:
# Enough space to send more heavy tests. Check if the test is not
# filtered otherwise.
used = self._send_test(test)
if used:
self.n_heavy += 1
return used
else:
# Too many tests in the pipeline. Buffer the test and indicate that
# this test didn't end up in the execution queue (i.e. test loader
# will try to send more tests).
self.buffer.append(test)
return False
else:
return self._send_test(test)
def result_for(self, test, result):
if test.is_heavy:
# A heavy test finished computing. Try to send one from the buffer.
self.n_heavy -= 1
while self.buffer:
next_test = self.buffer.popleft()
if self._send_test(next_test):
self.n_heavy += 1
break
self._send_result(test, result)

View File

@ -0,0 +1,167 @@
#!/usr/bin/env python3
# Copyright 2021 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Test integrating the sequence processor into a simple test pipeline.
"""
import os
import sys
import unittest
# Needed because the test runner contains relative imports.
TOOLS_PATH = os.path.dirname(
os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
sys.path.append(TOOLS_PATH)
from testrunner.testproc import base
from testrunner.testproc.loader import LoadProc
from testrunner.testproc.sequence import SequenceProc
class FakeExecutionProc(base.TestProc):
"""Simulates the pipeline sink consuming and running the tests.
Test execution is simulated for each test by calling run().
"""
def __init__(self):
super(FakeExecutionProc, self).__init__()
self.tests = []
def next_test(self, test):
self.tests.append(test)
return True
def run(self):
test = self.tests.pop()
self._send_result(test, test.n)
class FakeResultObserver(base.TestProcObserver):
"""Observer to track all results sent back through the pipeline."""
def __init__(self):
super(FakeResultObserver, self).__init__()
self.tests = set([])
def _on_result_for(self, test, result):
self.tests.add(test.n)
class FakeTest(object):
"""Simple test representation to differentiate light/heavy tests."""
def __init__(self, n, is_heavy):
self.n = n
self.is_heavy = is_heavy
self.keep_output = False
class TestSequenceProc(unittest.TestCase):
def _test(self, tests, batch_size, max_heavy):
# Set up a simple processing pipeline:
# Loader -> observe results -> sequencer -> execution.
loader = LoadProc(iter(tests), initial_batch_size=batch_size)
results = FakeResultObserver()
sequence_proc = SequenceProc(max_heavy)
execution = FakeExecutionProc()
loader.connect_to(results)
results.connect_to(sequence_proc)
sequence_proc.connect_to(execution)
# Fill the execution queue (with the number of tests potentially
# executed in parallel).
loader.load_initial_tests()
# Simulate the execution test by test.
while execution.tests:
# Assert the invariant of maximum heavy tests executed simultaneously.
self.assertLessEqual(
sum(int(test.is_heavy) for test in execution.tests), max_heavy)
# As in the real pipeline, running a test and returning its result
# will add another test into the pipeline.
execution.run()
# Ensure that all tests are processed and deliver results.
self.assertEqual(set(test.n for test in tests), results.tests)
def test_wrong_usage(self):
with self.assertRaises(Exception):
SequenceProc(0)
def test_no_tests(self):
self._test([], 1, 1)
def test_large_batch_light(self):
self._test([
FakeTest(0, False),
FakeTest(1, False),
FakeTest(2, False),
], 4, 1)
def test_small_batch_light(self):
self._test([
FakeTest(0, False),
FakeTest(1, False),
FakeTest(2, False),
], 2, 1)
def test_large_batch_heavy(self):
self._test([
FakeTest(0, True),
FakeTest(1, True),
FakeTest(2, True),
], 4, 1)
def test_small_batch_heavy(self):
self._test([
FakeTest(0, True),
FakeTest(1, True),
FakeTest(2, True),
], 2, 1)
def test_large_batch_mixed(self):
self._test([
FakeTest(0, True),
FakeTest(1, False),
FakeTest(2, True),
FakeTest(3, False),
], 4, 1)
def test_small_batch_mixed(self):
self._test([
FakeTest(0, True),
FakeTest(1, False),
FakeTest(2, True),
FakeTest(3, False),
], 2, 1)
def test_large_batch_more_heavy(self):
self._test([
FakeTest(0, True),
FakeTest(1, True),
FakeTest(2, True),
FakeTest(3, False),
FakeTest(4, True),
FakeTest(5, True),
FakeTest(6, False),
], 4, 2)
def test_small_batch_more_heavy(self):
self._test([
FakeTest(0, True),
FakeTest(1, True),
FakeTest(2, True),
FakeTest(3, False),
FakeTest(4, True),
FakeTest(5, True),
FakeTest(6, False),
], 2, 2)
if __name__ == '__main__':
unittest.main()

View File

@ -0,0 +1,45 @@
# Copyright 2018 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from . import base
# Alphabet size determines the hashing radix. Choosing a prime number prevents
# clustering of the hashes.
HASHING_ALPHABET_SIZE = 2 ** 7 -1
def radix_hash(capacity, key):
h = 0
for character in key:
h = (h * HASHING_ALPHABET_SIZE + ord(character)) % capacity
return h
class ShardProc(base.TestProcFilter):
@staticmethod
def create(options):
myid, count = options.shard_info
if count == 1:
return None
return ShardProc(myid, count)
"""Processor distributing tests between shards.
It hashes the unique test identifiers uses the hash to shard tests.
"""
def __init__(self, myid, shards_count):
"""
Args:
myid: id of the shard within [0; shards_count - 1]
shards_count: number of shards
"""
super(ShardProc, self).__init__()
assert myid >= 0 and myid < shards_count
self._myid = myid
self._shards_count = shards_count
def _filter(self, test):
return self._myid != radix_hash(self._shards_count, test.procid)

View File

@ -0,0 +1,54 @@
#!/usr/bin/env python3
# Copyright 2019 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
import sys
import unittest
# Needed because the test runner contains relative imports.
TOOLS_PATH = os.path.dirname(
os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
sys.path.append(TOOLS_PATH)
from testrunner.testproc.shard import radix_hash
class TestRadixHashing(unittest.TestCase):
def test_hash_character_by_radix(self):
self.assertEqual(97, radix_hash(capacity=2**32, key="a"))
def test_hash_character_by_radix_with_capacity(self):
self.assertEqual(6, radix_hash(capacity=7, key="a"))
def test_hash_string(self):
self.assertEqual(6, radix_hash(capacity=7, key="ab"))
def test_hash_test_id(self):
self.assertEqual(
5,
radix_hash(
capacity=7, key="test262/Map/class-private-method-Variant-0-1"))
def test_hash_boundaries(self):
total_variants = 5
cases = []
for case in [
"test262/Map/class-private-method",
"test262/Map/class-public-method",
"test262/Map/object-retrieval",
"test262/Map/object-deletion",
"test262/Map/object-creation",
"test262/Map/garbage-collection",
]:
for variant_index in range(total_variants):
cases.append("%s-Variant-%d" % (case, variant_index))
for case in cases:
self.assertTrue(0 <= radix_hash(capacity=7, key=case) < 7)
if __name__ == '__main__':
unittest.main()

View File

@ -0,0 +1,37 @@
# Copyright 2018 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import faulthandler
import logging
import signal
from . import base
from testrunner.local import utils
class SignalProc(base.TestProcObserver):
def __init__(self):
super(SignalProc, self).__init__()
self.exit_code = utils.EXIT_CODE_PASS
signal.signal(signal.SIGINT, self._on_ctrlc)
signal.signal(signal.SIGTERM, self._on_sigterm)
def _on_ctrlc(self, _signum, _stack_frame):
logging.warning('Ctrl-C detected, early abort...')
self.exit_code = utils.EXIT_CODE_INTERRUPTED
self.stop()
if logging.getLogger().isEnabledFor(logging.INFO):
faulthandler.dump_traceback()
def _on_sigterm(self, _signum, _stack_frame):
logging.warning('SIGTERM received, early abort...')
self.exit_code = utils.EXIT_CODE_TERMINATED
self.stop()
if logging.getLogger().isEnabledFor(logging.INFO):
faulthandler.dump_traceback()
def worst_exit_code(self, results):
exit_code = results.exit_code()
# Indicate if a SIGINT or SIGTERM happened.
return max(exit_code, self.exit_code)

View File

@ -0,0 +1,3 @@
# Copyright 2022 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

View File

@ -0,0 +1,30 @@
#!/usr/bin/env python3
# Copyright 2022 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# This file exists to be able to mock some of the imports in ClusterFuzz. Since
# we only need a specific functionality in ClusterFuzz (Stack Analysis) we do
# not need most of the imports that it uses, so we fake them here in order to
# not crash when we run.
def empty_fn(*args, **kwargs):
raise 'empty function was used'
kernel_utils, \
storage, \
fetch_artifact, \
settings, \
symbols_downloader, \
= [empty_fn] * 5
class ProjectConfig:
def get(self):
"""Return empty config properties when ClusterFuzz tries to find a project
config.
"""
return None

View File

@ -0,0 +1,107 @@
#!/usr/bin/env python3
# Copyright 2022 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import logging
import os
import re
import sys
ANALYSIS_FAILURE_STATES = ['NULL', 'Unknown', '', None]
STACKFRAME_REGEX = r'^#\d+.*'
FILE_LOCATION_REGEX = r'.*\:\d+\:\d+$'
def fake_clusterfuzz_imports(modules):
for module in modules:
sys.modules[module] = __import__('clusterfuzz_fakes')
def pre_clusterfuzz_import():
local_path = os.path.dirname(os.path.abspath(__file__))
sys.path.append(local_path)
fake_clusterfuzz_imports([
'clusterfuzz._internal.platforms.android',
'clusterfuzz._internal.google_cloud_utils',
'clusterfuzz._internal.config.local_config',
])
class CustomStackParser:
def __init__(self):
pre_clusterfuzz_import()
from clusterfuzz.stacktraces import StackParser, MAX_CRASH_STATE_FRAMES
from clusterfuzz.stacktraces import llvm_test_one_input_override
from clusterfuzz.stacktraces import constants
self.MAX_CRASH_STATE_FRAMES = MAX_CRASH_STATE_FRAMES
self.stack_parser = StackParser()
self.constants = constants
self.llvm_test_one_input_override = llvm_test_one_input_override
def analyze_crash(self, stderr):
try:
stderr_analysis = self.stack_parser.parse(stderr)
self.custom_analyzer(stderr_analysis)
return {
"crash_state": stderr_analysis.crash_state.strip(),
"crash_type": stderr_analysis.crash_type.strip(),
}
except Exception as e:
logging.info(e)
return {
"crash_state": "Unknown",
"crash_type": "Unknown",
}
def _extract_function_name(self, frame):
split_frame = frame.split()
start_loc = 1
end_loc = -1
if len(split_frame) > 2 and split_frame[2] == 'in':
start_loc = 3
split_frame = split_frame[start_loc:]
for idx, item in enumerate(split_frame):
# exclude file name and everything after it
if re.match(FILE_LOCATION_REGEX, item):
end_loc = idx
break
if end_loc != -1:
return ' '.join(split_frame[:end_loc])
return None
def _fallback_crash_state(self, stacktrace):
status = []
for line in [l.strip() for l in stacktrace.splitlines()]:
if re.match(STACKFRAME_REGEX, line):
frame = self._extract_function_name(line)
if not self.stack_parser.ignore_stack_frame(frame):
status.append(frame)
if len(status) >= self.MAX_CRASH_STATE_FRAMES:
break
return '\n'.join(status)
def custom_analyzer(self, crash_info):
if crash_info.crash_state in ANALYSIS_FAILURE_STATES:
fallback_state = self._fallback_crash_state(crash_info.crash_stacktrace)
crash_info.crash_state = fallback_state or crash_info.crash_state
class EmptyStackParser:
def analyze_crash(self, stderr):
return {}
def create_stack_parser():
try:
return CustomStackParser()
except ImportError as e:
logging.info(e)
return EmptyStackParser()

View File

@ -0,0 +1,65 @@
#!/usr/bin/env python3
# Copyright 2022 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import json
import os
import sys
import unittest
TOOLS_PATH = os.path.dirname(
os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
sys.path.append(TOOLS_PATH)
TEST_DATA_ROOT = os.path.join(TOOLS_PATH, 'testproc', 'stack_utils', 'testdata')
TEST_DATA_GENERAL = os.path.join(TEST_DATA_ROOT, 'analyze_crash')
TEST_DATA_CUSTOM = os.path.join(TEST_DATA_ROOT, 'custom_analyzer')
from testproc.stack_utils.stack_analyzer_util import create_stack_parser
class TestScript(unittest.TestCase):
# TODO(almuthanna): find out why these test cases are not analyzed and add
# logic to make them pass.
skipped_tests = [
'type_assertion_1.txt',
'type_assertion_2.txt',
'static_assertion_2.txt',
'static_assertion_1.txt',
]
def test_analyze_crash(self):
stack_parser = create_stack_parser()
for file in [
f for f in os.listdir(TEST_DATA_GENERAL) if f.endswith('.txt')
]:
if file in self.skipped_tests:
continue
filepath = os.path.join(TEST_DATA_GENERAL, file)
exp_filepath = os.path.join(TEST_DATA_GENERAL,
file.replace('.txt', '.expected.json'))
with self.subTest(test_name=file[:-4]):
with open(filepath) as f:
result = stack_parser.analyze_crash(f.read())
with open(exp_filepath, 'r') as exp_f:
expectation = json.load(exp_f)
self.assertDictEqual(result, expectation)
def test_fallback_crash_state(self):
self.maxDiff = None
stack_parser = create_stack_parser()
for file in [f for f in os.listdir(TEST_DATA_CUSTOM) if f.endswith('.txt')]:
filepath = os.path.join(TEST_DATA_CUSTOM, file)
exp_filepath = os.path.join(TEST_DATA_CUSTOM,
file.replace('.txt', '.expected'))
with self.subTest(test_name=file[:-4]):
with open(filepath) as f:
result = stack_parser._fallback_crash_state(f.read())
with open(exp_filepath, 'r') as exp_f:
expectation = exp_f.read()
self.assertEqual(result, expectation)
if __name__ == '__main__':
unittest.main()

View File

@ -0,0 +1,4 @@
{
"crash_type": "CHECK failure",
"crash_state": "kind() == CodeKind::BASELINE"
}

View File

@ -0,0 +1,20 @@
Warning: disabling flag --regexp_tier_up due to conflicting flags
#
# Fatal error in , line 0
# Check failed: kind() == CodeKind::BASELINE.
#
#
#
#FailureMessage Object: 0x7fff55c98300
==== C stack trace ===============================
/b/s/w/ir/out/build/d8(+0xec56a3) [0x55fbef6236a3]
/b/s/w/ir/out/build/d8(+0xec4f4b) [0x55fbef622f4b]
/b/s/w/ir/out/build/d8(+0xebb4d5) [0x55fbef6194d5]
/b/s/w/ir/out/build/d8(+0x42cd8c) [0x55fbeeb8ad8c]
/b/s/w/ir/out/build/d8(+0x42bd45) [0x55fbeeb89d45]
[0x2c4d0000c1ca]
Received signal 6
Aborted (core dumped)

View File

@ -0,0 +1,4 @@
{
"crash_type": "Data race\nWRITE 8",
"crash_state": "SetFlag\nMarkWasUsedForAllocation\nv8::internal::PagedSpaceBase::SetLinearAllocationArea(unsigned long, unsigned long)"
}

View File

@ -0,0 +1,91 @@
==================
WARNING: ThreadSanitizer: data race (pid=24781)
Write of size 8 at 0x7e9b00080008 by main thread (mutexes: write M0):
#0 operator|= src/base/flags.h:47:11 (d8+0xa03eff) (BuildId: 2d1896fcafe8220c)
#1 operator|= src/base/flags.h:66:46 (d8+0xa03eff)
#2 SetFlag src/heap/basic-memory-chunk.h:198:48 (d8+0xa03eff)
#3 MarkWasUsedForAllocation src/heap/memory-chunk.h:223:37 (d8+0xa03eff)
#4 v8::internal::PagedSpaceBase::SetLinearAllocationArea(unsigned long, unsigned long) src/heap/paged-spaces.cc:435:13 (d8+0xa03eff)
#5 v8::internal::PagedSpaceBase::TryAllocationFromFreeListMain(unsigned long, v8::internal::AllocationOrigin) src/heap/paged-spaces.cc:653:3 (d8+0xa04b8e) (BuildId: 2d1896fcafe8220c)
#6 v8::internal::PagedSpaceBase::RawRefillLabMain(int, v8::internal::AllocationOrigin) src/heap/paged-spaces.cc:991:7 (d8+0xa066b4) (BuildId: 2d1896fcafe8220c)
#7 v8::internal::PagedSpaceBase::RefillLabMain(int, v8::internal::AllocationOrigin) src/heap/paged-spaces.cc:960:10 (d8+0xa065f7) (BuildId: 2d1896fcafe8220c)
#8 EnsureAllocation src/heap/paged-spaces-inl.h:89:10 (d8+0x9f33a8) (BuildId: 2d1896fcafe8220c)
#9 EnsureAllocation src/heap/new-spaces-inl.h:109:24 (d8+0x9f33a8)
#10 v8::internal::PagedNewSpace::EnsureAllocation(int, v8::internal::AllocationAlignment, v8::internal::AllocationOrigin, int*) src/heap/new-spaces.h:800:25 (d8+0x9f33a8)
#11 AllocateRawUnaligned src/heap/spaces-inl.h:277:8 (d8+0x8b41ea) (BuildId: 2d1896fcafe8220c)
#12 AllocateRawSlow src/heap/spaces-inl.h:331:13 (d8+0x8b41ea)
#13 AllocateRaw src/heap/spaces-inl.h:269:31 (d8+0x8b41ea)
#14 AllocateRaw<(v8::internal::AllocationType)0> src/heap/heap-allocator-inl.h:107:28 (d8+0x8b41ea)
#15 AllocateRawWith<(v8::internal::HeapAllocator::AllocationRetryMode)1> src/heap/heap-allocator-inl.h:230:14 (d8+0x8b41ea)
#16 v8::internal::Factory::AllocateRawWithAllocationSite(v8::internal::Handle<v8::internal::Map>, v8::internal::AllocationType, v8::internal::Handle<v8::internal::AllocationSite>) src/heap/factory.cc:356:36 (d8+0x8b41ea)
#17 v8::internal::Factory::NewJSObjectFromMap(v8::internal::Handle<v8::internal::Map>, v8::internal::AllocationType, v8::internal::Handle<v8::internal::AllocationSite>) src/heap/factory.cc:2728:7 (d8+0x8ba650) (BuildId: 2d1896fcafe8220c)
#18 __RT_impl_Runtime_NewArray src/runtime/runtime-array.cc:116:58 (d8+0xfa02b1) (BuildId: 2d1896fcafe8220c)
#19 v8::internal::Runtime_NewArray(int, unsigned long*, v8::internal::Isolate*) src/runtime/runtime-array.cc:44:1 (d8+0xfa02b1)
#20 Builtins_AsyncFromSyncIteratorPrototypeThrow setup-isolate-deserialize.cc (d8+0x1c3cd77)
#21 v8::internal::Execution::CallScript(v8::internal::Isolate*, v8::internal::Handle<v8::internal::JSFunction>, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>) src/execution/execution.cc:538:10 (d8+0x8187b5) (BuildId: 2d1896fcafe8220c)
#22 v8::Script::Run(v8::Local<v8::Context>, v8::Local<v8::Data>) src/api/api.cc:2151:7 (d8+0x5b210e) (BuildId: 2d1896fcafe8220c)
#23 v8::Script::Run(v8::Local<v8::Context>) src/api/api.cc:2078:10 (d8+0x5b1840) (BuildId: 2d1896fcafe8220c)
#24 v8::Shell::ExecuteString(v8::Isolate*, v8::Local<v8::String>, v8::Local<v8::String>, v8::Shell::PrintResult, v8::Shell::ReportExceptions, v8::Shell::ProcessMessageQueue) src/d8/d8.cc:879:28 (d8+0x5703cb) (BuildId: 2d1896fcafe8220c)
#25 v8::SourceGroup::Execute(v8::Isolate*) src/d8/d8.cc:4379:10 (d8+0x588620) (BuildId: 2d1896fcafe8220c)
#26 v8::Shell::RunMain(v8::Isolate*, bool) src/d8/d8.cc:5107:39 (d8+0x58c487) (BuildId: 2d1896fcafe8220c)
#27 v8::Shell::Main(int, char**) src/d8/d8.cc:5886:18 (d8+0x58efe0) (BuildId: 2d1896fcafe8220c)
#28 main src/d8/d8.cc:5976:43 (d8+0x58f4ee) (BuildId: 2d1896fcafe8220c)
Previous read of size 8 at 0x7e9b00080008 by thread T6:
#0 GetFlags src/heap/basic-memory-chunk.h:211:45 (d8+0x88ee2f) (BuildId: 2d1896fcafe8220c)
#1 ShouldSkipEvacuationSlotRecording src/heap/basic-memory-chunk.h:240:29 (d8+0x88ee2f)
#2 RecordSlot src/heap/mark-compact-inl.h:68:21 (d8+0x88ee2f)
#3 void v8::internal::ConcurrentMarkingVisitor::RecordSlot<v8::internal::CompressedHeapObjectSlot>(v8::internal::HeapObject, v8::internal::CompressedHeapObjectSlot, v8::internal::HeapObject) src/heap/concurrent-marking.cc:481:5 (d8+0x88ee2f)
#4 void v8::internal::MarkingVisitorBase<v8::internal::ConcurrentMarkingVisitor, v8::internal::ConcurrentMarkingState>::ProcessStrongHeapObject<v8::internal::CompressedHeapObjectSlot>(v8::internal::HeapObject, v8::internal::CompressedHeapObjectSlot, v8::internal::HeapObject) src/heap/marking-visitor-inl.h:49:23 (d8+0x88ed97) (BuildId: 2d1896fcafe8220c)
#5 VisitPointersImpl<v8::internal::CompressedObjectSlot> src/heap/marking-visitor-inl.h:90:7 (d8+0x894a3a) (BuildId: 2d1896fcafe8220c)
#6 VisitPointers src/heap/marking-visitor.h:197:5 (d8+0x894a3a)
#7 IteratePointers<v8::internal::ConcurrentMarkingVisitor> src/objects/objects-body-descriptors-inl.h:127:6 (d8+0x894a3a)
#8 IterateBody<v8::internal::ConcurrentMarkingVisitor> src/objects/objects-body-descriptors-inl.h:358:5 (d8+0x894a3a)
#9 int v8::internal::ConcurrentMarkingVisitorUtility::VisitJSObjectSubclass<v8::internal::ConcurrentMarkingVisitor, v8::internal::JSFunction, v8::internal::JSFunction::BodyDescriptor>(v8::internal::ConcurrentMarkingVisitor*, v8::internal::Map, v8::internal::JSFunction) src/heap/concurrent-marking.cc:102:5 (d8+0x894a3a)
#10 VisitJSObjectSubclass<v8::internal::JSFunction, v8::internal::JSFunction::BodyDescriptor> src/heap/concurrent-marking.cc:489:12 (d8+0x884a6f) (BuildId: 2d1896fcafe8220c)
#11 VisitJSFunction src/heap/marking-visitor-inl.h:178:34 (d8+0x884a6f)
#12 Visit src/heap/objects-visiting-inl.h:65:5 (d8+0x884a6f)
#13 v8::internal::ConcurrentMarking::RunMajor(v8::JobDelegate*, v8::base::EnumSet<v8::internal::CodeFlushMode, int>, unsigned int, bool) src/heap/concurrent-marking.cc:758:41 (d8+0x884a6f)
#14 v8::internal::ConcurrentMarking::JobTaskMajor::Run(v8::JobDelegate*) src/heap/concurrent-marking.cc:606:28 (d8+0x898719) (BuildId: 2d1896fcafe8220c)
#15 v8::DelayedTasksPlatform::DelayedJob::Run(v8::JobDelegate*) src/d8/d8-platforms.cc:304:18 (d8+0x565b28) (BuildId: 2d1896fcafe8220c)
#16 v8::platform::DefaultJobWorker::Run() src/libplatform/default-job.h:147:18 (d8+0x1e5184b) (BuildId: 2d1896fcafe8220c)
#17 v8::platform::DefaultWorkerThreadsTaskRunner::WorkerThread::Run() src/libplatform/default-worker-threads-task-runner.cc:73:11 (d8+0x1e586b0) (BuildId: 2d1896fcafe8220c)
#18 NotifyStartedAndRun src/base/platform/platform.h:596:5 (d8+0x1e4bc22) (BuildId: 2d1896fcafe8220c)
#19 v8::base::ThreadEntry(void*) src/base/platform/platform-posix.cc:1112:11 (d8+0x1e4bc22)
Mutex M0 (0x7b5400000710) created at:
#0 pthread_mutex_init /b/s/w/ir/cache/builder/src/third_party/llvm/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1316:3 (d8+0x4df75f) (BuildId: 2d1896fcafe8220c)
#1 InitializeNativeHandle src/base/platform/mutex.cc:99:12 (d8+0x1e4408b) (BuildId: 2d1896fcafe8220c)
#2 v8::base::Mutex::Mutex() src/base/platform/mutex.cc:152:3 (d8+0x1e4408b)
#3 v8::internal::PagedSpaceBase::PagedSpaceBase(v8::internal::Heap*, v8::internal::AllocationSpace, v8::internal::Executability, v8::internal::FreeList*, v8::internal::AllocationCounter&, v8::internal::LinearAllocationArea&, v8::internal::LinearAreaOriginalData&, v8::internal::CompactionSpaceKind) src/heap/paged-spaces.cc:120:17 (d8+0xa023d8) (BuildId: 2d1896fcafe8220c)
#4 PagedSpaceForNewSpace src/heap/new-spaces.cc:923:7 (d8+0x9f1f66) (BuildId: 2d1896fcafe8220c)
#5 v8::internal::PagedNewSpace::PagedNewSpace(v8::internal::Heap*, unsigned long, unsigned long, v8::internal::LinearAllocationArea&) src/heap/new-spaces.cc:1042:7 (d8+0x9f1f66)
#6 make_unique<v8::internal::PagedNewSpace, v8::internal::Heap *, unsigned long &, unsigned long &, v8::internal::LinearAllocationArea &> buildtools/third_party/libc++/trunk/include/__memory/unique_ptr.h:670:30 (d8+0x90c4a9) (BuildId: 2d1896fcafe8220c)
#7 v8::internal::Heap::SetUpSpaces(v8::internal::LinearAllocationArea&, v8::internal::LinearAllocationArea&) src/heap/heap.cc:5559:27 (d8+0x90c4a9)
#8 v8::internal::Isolate::Init(v8::internal::SnapshotData*, v8::internal::SnapshotData*, v8::internal::SnapshotData*, bool) src/execution/isolate.cc:4264:9 (d8+0x843e08) (BuildId: 2d1896fcafe8220c)
#9 v8::internal::Isolate::InitWithSnapshot(v8::internal::SnapshotData*, v8::internal::SnapshotData*, v8::internal::SnapshotData*, bool) src/execution/isolate.cc:4036:10 (d8+0x8455f9) (BuildId: 2d1896fcafe8220c)
#10 v8::internal::Snapshot::Initialize(v8::internal::Isolate*) src/snapshot/snapshot.cc:182:27 (d8+0x10bc8e1) (BuildId: 2d1896fcafe8220c)
#11 v8::Isolate::Initialize(v8::Isolate*, v8::Isolate::CreateParams const&) src/api/api.cc:8836:8 (d8+0x5dd97f) (BuildId: 2d1896fcafe8220c)
#12 v8::Isolate::New(v8::Isolate::CreateParams const&) src/api/api.cc:8872:3 (d8+0x5ddc45) (BuildId: 2d1896fcafe8220c)
#13 v8::Shell::Main(int, char**) src/d8/d8.cc:5788:22 (d8+0x58e70c) (BuildId: 2d1896fcafe8220c)
#14 main src/d8/d8.cc:5976:43 (d8+0x58f4ee) (BuildId: 2d1896fcafe8220c)
Thread T6 'V8 DefaultWorke' (tid=24798, running) created by main thread at:
#0 pthread_create /b/s/w/ir/cache/builder/src/third_party/llvm/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1022:3 (d8+0x4ddffb) (BuildId: 2d1896fcafe8220c)
#1 v8::base::Thread::Start() src/base/platform/platform-posix.cc:1144:14 (d8+0x1e4bb36) (BuildId: 2d1896fcafe8220c)
#2 WorkerThread src/libplatform/default-worker-threads-task-runner.cc:66:3 (d8+0x1e580ac) (BuildId: 2d1896fcafe8220c)
#3 make_unique<v8::platform::DefaultWorkerThreadsTaskRunner::WorkerThread, v8::platform::DefaultWorkerThreadsTaskRunner *> buildtools/third_party/libc++/trunk/include/__memory/unique_ptr.h:670:30 (d8+0x1e580ac)
#4 v8::platform::DefaultWorkerThreadsTaskRunner::DefaultWorkerThreadsTaskRunner(unsigned int, double (*)()) src/libplatform/default-worker-threads-task-runner.cc:16:28 (d8+0x1e580ac)
#5 __shared_ptr_emplace<const int &, double (*)()> buildtools/third_party/libc++/trunk/include/__memory/shared_ptr.h:297:37 (d8+0x1e4e1b0) (BuildId: 2d1896fcafe8220c)
#6 allocate_shared<v8::platform::DefaultWorkerThreadsTaskRunner, std::Cr::allocator<v8::platform::DefaultWorkerThreadsTaskRunner>, const int &, double (*)(), void> buildtools/third_party/libc++/trunk/include/__memory/shared_ptr.h:956:55 (d8+0x1e4e1b0)
#7 make_shared<v8::platform::DefaultWorkerThreadsTaskRunner, const int &, double (*)(), void> buildtools/third_party/libc++/trunk/include/__memory/shared_ptr.h:965:12 (d8+0x1e4e1b0)
#8 EnsureBackgroundTaskRunnerInitialized src/libplatform/default-platform.cc:132:7 (d8+0x1e4e1b0)
#9 v8::platform::DefaultPlatform::DefaultPlatform(int, v8::platform::IdleTaskSupport, std::Cr::unique_ptr<v8::TracingController, std::Cr::default_delete<v8::TracingController>>) src/libplatform/default-platform.cc:108:5 (d8+0x1e4e1b0)
#10 make_unique<v8::platform::DefaultPlatform, int &, v8::platform::IdleTaskSupport &, std::Cr::unique_ptr<v8::TracingController, std::Cr::default_delete<v8::TracingController> > > buildtools/third_party/libc++/trunk/include/__memory/unique_ptr.h:670:30 (d8+0x1e4d839) (BuildId: 2d1896fcafe8220c)
#11 v8::platform::NewDefaultPlatform(int, v8::platform::IdleTaskSupport, v8::platform::InProcessStackDumping, std::Cr::unique_ptr<v8::TracingController, std::Cr::default_delete<v8::TracingController>>) src/libplatform/default-platform.cc:53:19 (d8+0x1e4d839)
#12 v8::Shell::Main(int, char**) src/d8/d8.cc:5691:16 (d8+0x58e251) (BuildId: 2d1896fcafe8220c)
#13 main src/d8/d8.cc:5976:43 (d8+0x58f4ee) (BuildId: 2d1896fcafe8220c)
SUMMARY: ThreadSanitizer: data race src/base/flags.h:47:11 in operator|=
==================
ThreadSanitizer: reported 1 warnings

View File

@ -0,0 +1,4 @@
{
"crash_type": "Data race\nWRITE 8",
"crash_state": "ClearCellRangeRelaxed\nClear\nClearMarkBitsAndHandleLivenessStatistics"
}

View File

@ -0,0 +1,118 @@
==================
WARNING: ThreadSanitizer: data race (pid=10132)
Write of size 8 at 0x7e8d00440248 by thread T7 (mutexes: write M0):
#0 memset sanitizer_common/sanitizer_common_interceptors.inc:799:3 (d8+0x49d4ad) (BuildId: c849b9596314cb5d)
#1 ClearCellRangeRelaxed src/heap/marking.h:205:16 (d8+0x94d685) (BuildId: c849b9596314cb5d)
#2 Clear src/heap/marking.h:228:3 (d8+0x94d685)
#3 ClearMarkBitsAndHandleLivenessStatistics src/heap/sweeper.cc:303:33 (d8+0x94d685)
#4 v8::internal::Sweeper::RawSweep(v8::internal::Page*, v8::internal::Sweeper::FreeListRebuildingMode, v8::internal::FreeSpaceTreatmentMode, v8::internal::Sweeper::FreeSpaceMayContainInvalidatedSlots, v8::base::LockGuard<v8::base::Mutex, (v8::base::NullBehavior)0> const&) src/heap/sweeper.cc:412:3 (d8+0x94d685)
#5 v8::internal::Sweeper::ParallelSweepPage(v8::internal::Page*, v8::internal::AllocationSpace, v8::internal::Sweeper::FreeSpaceMayContainInvalidatedSlots) src/heap/sweeper.cc:494:17 (d8+0x94d9e6) (BuildId: c849b9596314cb5d)
#6 ConcurrentSweepSpace src/heap/sweeper.cc:437:5 (d8+0x95056a) (BuildId: c849b9596314cb5d)
#7 v8::internal::Sweeper::SweeperJob::RunImpl(v8::JobDelegate*) src/heap/sweeper.cc:117:22 (d8+0x95056a)
#8 v8::internal::Sweeper::SweeperJob::Run(v8::JobDelegate*) src/heap/sweeper.cc (d8+0x950295) (BuildId: c849b9596314cb5d)
#9 v8::DelayedTasksPlatform::DelayedJob::Run(v8::JobDelegate*) src/d8/d8-platforms.cc:297:18 (d8+0x51a6a8) (BuildId: c849b9596314cb5d)
#10 v8::platform::DefaultJobWorker::Run() src/libplatform/default-job.h:147:18 (d8+0x1a7bec8) (BuildId: c849b9596314cb5d)
#11 v8::platform::DefaultWorkerThreadsTaskRunner::WorkerThread::Run() src/libplatform/default-worker-threads-task-runner.cc:73:11 (d8+0x1a836f0) (BuildId: c849b9596314cb5d)
#12 NotifyStartedAndRun src/base/platform/platform.h:560:5 (d8+0x1a77162) (BuildId: c849b9596314cb5d)
#13 v8::base::ThreadEntry(void*) src/base/platform/platform-posix.cc:1051:11 (d8+0x1a77162)
Previous atomic read of size 4 at 0x7e8d00440248 by thread T3:
#0 __cxx_atomic_load<int> buildtools/third_party/libc++/trunk/include/atomic:1000:12 (d8+0x7e5423) (BuildId: c849b9596314cb5d)
#1 load buildtools/third_party/libc++/trunk/include/atomic:1611:17 (d8+0x7e5423)
#2 atomic_load_explicit<int> buildtools/third_party/libc++/trunk/include/atomic:1967:17 (d8+0x7e5423)
#3 Acquire_Load src/base/atomicops.h:240:10 (d8+0x7e5423)
#4 Acquire_Load<unsigned int> src/base/atomic-utils.h:73:9 (d8+0x7e5423)
#5 Get<v8::internal::AccessMode::ATOMIC> src/heap/marking.h:78:11 (d8+0x7e5423)
#6 IsBlackOrGrey<v8::internal::AccessMode::ATOMIC> src/heap/marking.h:398:21 (d8+0x7e5423)
#7 IsBlackOrGrey src/heap/marking-visitor.h:81:12 (d8+0x7e5423)
#8 void v8::internal::MarkingVisitorBase<v8::internal::ConcurrentMarkingVisitor, v8::internal::ConcurrentMarkingState>::ProcessWeakHeapObject<v8::internal::CompressedHeapObjectSlot>(v8::internal::HeapObject, v8::internal::CompressedHeapObjectSlot, v8::internal::HeapObject) src/heap/marking-visitor-inl.h:58:44 (d8+0x7e5423)
#9 VisitPointersImpl<v8::internal::CompressedMaybeObjectSlot> src/heap/marking-visitor-inl.h:90:7 (d8+0x7df885) (BuildId: c849b9596314cb5d)
#10 VisitPointers src/heap/marking-visitor.h:199:5 (d8+0x7df885)
#11 IterateMaybeWeakPointers<v8::internal::ConcurrentMarkingVisitor> src/objects/objects-body-descriptors-inl.h:139:6 (d8+0x7df885)
#12 IterateBody<v8::internal::ConcurrentMarkingVisitor> src/objects/objects-body-descriptors.h:176:5 (d8+0x7df885)
#13 VisitFeedbackVector src/heap/objects-visiting-inl.h:118:1 (d8+0x7df885)
#14 Visit src/heap/objects-visiting-inl.h:65:5 (d8+0x7df885)
#15 v8::internal::ConcurrentMarking::Run(v8::JobDelegate*, v8::base::EnumSet<v8::internal::CodeFlushMode, int>, unsigned int, bool) src/heap/concurrent-marking.cc:531:41 (d8+0x7df885)
#16 v8::internal::ConcurrentMarking::JobTask::Run(v8::JobDelegate*) src/heap/concurrent-marking.cc:420:28 (d8+0x7eb659) (BuildId: c849b9596314cb5d)
#17 v8::DelayedTasksPlatform::DelayedJob::Run(v8::JobDelegate*) src/d8/d8-platforms.cc:297:18 (d8+0x51a6a8) (BuildId: c849b9596314cb5d)
#18 v8::platform::DefaultJobWorker::Run() src/libplatform/default-job.h:147:18 (d8+0x1a7bec8) (BuildId: c849b9596314cb5d)
#19 v8::platform::DefaultWorkerThreadsTaskRunner::WorkerThread::Run() src/libplatform/default-worker-threads-task-runner.cc:73:11 (d8+0x1a836f0) (BuildId: c849b9596314cb5d)
#20 NotifyStartedAndRun src/base/platform/platform.h:560:5 (d8+0x1a77162) (BuildId: c849b9596314cb5d)
#21 v8::base::ThreadEntry(void*) src/base/platform/platform-posix.cc:1051:11 (d8+0x1a77162)
As if synchronized via sleep:
#0 usleep /b/s/w/ir/cache/builder/src/third_party/llvm/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:358:3 (d8+0x490b4a) (BuildId: c849b9596314cb5d)
#1 v8::base::OS::Sleep(v8::base::TimeDelta) src/base/platform/platform-posix.cc:615:3 (d8+0x1a76295) (BuildId: c849b9596314cb5d)
#2 v8::DelayedTasksPlatform::DelayedJob::Run(v8::JobDelegate*) src/d8/d8-platforms.cc:296:7 (d8+0x51a687) (BuildId: c849b9596314cb5d)
#3 v8::platform::DefaultJobWorker::Run() src/libplatform/default-job.h:147:18 (d8+0x1a7bec8) (BuildId: c849b9596314cb5d)
#4 v8::platform::DefaultWorkerThreadsTaskRunner::WorkerThread::Run() src/libplatform/default-worker-threads-task-runner.cc:73:11 (d8+0x1a836f0) (BuildId: c849b9596314cb5d)
#5 NotifyStartedAndRun src/base/platform/platform.h:560:5 (d8+0x1a77162) (BuildId: c849b9596314cb5d)
#6 v8::base::ThreadEntry(void*) src/base/platform/platform-posix.cc:1051:11 (d8+0x1a77162)
Mutex M0 (0x7b0c000091e0) created at:
#0 pthread_mutex_init /b/s/w/ir/cache/builder/src/third_party/llvm/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1316:3 (d8+0x494d4f) (BuildId: c849b9596314cb5d)
#1 InitializeNativeHandle src/base/platform/mutex.cc:95:12 (d8+0x1a71ecb) (BuildId: c849b9596314cb5d)
#2 v8::base::Mutex::Mutex() src/base/platform/mutex.cc:148:3 (d8+0x1a71ecb)
#3 v8::internal::MemoryChunk::Initialize(v8::internal::BasicMemoryChunk*, v8::internal::Heap*, v8::internal::Executability) src/heap/memory-chunk.cc:149:23 (d8+0x8fa1dd) (BuildId: c849b9596314cb5d)
#4 AllocateChunk src/heap/memory-allocator.cc:409:7 (d8+0x8f9094) (BuildId: c849b9596314cb5d)
#5 v8::internal::MemoryAllocator::AllocatePage(v8::internal::MemoryAllocator::AllocationMode, unsigned long, v8::internal::Space*, v8::internal::Executability) src/heap/memory-allocator.cc:562:13 (d8+0x8f9094)
#6 AllocatePage src/heap/paged-spaces.cc:322:38 (d8+0x9130dd) (BuildId: c849b9596314cb5d)
#7 v8::internal::PagedSpace::ExpandBackground(unsigned long) src/heap/paged-spaces.cc:338:16 (d8+0x9130dd)
#8 v8::internal::PagedSpace::RawRefillLabBackground(v8::internal::LocalHeap*, unsigned long, unsigned long, v8::internal::AllocationAlignment, v8::internal::AllocationOrigin) src/heap/paged-spaces.cc:631:14 (d8+0x914467) (BuildId: c849b9596314cb5d)
#9 v8::internal::ConcurrentAllocator::EnsureLab(v8::internal::AllocationOrigin) src/heap/concurrent-allocator.cc:135:25 (d8+0x7dc06c) (BuildId: c849b9596314cb5d)
#10 v8::internal::ConcurrentAllocator::AllocateInLabSlow(int, v8::internal::AllocationAlignment, v8::internal::AllocationOrigin) src/heap/concurrent-allocator.cc:124:8 (d8+0x7dbf7b) (BuildId: c849b9596314cb5d)
#11 AllocateInLab src/heap/concurrent-allocator-inl.h:41:16 (d8+0x82d0b1) (BuildId: c849b9596314cb5d)
#12 AllocateRaw src/heap/concurrent-allocator-inl.h:34:10 (d8+0x82d0b1)
#13 AllocateRaw<v8::internal::AllocationType::kSharedMap> src/heap/heap-allocator-inl.h:122:47 (d8+0x82d0b1)
#14 AllocateRaw src/heap/heap-allocator-inl.h:184:14 (d8+0x82d0b1)
#15 v8::internal::HeapAllocator::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) src/heap/heap-allocator.cc:75:29 (d8+0x82d0b1)
#16 v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) src/heap/heap-allocator.cc:100:7 (d8+0x82e234) (BuildId: c849b9596314cb5d)
#17 AllocateRawWith<v8::internal::HeapAllocator::kRetryOrFail> src/heap/heap-allocator-inl.h:237:16 (d8+0x808920) (BuildId: c849b9596314cb5d)
#18 v8::internal::Factory::NewMap(v8::internal::InstanceType, int, v8::internal::ElementsKind, int, v8::internal::AllocationType) src/heap/factory.cc:1848:36 (d8+0x808920)
#19 v8::internal::Builtin_Impl_SharedStructTypeConstructor(v8::internal::BuiltinArguments, v8::internal::Isolate*) src/builtins/builtins-struct.cc:84:39 (d8+0x65fa26) (BuildId: c849b9596314cb5d)
#20 v8::internal::Builtin_SharedStructTypeConstructor(int, unsigned long*, v8::internal::Isolate*) src/builtins/builtins-struct.cc:20:1 (d8+0x65f061) (BuildId: c849b9596314cb5d)
#21 <null> <null> (0x560ebfe66ef8)
#22 v8::internal::Execution::CallScript(v8::internal::Isolate*, v8::internal::Handle<v8::internal::JSFunction>, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>) src/execution/execution.cc:531:10 (d8+0x77252c) (BuildId: c849b9596314cb5d)
#23 v8::Script::Run(v8::Local<v8::Context>, v8::Local<v8::Data>) src/api/api.cc:2105:7 (d8+0x561590) (BuildId: c849b9596314cb5d)
#24 v8::Script::Run(v8::Local<v8::Context>) src/api/api.cc:2048:10 (d8+0x560d20) (BuildId: c849b9596314cb5d)
#25 v8::Shell::ExecuteString(v8::Isolate*, v8::Local<v8::String>, v8::Local<v8::String>, v8::Shell::PrintResult, v8::Shell::ReportExceptions, v8::Shell::ProcessMessageQueue) src/d8/d8.cc:773:28 (d8+0x5211d0) (BuildId: c849b9596314cb5d)
#26 v8::SourceGroup::Execute(v8::Isolate*) src/d8/d8.cc:3990:10 (d8+0x53659a) (BuildId: c849b9596314cb5d)
#27 v8::Shell::RunMain(v8::Isolate*, bool) src/d8/d8.cc:4656:39 (d8+0x53a188) (BuildId: c849b9596314cb5d)
#28 v8::Shell::Main(int, char**) src/d8/d8.cc:5473:18 (d8+0x53cd5b) (BuildId: c849b9596314cb5d)
#29 main src/d8/d8.cc:5553:43 (d8+0x53cf4e) (BuildId: c849b9596314cb5d)
Thread T7 'V8 DefaultWorke' (tid=10149, running) created by main thread at:
#0 pthread_create /b/s/w/ir/cache/builder/src/third_party/llvm/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1022:3 (d8+0x49356d) (BuildId: c849b9596314cb5d)
#1 v8::base::Thread::Start() src/base/platform/platform-posix.cc:1083:14 (d8+0x1a77076) (BuildId: c849b9596314cb5d)
#2 WorkerThread src/libplatform/default-worker-threads-task-runner.cc:66:3 (d8+0x1a830f2) (BuildId: c849b9596314cb5d)
#3 make_unique<v8::platform::DefaultWorkerThreadsTaskRunner::WorkerThread, v8::platform::DefaultWorkerThreadsTaskRunner *> buildtools/third_party/libc++/trunk/include/__memory/unique_ptr.h:725:32 (d8+0x1a830f2)
#4 v8::platform::DefaultWorkerThreadsTaskRunner::DefaultWorkerThreadsTaskRunner(unsigned int, double (*)()) src/libplatform/default-worker-threads-task-runner.cc:16:28 (d8+0x1a830f2)
#5 __shared_ptr_emplace<const int &, double (*)()> buildtools/third_party/libc++/trunk/include/__memory/shared_ptr.h:293:37 (d8+0x1a7890d) (BuildId: c849b9596314cb5d)
#6 allocate_shared<v8::platform::DefaultWorkerThreadsTaskRunner, std::__1::allocator<v8::platform::DefaultWorkerThreadsTaskRunner>, const int &, double (*)(), void> buildtools/third_party/libc++/trunk/include/__memory/shared_ptr.h:1101:55 (d8+0x1a7890d)
#7 make_shared<v8::platform::DefaultWorkerThreadsTaskRunner, const int &, double (*)(), void> buildtools/third_party/libc++/trunk/include/__memory/shared_ptr.h:1110:12 (d8+0x1a7890d)
#8 EnsureBackgroundTaskRunnerInitialized src/libplatform/default-platform.cc:133:7 (d8+0x1a7890d)
#9 v8::platform::DefaultPlatform::DefaultPlatform(int, v8::platform::IdleTaskSupport, std::__1::unique_ptr<v8::TracingController, std::__1::default_delete<v8::TracingController> >) src/libplatform/default-platform.cc:109:5 (d8+0x1a7890d)
#10 make_unique<v8::platform::DefaultPlatform, int &, v8::platform::IdleTaskSupport &, std::__1::unique_ptr<v8::TracingController, std::__1::default_delete<v8::TracingController> > > buildtools/third_party/libc++/trunk/include/__memory/unique_ptr.h:725:32 (d8+0x1a78029) (BuildId: c849b9596314cb5d)
#11 v8::platform::NewDefaultPlatform(int, v8::platform::IdleTaskSupport, v8::platform::InProcessStackDumping, std::__1::unique_ptr<v8::TracingController, std::__1::default_delete<v8::TracingController> >) src/libplatform/default-platform.cc:54:19 (d8+0x1a78029)
#12 v8::Shell::Main(int, char**) src/d8/d8.cc:5270:16 (d8+0x53b887) (BuildId: c849b9596314cb5d)
#13 main src/d8/d8.cc:5553:43 (d8+0x53cf4e) (BuildId: c849b9596314cb5d)
Thread T3 'V8 DefaultWorke' (tid=10144, running) created by main thread at:
#0 pthread_create /b/s/w/ir/cache/builder/src/third_party/llvm/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1022:3 (d8+0x49356d) (BuildId: c849b9596314cb5d)
#1 v8::base::Thread::Start() src/base/platform/platform-posix.cc:1083:14 (d8+0x1a77076) (BuildId: c849b9596314cb5d)
#2 WorkerThread src/libplatform/default-worker-threads-task-runner.cc:66:3 (d8+0x1a830f2) (BuildId: c849b9596314cb5d)
#3 make_unique<v8::platform::DefaultWorkerThreadsTaskRunner::WorkerThread, v8::platform::DefaultWorkerThreadsTaskRunner *> buildtools/third_party/libc++/trunk/include/__memory/unique_ptr.h:725:32 (d8+0x1a830f2)
#4 v8::platform::DefaultWorkerThreadsTaskRunner::DefaultWorkerThreadsTaskRunner(unsigned int, double (*)()) src/libplatform/default-worker-threads-task-runner.cc:16:28 (d8+0x1a830f2)
#5 __shared_ptr_emplace<const int &, double (*)()> buildtools/third_party/libc++/trunk/include/__memory/shared_ptr.h:293:37 (d8+0x1a7890d) (BuildId: c849b9596314cb5d)
#6 allocate_shared<v8::platform::DefaultWorkerThreadsTaskRunner, std::__1::allocator<v8::platform::DefaultWorkerThreadsTaskRunner>, const int &, double (*)(), void> buildtools/third_party/libc++/trunk/include/__memory/shared_ptr.h:1101:55 (d8+0x1a7890d)
#7 make_shared<v8::platform::DefaultWorkerThreadsTaskRunner, const int &, double (*)(), void> buildtools/third_party/libc++/trunk/include/__memory/shared_ptr.h:1110:12 (d8+0x1a7890d)
#8 EnsureBackgroundTaskRunnerInitialized src/libplatform/default-platform.cc:133:7 (d8+0x1a7890d)
#9 v8::platform::DefaultPlatform::DefaultPlatform(int, v8::platform::IdleTaskSupport, std::__1::unique_ptr<v8::TracingController, std::__1::default_delete<v8::TracingController> >) src/libplatform/default-platform.cc:109:5 (d8+0x1a7890d)
#10 make_unique<v8::platform::DefaultPlatform, int &, v8::platform::IdleTaskSupport &, std::__1::unique_ptr<v8::TracingController, std::__1::default_delete<v8::TracingController> > > buildtools/third_party/libc++/trunk/include/__memory/unique_ptr.h:725:32 (d8+0x1a78029) (BuildId: c849b9596314cb5d)
#11 v8::platform::NewDefaultPlatform(int, v8::platform::IdleTaskSupport, v8::platform::InProcessStackDumping, std::__1::unique_ptr<v8::TracingController, std::__1::default_delete<v8::TracingController> >) src/libplatform/default-platform.cc:54:19 (d8+0x1a78029)
#12 v8::Shell::Main(int, char**) src/d8/d8.cc:5270:16 (d8+0x53b887) (BuildId: c849b9596314cb5d)
#13 main src/d8/d8.cc:5553:43 (d8+0x53cf4e) (BuildId: c849b9596314cb5d)
SUMMARY: ThreadSanitizer: data race src/heap/marking.h:205:16 in ClearCellRangeRelaxed
==================
ThreadSanitizer: reported 1 warnings

View File

@ -0,0 +1,4 @@
{
"crash_type": "Data race\nREAD 8",
"crash_state": "v8::internal::compiler::JSObjectRef::GetOwnConstantElementFromHeap\nv8::internal::compiler::JSObjectRef::GetOwnConstantElement\nv8::internal::compiler::JSNativeContextSpecialization::ReduceElementLoadFromHeap"
}

View File

@ -0,0 +1,50 @@
WARNING: ThreadSanitizer: data race (pid=3187405)
Read of size 8 at 0x7ea200056b80 by thread T1:
#0 0x55ad577064dc in v8::internal::compiler::JSObjectRef::GetOwnConstantElementFromHeap(v8::internal::FixedArrayBase, v8::internal::ElementsKind, unsigned int) const src/base/memory.h:34:3
#1 0x55ad577062aa in v8::internal::compiler::JSObjectRef::GetOwnConstantElement(v8::internal::compiler::FixedArrayBaseRef, unsigned int, v8::internal::compiler::CompilationDependencies*) const src/compiler/heap-refs.cc:1815:42
#2 0x55ad577c4ff7 in v8::internal::compiler::JSNativeContextSpecialization::ReduceElementLoadFromHeapConstant(v8::internal::compiler::Node*, v8::internal::compiler::Node*, v8::internal::compiler::AccessMode, v8::internal::KeyedAccessLoadMode) src/compiler/js-native-context-specialization.cc:2325:32
#3 0x55ad577c2c8f in v8::internal::compiler::JSNativeContextSpecialization::ReduceElementAccess(v8::internal::compiler::Node*, v8::internal::compiler::Node*, v8::internal::compiler::Node*, v8::internal::compiler::ElementAccessFeedback const&) src/compiler/js-native-context-specialization.cc:2094:27
#4 0x55ad577c19f7 in v8::internal::compiler::JSNativeContextSpecialization::ReducePropertyAccess(v8::internal::compiler::Node*, v8::internal::compiler::Node*, v8::base::Optional<v8::internal::compiler::NameRef>, v8::internal::compiler::Node*, v8::internal::compiler::FeedbackSource const&, v8::internal::compiler::AccessMode) src/compiler/js-native-context-specialization.cc:2413:14
#5 0x55ad577b6099 in v8::internal::compiler::JSNativeContextSpecialization::ReduceJSLoadProperty(v8::internal::compiler::Node*) src/compiler/js-native-context-specialization.cc:2564:10
#6 0x55ad577afc8f in v8::internal::compiler::JSNativeContextSpecialization::Reduce(v8::internal::compiler::Node*) src/compiler/js-native-context-specialization.cc:108:14
#7 0x55ad576d605a in v8::internal::compiler::GraphReducer::Reduce(v8::internal::compiler::Node*) src/compiler/graph-reducer.cc:34:25
#8 0x55ad576d59f4 in v8::internal::compiler::GraphReducer::ReduceTop() src/compiler/graph-reducer.cc:178:25
#9 0x55ad576d5209 in v8::internal::compiler::GraphReducer::ReduceNode(v8::internal::compiler::Node*) src/compiler/graph-reducer.cc:75:7
#10 0x55ad576d5f35 in v8::internal::compiler::GraphReducer::ReduceGraph() src/compiler/graph-reducer.cc:97:36
#11 0x55ad57887506 in v8::internal::compiler::InliningPhase::Run(v8::internal::compiler::PipelineData*, v8::internal::Zone*) src/compiler/pipeline.cc:1422:19
#12 0x55ad578763c9 in auto v8::internal::compiler::PipelineImpl::Run<v8::internal::compiler::InliningPhase>() src/compiler/pipeline.cc:1319:16
#13 0x55ad57872135 in v8::internal::compiler::PipelineImpl::CreateGraph() src/compiler/pipeline.cc:2847:3
#14 0x55ad57871f32 in v8::internal::compiler::PipelineCompilationJob::ExecuteJobImpl(v8::internal::RuntimeCallStats*, v8::internal::LocalIsolate*) src/compiler/pipeline.cc:1247:18
#15 0x55ad565a9830 in v8::internal::OptimizedCompilationJob::ExecuteJob(v8::internal::RuntimeCallStats*, v8::internal::LocalIsolate*) src/codegen/compiler.cc:494:22
#16 0x55ad565ef91e in v8::internal::OptimizingCompileDispatcher::CompileNext(v8::internal::TurbofanCompilationJob*, v8::internal::LocalIsolate*) src/compiler-dispatcher/optimizing-compile-dispatcher.cc:105:12
#17 0x55ad565f2555 in v8::internal::OptimizingCompileDispatcher::CompileTask::RunInternal() src/compiler-dispatcher/optimizing-compile-dispatcher.cc:67:20
#18 0x55ad5640b898 in non-virtual thunk to v8::internal::CancelableTask::Run() src/tasks/cancelable-task.h:155:7
#19 0x55ad57cc46b1 in v8::platform::DefaultWorkerThreadsTaskRunner::WorkerThread::Run() src/libplatform/default-worker-threads-task-runner.cc:73:11
#20 0x55ad57cb7c23 in v8::base::ThreadEntry(void*) src/base/platform/platform.h:596:5
Previous write of size 8 at 0x7ea200056b80 by main thread:
#0 0x55ad56a49f14 in v8::internal::(anonymous namespace)::DictionaryElementsAccessor::SetLengthImpl(v8::internal::Isolate*, v8::internal::Handle<v8::internal::JSArray>, unsigned int, v8::internal::Handle<v8::internal::FixedArrayBase>) src/base/memory.h:41:3
#1 0x55ad56a675ea in v8::internal::(anonymous namespace)::ElementsAccessorBase<v8::internal::(anonymous namespace)::DictionaryElementsAccessor, v8::internal::(anonymous namespace)::ElementsKindTraits<(v8::internal::ElementsKind)13> >::SetLength(v8::internal::Handle<v8::internal::JSArray>, unsigned int) src/objects/elements.cc:758:12
#2 0x55ad56c5f9c0 in v8::internal::JSArray::SetLength(v8::internal::Handle<v8::internal::JSArray>, unsigned int) src/objects/objects.cc:5237:40
#3 0x55ad564a6616 in v8::internal::Accessors::ArrayLengthSetter(v8::Local<v8::Name>, v8::Local<v8::Value>, v8::PropertyCallbackInfo<v8::Boolean> const&) src/builtins/accessors.cc:202:7
#4 0x55ad568e961b in v8::internal::PropertyCallbackArguments::CallAccessorSetter(v8::internal::Handle<v8::internal::AccessorInfo>, v8::internal::Handle<v8::internal::Name>, v8::internal::Handle<v8::internal::Object>) src/api/api-arguments-inl.h:332:3
#5 0x55ad568e39df in v8::internal::Runtime_StoreCallbackProperty(int, unsigned long*, v8::internal::Isolate*) src/ic/ic.cc:3245:13
#6 0x55acdfe69bb8 in Builtins_AsyncFromSyncIteratorPrototypeThrow (/mnt/scratch0/clusterfuzz/bot/builds/v8-tsan_linux-release_8681dd6e7b8d9ebe281ad96b26057d51e550c14e/revisions/d8-tsan-linux-release-v8-component-83502/d8+0x1c30bb7)
#7 0x55ad5668cf86 in v8::internal::Execution::CallScript(v8::internal::Isolate*, v8::internal::Handle<v8::internal::JSFunction>, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>) src/execution/execution.cc:538:10
#8 0x55ad5642808f in v8::Script::Run(v8::Local<v8::Context>, v8::Local<v8::Data>) src/api/api.cc:2231:7
#9 0x55ad564277c1 in v8::Script::Run(v8::Local<v8::Context>) src/api/api.cc:2158:10
#10 0x55ad563e63cc in v8::Shell::ExecuteString(v8::Isolate*, v8::Local<v8::String>, v8::Local<v8::String>, v8::Shell::PrintResult, v8::Shell::ReportExceptions, v8::Shell::ProcessMessageQueue) src/d8/d8.cc:879:28
#11 0x55ad563fe621 in v8::SourceGroup::Execute(v8::Isolate*) src/d8/d8.cc:4379:10
#12 0x55ad56402488 in v8::Shell::RunMain(v8::Isolate*, bool) src/d8/d8.cc:5107:39
#13 0x55ad56404fe1 in v8::Shell::Main(int, char**) src/d8/d8.cc:5886:18
#14 0x55ad564054ef in main src/d8/d8.cc:5976:43
Thread T1 'V8 DefaultWorke' (tid=3187415, running) created by main thread at:
#0 0x55ad56353ffc in pthread_create third_party/llvm/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1022:3
#1 0x55ad57cb7b37 in v8::base::Thread::Start() src/base/platform/platform-posix.cc:1144:14
#2 0x55ad57cc40ad in v8::platform::DefaultWorkerThreadsTaskRunner::DefaultWorkerThreadsTaskRunner(unsigned int, double (*)()) src/libplatform/default-worker-threads-task-runner.cc:66:3
#3 0x55ad57cba1b1 in v8::platform::DefaultPlatform::DefaultPlatform(int, v8::platform::IdleTaskSupport, std::Cr::unique_ptr<v8::TracingController, std::Cr::default_delete<v8::TracingController> >) buildtools/third_party/libc++/trunk/include/__memory/shared_ptr.h:297:37
#4 0x55ad57cb983a in v8::platform::NewDefaultPlatform(int, v8::platform::IdleTaskSupport, v8::platform::InProcessStackDumping, std::Cr::unique_ptr<v8::TracingController, std::Cr::default_delete<v8::TracingController> >) buildtools/third_party/libc++/trunk/include/__memory/unique_ptr.h:670:30
#5 0x55ad56404252 in v8::Shell::Main(int, char**) src/d8/d8.cc:5691:16
#6 0x55ad564054ef in main src/d8/d8.cc:5976:43
SUMMARY: ThreadSanitizer: data race src/base/memory.h:34:3 in v8::internal::compiler::JSObjectRef::GetOwnConstantElementFromHeap(v8::internal::FixedArrayBase, v8::internal::ElementsKind, unsigned int) const
==================
ThreadSanitizer: reported 1 warnings

View File

@ -0,0 +1,4 @@
{
"crash_type": "",
"crash_state": ""
}

View File

@ -0,0 +1,43 @@
<--- Last few GCs --->
<--- JS stacktrace --->
#
# Fatal javascript OOM in GC during deserialization
#
Received signal 6
==== C stack trace ===============================
[0x559eb24c1167]
[0x7f27da846980]
[0x7f27d9ecbfb7]
[0x7f27d9ecd921]
[0x559eb24bec92]
[0x559eb192b71f]
[0x559eb192b685]
[0x559eb1abd785]
[0x559eb1abc125]
[0x559eb1ac6bfb]
[0x559eb1ac6c91]
[0x559eb1e5f0c8]
[0x559eb1e604a0]
[0x559eb1e5f99e]
[0x559eb1ac53c8]
[0x559eb1e6dbf8]
[0x559eb1a5eb21]
[0x559eb1a5ef79]
[0x559eb1e6b9a9]
[0x559eb194c069]
[0x559eb194c23d]
[0x559eb1919e3a]
[0x559eb1919da8]
[0x559eb24bf710]
[0x7f27da83b6db]
[0x7f27d9fae71f]
[end of stack trace]
Aborted (core dumped)

View File

@ -0,0 +1,4 @@
{
"crash_type": "",
"crash_state": ""
}

View File

@ -0,0 +1,48 @@
<--- Last few GCs --->
<--- JS stacktrace --->
#
# Fatal javascript OOM in GC during deserialization
#
Received signal 6
==== C stack trace ===============================
[0x7f31c97776b7]
[0x7f31c631b980]
[0x7f31c5bb8e87]
[0x7f31c5bba7f1]
[0x7f31c9775332]
[0x7f31c7c8daf5]
[0x7f31c7c8d97d]
[0x7f31c81a33a5]
[0x7f31c81a15ed]
[0x7f31c81914df]
[0x7f31c81915c1]
[0x7f31c8134c33]
[0x7f31c8adbc18]
[0x7f31c8ad7af1]
[0x7f31c8ada0d5]
[0x7f31c8ad7fdd]
[0x7f31c8adb0be]
[0x7f31c8ad9c46]
[0x7f31c81b4499]
[0x7f31c81adcc9]
[0x7f31c8b16d0e]
[0x7f31c809ed03]
[0x7f31c809fcb1]
[0x7f31c8b114b7]
[0x7f31c7d02526]
[0x7f31c7d02b2d]
[0x565117ee00ed]
[0x565117ee0008]
[0x7f31c9776470]
[0x7f31c63106db]
[0x7f31c5c9b61f]
[end of stack trace]
Aborted (core dumped)

View File

@ -0,0 +1,4 @@
{
"crash_type": "DCHECK failure",
"crash_state": "!has_optimized_code() || optimized_code().marked_for_deoptimization() || (CodeKi"
}

View File

@ -0,0 +1,30 @@
#
# Fatal error in ../../src/objects/feedback-vector.cc, line 396
# Debug check failed: !has_optimized_code() || optimized_code().marked_for_deoptimization() || (CodeKindCanTierUp(optimized_code().kind()) && optimized_code().kind() < code.kind()) || v8_flags.stress_concurrent_inlining_attach_code.
#
#
#
#FailureMessage Object: 0x7fffe8420b90Received signal 6
==== C stack trace ===============================
[0x7fdffc28c263]
[0x7fdffc28c1b1]
[0x7fdff8747980]
[0x7fdff7fe4e87]
[0x7fdff7fe67f1]
[0x7fdffc289de2]
[0x7fdffc26bbe0]
[0x7fdffc26b675]
[0x7fdffae468b2]
[0x7fdffa6c2f1b]
[0x7fdffa6c3517]
[0x7fdffb4f49b5]
[0x7fdffa8bc015]
[0x7fdffb2fa1e4]
[0x7fdffb2f9cd7]
[0x7fdf7f9c83ff]
[end of stack trace]
Aborted (core dumped)

View File

@ -0,0 +1,4 @@
{
"crash_type": "",
"crash_state": ""
}

View File

@ -0,0 +1,33 @@
<--- Last few GCs --->
nd[29661:0x563245f31e60] 3744 ms: Mark-sweep 94.8 (110.0) -> 92.7 (109.5) MB, 376.4 / 0.0 ms (+ 17.3 ms in 1 steps since start of marking, biggest step 17.3 ms, walltime since start of marking 460 ms) (average mu = 0.267, current mu = 0.191) background[29661:0x563245f31e60] 4198 ms: Mark-sweep 96.8 (113.0) -> 95.2 (111.7) MB, 377.4 / 0.0 ms (+ 0.0 ms in 0 steps since start of marking, biggest step 0.0 ms, walltime since start of marking 431 ms) (average mu = 0.221, current mu = 0.169) background a
<--- JS stacktrace --->
#
# Fatal javascript OOM in Reached heap limit
#
Received signal 6
==== C stack trace ===============================
[0x7ff0cca95ee7]
[0x7ff0c9876980]
[0x7ff0c9111fb7]
[0x7ff0c9113921]
[0x7ff0cca93c52]
[0x7ff0cb13fc25]
[0x7ff0cb13faad]
[0x7ff0cb5e77d5]
[0x7ff0cb5e5a93]
[0x7ff0cb5ea284]
[0x7ff0cb58ad35]
[0x7ff0cb5f9306]
[0x7ff0cb5f9595]
[0x7ff0cb58920a]
[0x7ff0cbdead26]
[0x7ff0cab572bf]
[end of stack trace]
Aborted (core dumped)

View File

@ -0,0 +1,4 @@
{
"crash_type": "DCHECK failure",
"crash_state": "is_main_thread_barrier_ in marking-barrier.cc"
}

View File

@ -0,0 +1,30 @@
#
# Fatal error in ../../src/heap/marking-barrier.cc, line 77
# Debug check failed: is_main_thread_barrier_.
#
#
#
#FailureMessage Object: 0x7fbcb88255c0Received signal 6
==== C stack trace ===============================
[0x7fbcc0a3a7f7]
[0x7fbcbd9c1980]
[0x7fbcbd25efb7]
[0x7fbcbd260921]
[0x7fbcc0a38932]
[0x7fbcc0a1dfa0]
[0x7fbcc0a1da15]
[0x7fbcbf65b64a]
[0x7fbcbfeb60df]
[0x7fbcbfec3389]
[0x7fbcbfec324c]
[0x7fbcbfea5c34]
[0x7fbcbfea7f18]
[0x7fbcc0a395a0]
[0x7fbcbd9b66db]
[0x7fbcbd34171f]
[end of stack trace]
Aborted (core dumped)

View File

@ -0,0 +1,4 @@
{
"crash_type": "DCHECK failure",
"crash_state": "is_main_thread_barrier_ in marking-barrier.cc"
}

View File

@ -0,0 +1,26 @@
#
# Fatal error in ../../src/heap/marking-barrier.cc, line 77
# Debug check failed: is_main_thread_barrier_.
#
#
#
#FailureMessage Object: 0x7fa0116815c0
==== C stack trace ===============================
/b/s/w/ir/out/build/libv8_libbase.so(v8::base::debug::StackTrace::StackTrace()+0x13) [0x7fa01988e8c3]
/b/s/w/ir/out/build/libv8_libplatform.so(+0x1bfed) [0x7fa01983efed]
/b/s/w/ir/out/build/libv8_libbase.so(V8_Fatal(char const*, int, char const*, ...)+0x153) [0x7fa019871fb3]
/b/s/w/ir/out/build/libv8_libbase.so(+0x24a35) [0x7fa019871a35]
/b/s/w/ir/out/build/libv8.so(v8::internal::MarkingBarrier::Write(v8::internal::DescriptorArray, int)+0xca) [0x7fa0184b52fa]
/b/s/w/ir/out/build/libv8.so(v8::internal::Deserializer<v8::internal::LocalIsolate>::WeakenDescriptorArrays()+0x8f) [0x7fa018d1170f]
/b/s/w/ir/out/build/libv8.so(v8::internal::OffThreadObjectDeserializer::Deserialize(std::__Cr::vector<v8::internal::Handle<v8::internal::Script>, std::__Cr::allocator<v8::internal::Handle<v8::internal::Script> > >*)+0xc9) [0x7fa018d1e9b9]
/b/s/w/ir/out/build/libv8.so(v8::internal::OffThreadObjectDeserializer::DeserializeSharedFunctionInfo(v8::internal::LocalIsolate*, v8::internal::SerializedCodeData const*, std::__Cr::vector<v8::internal::Handle<v8::internal::Script>, std::__Cr::allocator<v8::internal::Handle<v8::internal::Script> > >*)+0x1ac) [0x7fa018d1e87c]
/b/s/w/ir/out/build/libv8.so(v8::internal::CodeSerializer::StartDeserializeOffThread(v8::internal::LocalIsolate*, v8::internal::AlignedCachedData*)+0x144) [0x7fa018d01264]
/b/s/w/ir/out/build/libv8.so(+0x2079548) [0x7fa018d03548]
/b/s/w/ir/out/build/libv8_libbase.so(+0x405c0) [0x7fa01988d5c0]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x76db) [0x7fa0168116db]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x3f) [0x7fa01619c71f]
Received signal 6
Aborted (core dumped)

View File

@ -0,0 +1,4 @@
{
"crash_type": "CHECK failure",
"crash_state": "JSFunctionRef construction failed"
}

View File

@ -0,0 +1,55 @@
#
# Fatal error in , line 0
# Check failed: JSFunctionRef construction failed.
#
#
#
#FailureMessage Object: 0x7fe2840bb790Received signal 6
==== C stack trace ===============================
[0x560fb0a62e08]
[0x560fb1e5dbdc]
[0x560fb0a4be9c]
[0x560fb0a83a8c]
[0x7fe288cdf980]
[0x7fe28815cfb7]
[0x7fe28815e921]
[0x560fb0a4ae48]
[0x560fb1e5a0d7]
[0x560fb1e4dd5f]
[0x560fb19082b3]
[0x560fb19c1975]
[0x560fb1917895]
[0x560fb190b1b4]
[0x560fb1935a48]
[0x560fb1aab7de]
[0x560fb1aac3d2]
[0x560fb19f6cb0]
[0x560fb19ed1eb]
[0x560fb19e96f5]
[0x560fb19ed32e]
[0x560fb19e4111]
[0x560fb19def82]
[0x560fb18f6cee]
[0x560fb18f6348]
[0x560fb18f5b69]
[0x560fb18f6be5]
[0x560fb1aa51ed]
[0x560fb1a96dea]
[0x560fb1a9259d]
[0x560fb1a92825]
[0x560fb0bfc5d0]
[0x560fb0c3812e]
[0x560fb0c3b775]
[0x560fb0ae4046]
[0x560fb0abdbd2]
[0x560fb1e67121]
[0x560fb1e5afb3]
[0x560fb0a4526d]
[0x7fe288cd46db]
[0x7fe28823f71f]
[end of stack trace]
Aborted (core dumped)

View File

@ -0,0 +1,4 @@
{
"crash_type": "CHECK failure",
"crash_state": "marking_state_->IsBlack(heap_object) in mark-compact.cc"
}

View File

@ -0,0 +1,37 @@
#
# Fatal error in ../../src/heap/mark-compact.cc, line 285
# Check failed: marking_state_->IsBlack(heap_object).
#
#
#
#FailureMessage Object: 0x7ffce64f0700
==== C stack trace ===============================
/b/s/w/ir/out/build/libv8_libbase.so(v8::base::debug::StackTrace::StackTrace()+0x13) [0x7f644a73e4b3]
/b/s/w/ir/out/build/libv8_libplatform.so(+0x1bc5d) [0x7f644a6e2c5d]
/b/s/w/ir/out/build/libv8_libbase.so(V8_Fatal(char const*, int, char const*, ...)+0x153) [0x7f644a71e653]
/b/s/w/ir/out/build/libv8.so(+0x1b80d25) [0x7f6449080d25]
/b/s/w/ir/out/build/libv8.so(v8::internal::CommonFrame::IterateExpressions(v8::internal::RootVisitor*) const+0x144) [0x7f6448eed414]
/b/s/w/ir/out/build/libv8.so(v8::internal::JavaScriptFrame::Iterate(v8::internal::RootVisitor*) const+0x16) [0x7f6448efa386]
/b/s/w/ir/out/build/libv8.so(v8::internal::Isolate::Iterate(v8::internal::RootVisitor*, v8::internal::ThreadLocalTop*)+0x249) [0x7f6448f072c9]
/b/s/w/ir/out/build/libv8.so(v8::internal::Heap::IterateRoots(v8::internal::RootVisitor*, v8::base::EnumSet<v8::internal::SkipRoot, int>)+0x175) [0x7f6449021935]
/b/s/w/ir/out/build/libv8.so(v8::internal::Heap::IterateRootsIncludingClients(v8::internal::RootVisitor*, v8::base::EnumSet<v8::internal::SkipRoot, int>)+0x42) [0x7f6449028362]
/b/s/w/ir/out/build/libv8.so(+0x1b64e35) [0x7f6449064e35]
/b/s/w/ir/out/build/libv8.so(v8::internal::MarkCompactCollector::VerifyMarking()+0xaf) [0x7f6449061dbf]
/b/s/w/ir/out/build/libv8.so(v8::internal::MarkCompactCollector::CollectGarbage()+0x27) [0x7f644905f487]
/b/s/w/ir/out/build/libv8.so(v8::internal::Heap::MarkCompact()+0x2a1) [0x7f644901abb1]
/b/s/w/ir/out/build/libv8.so(v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::internal::GarbageCollectionReason, char const*, v8::GCCallbackFlags)+0x5b9) [0x7f6449017949]
/b/s/w/ir/out/build/libv8.so(v8::internal::Heap::PerformSharedGarbageCollection(v8::internal::Isolate*, v8::internal::GarbageCollectionReason)+0x1a2) [0x7f644901c552]
/b/s/w/ir/out/build/libv8.so(v8::internal::HeapAllocator::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment)+0x49) [0x7f64490064e9]
/b/s/w/ir/out/build/libv8.so(v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment)+0x21) [0x7f6449006621]
/b/s/w/ir/out/build/libv8.so(v8::internal::HeapObject v8::internal::HeapAllocator::AllocateRawWith<(v8::internal::HeapAllocator::AllocationRetryMode)1>(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment)+0x73) [0x7f6448fb3fe3]
/b/s/w/ir/out/build/libv8.so(v8::internal::FactoryBase<v8::internal::Factory>::AllocateRawArray(int, v8::internal::AllocationType)+0x1d) [0x7f6448f9d3bd]
/b/s/w/ir/out/build/libv8.so(v8::internal::FactoryBase<v8::internal::Factory>::NewFixedArrayWithFiller(v8::internal::Handle<v8::internal::Map>, int, v8::internal::Handle<v8::internal::Oddball>, v8::internal::AllocationType)+0x40) [0x7f6448f9c720]
/b/s/w/ir/out/build/libv8.so(v8::internal::FactoryBase<v8::internal::Factory>::NewFixedArray(int, v8::internal::AllocationType)+0x75) [0x7f6448f9c665]
/b/s/w/ir/out/build/libv8.so(+0x178c16f) [0x7f6448c8c16f]
/b/s/w/ir/out/build/libv8.so(v8::internal::Builtin_SharedArrayConstructor(int, unsigned long*, v8::internal::Isolate*)+0xa4) [0x7f6448c8bbe4]
[0x7f63df9cf67f]
Received signal 6
Aborted (core dumped)

View File

@ -0,0 +1,4 @@
{
"crash_type": "CHECK failure",
"crash_state": "!maybe.IsCleared() in code-inl.h"
}

View File

@ -0,0 +1,21 @@
#
# Fatal error in ../../src/objects/code-inl.h, line 1210
# Check failed: !maybe.IsCleared().
#
#
#
#FailureMessage Object: 0x7ffc7bce3850
==== C stack trace ===============================
/b/s/w/ir/out/build/libv8_libbase.so(v8::base::debug::StackTrace::StackTrace()+0x13) [0x7f943d292143]
/b/s/w/ir/out/build/libv8_libplatform.so(+0x1c1bd) [0x7f943d2421bd]
/b/s/w/ir/out/build/libv8_libbase.so(V8_Fatal(char const*, int, char const*, ...)+0x153) [0x7f943d2758b3]
/b/s/w/ir/out/build/libv8.so(v8::internal::DeoptimizationLiteralArray::get(int) const+0xcd) [0x7f943bbea88d]
/b/s/w/ir/out/build/libv8.so(v8::internal::TranslatedState::CreateNextTranslatedValue(int, v8::internal::TranslationArrayIterator*, v8::internal::DeoptimizationLiteralArray, unsigned long, v8::internal::RegisterValues*, _IO_FILE*)+0x7b7) [0x7f943bbee387]
/b/s/w/ir/out/build/libv8.so(v8::internal::TranslatedState::Init(v8::internal::Isolate*, unsigned long, unsigned long, v8::internal::TranslationArrayIterator*, v8::internal::DeoptimizationLiteralArray, v8::internal::RegisterValues*, _IO_FILE*, int, int)+0x41f) [0x7f943bbefe5f]
/b/s/w/ir/out/build/libv8.so(v8::internal::Deoptimizer::DoComputeOutputFrames()+0x8ab) [0x7f943bbde04b]
[0xd3007600544]
Received signal 6
Aborted (core dumped)

View File

@ -0,0 +1,4 @@
{
"crash_type": "Fatal error",
"crash_state": "Missing deoptimization information for OptimizedFrame::Summarize"
}

View File

@ -0,0 +1,24 @@
#
# Fatal error in , line 0
# Missing deoptimization information for OptimizedFrame::Summarize.
#
#
#
#FailureMessage Object: 0x7ffc291ecd70
==== C stack trace ===============================
/b/s/w/ir/out/build/d8(__interceptor_backtrace+0xca) [0x559a3689f74a]
/b/s/w/ir/out/build/d8(+0x1d3da40) [0x559a380f9a40]
/b/s/w/ir/out/build/d8(+0x1d3cd54) [0x559a380f8d54]
/b/s/w/ir/out/build/d8(+0x1d2af46) [0x559a380e6f46]
/b/s/w/ir/out/build/d8(+0x803da6) [0x559a36bbfda6]
/b/s/w/ir/out/build/d8(+0x7fc16d) [0x559a36bb816d]
/b/s/w/ir/out/build/d8(+0x8180f8) [0x559a36bd40f8]
/b/s/w/ir/out/build/d8(+0x816ad4) [0x559a36bd2ad4]
/b/s/w/ir/out/build/d8(+0x8163a4) [0x559a36bd23a4]
/b/s/w/ir/out/build/d8(+0xf772fc) [0x559a373332fc]
[0x5599bfe6fe78]
Received signal 6
Aborted (core dumped)

View File

@ -0,0 +1,4 @@
{
"crash_type": "Null-dereference",
"crash_state": "NULL"
}

View File

@ -0,0 +1,13 @@
Received signal 11 SEGV_MAPERR 000000000030
==== C stack trace ===============================
[0x55b2023882a7]
[0x7f044e972980]
[0x7f044e969fd0]
[0x55b201949b84]
[0x55b20194b6da]
[0x55b201cf7206]
[0x0ad7000b4778]
[end of stack trace]
Segmentation fault (core dumped)

View File

@ -0,0 +1,4 @@
{
"crash_type": "UNKNOWN",
"crash_state": "NULL"
}

View File

@ -0,0 +1,9 @@
Received signal 11 SEGV_ACCERR 2e2d00002258
==== C stack trace ===============================
[0x5562678976c6]
[0x7f36e5f68980]
[0x5561e008adaf]
[end of stack trace]
Segmentation fault (core dumped)

View File

@ -0,0 +1,4 @@
{
"crash_type": "Null-dereference",
"crash_state": "NULL"
}

View File

@ -0,0 +1,15 @@
Received signal 11 SEGV_MAPERR 000000000000
==== C stack trace ===============================
[0x562f1fdf8d47]
[0x7f32df0c6980]
[0x562f1f293057]
[0x562f1f292f0e]
[0x562f1fdf9fd7]
[0x562f1fdfc139]
[0x562f1fdf72f0]
[0x7f32df0bb6db]
[0x7f32de82e71f]
[end of stack trace]
Segmentation fault (core dumped)

View File

@ -0,0 +1,4 @@
{
"crash_type": "DCHECK failure",
"crash_state": "is_main_thread_barrier_ in marking-barrier.cc"
}

View File

@ -0,0 +1,60 @@
#
# Fatal error in ../../src/execution/frames.cc, line 1430
# Debug check failed: !StackFrame::IsTypeMarker(marker).
#
#
#
#FailureMessage Object: 0x7fff924da4a0Received signal 6
==== C stack trace ===============================
[0x7fb3c0ab1503]
[0x7fb3c0ab1451]
[0x7fb3bd06a980]
[0x7fb3bc907e87]
[0x7fb3bc9097f1]
[0x7fb3c0aaf082]
[0x7fb3c0a90ed0]
[0x7fb3c0a90965]
[0x7fb3bf128909]
[0x7fb3bf1408c9]
[0x7fb3bf27ec15]
[0x7fb3bf27776b]
[0x7fb3bf274c53]
[0x7fb3bf271e03]
[0x7fb3bf262ae1]
[0x7fb3bf262b71]
[0x7fb3bf20b953]
[0x7fb3bf1d3a22]
[0x7fb3c01f46ca]
#
# Fatal error in ../../src/heap/marking-barrier.cc, line 77
# Debug check failed: is_main_thread_barrier_.
#
#
#
#FailureMessage Object: 0x7fbcb88255c0Received signal 6
==== C stack trace ===============================
[0x7fbcc0a3a7f7]
[0x7fbcbd9c1980]
[0x7fbcbd25efb7]
[0x7fbcbd260921]
[0x7fbcc0a38932]
[0x7fbcc0a1dfa0]
[0x7fbcc0a1da15]
[0x7fbcbf65b64a]
[0x7fbcbfeb60df]
[0x7fbcbfec3389]
[0x7fbcbfec324c]
[0x7fbcbfea5c34]
[0x7fbcbfea7f18]
[0x7fbcc0a395a0]
[0x7fbcbd9b66db]
[0x7fbcbd34171f]
[end of stack trace]
Aborted (core dumped)

View File

@ -0,0 +1,4 @@
{
"crash_type": "Static Assertion",
"crash_state": "Expected Turbofan static assert to hold, but got non-true input"
}

View File

@ -0,0 +1,37 @@
#
# Fatal error in ../../src/compiler/backend/instruction-selector.cc, line 3202
# Expected Turbofan static assert to hold, but got non-true input:
%TurbofanStaticAssert
#
#
#
#FailureMessage Object: 0x7ffc34427560Received signal 6
==== C stack trace ===============================
[0x7efe1f546b93]
[0x7efe1f546ae2]
[0x7efe1b907980]
[0x7efe1b1a4e87]
[0x7efe1b1a67f1]
[0x7efe1f544712]
[0x7efe1f5263d2]
[0x7efe1ed5b249]
[0x7efe1ed58a58]
[0x7efe1ed4e6fa]
[0x7efe1ed4d4d6]
[0x7efe1f0ba876]
[0x7efe1f07023b]
[0x7efe1f06837b]
[0x7efe1f062006]
[0x7efe1f061580]
[0x7efe1d8c2710]
[0x7efe1d8d5502]
[0x7efe1d8d8a55]
[0x7efe1e509ec6]
[0x7efe1e509879]
[0x7efd9f9da37f]
[end of stack trace]
Aborted (core dumped)

View File

@ -0,0 +1,4 @@
{
"crash_type": "Static Assertion",
"crash_state": "Expected Turbofan static assert to hold, but got non-true input"
}

View File

@ -0,0 +1,37 @@
unsupported node type: StaticAssert[%TurbofanStaticAssert]
132: StaticAssert[%TurbofanStaticAssert](113, 319)
113: Word32Equal(130, 128)
319: DeoptimizeUnless[WrongCallTarget, FeedbackSource(INVALID)](86, 253, 303, 129)
#
# Fatal error in , line 0
# unimplemented code
#
#
#
#FailureMessage Object: 0x7fff6c485990Received signal 6
==== C stack trace ===============================
[0x55b035fcd8da]
[0x55b03798aebb]
[0x55b035fb3607]
[0x55b035fb3b24]
[0x7fb750346980]
[0x7fb74f5a9e87]
[0x7fb74f5ab7f1]
[0x55b035fb2283]
[0x55b037985d87]
[0x55b0379767ab]
[0x55b03765bdf7]
[0x55b03764ee25]
[0x55b0374fdbcb]
[0x55b0374f7d42]
[0x55b0374f6c77]
[0x55b0362183f8]
[0x55b03621b230]
[0x55b036a886a8]
[0x55b03776c678]
[end of stack trace]
Aborted (core dumped)

View File

@ -0,0 +1,4 @@
{
"crash_type": "CHECK failure",
"crash_state": "storage_.is_populated_"
}

View File

@ -0,0 +1,35 @@
#
# Fatal error in , line 0
# Check failed: storage_.is_populated_.
#
#
#
#FailureMessage Object: 0x7f9d3a7b77b0
==== C stack trace ===============================
/b/s/w/ir/out/build/d8(+0xec0b43) [0x55e9d253cb43]
/b/s/w/ir/out/build/d8(+0xec03eb) [0x55e9d253c3eb]
/b/s/w/ir/out/build/d8(+0xeb68e5) [0x55e9d25328e5]
/b/s/w/ir/out/build/d8(+0xb429ac) [0x55e9d21be9ac]
/b/s/w/ir/out/build/d8(+0xb528b2) [0x55e9d21ce8b2]
/b/s/w/ir/out/build/d8(+0xc228ec) [0x55e9d229e8ec]
/b/s/w/ir/out/build/d8(+0xc1cc2c) [0x55e9d2298c2c]
/b/s/w/ir/out/build/d8(+0xc1cb40) [0x55e9d2298b40]
/b/s/w/ir/out/build/d8(+0xb9dfcf) [0x55e9d2219fcf]
/b/s/w/ir/out/build/d8(+0xb9db13) [0x55e9d2219b13]
/b/s/w/ir/out/build/d8(+0xb9d718) [0x55e9d2219718]
/b/s/w/ir/out/build/d8(+0xc9e908) [0x55e9d231a908]
/b/s/w/ir/out/build/d8(+0xc93912) [0x55e9d230f912]
/b/s/w/ir/out/build/d8(+0xc908f1) [0x55e9d230c8f1]
/b/s/w/ir/out/build/d8(+0xc90a8e) [0x55e9d230ca8e]
/b/s/w/ir/out/build/d8(+0x420adb) [0x55e9d1a9cadb]
/b/s/w/ir/out/build/d8(+0x442558) [0x55e9d1abe558]
/b/s/w/ir/out/build/d8(+0x443082) [0x55e9d1abf082]
/b/s/w/ir/out/build/d8(+0xec3e29) [0x55e9d253fe29]
/b/s/w/ir/out/build/d8(+0xebf060) [0x55e9d253b060]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x76db) [0x7f9d3bb276db]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x3f) [0x7f9d3b29a71f]
Received signal 6
Aborted (core dumped)

View File

@ -0,0 +1,4 @@
{
"crash_type": "DCHECK failure",
"crash_state": "topmost_optimized_code.is_null() || safe_if_deopt_triggered || is_builtin_code i"
}

View File

@ -0,0 +1,24 @@
#
# Fatal error in ../../src/deoptimizer/deoptimizer.cc, line 336
# Debug check failed: topmost_optimized_code.is_null() || safe_if_deopt_triggered || is_builtin_code.
#
#
#
#FailureMessage Object: 0x7ffd90181f90
==== C stack trace ===============================
/b/s/w/ir/out/build/libv8_libbase.so(v8::base::debug::StackTrace::StackTrace()+0x13) [0x7f1c0ac48243]
/b/s/w/ir/out/build/libv8_libplatform.so(+0x1865d) [0x7f1c0abf065d]
/b/s/w/ir/out/build/libv8_libbase.so(V8_Fatal(char const*, int, char const*, ...)+0x153) [0x7f1c0ac27bb3]
/b/s/w/ir/out/build/libv8_libbase.so(+0x2a655) [0x7f1c0ac27655]
/b/s/w/ir/out/build/libv8.so(v8::internal::Deoptimizer::DeoptimizeMarkedCodeForContext(v8::internal::NativeContext)+0x2e2) [0x7f1c0918d762]
/b/s/w/ir/out/build/libv8.so(v8::internal::Deoptimizer::DeoptimizeMarkedCode(v8::internal::Isolate*)+0x1d5) [0x7f1c0918f1c5]
/b/s/w/ir/out/build/libv8.so(v8::internal::Heap::DeoptMarkedAllocationSites()+0x5b) [0x7f1c0939e2eb]
/b/s/w/ir/out/build/libv8.so(v8::internal::StackGuard::HandleInterrupts()+0x90c) [0x7f1c0929c4dc]
/b/s/w/ir/out/build/libv8.so(+0x25908c4) [0x7f1c09cd58c4]
/b/s/w/ir/out/build/libv8.so(v8::internal::Runtime_StackGuard(int, unsigned long*, v8::internal::Isolate*)+0xb7) [0x7f1c09cd53b7]
[0x7f1b9f9cc3ff]
Received signal 6
Aborted (core dumped)

View File

@ -0,0 +1,4 @@
{
"crash_type": "Type Assertion",
"crash_state": "Trace/breakpoint trap (core dumped)"
}

View File

@ -0,0 +1 @@
Trace/breakpoint trap (core dumped)

View File

@ -0,0 +1,4 @@
{
"crash_type": "Type Assertion",
"crash_state": "Trace/breakpoint trap (core dumped)"
}

View File

@ -0,0 +1,5 @@
Type assertion failed! (value/expectedType/nodeId)
0x5510000ffcf5 <HeapNumber -2147483647.0>
0x551000058dfd <Other heap object (TURBOFAN_UNION_TYPE_TYPE)>
5156
Trace/breakpoint trap (core dumped)

View File

@ -0,0 +1,4 @@
{
"crash_type": "Unreachable code",
"crash_state": "NULL"
}

View File

@ -0,0 +1,28 @@
#
# Fatal error in , line 0
# unimplemented code
#
#
#
#FailureMessage Object: 0x7ff272c984b0
==== C stack trace ===============================
/b/s/w/ir/out/build/d8(+0x11db253) [0x55cf35eeb253]
/b/s/w/ir/out/build/d8(+0x11daa7b) [0x55cf35eeaa7b]
/b/s/w/ir/out/build/d8(+0x11ced35) [0x55cf35eded35]
/b/s/w/ir/out/build/d8(+0xffd0ee) [0x55cf35d0d0ee]
/b/s/w/ir/out/build/d8(+0xff82d7) [0x55cf35d082d7]
/b/s/w/ir/out/build/d8(+0xf4362a) [0x55cf35c5362a]
/b/s/w/ir/out/build/d8(+0xf3f1ab) [0x55cf35c4f1ab]
/b/s/w/ir/out/build/d8(+0xf3e850) [0x55cf35c4e850]
/b/s/w/ir/out/build/d8(+0x4d80ab) [0x55cf351e80ab]
/b/s/w/ir/out/build/d8(+0x50a448) [0x55cf3521a448]
/b/s/w/ir/out/build/d8(+0x50aef9) [0x55cf3521aef9]
/b/s/w/ir/out/build/d8(+0x11de7e9) [0x55cf35eee7e9]
/b/s/w/ir/out/build/d8(+0x11d8c30) [0x55cf35ee8c30]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x76db) [0x7ff2750456db]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x3f) [0x7ff2747b861f]
Received signal 6
Aborted (core dumped)

View File

@ -0,0 +1,3 @@
SetFlag
MarkWasUsedForAllocation
v8::internal::PagedSpaceBase::SetLinearAllocationArea(unsigned long, unsigned long)

View File

@ -0,0 +1,91 @@
==================
WARNING: ThreadSanitizer: data race (pid=24781)
Write of size 8 at 0x7e9b00080008 by main thread (mutexes: write M0):
#0 operator|= src/base/flags.h:47:11 (d8+0xa03eff) (BuildId: 2d1896fcafe8220c)
#1 operator|= src/base/flags.h:66:46 (d8+0xa03eff)
#2 SetFlag src/heap/basic-memory-chunk.h:198:48 (d8+0xa03eff)
#3 MarkWasUsedForAllocation src/heap/memory-chunk.h:223:37 (d8+0xa03eff)
#4 v8::internal::PagedSpaceBase::SetLinearAllocationArea(unsigned long, unsigned long) src/heap/paged-spaces.cc:435:13 (d8+0xa03eff)
#5 v8::internal::PagedSpaceBase::TryAllocationFromFreeListMain(unsigned long, v8::internal::AllocationOrigin) src/heap/paged-spaces.cc:653:3 (d8+0xa04b8e) (BuildId: 2d1896fcafe8220c)
#6 v8::internal::PagedSpaceBase::RawRefillLabMain(int, v8::internal::AllocationOrigin) src/heap/paged-spaces.cc:991:7 (d8+0xa066b4) (BuildId: 2d1896fcafe8220c)
#7 v8::internal::PagedSpaceBase::RefillLabMain(int, v8::internal::AllocationOrigin) src/heap/paged-spaces.cc:960:10 (d8+0xa065f7) (BuildId: 2d1896fcafe8220c)
#8 EnsureAllocation src/heap/paged-spaces-inl.h:89:10 (d8+0x9f33a8) (BuildId: 2d1896fcafe8220c)
#9 EnsureAllocation src/heap/new-spaces-inl.h:109:24 (d8+0x9f33a8)
#10 v8::internal::PagedNewSpace::EnsureAllocation(int, v8::internal::AllocationAlignment, v8::internal::AllocationOrigin, int*) src/heap/new-spaces.h:800:25 (d8+0x9f33a8)
#11 AllocateRawUnaligned src/heap/spaces-inl.h:277:8 (d8+0x8b41ea) (BuildId: 2d1896fcafe8220c)
#12 AllocateRawSlow src/heap/spaces-inl.h:331:13 (d8+0x8b41ea)
#13 AllocateRaw src/heap/spaces-inl.h:269:31 (d8+0x8b41ea)
#14 AllocateRaw<(v8::internal::AllocationType)0> src/heap/heap-allocator-inl.h:107:28 (d8+0x8b41ea)
#15 AllocateRawWith<(v8::internal::HeapAllocator::AllocationRetryMode)1> src/heap/heap-allocator-inl.h:230:14 (d8+0x8b41ea)
#16 v8::internal::Factory::AllocateRawWithAllocationSite(v8::internal::Handle<v8::internal::Map>, v8::internal::AllocationType, v8::internal::Handle<v8::internal::AllocationSite>) src/heap/factory.cc:356:36 (d8+0x8b41ea)
#17 v8::internal::Factory::NewJSObjectFromMap(v8::internal::Handle<v8::internal::Map>, v8::internal::AllocationType, v8::internal::Handle<v8::internal::AllocationSite>) src/heap/factory.cc:2728:7 (d8+0x8ba650) (BuildId: 2d1896fcafe8220c)
#18 __RT_impl_Runtime_NewArray src/runtime/runtime-array.cc:116:58 (d8+0xfa02b1) (BuildId: 2d1896fcafe8220c)
#19 v8::internal::Runtime_NewArray(int, unsigned long*, v8::internal::Isolate*) src/runtime/runtime-array.cc:44:1 (d8+0xfa02b1)
#20 Builtins_AsyncFromSyncIteratorPrototypeThrow setup-isolate-deserialize.cc (d8+0x1c3cd77)
#21 v8::internal::Execution::CallScript(v8::internal::Isolate*, v8::internal::Handle<v8::internal::JSFunction>, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>) src/execution/execution.cc:538:10 (d8+0x8187b5) (BuildId: 2d1896fcafe8220c)
#22 v8::Script::Run(v8::Local<v8::Context>, v8::Local<v8::Data>) src/api/api.cc:2151:7 (d8+0x5b210e) (BuildId: 2d1896fcafe8220c)
#23 v8::Script::Run(v8::Local<v8::Context>) src/api/api.cc:2078:10 (d8+0x5b1840) (BuildId: 2d1896fcafe8220c)
#24 v8::Shell::ExecuteString(v8::Isolate*, v8::Local<v8::String>, v8::Local<v8::String>, v8::Shell::PrintResult, v8::Shell::ReportExceptions, v8::Shell::ProcessMessageQueue) src/d8/d8.cc:879:28 (d8+0x5703cb) (BuildId: 2d1896fcafe8220c)
#25 v8::SourceGroup::Execute(v8::Isolate*) src/d8/d8.cc:4379:10 (d8+0x588620) (BuildId: 2d1896fcafe8220c)
#26 v8::Shell::RunMain(v8::Isolate*, bool) src/d8/d8.cc:5107:39 (d8+0x58c487) (BuildId: 2d1896fcafe8220c)
#27 v8::Shell::Main(int, char**) src/d8/d8.cc:5886:18 (d8+0x58efe0) (BuildId: 2d1896fcafe8220c)
#28 main src/d8/d8.cc:5976:43 (d8+0x58f4ee) (BuildId: 2d1896fcafe8220c)
Previous read of size 8 at 0x7e9b00080008 by thread T6:
#0 GetFlags src/heap/basic-memory-chunk.h:211:45 (d8+0x88ee2f) (BuildId: 2d1896fcafe8220c)
#1 ShouldSkipEvacuationSlotRecording src/heap/basic-memory-chunk.h:240:29 (d8+0x88ee2f)
#2 RecordSlot src/heap/mark-compact-inl.h:68:21 (d8+0x88ee2f)
#3 void v8::internal::ConcurrentMarkingVisitor::RecordSlot<v8::internal::CompressedHeapObjectSlot>(v8::internal::HeapObject, v8::internal::CompressedHeapObjectSlot, v8::internal::HeapObject) src/heap/concurrent-marking.cc:481:5 (d8+0x88ee2f)
#4 void v8::internal::MarkingVisitorBase<v8::internal::ConcurrentMarkingVisitor, v8::internal::ConcurrentMarkingState>::ProcessStrongHeapObject<v8::internal::CompressedHeapObjectSlot>(v8::internal::HeapObject, v8::internal::CompressedHeapObjectSlot, v8::internal::HeapObject) src/heap/marking-visitor-inl.h:49:23 (d8+0x88ed97) (BuildId: 2d1896fcafe8220c)
#5 VisitPointersImpl<v8::internal::CompressedObjectSlot> src/heap/marking-visitor-inl.h:90:7 (d8+0x894a3a) (BuildId: 2d1896fcafe8220c)
#6 VisitPointers src/heap/marking-visitor.h:197:5 (d8+0x894a3a)
#7 IteratePointers<v8::internal::ConcurrentMarkingVisitor> src/objects/objects-body-descriptors-inl.h:127:6 (d8+0x894a3a)
#8 IterateBody<v8::internal::ConcurrentMarkingVisitor> src/objects/objects-body-descriptors-inl.h:358:5 (d8+0x894a3a)
#9 int v8::internal::ConcurrentMarkingVisitorUtility::VisitJSObjectSubclass<v8::internal::ConcurrentMarkingVisitor, v8::internal::JSFunction, v8::internal::JSFunction::BodyDescriptor>(v8::internal::ConcurrentMarkingVisitor*, v8::internal::Map, v8::internal::JSFunction) src/heap/concurrent-marking.cc:102:5 (d8+0x894a3a)
#10 VisitJSObjectSubclass<v8::internal::JSFunction, v8::internal::JSFunction::BodyDescriptor> src/heap/concurrent-marking.cc:489:12 (d8+0x884a6f) (BuildId: 2d1896fcafe8220c)
#11 VisitJSFunction src/heap/marking-visitor-inl.h:178:34 (d8+0x884a6f)
#12 Visit src/heap/objects-visiting-inl.h:65:5 (d8+0x884a6f)
#13 v8::internal::ConcurrentMarking::RunMajor(v8::JobDelegate*, v8::base::EnumSet<v8::internal::CodeFlushMode, int>, unsigned int, bool) src/heap/concurrent-marking.cc:758:41 (d8+0x884a6f)
#14 v8::internal::ConcurrentMarking::JobTaskMajor::Run(v8::JobDelegate*) src/heap/concurrent-marking.cc:606:28 (d8+0x898719) (BuildId: 2d1896fcafe8220c)
#15 v8::DelayedTasksPlatform::DelayedJob::Run(v8::JobDelegate*) src/d8/d8-platforms.cc:304:18 (d8+0x565b28) (BuildId: 2d1896fcafe8220c)
#16 v8::platform::DefaultJobWorker::Run() src/libplatform/default-job.h:147:18 (d8+0x1e5184b) (BuildId: 2d1896fcafe8220c)
#17 v8::platform::DefaultWorkerThreadsTaskRunner::WorkerThread::Run() src/libplatform/default-worker-threads-task-runner.cc:73:11 (d8+0x1e586b0) (BuildId: 2d1896fcafe8220c)
#18 NotifyStartedAndRun src/base/platform/platform.h:596:5 (d8+0x1e4bc22) (BuildId: 2d1896fcafe8220c)
#19 v8::base::ThreadEntry(void*) src/base/platform/platform-posix.cc:1112:11 (d8+0x1e4bc22)
Mutex M0 (0x7b5400000710) created at:
#0 pthread_mutex_init /b/s/w/ir/cache/builder/src/third_party/llvm/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1316:3 (d8+0x4df75f) (BuildId: 2d1896fcafe8220c)
#1 InitializeNativeHandle src/base/platform/mutex.cc:99:12 (d8+0x1e4408b) (BuildId: 2d1896fcafe8220c)
#2 v8::base::Mutex::Mutex() src/base/platform/mutex.cc:152:3 (d8+0x1e4408b)
#3 v8::internal::PagedSpaceBase::PagedSpaceBase(v8::internal::Heap*, v8::internal::AllocationSpace, v8::internal::Executability, v8::internal::FreeList*, v8::internal::AllocationCounter&, v8::internal::LinearAllocationArea&, v8::internal::LinearAreaOriginalData&, v8::internal::CompactionSpaceKind) src/heap/paged-spaces.cc:120:17 (d8+0xa023d8) (BuildId: 2d1896fcafe8220c)
#4 PagedSpaceForNewSpace src/heap/new-spaces.cc:923:7 (d8+0x9f1f66) (BuildId: 2d1896fcafe8220c)
#5 v8::internal::PagedNewSpace::PagedNewSpace(v8::internal::Heap*, unsigned long, unsigned long, v8::internal::LinearAllocationArea&) src/heap/new-spaces.cc:1042:7 (d8+0x9f1f66)
#6 make_unique<v8::internal::PagedNewSpace, v8::internal::Heap *, unsigned long &, unsigned long &, v8::internal::LinearAllocationArea &> buildtools/third_party/libc++/trunk/include/__memory/unique_ptr.h:670:30 (d8+0x90c4a9) (BuildId: 2d1896fcafe8220c)
#7 v8::internal::Heap::SetUpSpaces(v8::internal::LinearAllocationArea&, v8::internal::LinearAllocationArea&) src/heap/heap.cc:5559:27 (d8+0x90c4a9)
#8 v8::internal::Isolate::Init(v8::internal::SnapshotData*, v8::internal::SnapshotData*, v8::internal::SnapshotData*, bool) src/execution/isolate.cc:4264:9 (d8+0x843e08) (BuildId: 2d1896fcafe8220c)
#9 v8::internal::Isolate::InitWithSnapshot(v8::internal::SnapshotData*, v8::internal::SnapshotData*, v8::internal::SnapshotData*, bool) src/execution/isolate.cc:4036:10 (d8+0x8455f9) (BuildId: 2d1896fcafe8220c)
#10 v8::internal::Snapshot::Initialize(v8::internal::Isolate*) src/snapshot/snapshot.cc:182:27 (d8+0x10bc8e1) (BuildId: 2d1896fcafe8220c)
#11 v8::Isolate::Initialize(v8::Isolate*, v8::Isolate::CreateParams const&) src/api/api.cc:8836:8 (d8+0x5dd97f) (BuildId: 2d1896fcafe8220c)
#12 v8::Isolate::New(v8::Isolate::CreateParams const&) src/api/api.cc:8872:3 (d8+0x5ddc45) (BuildId: 2d1896fcafe8220c)
#13 v8::Shell::Main(int, char**) src/d8/d8.cc:5788:22 (d8+0x58e70c) (BuildId: 2d1896fcafe8220c)
#14 main src/d8/d8.cc:5976:43 (d8+0x58f4ee) (BuildId: 2d1896fcafe8220c)
Thread T6 'V8 DefaultWorke' (tid=24798, running) created by main thread at:
#0 pthread_create /b/s/w/ir/cache/builder/src/third_party/llvm/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1022:3 (d8+0x4ddffb) (BuildId: 2d1896fcafe8220c)
#1 v8::base::Thread::Start() src/base/platform/platform-posix.cc:1144:14 (d8+0x1e4bb36) (BuildId: 2d1896fcafe8220c)
#2 WorkerThread src/libplatform/default-worker-threads-task-runner.cc:66:3 (d8+0x1e580ac) (BuildId: 2d1896fcafe8220c)
#3 make_unique<v8::platform::DefaultWorkerThreadsTaskRunner::WorkerThread, v8::platform::DefaultWorkerThreadsTaskRunner *> buildtools/third_party/libc++/trunk/include/__memory/unique_ptr.h:670:30 (d8+0x1e580ac)
#4 v8::platform::DefaultWorkerThreadsTaskRunner::DefaultWorkerThreadsTaskRunner(unsigned int, double (*)()) src/libplatform/default-worker-threads-task-runner.cc:16:28 (d8+0x1e580ac)
#5 __shared_ptr_emplace<const int &, double (*)()> buildtools/third_party/libc++/trunk/include/__memory/shared_ptr.h:297:37 (d8+0x1e4e1b0) (BuildId: 2d1896fcafe8220c)
#6 allocate_shared<v8::platform::DefaultWorkerThreadsTaskRunner, std::Cr::allocator<v8::platform::DefaultWorkerThreadsTaskRunner>, const int &, double (*)(), void> buildtools/third_party/libc++/trunk/include/__memory/shared_ptr.h:956:55 (d8+0x1e4e1b0)
#7 make_shared<v8::platform::DefaultWorkerThreadsTaskRunner, const int &, double (*)(), void> buildtools/third_party/libc++/trunk/include/__memory/shared_ptr.h:965:12 (d8+0x1e4e1b0)
#8 EnsureBackgroundTaskRunnerInitialized src/libplatform/default-platform.cc:132:7 (d8+0x1e4e1b0)
#9 v8::platform::DefaultPlatform::DefaultPlatform(int, v8::platform::IdleTaskSupport, std::Cr::unique_ptr<v8::TracingController, std::Cr::default_delete<v8::TracingController>>) src/libplatform/default-platform.cc:108:5 (d8+0x1e4e1b0)
#10 make_unique<v8::platform::DefaultPlatform, int &, v8::platform::IdleTaskSupport &, std::Cr::unique_ptr<v8::TracingController, std::Cr::default_delete<v8::TracingController> > > buildtools/third_party/libc++/trunk/include/__memory/unique_ptr.h:670:30 (d8+0x1e4d839) (BuildId: 2d1896fcafe8220c)
#11 v8::platform::NewDefaultPlatform(int, v8::platform::IdleTaskSupport, v8::platform::InProcessStackDumping, std::Cr::unique_ptr<v8::TracingController, std::Cr::default_delete<v8::TracingController>>) src/libplatform/default-platform.cc:53:19 (d8+0x1e4d839)
#12 v8::Shell::Main(int, char**) src/d8/d8.cc:5691:16 (d8+0x58e251) (BuildId: 2d1896fcafe8220c)
#13 main src/d8/d8.cc:5976:43 (d8+0x58f4ee) (BuildId: 2d1896fcafe8220c)
SUMMARY: ThreadSanitizer: data race src/base/flags.h:47:11 in operator|=
==================
ThreadSanitizer: reported 1 warnings

View File

@ -0,0 +1,3 @@
ClearCellRangeRelaxed
Clear
ClearMarkBitsAndHandleLivenessStatistics

View File

@ -0,0 +1,118 @@
==================
WARNING: ThreadSanitizer: data race (pid=10132)
Write of size 8 at 0x7e8d00440248 by thread T7 (mutexes: write M0):
#0 memset sanitizer_common/sanitizer_common_interceptors.inc:799:3 (d8+0x49d4ad) (BuildId: c849b9596314cb5d)
#1 ClearCellRangeRelaxed src/heap/marking.h:205:16 (d8+0x94d685) (BuildId: c849b9596314cb5d)
#2 Clear src/heap/marking.h:228:3 (d8+0x94d685)
#3 ClearMarkBitsAndHandleLivenessStatistics src/heap/sweeper.cc:303:33 (d8+0x94d685)
#4 v8::internal::Sweeper::RawSweep(v8::internal::Page*, v8::internal::Sweeper::FreeListRebuildingMode, v8::internal::FreeSpaceTreatmentMode, v8::internal::Sweeper::FreeSpaceMayContainInvalidatedSlots, v8::base::LockGuard<v8::base::Mutex, (v8::base::NullBehavior)0> const&) src/heap/sweeper.cc:412:3 (d8+0x94d685)
#5 v8::internal::Sweeper::ParallelSweepPage(v8::internal::Page*, v8::internal::AllocationSpace, v8::internal::Sweeper::FreeSpaceMayContainInvalidatedSlots) src/heap/sweeper.cc:494:17 (d8+0x94d9e6) (BuildId: c849b9596314cb5d)
#6 ConcurrentSweepSpace src/heap/sweeper.cc:437:5 (d8+0x95056a) (BuildId: c849b9596314cb5d)
#7 v8::internal::Sweeper::SweeperJob::RunImpl(v8::JobDelegate*) src/heap/sweeper.cc:117:22 (d8+0x95056a)
#8 v8::internal::Sweeper::SweeperJob::Run(v8::JobDelegate*) src/heap/sweeper.cc (d8+0x950295) (BuildId: c849b9596314cb5d)
#9 v8::DelayedTasksPlatform::DelayedJob::Run(v8::JobDelegate*) src/d8/d8-platforms.cc:297:18 (d8+0x51a6a8) (BuildId: c849b9596314cb5d)
#10 v8::platform::DefaultJobWorker::Run() src/libplatform/default-job.h:147:18 (d8+0x1a7bec8) (BuildId: c849b9596314cb5d)
#11 v8::platform::DefaultWorkerThreadsTaskRunner::WorkerThread::Run() src/libplatform/default-worker-threads-task-runner.cc:73:11 (d8+0x1a836f0) (BuildId: c849b9596314cb5d)
#12 NotifyStartedAndRun src/base/platform/platform.h:560:5 (d8+0x1a77162) (BuildId: c849b9596314cb5d)
#13 v8::base::ThreadEntry(void*) src/base/platform/platform-posix.cc:1051:11 (d8+0x1a77162)
Previous atomic read of size 4 at 0x7e8d00440248 by thread T3:
#0 __cxx_atomic_load<int> buildtools/third_party/libc++/trunk/include/atomic:1000:12 (d8+0x7e5423) (BuildId: c849b9596314cb5d)
#1 load buildtools/third_party/libc++/trunk/include/atomic:1611:17 (d8+0x7e5423)
#2 atomic_load_explicit<int> buildtools/third_party/libc++/trunk/include/atomic:1967:17 (d8+0x7e5423)
#3 Acquire_Load src/base/atomicops.h:240:10 (d8+0x7e5423)
#4 Acquire_Load<unsigned int> src/base/atomic-utils.h:73:9 (d8+0x7e5423)
#5 Get<v8::internal::AccessMode::ATOMIC> src/heap/marking.h:78:11 (d8+0x7e5423)
#6 IsBlackOrGrey<v8::internal::AccessMode::ATOMIC> src/heap/marking.h:398:21 (d8+0x7e5423)
#7 IsBlackOrGrey src/heap/marking-visitor.h:81:12 (d8+0x7e5423)
#8 void v8::internal::MarkingVisitorBase<v8::internal::ConcurrentMarkingVisitor, v8::internal::ConcurrentMarkingState>::ProcessWeakHeapObject<v8::internal::CompressedHeapObjectSlot>(v8::internal::HeapObject, v8::internal::CompressedHeapObjectSlot, v8::internal::HeapObject) src/heap/marking-visitor-inl.h:58:44 (d8+0x7e5423)
#9 VisitPointersImpl<v8::internal::CompressedMaybeObjectSlot> src/heap/marking-visitor-inl.h:90:7 (d8+0x7df885) (BuildId: c849b9596314cb5d)
#10 VisitPointers src/heap/marking-visitor.h:199:5 (d8+0x7df885)
#11 IterateMaybeWeakPointers<v8::internal::ConcurrentMarkingVisitor> src/objects/objects-body-descriptors-inl.h:139:6 (d8+0x7df885)
#12 IterateBody<v8::internal::ConcurrentMarkingVisitor> src/objects/objects-body-descriptors.h:176:5 (d8+0x7df885)
#13 VisitFeedbackVector src/heap/objects-visiting-inl.h:118:1 (d8+0x7df885)
#14 Visit src/heap/objects-visiting-inl.h:65:5 (d8+0x7df885)
#15 v8::internal::ConcurrentMarking::Run(v8::JobDelegate*, v8::base::EnumSet<v8::internal::CodeFlushMode, int>, unsigned int, bool) src/heap/concurrent-marking.cc:531:41 (d8+0x7df885)
#16 v8::internal::ConcurrentMarking::JobTask::Run(v8::JobDelegate*) src/heap/concurrent-marking.cc:420:28 (d8+0x7eb659) (BuildId: c849b9596314cb5d)
#17 v8::DelayedTasksPlatform::DelayedJob::Run(v8::JobDelegate*) src/d8/d8-platforms.cc:297:18 (d8+0x51a6a8) (BuildId: c849b9596314cb5d)
#18 v8::platform::DefaultJobWorker::Run() src/libplatform/default-job.h:147:18 (d8+0x1a7bec8) (BuildId: c849b9596314cb5d)
#19 v8::platform::DefaultWorkerThreadsTaskRunner::WorkerThread::Run() src/libplatform/default-worker-threads-task-runner.cc:73:11 (d8+0x1a836f0) (BuildId: c849b9596314cb5d)
#20 NotifyStartedAndRun src/base/platform/platform.h:560:5 (d8+0x1a77162) (BuildId: c849b9596314cb5d)
#21 v8::base::ThreadEntry(void*) src/base/platform/platform-posix.cc:1051:11 (d8+0x1a77162)
As if synchronized via sleep:
#0 usleep /b/s/w/ir/cache/builder/src/third_party/llvm/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:358:3 (d8+0x490b4a) (BuildId: c849b9596314cb5d)
#1 v8::base::OS::Sleep(v8::base::TimeDelta) src/base/platform/platform-posix.cc:615:3 (d8+0x1a76295) (BuildId: c849b9596314cb5d)
#2 v8::DelayedTasksPlatform::DelayedJob::Run(v8::JobDelegate*) src/d8/d8-platforms.cc:296:7 (d8+0x51a687) (BuildId: c849b9596314cb5d)
#3 v8::platform::DefaultJobWorker::Run() src/libplatform/default-job.h:147:18 (d8+0x1a7bec8) (BuildId: c849b9596314cb5d)
#4 v8::platform::DefaultWorkerThreadsTaskRunner::WorkerThread::Run() src/libplatform/default-worker-threads-task-runner.cc:73:11 (d8+0x1a836f0) (BuildId: c849b9596314cb5d)
#5 NotifyStartedAndRun src/base/platform/platform.h:560:5 (d8+0x1a77162) (BuildId: c849b9596314cb5d)
#6 v8::base::ThreadEntry(void*) src/base/platform/platform-posix.cc:1051:11 (d8+0x1a77162)
Mutex M0 (0x7b0c000091e0) created at:
#0 pthread_mutex_init /b/s/w/ir/cache/builder/src/third_party/llvm/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1316:3 (d8+0x494d4f) (BuildId: c849b9596314cb5d)
#1 InitializeNativeHandle src/base/platform/mutex.cc:95:12 (d8+0x1a71ecb) (BuildId: c849b9596314cb5d)
#2 v8::base::Mutex::Mutex() src/base/platform/mutex.cc:148:3 (d8+0x1a71ecb)
#3 v8::internal::MemoryChunk::Initialize(v8::internal::BasicMemoryChunk*, v8::internal::Heap*, v8::internal::Executability) src/heap/memory-chunk.cc:149:23 (d8+0x8fa1dd) (BuildId: c849b9596314cb5d)
#4 AllocateChunk src/heap/memory-allocator.cc:409:7 (d8+0x8f9094) (BuildId: c849b9596314cb5d)
#5 v8::internal::MemoryAllocator::AllocatePage(v8::internal::MemoryAllocator::AllocationMode, unsigned long, v8::internal::Space*, v8::internal::Executability) src/heap/memory-allocator.cc:562:13 (d8+0x8f9094)
#6 AllocatePage src/heap/paged-spaces.cc:322:38 (d8+0x9130dd) (BuildId: c849b9596314cb5d)
#7 v8::internal::PagedSpace::ExpandBackground(unsigned long) src/heap/paged-spaces.cc:338:16 (d8+0x9130dd)
#8 v8::internal::PagedSpace::RawRefillLabBackground(v8::internal::LocalHeap*, unsigned long, unsigned long, v8::internal::AllocationAlignment, v8::internal::AllocationOrigin) src/heap/paged-spaces.cc:631:14 (d8+0x914467) (BuildId: c849b9596314cb5d)
#9 v8::internal::ConcurrentAllocator::EnsureLab(v8::internal::AllocationOrigin) src/heap/concurrent-allocator.cc:135:25 (d8+0x7dc06c) (BuildId: c849b9596314cb5d)
#10 v8::internal::ConcurrentAllocator::AllocateInLabSlow(int, v8::internal::AllocationAlignment, v8::internal::AllocationOrigin) src/heap/concurrent-allocator.cc:124:8 (d8+0x7dbf7b) (BuildId: c849b9596314cb5d)
#11 AllocateInLab src/heap/concurrent-allocator-inl.h:41:16 (d8+0x82d0b1) (BuildId: c849b9596314cb5d)
#12 AllocateRaw src/heap/concurrent-allocator-inl.h:34:10 (d8+0x82d0b1)
#13 AllocateRaw<v8::internal::AllocationType::kSharedMap> src/heap/heap-allocator-inl.h:122:47 (d8+0x82d0b1)
#14 AllocateRaw src/heap/heap-allocator-inl.h:184:14 (d8+0x82d0b1)
#15 v8::internal::HeapAllocator::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) src/heap/heap-allocator.cc:75:29 (d8+0x82d0b1)
#16 v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) src/heap/heap-allocator.cc:100:7 (d8+0x82e234) (BuildId: c849b9596314cb5d)
#17 AllocateRawWith<v8::internal::HeapAllocator::kRetryOrFail> src/heap/heap-allocator-inl.h:237:16 (d8+0x808920) (BuildId: c849b9596314cb5d)
#18 v8::internal::Factory::NewMap(v8::internal::InstanceType, int, v8::internal::ElementsKind, int, v8::internal::AllocationType) src/heap/factory.cc:1848:36 (d8+0x808920)
#19 v8::internal::Builtin_Impl_SharedStructTypeConstructor(v8::internal::BuiltinArguments, v8::internal::Isolate*) src/builtins/builtins-struct.cc:84:39 (d8+0x65fa26) (BuildId: c849b9596314cb5d)
#20 v8::internal::Builtin_SharedStructTypeConstructor(int, unsigned long*, v8::internal::Isolate*) src/builtins/builtins-struct.cc:20:1 (d8+0x65f061) (BuildId: c849b9596314cb5d)
#21 <null> <null> (0x560ebfe66ef8)
#22 v8::internal::Execution::CallScript(v8::internal::Isolate*, v8::internal::Handle<v8::internal::JSFunction>, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>) src/execution/execution.cc:531:10 (d8+0x77252c) (BuildId: c849b9596314cb5d)
#23 v8::Script::Run(v8::Local<v8::Context>, v8::Local<v8::Data>) src/api/api.cc:2105:7 (d8+0x561590) (BuildId: c849b9596314cb5d)
#24 v8::Script::Run(v8::Local<v8::Context>) src/api/api.cc:2048:10 (d8+0x560d20) (BuildId: c849b9596314cb5d)
#25 v8::Shell::ExecuteString(v8::Isolate*, v8::Local<v8::String>, v8::Local<v8::String>, v8::Shell::PrintResult, v8::Shell::ReportExceptions, v8::Shell::ProcessMessageQueue) src/d8/d8.cc:773:28 (d8+0x5211d0) (BuildId: c849b9596314cb5d)
#26 v8::SourceGroup::Execute(v8::Isolate*) src/d8/d8.cc:3990:10 (d8+0x53659a) (BuildId: c849b9596314cb5d)
#27 v8::Shell::RunMain(v8::Isolate*, bool) src/d8/d8.cc:4656:39 (d8+0x53a188) (BuildId: c849b9596314cb5d)
#28 v8::Shell::Main(int, char**) src/d8/d8.cc:5473:18 (d8+0x53cd5b) (BuildId: c849b9596314cb5d)
#29 main src/d8/d8.cc:5553:43 (d8+0x53cf4e) (BuildId: c849b9596314cb5d)
Thread T7 'V8 DefaultWorke' (tid=10149, running) created by main thread at:
#0 pthread_create /b/s/w/ir/cache/builder/src/third_party/llvm/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1022:3 (d8+0x49356d) (BuildId: c849b9596314cb5d)
#1 v8::base::Thread::Start() src/base/platform/platform-posix.cc:1083:14 (d8+0x1a77076) (BuildId: c849b9596314cb5d)
#2 WorkerThread src/libplatform/default-worker-threads-task-runner.cc:66:3 (d8+0x1a830f2) (BuildId: c849b9596314cb5d)
#3 make_unique<v8::platform::DefaultWorkerThreadsTaskRunner::WorkerThread, v8::platform::DefaultWorkerThreadsTaskRunner *> buildtools/third_party/libc++/trunk/include/__memory/unique_ptr.h:725:32 (d8+0x1a830f2)
#4 v8::platform::DefaultWorkerThreadsTaskRunner::DefaultWorkerThreadsTaskRunner(unsigned int, double (*)()) src/libplatform/default-worker-threads-task-runner.cc:16:28 (d8+0x1a830f2)
#5 __shared_ptr_emplace<const int &, double (*)()> buildtools/third_party/libc++/trunk/include/__memory/shared_ptr.h:293:37 (d8+0x1a7890d) (BuildId: c849b9596314cb5d)
#6 allocate_shared<v8::platform::DefaultWorkerThreadsTaskRunner, std::__1::allocator<v8::platform::DefaultWorkerThreadsTaskRunner>, const int &, double (*)(), void> buildtools/third_party/libc++/trunk/include/__memory/shared_ptr.h:1101:55 (d8+0x1a7890d)
#7 make_shared<v8::platform::DefaultWorkerThreadsTaskRunner, const int &, double (*)(), void> buildtools/third_party/libc++/trunk/include/__memory/shared_ptr.h:1110:12 (d8+0x1a7890d)
#8 EnsureBackgroundTaskRunnerInitialized src/libplatform/default-platform.cc:133:7 (d8+0x1a7890d)
#9 v8::platform::DefaultPlatform::DefaultPlatform(int, v8::platform::IdleTaskSupport, std::__1::unique_ptr<v8::TracingController, std::__1::default_delete<v8::TracingController> >) src/libplatform/default-platform.cc:109:5 (d8+0x1a7890d)
#10 make_unique<v8::platform::DefaultPlatform, int &, v8::platform::IdleTaskSupport &, std::__1::unique_ptr<v8::TracingController, std::__1::default_delete<v8::TracingController> > > buildtools/third_party/libc++/trunk/include/__memory/unique_ptr.h:725:32 (d8+0x1a78029) (BuildId: c849b9596314cb5d)
#11 v8::platform::NewDefaultPlatform(int, v8::platform::IdleTaskSupport, v8::platform::InProcessStackDumping, std::__1::unique_ptr<v8::TracingController, std::__1::default_delete<v8::TracingController> >) src/libplatform/default-platform.cc:54:19 (d8+0x1a78029)
#12 v8::Shell::Main(int, char**) src/d8/d8.cc:5270:16 (d8+0x53b887) (BuildId: c849b9596314cb5d)
#13 main src/d8/d8.cc:5553:43 (d8+0x53cf4e) (BuildId: c849b9596314cb5d)
Thread T3 'V8 DefaultWorke' (tid=10144, running) created by main thread at:
#0 pthread_create /b/s/w/ir/cache/builder/src/third_party/llvm/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1022:3 (d8+0x49356d) (BuildId: c849b9596314cb5d)
#1 v8::base::Thread::Start() src/base/platform/platform-posix.cc:1083:14 (d8+0x1a77076) (BuildId: c849b9596314cb5d)
#2 WorkerThread src/libplatform/default-worker-threads-task-runner.cc:66:3 (d8+0x1a830f2) (BuildId: c849b9596314cb5d)
#3 make_unique<v8::platform::DefaultWorkerThreadsTaskRunner::WorkerThread, v8::platform::DefaultWorkerThreadsTaskRunner *> buildtools/third_party/libc++/trunk/include/__memory/unique_ptr.h:725:32 (d8+0x1a830f2)
#4 v8::platform::DefaultWorkerThreadsTaskRunner::DefaultWorkerThreadsTaskRunner(unsigned int, double (*)()) src/libplatform/default-worker-threads-task-runner.cc:16:28 (d8+0x1a830f2)
#5 __shared_ptr_emplace<const int &, double (*)()> buildtools/third_party/libc++/trunk/include/__memory/shared_ptr.h:293:37 (d8+0x1a7890d) (BuildId: c849b9596314cb5d)
#6 allocate_shared<v8::platform::DefaultWorkerThreadsTaskRunner, std::__1::allocator<v8::platform::DefaultWorkerThreadsTaskRunner>, const int &, double (*)(), void> buildtools/third_party/libc++/trunk/include/__memory/shared_ptr.h:1101:55 (d8+0x1a7890d)
#7 make_shared<v8::platform::DefaultWorkerThreadsTaskRunner, const int &, double (*)(), void> buildtools/third_party/libc++/trunk/include/__memory/shared_ptr.h:1110:12 (d8+0x1a7890d)
#8 EnsureBackgroundTaskRunnerInitialized src/libplatform/default-platform.cc:133:7 (d8+0x1a7890d)
#9 v8::platform::DefaultPlatform::DefaultPlatform(int, v8::platform::IdleTaskSupport, std::__1::unique_ptr<v8::TracingController, std::__1::default_delete<v8::TracingController> >) src/libplatform/default-platform.cc:109:5 (d8+0x1a7890d)
#10 make_unique<v8::platform::DefaultPlatform, int &, v8::platform::IdleTaskSupport &, std::__1::unique_ptr<v8::TracingController, std::__1::default_delete<v8::TracingController> > > buildtools/third_party/libc++/trunk/include/__memory/unique_ptr.h:725:32 (d8+0x1a78029) (BuildId: c849b9596314cb5d)
#11 v8::platform::NewDefaultPlatform(int, v8::platform::IdleTaskSupport, v8::platform::InProcessStackDumping, std::__1::unique_ptr<v8::TracingController, std::__1::default_delete<v8::TracingController> >) src/libplatform/default-platform.cc:54:19 (d8+0x1a78029)
#12 v8::Shell::Main(int, char**) src/d8/d8.cc:5270:16 (d8+0x53b887) (BuildId: c849b9596314cb5d)
#13 main src/d8/d8.cc:5553:43 (d8+0x53cf4e) (BuildId: c849b9596314cb5d)
SUMMARY: ThreadSanitizer: data race src/heap/marking.h:205:16 in ClearCellRangeRelaxed
==================
ThreadSanitizer: reported 1 warnings

View File

@ -0,0 +1,3 @@
v8::internal::compiler::JSObjectRef::GetOwnConstantElementFromHeap(v8::internal::FixedArrayBase, v8::internal::ElementsKind, unsigned int) const
v8::internal::compiler::JSObjectRef::GetOwnConstantElement(v8::internal::compiler::FixedArrayBaseRef, unsigned int, v8::internal::compiler::CompilationDependencies*) const
v8::internal::compiler::JSNativeContextSpecialization::ReduceElementLoadFromHeapConstant(v8::internal::compiler::Node*, v8::internal::compiler::Node*, v8::internal::compiler::AccessMode, v8::internal::KeyedAccessLoadMode)

View File

@ -0,0 +1,50 @@
WARNING: ThreadSanitizer: data race (pid=3187405)
Read of size 8 at 0x7ea200056b80 by thread T1:
#0 0x55ad577064dc in v8::internal::compiler::JSObjectRef::GetOwnConstantElementFromHeap(v8::internal::FixedArrayBase, v8::internal::ElementsKind, unsigned int) const src/base/memory.h:34:3
#1 0x55ad577062aa in v8::internal::compiler::JSObjectRef::GetOwnConstantElement(v8::internal::compiler::FixedArrayBaseRef, unsigned int, v8::internal::compiler::CompilationDependencies*) const src/compiler/heap-refs.cc:1815:42
#2 0x55ad577c4ff7 in v8::internal::compiler::JSNativeContextSpecialization::ReduceElementLoadFromHeapConstant(v8::internal::compiler::Node*, v8::internal::compiler::Node*, v8::internal::compiler::AccessMode, v8::internal::KeyedAccessLoadMode) src/compiler/js-native-context-specialization.cc:2325:32
#3 0x55ad577c2c8f in v8::internal::compiler::JSNativeContextSpecialization::ReduceElementAccess(v8::internal::compiler::Node*, v8::internal::compiler::Node*, v8::internal::compiler::Node*, v8::internal::compiler::ElementAccessFeedback const&) src/compiler/js-native-context-specialization.cc:2094:27
#4 0x55ad577c19f7 in v8::internal::compiler::JSNativeContextSpecialization::ReducePropertyAccess(v8::internal::compiler::Node*, v8::internal::compiler::Node*, v8::base::Optional<v8::internal::compiler::NameRef>, v8::internal::compiler::Node*, v8::internal::compiler::FeedbackSource const&, v8::internal::compiler::AccessMode) src/compiler/js-native-context-specialization.cc:2413:14
#5 0x55ad577b6099 in v8::internal::compiler::JSNativeContextSpecialization::ReduceJSLoadProperty(v8::internal::compiler::Node*) src/compiler/js-native-context-specialization.cc:2564:10
#6 0x55ad577afc8f in v8::internal::compiler::JSNativeContextSpecialization::Reduce(v8::internal::compiler::Node*) src/compiler/js-native-context-specialization.cc:108:14
#7 0x55ad576d605a in v8::internal::compiler::GraphReducer::Reduce(v8::internal::compiler::Node*) src/compiler/graph-reducer.cc:34:25
#8 0x55ad576d59f4 in v8::internal::compiler::GraphReducer::ReduceTop() src/compiler/graph-reducer.cc:178:25
#9 0x55ad576d5209 in v8::internal::compiler::GraphReducer::ReduceNode(v8::internal::compiler::Node*) src/compiler/graph-reducer.cc:75:7
#10 0x55ad576d5f35 in v8::internal::compiler::GraphReducer::ReduceGraph() src/compiler/graph-reducer.cc:97:36
#11 0x55ad57887506 in v8::internal::compiler::InliningPhase::Run(v8::internal::compiler::PipelineData*, v8::internal::Zone*) src/compiler/pipeline.cc:1422:19
#12 0x55ad578763c9 in auto v8::internal::compiler::PipelineImpl::Run<v8::internal::compiler::InliningPhase>() src/compiler/pipeline.cc:1319:16
#13 0x55ad57872135 in v8::internal::compiler::PipelineImpl::CreateGraph() src/compiler/pipeline.cc:2847:3
#14 0x55ad57871f32 in v8::internal::compiler::PipelineCompilationJob::ExecuteJobImpl(v8::internal::RuntimeCallStats*, v8::internal::LocalIsolate*) src/compiler/pipeline.cc:1247:18
#15 0x55ad565a9830 in v8::internal::OptimizedCompilationJob::ExecuteJob(v8::internal::RuntimeCallStats*, v8::internal::LocalIsolate*) src/codegen/compiler.cc:494:22
#16 0x55ad565ef91e in v8::internal::OptimizingCompileDispatcher::CompileNext(v8::internal::TurbofanCompilationJob*, v8::internal::LocalIsolate*) src/compiler-dispatcher/optimizing-compile-dispatcher.cc:105:12
#17 0x55ad565f2555 in v8::internal::OptimizingCompileDispatcher::CompileTask::RunInternal() src/compiler-dispatcher/optimizing-compile-dispatcher.cc:67:20
#18 0x55ad5640b898 in non-virtual thunk to v8::internal::CancelableTask::Run() src/tasks/cancelable-task.h:155:7
#19 0x55ad57cc46b1 in v8::platform::DefaultWorkerThreadsTaskRunner::WorkerThread::Run() src/libplatform/default-worker-threads-task-runner.cc:73:11
#20 0x55ad57cb7c23 in v8::base::ThreadEntry(void*) src/base/platform/platform.h:596:5
Previous write of size 8 at 0x7ea200056b80 by main thread:
#0 0x55ad56a49f14 in v8::internal::(anonymous namespace)::DictionaryElementsAccessor::SetLengthImpl(v8::internal::Isolate*, v8::internal::Handle<v8::internal::JSArray>, unsigned int, v8::internal::Handle<v8::internal::FixedArrayBase>) src/base/memory.h:41:3
#1 0x55ad56a675ea in v8::internal::(anonymous namespace)::ElementsAccessorBase<v8::internal::(anonymous namespace)::DictionaryElementsAccessor, v8::internal::(anonymous namespace)::ElementsKindTraits<(v8::internal::ElementsKind)13> >::SetLength(v8::internal::Handle<v8::internal::JSArray>, unsigned int) src/objects/elements.cc:758:12
#2 0x55ad56c5f9c0 in v8::internal::JSArray::SetLength(v8::internal::Handle<v8::internal::JSArray>, unsigned int) src/objects/objects.cc:5237:40
#3 0x55ad564a6616 in v8::internal::Accessors::ArrayLengthSetter(v8::Local<v8::Name>, v8::Local<v8::Value>, v8::PropertyCallbackInfo<v8::Boolean> const&) src/builtins/accessors.cc:202:7
#4 0x55ad568e961b in v8::internal::PropertyCallbackArguments::CallAccessorSetter(v8::internal::Handle<v8::internal::AccessorInfo>, v8::internal::Handle<v8::internal::Name>, v8::internal::Handle<v8::internal::Object>) src/api/api-arguments-inl.h:332:3
#5 0x55ad568e39df in v8::internal::Runtime_StoreCallbackProperty(int, unsigned long*, v8::internal::Isolate*) src/ic/ic.cc:3245:13
#6 0x55acdfe69bb8 in Builtins_AsyncFromSyncIteratorPrototypeThrow (/mnt/scratch0/clusterfuzz/bot/builds/v8-tsan_linux-release_8681dd6e7b8d9ebe281ad96b26057d51e550c14e/revisions/d8-tsan-linux-release-v8-component-83502/d8+0x1c30bb7)
#7 0x55ad5668cf86 in v8::internal::Execution::CallScript(v8::internal::Isolate*, v8::internal::Handle<v8::internal::JSFunction>, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>) src/execution/execution.cc:538:10
#8 0x55ad5642808f in v8::Script::Run(v8::Local<v8::Context>, v8::Local<v8::Data>) src/api/api.cc:2231:7
#9 0x55ad564277c1 in v8::Script::Run(v8::Local<v8::Context>) src/api/api.cc:2158:10
#10 0x55ad563e63cc in v8::Shell::ExecuteString(v8::Isolate*, v8::Local<v8::String>, v8::Local<v8::String>, v8::Shell::PrintResult, v8::Shell::ReportExceptions, v8::Shell::ProcessMessageQueue) src/d8/d8.cc:879:28
#11 0x55ad563fe621 in v8::SourceGroup::Execute(v8::Isolate*) src/d8/d8.cc:4379:10
#12 0x55ad56402488 in v8::Shell::RunMain(v8::Isolate*, bool) src/d8/d8.cc:5107:39
#13 0x55ad56404fe1 in v8::Shell::Main(int, char**) src/d8/d8.cc:5886:18
#14 0x55ad564054ef in main src/d8/d8.cc:5976:43
Thread T1 'V8 DefaultWorke' (tid=3187415, running) created by main thread at:
#0 0x55ad56353ffc in pthread_create third_party/llvm/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1022:3
#1 0x55ad57cb7b37 in v8::base::Thread::Start() src/base/platform/platform-posix.cc:1144:14
#2 0x55ad57cc40ad in v8::platform::DefaultWorkerThreadsTaskRunner::DefaultWorkerThreadsTaskRunner(unsigned int, double (*)()) src/libplatform/default-worker-threads-task-runner.cc:66:3
#3 0x55ad57cba1b1 in v8::platform::DefaultPlatform::DefaultPlatform(int, v8::platform::IdleTaskSupport, std::Cr::unique_ptr<v8::TracingController, std::Cr::default_delete<v8::TracingController> >) buildtools/third_party/libc++/trunk/include/__memory/shared_ptr.h:297:37
#4 0x55ad57cb983a in v8::platform::NewDefaultPlatform(int, v8::platform::IdleTaskSupport, v8::platform::InProcessStackDumping, std::Cr::unique_ptr<v8::TracingController, std::Cr::default_delete<v8::TracingController> >) buildtools/third_party/libc++/trunk/include/__memory/unique_ptr.h:670:30
#5 0x55ad56404252 in v8::Shell::Main(int, char**) src/d8/d8.cc:5691:16
#6 0x55ad564054ef in main src/d8/d8.cc:5976:43
SUMMARY: ThreadSanitizer: data race src/base/memory.h:34:3 in v8::internal::compiler::JSObjectRef::GetOwnConstantElementFromHeap(v8::internal::FixedArrayBase, v8::internal::ElementsKind, unsigned int) const
==================
ThreadSanitizer: reported 1 warnings

View File

@ -0,0 +1,3 @@
MemMove
v8::internal::Heap::MoveRange(v8::internal::HeapObject, v8::internal::CompressedObjectSlot, v8::internal::CompressedObjectSlot, int, v8::internal::WriteBarrierMode)
MoveElements

View File

@ -0,0 +1,190 @@
WARNING: ThreadSanitizer: data race (pid=21413)
Write of size 8 at 0x7eba001056b8 by main thread:
#0 __tsan_memmove /b/s/w/ir/cache/builder/src/third_party/llvm/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:3118:3 (d8+0x566140) (BuildId: 06e6c95b54bbb645)
#1 MemMove src/utils/memcopy.h:123:7 (d8+0x949b82) (BuildId: 06e6c95b54bbb645)
#2 v8::internal::Heap::MoveRange(v8::internal::HeapObject, v8::internal::CompressedObjectSlot, v8::internal::CompressedObjectSlot, int, v8::internal::WriteBarrierMode) src/heap/heap.cc:2027:5 (d8+0x949b82)
#3 MoveElements src/objects/fixed-array-inl.h:262:20 (d8+0xc1577f) (BuildId: 06e6c95b54bbb645)
#4 v8::internal::(anonymous namespace)::FastElementsAccessor<v8::internal::(anonymous namespace)::FastPackedObjectElementsAccessor, v8::internal::(anonymous namespace)::ElementsKindTraits<(v8::internal::ElementsKind)2>>::MoveElements(v8::internal::Isolate*, v8::internal::Handle<v8::internal::JSArray>, v8::internal::Handle<v8::internal::FixedArrayBase>, int, int, int, int, int) src/objects/elements.cc:2242:16 (d8+0xc1577f)
#5 v8::internal::(anonymous namespace)::FastElementsAccessor<v8::internal::(anonymous namespace)::FastPackedObjectElementsAccessor, v8::internal::(anonymous namespace)::ElementsKindTraits<(v8::internal::ElementsKind)2>>::AddArguments(v8::internal::Handle<v8::internal::JSArray>, v8::internal::Handle<v8::internal::FixedArrayBase>, v8::internal::BuiltinArguments*, unsigned int, v8::internal::(anonymous namespace)::Where) src/objects/elements.cc:2491:7 (d8+0xc1545d) (BuildId: 06e6c95b54bbb645)
#6 UnshiftImpl src/objects/elements.cc:2218:12 (d8+0xc12e43) (BuildId: 06e6c95b54bbb645)
#7 v8::internal::(anonymous namespace)::ElementsAccessorBase<v8::internal::(anonymous namespace)::FastPackedObjectElementsAccessor, v8::internal::(anonymous namespace)::ElementsKindTraits<(v8::internal::ElementsKind)2>>::Unshift(v8::internal::Handle<v8::internal::JSArray>, v8::internal::BuiltinArguments*, unsigned int) src/objects/elements.cc:732:12 (d8+0xc12e43)
#8 v8::internal::Builtin_Impl_ArrayUnshift(v8::internal::BuiltinArguments, v8::internal::Isolate*) src/builtins/builtins-array.cc:640:3 (d8+0x6871cf) (BuildId: 06e6c95b54bbb645)
#9 v8::internal::Builtin_ArrayUnshift(int, unsigned long*, v8::internal::Isolate*) src/builtins/builtins-array.cc:617:1 (d8+0x686d93) (BuildId: 06e6c95b54bbb645)
#10 Builtins_AsyncFromSyncIteratorPrototypeThrow setup-isolate-deserialize.cc (d8+0x1dda837)
#11 v8::internal::(anonymous namespace)::InvokeWithTryCatch(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const&) src/execution/execution.cc:489:20 (d8+0x85e89e) (BuildId: 06e6c95b54bbb645)
#12 v8::internal::Execution::TryCall(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, int, v8::internal::Handle<v8::internal::Object>*, v8::internal::Execution::MessageHandling, v8::internal::MaybeHandle<v8::internal::Object>*, bool) src/execution/execution.cc:591:10 (d8+0x85eb68) (BuildId: 06e6c95b54bbb645)
#13 v8::internal::SourceTextModule::ExecuteModule(v8::internal::Isolate*, v8::internal::Handle<v8::internal::SourceTextModule>) src/objects/source-text-module.cc:1021:3 (d8+0xe52c68) (BuildId: 06e6c95b54bbb645)
#14 v8::internal::SourceTextModule::InnerModuleEvaluation(v8::internal::Isolate*, v8::internal::Handle<v8::internal::SourceTextModule>, v8::internal::ZoneForwardList<v8::internal::Handle<v8::internal::SourceTextModule>>*, unsigned int*) src/objects/source-text-module.cc:1192:5 (d8+0xe51d39) (BuildId: 06e6c95b54bbb645)
#15 v8::internal::SourceTextModule::Evaluate(v8::internal::Isolate*, v8::internal::Handle<v8::internal::SourceTextModule>) src/objects/source-text-module.cc:733:8 (d8+0xe51368) (BuildId: 06e6c95b54bbb645)
#16 v8::internal::Module::Evaluate(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Module>) src/objects/module.cc:280:12 (d8+0xdf8599) (BuildId: 06e6c95b54bbb645)
#17 v8::Module::Evaluate(v8::Local<v8::Context>) src/api/api.cc:2548:16 (d8+0x60552d) (BuildId: 06e6c95b54bbb645)
#18 v8::Shell::ExecuteModule(v8::Isolate*, char const*) src/d8/d8.cc:1455:33 (d8+0x5c8cf1) (BuildId: 06e6c95b54bbb645)
#19 v8::SourceGroup::Execute(v8::Isolate*) src/d8/d8.cc:4442:12 (d8+0x5da4a0) (BuildId: 06e6c95b54bbb645)
#20 v8::Shell::RunMain(v8::Isolate*, bool) src/d8/d8.cc:5224:39 (d8+0x5de41e) (BuildId: 06e6c95b54bbb645)
#21 v8::Shell::Main(int, char**) src/d8/d8.cc:6020:18 (d8+0x5e0906) (BuildId: 06e6c95b54bbb645)
#22 main src/d8/d8.cc:6117:43 (d8+0x5e0f10) (BuildId: 06e6c95b54bbb645)
Previous atomic read of size 4 at 0x7eba001056b8 by thread T5 (mutexes: write M0):
#0 __cxx_atomic_load<int> buildtools/third_party/libc++/trunk/include/atomic:948:12 (d8+0xa98a99) (BuildId: 06e6c95b54bbb645)
#1 load buildtools/third_party/libc++/trunk/include/atomic:1537:17 (d8+0xa98a99)
#2 atomic_load_explicit<int> buildtools/third_party/libc++/trunk/include/atomic:1916:17 (d8+0xa98a99)
#3 Relaxed_Load src/base/atomicops.h:237:10 (d8+0xa98a99)
#4 Relaxed_Load<unsigned int> src/base/atomic-utils.h:87:9 (d8+0xa98a99)
#5 Relaxed_Load src/objects/compressed-slots-inl.h:75:26 (d8+0xa98a99)
#6 VisitPointer src/heap/sweeper.cc:678:50 (d8+0xa98a99)
#7 VisitPointers src/heap/sweeper.cc:694:7 (d8+0xa98a99)
#8 IteratePointers<v8::internal::(anonymous namespace)::PromotedPageRecordMigratedSlotVisitor> src/objects/objects-body-descriptors-inl.h:128:6 (d8+0xa98a99)
#9 IterateBody<v8::internal::(anonymous namespace)::PromotedPageRecordMigratedSlotVisitor> src/objects/objects-body-descriptors.h:135:5 (d8+0xa98a99)
#10 void v8::internal::CallIterateBody::apply<v8::internal::FixedArray::BodyDescriptor, v8::internal::(anonymous namespace)::PromotedPageRecordMigratedSlotVisitor>(v8::internal::Map, v8::internal::HeapObject, int, v8::internal::(anonymous namespace)::PromotedPageRecordMigratedSlotVisitor*) src/objects/objects-body-descriptors-inl.h:1432:5 (d8+0xa98a99)
#11 auto v8::internal::BodyDescriptorApply<v8::internal::CallIterateBody, v8::internal::Map&, v8::internal::HeapObject&, int&, v8::internal::(anonymous namespace)::PromotedPageRecordMigratedSlotVisitor*&>(v8::internal::InstanceType, v8::internal::Map&, v8::internal::HeapObject&, int&, v8::internal::(anonymous namespace)::PromotedPageRecordMigratedSlotVisitor*&) src/objects/objects-body-descriptors-inl.h (d8+0xa97d74) (BuildId: 06e6c95b54bbb645)
#12 IterateBodyFast<v8::internal::(anonymous namespace)::PromotedPageRecordMigratedSlotVisitor> src/objects/objects-body-descriptors-inl.h:1438:3 (d8+0xa9318c) (BuildId: 06e6c95b54bbb645)
#13 IterateBodyFast<v8::internal::(anonymous namespace)::PromotedPageRecordMigratedSlotVisitor> src/objects/objects-body-descriptors-inl.h:1425:3 (d8+0xa9318c)
#14 IterateFast<v8::internal::(anonymous namespace)::PromotedPageRecordMigratedSlotVisitor> src/objects/objects-body-descriptors-inl.h:1413:3 (d8+0xa9318c)
#15 v8::internal::(anonymous namespace)::HandlePromotedObject(v8::internal::HeapObject, v8::internal::NonAtomicMarkingState*, v8::internal::PretenuringHandler*, v8::internal::PtrComprCageBase, std::Cr::unordered_map<v8::internal::AllocationSite, unsigned long, v8::internal::Object::Hasher, std::Cr::equal_to<v8::internal::AllocationSite>, std::Cr::allocator<std::Cr::pair<v8::internal::AllocationSite const, unsigned long>>>*, v8::internal::(anonymous namespace)::PromotedPageRecordMigratedSlotVisitor*) src/heap/sweeper.cc:805:10 (d8+0xa9318c)
#16 v8::internal::Sweeper::RawIteratePromotedPageForRememberedSets(v8::internal::MemoryChunk*, std::Cr::unordered_map<v8::internal::AllocationSite, unsigned long, v8::internal::Object::Hasher, std::Cr::equal_to<v8::internal::AllocationSite>, std::Cr::allocator<std::Cr::pair<v8::internal::AllocationSite const, unsigned long>>>*, std::Cr::unordered_map<v8::internal::MemoryChunk*, v8::internal::SlotSet*, std::Cr::hash<v8::internal::MemoryChunk*>, std::Cr::equal_to<v8::internal::MemoryChunk*>, std::Cr::allocator<std::Cr::pair<v8::internal::MemoryChunk* const, v8::internal::SlotSet*>>>*) src/heap/sweeper.cc:841:7 (d8+0xa92e20) (BuildId: 06e6c95b54bbb645)
#17 ParallelIteratePromotedPageForRememberedSets src/heap/sweeper.cc:987:3 (d8+0xa9ffdc) (BuildId: 06e6c95b54bbb645)
#18 v8::internal::Sweeper::ConcurrentSweeper::ConcurrentSweepForRememberedSet(v8::JobDelegate*) src/heap/sweeper.cc:61:17 (d8+0xa9ffdc)
#19 v8::internal::Sweeper::SweeperJob::RunImpl(v8::JobDelegate*, bool) src/heap/sweeper.cc:126:31 (d8+0xa9f0f6) (BuildId: 06e6c95b54bbb645)
#20 v8::internal::Sweeper::SweeperJob::Run(v8::JobDelegate*) src/heap/sweeper.cc:98:5 (d8+0xa9e6e9) (BuildId: 06e6c95b54bbb645)
#21 v8::platform::DefaultJobWorker::Run() src/libplatform/default-job.h:147:18 (d8+0x201972b) (BuildId: 06e6c95b54bbb645)
#22 v8::platform::DefaultWorkerThreadsTaskRunner::WorkerThread::Run() src/libplatform/default-worker-threads-task-runner.cc:73:11 (d8+0x201f240) (BuildId: 06e6c95b54bbb645)
#23 NotifyStartedAndRun src/base/platform/platform.h:596:5 (d8+0x2013592) (BuildId: 06e6c95b54bbb645)
#24 v8::base::ThreadEntry(void*) src/base/platform/platform-posix.cc:1123:11 (d8+0x2013592)
Mutex M0 (0x7b0c000007e0) created at:
#0 pthread_mutex_init /b/s/w/ir/cache/builder/src/third_party/llvm/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1331:3 (d8+0x523300) (BuildId: 06e6c95b54bbb645)
#1 InitializeNativeHandle src/base/platform/mutex.cc:99:12 (d8+0x200b32b) (BuildId: 06e6c95b54bbb645)
#2 v8::base::Mutex::Mutex() src/base/platform/mutex.cc:152:3 (d8+0x200b32b)
#3 v8::internal::MemoryChunk::MemoryChunk(v8::internal::Heap*, v8::internal::BaseSpace*, unsigned long, unsigned long, unsigned long, v8::internal::VirtualMemory, v8::internal::Executability, v8::internal::PageSize) src/heap/memory-chunk.cc:154:16 (d8+0xa3462f) (BuildId: 06e6c95b54bbb645)
#4 v8::internal::Page::Page(v8::internal::Heap*, v8::internal::BaseSpace*, unsigned long, unsigned long, unsigned long, v8::internal::VirtualMemory, v8::internal::Executability) src/heap/spaces.cc:53:7 (d8+0xa8a50f) (BuildId: 06e6c95b54bbb645)
#5 v8::internal::MemoryAllocator::AllocatePage(v8::internal::MemoryAllocator::AllocationMode, v8::internal::Space*, v8::internal::Executability) src/heap/memory-allocator.cc:579:40 (d8+0xa31224) (BuildId: 06e6c95b54bbb645)
#6 v8::internal::PagedSpaceBase::TryExpandImpl() src/heap/paged-spaces.cc:393:44 (d8+0xa50188) (BuildId: 06e6c95b54bbb645)
#7 PreallocatePages src/heap/new-spaces.cc:984:10 (d8+0xa3fab0) (BuildId: 06e6c95b54bbb645)
#8 PagedSpaceForNewSpace src/heap/new-spaces.cc:901:8 (d8+0xa3fab0)
#9 v8::internal::PagedNewSpace::PagedNewSpace(v8::internal::Heap*, unsigned long, unsigned long, v8::internal::LinearAllocationArea&) src/heap/new-spaces.cc:1016:7 (d8+0xa3fab0)
#10 make_unique<v8::internal::PagedNewSpace, v8::internal::Heap *, unsigned long &, unsigned long &, v8::internal::LinearAllocationArea &> buildtools/third_party/libc++/trunk/include/__memory/unique_ptr.h:686:30 (d8+0x959f81) (BuildId: 06e6c95b54bbb645)
#11 v8::internal::Heap::SetUpSpaces(v8::internal::LinearAllocationArea&, v8::internal::LinearAllocationArea&) src/heap/heap.cc:5569:27 (d8+0x959f81)
#12 v8::internal::Isolate::Init(v8::internal::SnapshotData*, v8::internal::SnapshotData*, v8::internal::SnapshotData*, bool) src/execution/isolate.cc:4348:9 (d8+0x88a11c) (BuildId: 06e6c95b54bbb645)
#13 v8::internal::Isolate::InitWithSnapshot(v8::internal::SnapshotData*, v8::internal::SnapshotData*, v8::internal::SnapshotData*, bool) src/execution/isolate.cc:4064:10 (d8+0x88ba99) (BuildId: 06e6c95b54bbb645)
#14 v8::internal::Snapshot::Initialize(v8::internal::Isolate*) src/snapshot/snapshot.cc:182:27 (d8+0x1103aed) (BuildId: 06e6c95b54bbb645)
#15 v8::Isolate::Initialize(v8::Isolate*, v8::Isolate::CreateParams const&) src/api/api.cc:9049:8 (d8+0x62c749) (BuildId: 06e6c95b54bbb645)
#16 v8::Isolate::New(v8::Isolate::CreateParams const&) src/api/api.cc:9085:3 (d8+0x62ca05) (BuildId: 06e6c95b54bbb645)
#17 v8::Shell::Main(int, char**) src/d8/d8.cc:5909:22 (d8+0x5dffbe) (BuildId: 06e6c95b54bbb645)
#18 main src/d8/d8.cc:6117:43 (d8+0x5e0f10) (BuildId: 06e6c95b54bbb645)
Thread T5 'V8 DefaultWorke' (tid=21435, running) created by main thread at:
#0 pthread_create /b/s/w/ir/cache/builder/src/third_party/llvm/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1038:3 (d8+0x52198b) (BuildId: 06e6c95b54bbb645)
#1 v8::base::Thread::Start() src/base/platform/platform-posix.cc:1155:14 (d8+0x20134a6) (BuildId: 06e6c95b54bbb645)
#2 WorkerThread src/libplatform/default-worker-threads-task-runner.cc:66:3 (d8+0x201ec07) (BuildId: 06e6c95b54bbb645)
#3 make_unique<v8::platform::DefaultWorkerThreadsTaskRunner::WorkerThread, v8::platform::DefaultWorkerThreadsTaskRunner *> buildtools/third_party/libc++/trunk/include/__memory/unique_ptr.h:686:30 (d8+0x201ec07)
#4 v8::platform::DefaultWorkerThreadsTaskRunner::DefaultWorkerThreadsTaskRunner(unsigned int, double (*)()) src/libplatform/default-worker-threads-task-runner.cc:16:28 (d8+0x201ec07)
#5 construct_at<v8::platform::DefaultWorkerThreadsTaskRunner, const int &, double (*)(), v8::platform::DefaultWorkerThreadsTaskRunner *> buildtools/third_party/libc++/trunk/include/__memory/construct_at.h:38:48 (d8+0x2015d60) (BuildId: 06e6c95b54bbb645)
#6 construct<v8::platform::DefaultWorkerThreadsTaskRunner, const int &, double (*)(), void, void> buildtools/third_party/libc++/trunk/include/__memory/allocator_traits.h:304:9 (d8+0x2015d60)
#7 __shared_ptr_emplace<const int &, double (*)()> buildtools/third_party/libc++/trunk/include/__memory/shared_ptr.h:275:9 (d8+0x2015d60)
#8 allocate_shared<v8::platform::DefaultWorkerThreadsTaskRunner, std::Cr::allocator<v8::platform::DefaultWorkerThreadsTaskRunner>, const int &, double (*)(), void> buildtools/third_party/libc++/trunk/include/__memory/shared_ptr.h:936:55 (d8+0x2015d60)
#9 make_shared<v8::platform::DefaultWorkerThreadsTaskRunner, const int &, double (*)(), void> buildtools/third_party/libc++/trunk/include/__memory/shared_ptr.h:945:12 (d8+0x2015d60)
#10 EnsureBackgroundTaskRunnerInitialized src/libplatform/default-platform.cc:132:7 (d8+0x2015d60)
#11 v8::platform::DefaultPlatform::DefaultPlatform(int, v8::platform::IdleTaskSupport, std::Cr::unique_ptr<v8::TracingController, std::Cr::default_delete<v8::TracingController>>) src/libplatform/default-platform.cc:108:5 (d8+0x2015d60)
#12 make_unique<v8::platform::DefaultPlatform, int &, v8::platform::IdleTaskSupport &, std::Cr::unique_ptr<v8::TracingController, std::Cr::default_delete<v8::TracingController> > > buildtools/third_party/libc++/trunk/include/__memory/unique_ptr.h:686:30 (d8+0x20153d2) (BuildId: 06e6c95b54bbb645)
#13 v8::platform::NewDefaultPlatform(int, v8::platform::IdleTaskSupport, v8::platform::InProcessStackDumping, std::Cr::unique_ptr<v8::TracingController, std::Cr::default_delete<v8::TracingController>>) src/libplatform/default-platform.cc:53:19 (d8+0x20153d2)
#14 v8::Shell::Main(int, char**) src/d8/d8.cc:5812:16 (d8+0x5dfb09) (BuildId: 06e6c95b54bbb645)
#15 main src/d8/d8.cc:6117:43 (d8+0x5e0f10) (BuildId: 06e6c95b54bbb645)
SUMMARY: ThreadSanitizer: data race src/utils/memcopy.h:123:7 in MemMove
==================
==================
WARNING: ThreadSanitizer: data race (pid=21413)
Write of size 8 at 0x7eba001057e0 by main thread:
#0 __tsan_memmove /b/s/w/ir/cache/builder/src/third_party/llvm/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:3118:3 (d8+0x566140) (BuildId: 06e6c95b54bbb645)
#1 MemMove src/utils/memcopy.h:123:7 (d8+0x949b82) (BuildId: 06e6c95b54bbb645)
#2 v8::internal::Heap::MoveRange(v8::internal::HeapObject, v8::internal::CompressedObjectSlot, v8::internal::CompressedObjectSlot, int, v8::internal::WriteBarrierMode) src/heap/heap.cc:2027:5 (d8+0x949b82)
#3 MoveElements src/objects/fixed-array-inl.h:262:20 (d8+0xc0b43a) (BuildId: 06e6c95b54bbb645)
#4 v8::internal::(anonymous namespace)::FastElementsAccessor<v8::internal::(anonymous namespace)::FastPackedSmiElementsAccessor, v8::internal::(anonymous namespace)::ElementsKindTraits<(v8::internal::ElementsKind)0>>::MoveElements(v8::internal::Isolate*, v8::internal::Handle<v8::internal::JSArray>, v8::internal::Handle<v8::internal::FixedArrayBase>, int, int, int, int, int) src/objects/elements.cc:2242:16 (d8+0xc0b43a)
#5 v8::internal::(anonymous namespace)::FastElementsAccessor<v8::internal::(anonymous namespace)::FastPackedSmiElementsAccessor, v8::internal::(anonymous namespace)::ElementsKindTraits<(v8::internal::ElementsKind)0>>::AddArguments(v8::internal::Handle<v8::internal::JSArray>, v8::internal::Handle<v8::internal::FixedArrayBase>, v8::internal::BuiltinArguments*, unsigned int, v8::internal::(anonymous namespace)::Where) src/objects/elements.cc:2491:7 (d8+0xc0b13a) (BuildId: 06e6c95b54bbb645)
#6 UnshiftImpl src/objects/elements.cc:2218:12 (d8+0xc055f3) (BuildId: 06e6c95b54bbb645)
#7 v8::internal::(anonymous namespace)::ElementsAccessorBase<v8::internal::(anonymous namespace)::FastPackedSmiElementsAccessor, v8::internal::(anonymous namespace)::ElementsKindTraits<(v8::internal::ElementsKind)0>>::Unshift(v8::internal::Handle<v8::internal::JSArray>, v8::internal::BuiltinArguments*, unsigned int) src/objects/elements.cc:732:12 (d8+0xc055f3)
#8 v8::internal::Builtin_Impl_ArrayUnshift(v8::internal::BuiltinArguments, v8::internal::Isolate*) src/builtins/builtins-array.cc:640:3 (d8+0x6871cf) (BuildId: 06e6c95b54bbb645)
#9 v8::internal::Builtin_ArrayUnshift(int, unsigned long*, v8::internal::Isolate*) src/builtins/builtins-array.cc:617:1 (d8+0x686d93) (BuildId: 06e6c95b54bbb645)
#10 Builtins_AsyncFromSyncIteratorPrototypeThrow setup-isolate-deserialize.cc (d8+0x1dda837)
#11 v8::internal::(anonymous namespace)::InvokeWithTryCatch(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const&) src/execution/execution.cc:489:20 (d8+0x85e89e) (BuildId: 06e6c95b54bbb645)
#12 v8::internal::Execution::TryCall(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, int, v8::internal::Handle<v8::internal::Object>*, v8::internal::Execution::MessageHandling, v8::internal::MaybeHandle<v8::internal::Object>*, bool) src/execution/execution.cc:591:10 (d8+0x85eb68) (BuildId: 06e6c95b54bbb645)
#13 v8::internal::SourceTextModule::ExecuteModule(v8::internal::Isolate*, v8::internal::Handle<v8::internal::SourceTextModule>) src/objects/source-text-module.cc:1021:3 (d8+0xe52c68) (BuildId: 06e6c95b54bbb645)
#14 v8::internal::SourceTextModule::InnerModuleEvaluation(v8::internal::Isolate*, v8::internal::Handle<v8::internal::SourceTextModule>, v8::internal::ZoneForwardList<v8::internal::Handle<v8::internal::SourceTextModule>>*, unsigned int*) src/objects/source-text-module.cc:1192:5 (d8+0xe51d39) (BuildId: 06e6c95b54bbb645)
#15 v8::internal::SourceTextModule::Evaluate(v8::internal::Isolate*, v8::internal::Handle<v8::internal::SourceTextModule>) src/objects/source-text-module.cc:733:8 (d8+0xe51368) (BuildId: 06e6c95b54bbb645)
#16 v8::internal::Module::Evaluate(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Module>) src/objects/module.cc:280:12 (d8+0xdf8599) (BuildId: 06e6c95b54bbb645)
#17 v8::Module::Evaluate(v8::Local<v8::Context>) src/api/api.cc:2548:16 (d8+0x60552d) (BuildId: 06e6c95b54bbb645)
#18 v8::Shell::ExecuteModule(v8::Isolate*, char const*) src/d8/d8.cc:1455:33 (d8+0x5c8cf1) (BuildId: 06e6c95b54bbb645)
#19 v8::SourceGroup::Execute(v8::Isolate*) src/d8/d8.cc:4442:12 (d8+0x5da4a0) (BuildId: 06e6c95b54bbb645)
#20 v8::Shell::RunMain(v8::Isolate*, bool) src/d8/d8.cc:5224:39 (d8+0x5de41e) (BuildId: 06e6c95b54bbb645)
#21 v8::Shell::Main(int, char**) src/d8/d8.cc:6020:18 (d8+0x5e0906) (BuildId: 06e6c95b54bbb645)
#22 main src/d8/d8.cc:6117:43 (d8+0x5e0f10) (BuildId: 06e6c95b54bbb645)
Previous atomic read of size 4 at 0x7eba001057e0 by thread T5 (mutexes: write M0):
#0 __cxx_atomic_load<int> buildtools/third_party/libc++/trunk/include/atomic:948:12 (d8+0xa98a99) (BuildId: 06e6c95b54bbb645)
#1 load buildtools/third_party/libc++/trunk/include/atomic:1537:17 (d8+0xa98a99)
#2 atomic_load_explicit<int> buildtools/third_party/libc++/trunk/include/atomic:1916:17 (d8+0xa98a99)
#3 Relaxed_Load src/base/atomicops.h:237:10 (d8+0xa98a99)
#4 Relaxed_Load<unsigned int> src/base/atomic-utils.h:87:9 (d8+0xa98a99)
#5 Relaxed_Load src/objects/compressed-slots-inl.h:75:26 (d8+0xa98a99)
#6 VisitPointer src/heap/sweeper.cc:678:50 (d8+0xa98a99)
#7 VisitPointers src/heap/sweeper.cc:694:7 (d8+0xa98a99)
#8 IteratePointers<v8::internal::(anonymous namespace)::PromotedPageRecordMigratedSlotVisitor> src/objects/objects-body-descriptors-inl.h:128:6 (d8+0xa98a99)
#9 IterateBody<v8::internal::(anonymous namespace)::PromotedPageRecordMigratedSlotVisitor> src/objects/objects-body-descriptors.h:135:5 (d8+0xa98a99)
#10 void v8::internal::CallIterateBody::apply<v8::internal::FixedArray::BodyDescriptor, v8::internal::(anonymous namespace)::PromotedPageRecordMigratedSlotVisitor>(v8::internal::Map, v8::internal::HeapObject, int, v8::internal::(anonymous namespace)::PromotedPageRecordMigratedSlotVisitor*) src/objects/objects-body-descriptors-inl.h:1432:5 (d8+0xa98a99)
#11 auto v8::internal::BodyDescriptorApply<v8::internal::CallIterateBody, v8::internal::Map&, v8::internal::HeapObject&, int&, v8::internal::(anonymous namespace)::PromotedPageRecordMigratedSlotVisitor*&>(v8::internal::InstanceType, v8::internal::Map&, v8::internal::HeapObject&, int&, v8::internal::(anonymous namespace)::PromotedPageRecordMigratedSlotVisitor*&) src/objects/objects-body-descriptors-inl.h (d8+0xa97d74) (BuildId: 06e6c95b54bbb645)
#12 IterateBodyFast<v8::internal::(anonymous namespace)::PromotedPageRecordMigratedSlotVisitor> src/objects/objects-body-descriptors-inl.h:1438:3 (d8+0xa9318c) (BuildId: 06e6c95b54bbb645)
#13 IterateBodyFast<v8::internal::(anonymous namespace)::PromotedPageRecordMigratedSlotVisitor> src/objects/objects-body-descriptors-inl.h:1425:3 (d8+0xa9318c)
#14 IterateFast<v8::internal::(anonymous namespace)::PromotedPageRecordMigratedSlotVisitor> src/objects/objects-body-descriptors-inl.h:1413:3 (d8+0xa9318c)
#15 v8::internal::(anonymous namespace)::HandlePromotedObject(v8::internal::HeapObject, v8::internal::NonAtomicMarkingState*, v8::internal::PretenuringHandler*, v8::internal::PtrComprCageBase, std::Cr::unordered_map<v8::internal::AllocationSite, unsigned long, v8::internal::Object::Hasher, std::Cr::equal_to<v8::internal::AllocationSite>, std::Cr::allocator<std::Cr::pair<v8::internal::AllocationSite const, unsigned long>>>*, v8::internal::(anonymous namespace)::PromotedPageRecordMigratedSlotVisitor*) src/heap/sweeper.cc:805:10 (d8+0xa9318c)
#16 v8::internal::Sweeper::RawIteratePromotedPageForRememberedSets(v8::internal::MemoryChunk*, std::Cr::unordered_map<v8::internal::AllocationSite, unsigned long, v8::internal::Object::Hasher, std::Cr::equal_to<v8::internal::AllocationSite>, std::Cr::allocator<std::Cr::pair<v8::internal::AllocationSite const, unsigned long>>>*, std::Cr::unordered_map<v8::internal::MemoryChunk*, v8::internal::SlotSet*, std::Cr::hash<v8::internal::MemoryChunk*>, std::Cr::equal_to<v8::internal::MemoryChunk*>, std::Cr::allocator<std::Cr::pair<v8::internal::MemoryChunk* const, v8::internal::SlotSet*>>>*) src/heap/sweeper.cc:841:7 (d8+0xa92e20) (BuildId: 06e6c95b54bbb645)
#17 ParallelIteratePromotedPageForRememberedSets src/heap/sweeper.cc:987:3 (d8+0xa9ffdc) (BuildId: 06e6c95b54bbb645)
#18 v8::internal::Sweeper::ConcurrentSweeper::ConcurrentSweepForRememberedSet(v8::JobDelegate*) src/heap/sweeper.cc:61:17 (d8+0xa9ffdc)
#19 v8::internal::Sweeper::SweeperJob::RunImpl(v8::JobDelegate*, bool) src/heap/sweeper.cc:126:31 (d8+0xa9f0f6) (BuildId: 06e6c95b54bbb645)
#20 v8::internal::Sweeper::SweeperJob::Run(v8::JobDelegate*) src/heap/sweeper.cc:98:5 (d8+0xa9e6e9) (BuildId: 06e6c95b54bbb645)
#21 v8::platform::DefaultJobWorker::Run() src/libplatform/default-job.h:147:18 (d8+0x201972b) (BuildId: 06e6c95b54bbb645)
#22 v8::platform::DefaultWorkerThreadsTaskRunner::WorkerThread::Run() src/libplatform/default-worker-threads-task-runner.cc:73:11 (d8+0x201f240) (BuildId: 06e6c95b54bbb645)
#23 NotifyStartedAndRun src/base/platform/platform.h:596:5 (d8+0x2013592) (BuildId: 06e6c95b54bbb645)
#24 v8::base::ThreadEntry(void*) src/base/platform/platform-posix.cc:1123:11 (d8+0x2013592)
Mutex M0 (0x7b0c000007e0) created at:
#0 pthread_mutex_init /b/s/w/ir/cache/builder/src/third_party/llvm/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1331:3 (d8+0x523300) (BuildId: 06e6c95b54bbb645)
#1 InitializeNativeHandle src/base/platform/mutex.cc:99:12 (d8+0x200b32b) (BuildId: 06e6c95b54bbb645)
#2 v8::base::Mutex::Mutex() src/base/platform/mutex.cc:152:3 (d8+0x200b32b)
#3 v8::internal::MemoryChunk::MemoryChunk(v8::internal::Heap*, v8::internal::BaseSpace*, unsigned long, unsigned long, unsigned long, v8::internal::VirtualMemory, v8::internal::Executability, v8::internal::PageSize) src/heap/memory-chunk.cc:154:16 (d8+0xa3462f) (BuildId: 06e6c95b54bbb645)
#4 v8::internal::Page::Page(v8::internal::Heap*, v8::internal::BaseSpace*, unsigned long, unsigned long, unsigned long, v8::internal::VirtualMemory, v8::internal::Executability) src/heap/spaces.cc:53:7 (d8+0xa8a50f) (BuildId: 06e6c95b54bbb645)
#5 v8::internal::MemoryAllocator::AllocatePage(v8::internal::MemoryAllocator::AllocationMode, v8::internal::Space*, v8::internal::Executability) src/heap/memory-allocator.cc:579:40 (d8+0xa31224) (BuildId: 06e6c95b54bbb645)
#6 v8::internal::PagedSpaceBase::TryExpandImpl() src/heap/paged-spaces.cc:393:44 (d8+0xa50188) (BuildId: 06e6c95b54bbb645)
#7 PreallocatePages src/heap/new-spaces.cc:984:10 (d8+0xa3fab0) (BuildId: 06e6c95b54bbb645)
#8 PagedSpaceForNewSpace src/heap/new-spaces.cc:901:8 (d8+0xa3fab0)
#9 v8::internal::PagedNewSpace::PagedNewSpace(v8::internal::Heap*, unsigned long, unsigned long, v8::internal::LinearAllocationArea&) src/heap/new-spaces.cc:1016:7 (d8+0xa3fab0)
#10 make_unique<v8::internal::PagedNewSpace, v8::internal::Heap *, unsigned long &, unsigned long &, v8::internal::LinearAllocationArea &> buildtools/third_party/libc++/trunk/include/__memory/unique_ptr.h:686:30 (d8+0x959f81) (BuildId: 06e6c95b54bbb645)
#11 v8::internal::Heap::SetUpSpaces(v8::internal::LinearAllocationArea&, v8::internal::LinearAllocationArea&) src/heap/heap.cc:5569:27 (d8+0x959f81)
#12 v8::internal::Isolate::Init(v8::internal::SnapshotData*, v8::internal::SnapshotData*, v8::internal::SnapshotData*, bool) src/execution/isolate.cc:4348:9 (d8+0x88a11c) (BuildId: 06e6c95b54bbb645)
#13 v8::internal::Isolate::InitWithSnapshot(v8::internal::SnapshotData*, v8::internal::SnapshotData*, v8::internal::SnapshotData*, bool) src/execution/isolate.cc:4064:10 (d8+0x88ba99) (BuildId: 06e6c95b54bbb645)
#14 v8::internal::Snapshot::Initialize(v8::internal::Isolate*) src/snapshot/snapshot.cc:182:27 (d8+0x1103aed) (BuildId: 06e6c95b54bbb645)
#15 v8::Isolate::Initialize(v8::Isolate*, v8::Isolate::CreateParams const&) src/api/api.cc:9049:8 (d8+0x62c749) (BuildId: 06e6c95b54bbb645)
#16 v8::Isolate::New(v8::Isolate::CreateParams const&) src/api/api.cc:9085:3 (d8+0x62ca05) (BuildId: 06e6c95b54bbb645)
#17 v8::Shell::Main(int, char**) src/d8/d8.cc:5909:22 (d8+0x5dffbe) (BuildId: 06e6c95b54bbb645)
#18 main src/d8/d8.cc:6117:43 (d8+0x5e0f10) (BuildId: 06e6c95b54bbb645)
Thread T5 'V8 DefaultWorke' (tid=21435, running) created by main thread at:
#0 pthread_create /b/s/w/ir/cache/builder/src/third_party/llvm/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1038:3 (d8+0x52198b) (BuildId: 06e6c95b54bbb645)
#1 v8::base::Thread::Start() src/base/platform/platform-posix.cc:1155:14 (d8+0x20134a6) (BuildId: 06e6c95b54bbb645)
#2 WorkerThread src/libplatform/default-worker-threads-task-runner.cc:66:3 (d8+0x201ec07) (BuildId: 06e6c95b54bbb645)
#3 make_unique<v8::platform::DefaultWorkerThreadsTaskRunner::WorkerThread, v8::platform::DefaultWorkerThreadsTaskRunner *> buildtools/third_party/libc++/trunk/include/__memory/unique_ptr.h:686:30 (d8+0x201ec07)
#4 v8::platform::DefaultWorkerThreadsTaskRunner::DefaultWorkerThreadsTaskRunner(unsigned int, double (*)()) src/libplatform/default-worker-threads-task-runner.cc:16:28 (d8+0x201ec07)
#5 construct_at<v8::platform::DefaultWorkerThreadsTaskRunner, const int &, double (*)(), v8::platform::DefaultWorkerThreadsTaskRunner *> buildtools/third_party/libc++/trunk/include/__memory/construct_at.h:38:48 (d8+0x2015d60) (BuildId: 06e6c95b54bbb645)
#6 construct<v8::platform::DefaultWorkerThreadsTaskRunner, const int &, double (*)(), void, void> buildtools/third_party/libc++/trunk/include/__memory/allocator_traits.h:304:9 (d8+0x2015d60)
#7 __shared_ptr_emplace<const int &, double (*)()> buildtools/third_party/libc++/trunk/include/__memory/shared_ptr.h:275:9 (d8+0x2015d60)
#8 allocate_shared<v8::platform::DefaultWorkerThreadsTaskRunner, std::Cr::allocator<v8::platform::DefaultWorkerThreadsTaskRunner>, const int &, double (*)(), void> buildtools/third_party/libc++/trunk/include/__memory/shared_ptr.h:936:55 (d8+0x2015d60)
#9 make_shared<v8::platform::DefaultWorkerThreadsTaskRunner, const int &, double (*)(), void> buildtools/third_party/libc++/trunk/include/__memory/shared_ptr.h:945:12 (d8+0x2015d60)
#10 EnsureBackgroundTaskRunnerInitialized src/libplatform/default-platform.cc:132:7 (d8+0x2015d60)
#11 v8::platform::DefaultPlatform::DefaultPlatform(int, v8::platform::IdleTaskSupport, std::Cr::unique_ptr<v8::TracingController, std::Cr::default_delete<v8::TracingController>>) src/libplatform/default-platform.cc:108:5 (d8+0x2015d60)
#12 make_unique<v8::platform::DefaultPlatform, int &, v8::platform::IdleTaskSupport &, std::Cr::unique_ptr<v8::TracingController, std::Cr::default_delete<v8::TracingController> > > buildtools/third_party/libc++/trunk/include/__memory/unique_ptr.h:686:30 (d8+0x20153d2) (BuildId: 06e6c95b54bbb645)
#13 v8::platform::NewDefaultPlatform(int, v8::platform::IdleTaskSupport, v8::platform::InProcessStackDumping, std::Cr::unique_ptr<v8::TracingController, std::Cr::default_delete<v8::TracingController>>) src/libplatform/default-platform.cc:53:19 (d8+0x20153d2)
#14 v8::Shell::Main(int, char**) src/d8/d8.cc:5812:16 (d8+0x5dfb09) (BuildId: 06e6c95b54bbb645)
#15 main src/d8/d8.cc:6117:43 (d8+0x5e0f10) (BuildId: 06e6c95b54bbb645)
SUMMARY: ThreadSanitizer: data race src/utils/memcopy.h:123:7 in MemMove
==================
ThreadSanitizer: reported 2 warnings

View File

@ -0,0 +1,3 @@
ActivateSpace
ActivateSpaces
v8::internal::MarkingBarrier::ActivateAll(v8::internal::Heap*, bool, v8::internal::MarkingBarrierType)

View File

@ -0,0 +1,198 @@
WARNING: ThreadSanitizer: data race (pid=10493)
Write of size 8 at 0x553200140008 by main thread (mutexes: write M0, write M1, write M2, write M3, write M4):
#0 v8::internal::MemoryChunk::SetOldGenerationPageFlags(bool) src/heap/memory-chunk.cc (d8+0xa31ff9) (BuildId: 8b25ec4b66132a89)
#1 ActivateSpace src/heap/marking-barrier.cc:175:8 (d8+0xa281ec) (BuildId: 8b25ec4b66132a89)
#2 ActivateSpaces src/heap/marking-barrier.cc:194:5 (d8+0xa281ec)
#3 v8::internal::MarkingBarrier::ActivateAll(v8::internal::Heap*, bool, v8::internal::MarkingBarrierType) src/heap/marking-barrier.cc:261:3 (d8+0xa281ec)
#4 v8::internal::IncrementalMarking::StartMarkingMajor() src/heap/incremental-marking.cc:333:3 (d8+0x971249) (BuildId: 8b25ec4b66132a89)
#5 v8::internal::IncrementalMarking::Start(v8::internal::GarbageCollector, v8::internal::GarbageCollectionReason) src/heap/incremental-marking.cc:192:5 (d8+0x97072c) (BuildId: 8b25ec4b66132a89)
#6 v8::internal::Heap::StartIncrementalMarking(int, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags, v8::internal::GarbageCollector) src/heap/heap.cc:1892:26 (d8+0x93d973) (BuildId: 8b25ec4b66132a89)
#7 v8::internal::Heap::ReportExternalMemoryPressure() src/heap/heap.cc:1586:7 (d8+0x942526) (BuildId: 8b25ec4b66132a89)
#8 ReportExternalAllocationLimitReached src/api/api.cc:8757:9 (d8+0x62d9b2) (BuildId: 8b25ec4b66132a89)
#9 v8::Isolate::AdjustAmountOfExternalAllocatedMemory(long) src/api/api.cc:9442:5 (d8+0x62d9b2)
#10 FromSharedPtr src/objects/managed-inl.h:47:9 (d8+0x5d30c0) (BuildId: 8b25ec4b66132a89)
#11 v8::Shell::WorkerNew(v8::FunctionCallbackInfo<v8::Value> const&) src/d8/d8.cc:2944:36 (d8+0x5d30c0)
#12 v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo) src/api/api-arguments-inl.h:146:3 (d8+0x684709) (BuildId: 8b25ec4b66132a89)
#13 v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<true>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, unsigned long*, int) src/builtins/builtins-api.cc:113:36 (d8+0x68312c) (BuildId: 8b25ec4b66132a89)
#14 v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) src/builtins/builtins-api.cc:144:5 (d8+0x68275b) (BuildId: 8b25ec4b66132a89)
#15 v8::internal::Builtin_HandleApiCall(int, unsigned long*, v8::internal::Isolate*) src/builtins/builtins-api.cc:135:1 (d8+0x682273) (BuildId: 8b25ec4b66132a89)
#16 Builtins_AsyncFromSyncIteratorPrototypeThrow setup-isolate-deserialize.cc (d8+0x1dd5837)
#17 v8::internal::Execution::CallScript(v8::internal::Isolate*, v8::internal::Handle<v8::internal::JSFunction>, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>) src/execution/execution.cc:538:10 (d8+0x85ca90) (BuildId: 8b25ec4b66132a89)
#18 v8::Script::Run(v8::Local<v8::Context>, v8::Local<v8::Data>) src/api/api.cc:2271:7 (d8+0x603527) (BuildId: 8b25ec4b66132a89)
#19 v8::Script::Run(v8::Local<v8::Context>) src/api/api.cc:2198:10 (d8+0x602ce0) (BuildId: 8b25ec4b66132a89)
#20 v8::Shell::ExecuteString(v8::Isolate*, v8::Local<v8::String>, v8::Local<v8::String>, v8::Shell::PrintResult, v8::Shell::ReportExceptions, v8::Shell::ProcessMessageQueue) src/d8/d8.cc:876:28 (d8+0x5c03d6) (BuildId: 8b25ec4b66132a89)
#21 v8::SourceGroup::Execute(v8::Isolate*) src/d8/d8.cc:4483:10 (d8+0x5da0d3) (BuildId: 8b25ec4b66132a89)
#22 v8::Shell::RunMain(v8::Isolate*, bool) src/d8/d8.cc:5217:39 (d8+0x5de08e) (BuildId: 8b25ec4b66132a89)
#23 v8::Shell::Main(int, char**) src/d8/d8.cc:5973:20 (d8+0x5e04ed) (BuildId: 8b25ec4b66132a89)
#24 main src/d8/d8.cc:6110:43 (d8+0x5e0e80) (BuildId: 8b25ec4b66132a89)
Previous read of size 8 at 0x553200140008 by thread T3 (mutexes: write M5):
#0 operator& src/base/flags.h:56:18 (d8+0xa90de3) (BuildId: 8b25ec4b66132a89)
#1 operator& src/base/flags.h:70:12 (d8+0xa90de3)
#2 IsFlagSet src/heap/basic-memory-chunk.h:197:63 (d8+0xa90de3)
#3 InSharedHeap src/heap/basic-memory-chunk.h:261:38 (d8+0xa90de3)
#4 RecordOldToSharedMigratedSlot src/heap/sweeper.cc:779:23 (d8+0xa90de3)
#5 v8::internal::(anonymous namespace)::PromotedPageRecordMigratedSlotVisitor::RecordMigratedSlot(v8::internal::HeapObject, v8::internal::MaybeObject, unsigned long) src/heap/sweeper.cc:745:7 (d8+0xa90de3)
#6 VisitPointer src/heap/sweeper.cc:684:5 (d8+0xa953ec) (BuildId: 8b25ec4b66132a89)
#7 VisitPointers src/heap/sweeper.cc:698:7 (d8+0xa953ec)
#8 IterateMaybeWeakPointers<v8::internal::(anonymous namespace)::PromotedPageRecordMigratedSlotVisitor> src/objects/objects-body-descriptors-inl.h:141:6 (d8+0xa953ec)
#9 IterateBody<v8::internal::(anonymous namespace)::PromotedPageRecordMigratedSlotVisitor> src/objects/objects-body-descriptors.h:176:5 (d8+0xa953ec)
#10 void v8::internal::CallIterateBody::apply<v8::internal::DescriptorArray::BodyDescriptor, v8::internal::(anonymous namespace)::PromotedPageRecordMigratedSlotVisitor>(v8::internal::Map, v8::internal::HeapObject, int, v8::internal::(anonymous namespace)::PromotedPageRecordMigratedSlotVisitor*) src/objects/objects-body-descriptors-inl.h:1432:5 (d8+0xa953ec)
#11 auto v8::internal::BodyDescriptorApply<v8::internal::CallIterateBody, v8::internal::Map&, v8::internal::HeapObject&, int&, v8::internal::(anonymous namespace)::PromotedPageRecordMigratedSlotVisitor*&>(v8::internal::InstanceType, v8::internal::Map&, v8::internal::HeapObject&, int&, v8::internal::(anonymous namespace)::PromotedPageRecordMigratedSlotVisitor*&) src/objects/objects-body-descriptors-inl.h:1392:7 (d8+0xa92aa8) (BuildId: 8b25ec4b66132a89)
#12 IterateBodyFast<v8::internal::(anonymous namespace)::PromotedPageRecordMigratedSlotVisitor> src/objects/objects-body-descriptors-inl.h:1438:3 (d8+0xa8d622) (BuildId: 8b25ec4b66132a89)
#13 IterateBodyFast<v8::internal::(anonymous namespace)::PromotedPageRecordMigratedSlotVisitor> src/objects/objects-body-descriptors-inl.h:1425:3 (d8+0xa8d622)
#14 IterateFast<v8::internal::(anonymous namespace)::PromotedPageRecordMigratedSlotVisitor> src/objects/objects-body-descriptors-inl.h:1413:3 (d8+0xa8d622)
#15 v8::internal::(anonymous namespace)::HandlePromotedObject(v8::internal::HeapObject, v8::internal::NonAtomicMarkingState*, v8::internal::PretenuringHandler*, v8::internal::PtrComprCageBase, std::Cr::unordered_map<v8::internal::AllocationSite, unsigned long, v8::internal::Object::Hasher, std::Cr::equal_to<v8::internal::AllocationSite>, std::Cr::allocator<std::Cr::pair<v8::internal::AllocationSite const, unsigned long>>>*, v8::internal::(anonymous namespace)::PromotedPageRecordMigratedSlotVisitor*) src/heap/sweeper.cc:801:10 (d8+0xa8d622)
#16 v8::internal::Sweeper::RawIteratePromotedPageForRememberedSets(v8::internal::MemoryChunk*, std::Cr::unordered_map<v8::internal::AllocationSite, unsigned long, v8::internal::Object::Hasher, std::Cr::equal_to<v8::internal::AllocationSite>, std::Cr::allocator<std::Cr::pair<v8::internal::AllocationSite const, unsigned long>>>*, std::Cr::unordered_map<v8::internal::MemoryChunk*, v8::internal::SlotSet*, std::Cr::hash<v8::internal::MemoryChunk*>, std::Cr::equal_to<v8::internal::MemoryChunk*>, std::Cr::allocator<std::Cr::pair<v8::internal::MemoryChunk* const, v8::internal::SlotSet*>>>*) src/heap/sweeper.cc:837:7 (d8+0xa8d42b) (BuildId: 8b25ec4b66132a89)
#17 ParallelIteratePromotedPageForRememberedSets src/heap/sweeper.cc:984:3 (d8+0xa9a40c) (BuildId: 8b25ec4b66132a89)
#18 v8::internal::Sweeper::ConcurrentSweeper::ConcurrentSweepForRememberedSet(v8::JobDelegate*) src/heap/sweeper.cc:60:17 (d8+0xa9a40c)
#19 v8::internal::Sweeper::SweeperJob::RunImpl(v8::JobDelegate*, bool) src/heap/sweeper.cc:125:31 (d8+0xa99526) (BuildId: 8b25ec4b66132a89)
#20 v8::internal::Sweeper::SweeperJob::Run(v8::JobDelegate*) src/heap/sweeper.cc:97:5 (d8+0xa98b19) (BuildId: 8b25ec4b66132a89)
#21 v8::platform::DefaultJobWorker::Run() src/libplatform/default-job.h:147:18 (d8+0x201472b) (BuildId: 8b25ec4b66132a89)
#22 v8::platform::DefaultWorkerThreadsTaskRunner::WorkerThread::Run() src/libplatform/default-worker-threads-task-runner.cc:73:11 (d8+0x201a240) (BuildId: 8b25ec4b66132a89)
#23 NotifyStartedAndRun src/base/platform/platform.h:596:5 (d8+0x200e592) (BuildId: 8b25ec4b66132a89)
#24 v8::base::ThreadEntry(void*) src/base/platform/platform-posix.cc:1123:11 (d8+0x200e592)
Mutex M0 (0x563a3b443820) created at:
#0 pthread_mutex_init /b/s/w/ir/cache/builder/src/third_party/llvm/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1331:3 (d8+0x523300) (BuildId: 8b25ec4b66132a89)
#1 InitializeNativeHandle src/base/platform/mutex.cc:99:12 (d8+0x200632b) (BuildId: 8b25ec4b66132a89)
#2 v8::base::Mutex::Mutex() src/base/platform/mutex.cc:152:3 (d8+0x200632b)
#3 Construct src/base/lazy-instance.h:129:68 (d8+0x5ecd69) (BuildId: 8b25ec4b66132a89)
#4 InitStorageUsingTrait<v8::base::DefaultConstructTrait<v8::base::Mutex> > src/base/lazy-instance.h:106:5 (d8+0x5ecd69)
#5 v8::base::LazyInstanceImpl<v8::base::Mutex, v8::base::StaticallyAllocatedInstanceTrait<v8::base::Mutex>, v8::base::DefaultConstructTrait<v8::base::Mutex>, v8::base::ThreadSafeInitOnceTrait, v8::base::LeakyInstanceTrait<v8::base::Mutex>>::InitInstance(void*) src/base/lazy-instance.h:170:5 (d8+0x5ecd69)
#6 operator() src/base/once.h:101:32 (d8+0x5ecdad) (BuildId: 8b25ec4b66132a89)
#7 __invoke<(lambda at ../../src/base/once.h:101:24) &> buildtools/third_party/libc++/trunk/include/__functional/invoke.h:394:23 (d8+0x5ecdad)
#8 __call<(lambda at ../../src/base/once.h:101:24) &> buildtools/third_party/libc++/trunk/include/__functional/invoke.h:487:9 (d8+0x5ecdad)
#9 operator() buildtools/third_party/libc++/trunk/include/__functional/function.h:232:12 (d8+0x5ecdad)
#10 void std::Cr::__function::__policy_invoker<void ()>::__call_impl<std::Cr::__function::__default_alloc_func<void v8::base::CallOnce<void*, void>(std::Cr::atomic<unsigned char>*, v8::base::FunctionWithArgs<void*>::type, void*)::'lambda'(), void ()>>(std::Cr::__function::__policy_storage const*) buildtools/third_party/libc++/trunk/include/__functional/function.h:711:16 (d8+0x5ecdad)
#11 operator() buildtools/third_party/libc++/trunk/include/__functional/function.h:842:16 (d8+0x20054f7) (BuildId: 8b25ec4b66132a89)
#12 operator() buildtools/third_party/libc++/trunk/include/__functional/function.h:1152:12 (d8+0x20054f7)
#13 v8::base::CallOnceImpl(std::Cr::atomic<unsigned char>*, std::Cr::function<void ()>) src/base/once.cc:36:5 (d8+0x20054f7)
#14 CallOnce<void *, void> src/base/once.h:101:5 (d8+0x5d2f94) (BuildId: 8b25ec4b66132a89)
#15 Init<void (*)(void *), void *> src/base/lazy-instance.h:144:5 (d8+0x5d2f94)
#16 Init src/base/lazy-instance.h:175:5 (d8+0x5d2f94)
#17 Pointer src/base/lazy-instance.h:180:5 (d8+0x5d2f94)
#18 v8::Shell::WorkerNew(v8::FunctionCallbackInfo<v8::Value> const&) src/d8/d8.cc:2929:24 (d8+0x5d2f94)
#19 v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo) src/api/api-arguments-inl.h:146:3 (d8+0x684709) (BuildId: 8b25ec4b66132a89)
#20 v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<true>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, unsigned long*, int) src/builtins/builtins-api.cc:113:36 (d8+0x68312c) (BuildId: 8b25ec4b66132a89)
#21 v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) src/builtins/builtins-api.cc:144:5 (d8+0x68275b) (BuildId: 8b25ec4b66132a89)
#22 v8::internal::Builtin_HandleApiCall(int, unsigned long*, v8::internal::Isolate*) src/builtins/builtins-api.cc:135:1 (d8+0x682273) (BuildId: 8b25ec4b66132a89)
#23 Builtins_AsyncFromSyncIteratorPrototypeThrow setup-isolate-deserialize.cc (d8+0x1dd5837)
#24 v8::internal::Execution::CallScript(v8::internal::Isolate*, v8::internal::Handle<v8::internal::JSFunction>, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>) src/execution/execution.cc:538:10 (d8+0x85ca90) (BuildId: 8b25ec4b66132a89)
#25 v8::Script::Run(v8::Local<v8::Context>, v8::Local<v8::Data>) src/api/api.cc:2271:7 (d8+0x603527) (BuildId: 8b25ec4b66132a89)
#26 v8::Script::Run(v8::Local<v8::Context>) src/api/api.cc:2198:10 (d8+0x602ce0) (BuildId: 8b25ec4b66132a89)
#27 v8::Shell::ExecuteString(v8::Isolate*, v8::Local<v8::String>, v8::Local<v8::String>, v8::Shell::PrintResult, v8::Shell::ReportExceptions, v8::Shell::ProcessMessageQueue) src/d8/d8.cc:876:28 (d8+0x5c03d6) (BuildId: 8b25ec4b66132a89)
#28 v8::SourceGroup::Execute(v8::Isolate*) src/d8/d8.cc:4483:10 (d8+0x5da0d3) (BuildId: 8b25ec4b66132a89)
#29 v8::Shell::RunMain(v8::Isolate*, bool) src/d8/d8.cc:5217:39 (d8+0x5de08e) (BuildId: 8b25ec4b66132a89)
#30 v8::Shell::Main(int, char**) src/d8/d8.cc:5973:20 (d8+0x5e04ed) (BuildId: 8b25ec4b66132a89)
#31 main src/d8/d8.cc:6110:43 (d8+0x5e0e80) (BuildId: 8b25ec4b66132a89)
Mutex M1 (0x7b10000004c8) created at:
#0 pthread_mutex_init /b/s/w/ir/cache/builder/src/third_party/llvm/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1331:3 (d8+0x523300) (BuildId: 8b25ec4b66132a89)
#1 InitializeRecursiveNativeHandle src/base/platform/mutex.cc:112:12 (d8+0x200643a) (BuildId: 8b25ec4b66132a89)
#2 v8::base::RecursiveMutex::RecursiveMutex() src/base/platform/mutex.cc:187:3 (d8+0x200643a)
#3 v8::internal::GlobalSafepoint::GlobalSafepoint(v8::internal::Isolate*) src/heap/safepoint.cc:293:18 (d8+0xa582f9) (BuildId: 8b25ec4b66132a89)
#4 make_unique<v8::internal::GlobalSafepoint, v8::internal::Isolate *> buildtools/third_party/libc++/trunk/include/__memory/unique_ptr.h:686:30 (d8+0x88808d) (BuildId: 8b25ec4b66132a89)
#5 v8::internal::Isolate::Init(v8::internal::SnapshotData*, v8::internal::SnapshotData*, v8::internal::SnapshotData*, bool) src/execution/isolate.cc:4264:25 (d8+0x88808d)
#6 v8::internal::Isolate::InitWithSnapshot(v8::internal::SnapshotData*, v8::internal::SnapshotData*, v8::internal::SnapshotData*, bool) src/execution/isolate.cc:4054:10 (d8+0x88a109) (BuildId: 8b25ec4b66132a89)
#7 v8::internal::Snapshot::Initialize(v8::internal::Isolate*) src/snapshot/snapshot.cc:182:27 (d8+0x10fee3d) (BuildId: 8b25ec4b66132a89)
#8 v8::Isolate::Initialize(v8::Isolate*, v8::Isolate::CreateParams const&) src/api/api.cc:9048:8 (d8+0x62cc79) (BuildId: 8b25ec4b66132a89)
#9 v8::Isolate::New(v8::Isolate::CreateParams const&) src/api/api.cc:9084:3 (d8+0x62cf35) (BuildId: 8b25ec4b66132a89)
#10 v8::Shell::Main(int, char**) src/d8/d8.cc:5902:22 (d8+0x5dff2e) (BuildId: 8b25ec4b66132a89)
#11 main src/d8/d8.cc:6110:43 (d8+0x5e0e80) (BuildId: 8b25ec4b66132a89)
Mutex M2 (0x7b3800010020) created at:
#0 pthread_mutex_init /b/s/w/ir/cache/builder/src/third_party/llvm/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1331:3 (d8+0x523300) (BuildId: 8b25ec4b66132a89)
#1 InitializeRecursiveNativeHandle src/base/platform/mutex.cc:112:12 (d8+0x200643a) (BuildId: 8b25ec4b66132a89)
#2 v8::base::RecursiveMutex::RecursiveMutex() src/base/platform/mutex.cc:187:3 (d8+0x200643a)
#3 v8::internal::IsolateSafepoint::IsolateSafepoint(v8::internal::Heap*) src/heap/safepoint.cc:29:19 (d8+0xa56fd8) (BuildId: 8b25ec4b66132a89)
#4 make_unique<v8::internal::IsolateSafepoint, v8::internal::Heap *> buildtools/third_party/libc++/trunk/include/__memory/unique_ptr.h:686:30 (d8+0x931778) (BuildId: 8b25ec4b66132a89)
#5 v8::internal::Heap::Heap() src/heap/heap.cc:232:18 (d8+0x931778)
#6 v8::internal::Isolate::Isolate(std::Cr::unique_ptr<v8::internal::IsolateAllocator, std::Cr::default_delete<v8::internal::IsolateAllocator>>, bool) src/execution/isolate.cc:3432:10 (d8+0x883e6c) (BuildId: 8b25ec4b66132a89)
#7 Allocate src/execution/isolate.cc:3350:25 (d8+0x882a60) (BuildId: 8b25ec4b66132a89)
#8 v8::internal::Isolate::New() src/execution/isolate.cc:3328:22 (d8+0x882a60)
#9 Allocate src/api/api.cc:8975:37 (d8+0x62cf27) (BuildId: 8b25ec4b66132a89)
#10 v8::Isolate::New(v8::Isolate::CreateParams const&) src/api/api.cc:9083:25 (d8+0x62cf27)
#11 v8::Worker::ExecuteInThread() src/d8/d8.cc:4745:14 (d8+0x5db3ed) (BuildId: 8b25ec4b66132a89)
#12 v8::Worker::WorkerThread::Run() src/d8/d8.cc:4622:11 (d8+0x5db334) (BuildId: 8b25ec4b66132a89)
#13 NotifyStartedAndRun src/base/platform/platform.h:596:5 (d8+0x200e592) (BuildId: 8b25ec4b66132a89)
#14 v8::base::ThreadEntry(void*) src/base/platform/platform-posix.cc:1123:11 (d8+0x200e592)
Mutex M3 (0x7b380003e000) created at:
#0 pthread_mutex_init /b/s/w/ir/cache/builder/src/third_party/llvm/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1331:3 (d8+0x523300) (BuildId: 8b25ec4b66132a89)
#1 InitializeRecursiveNativeHandle src/base/platform/mutex.cc:112:12 (d8+0x200643a) (BuildId: 8b25ec4b66132a89)
#2 v8::base::RecursiveMutex::RecursiveMutex() src/base/platform/mutex.cc:187:3 (d8+0x200643a)
#3 v8::internal::IsolateSafepoint::IsolateSafepoint(v8::internal::Heap*) src/heap/safepoint.cc:29:19 (d8+0xa56fd8) (BuildId: 8b25ec4b66132a89)
#4 make_unique<v8::internal::IsolateSafepoint, v8::internal::Heap *> buildtools/third_party/libc++/trunk/include/__memory/unique_ptr.h:686:30 (d8+0x931778) (BuildId: 8b25ec4b66132a89)
#5 v8::internal::Heap::Heap() src/heap/heap.cc:232:18 (d8+0x931778)
#6 v8::internal::Isolate::Isolate(std::Cr::unique_ptr<v8::internal::IsolateAllocator, std::Cr::default_delete<v8::internal::IsolateAllocator>>, bool) src/execution/isolate.cc:3432:10 (d8+0x883e6c) (BuildId: 8b25ec4b66132a89)
#7 Allocate src/execution/isolate.cc:3350:25 (d8+0x882a60) (BuildId: 8b25ec4b66132a89)
#8 v8::internal::Isolate::New() src/execution/isolate.cc:3328:22 (d8+0x882a60)
#9 Allocate src/api/api.cc:8975:37 (d8+0x62cf27) (BuildId: 8b25ec4b66132a89)
#10 v8::Isolate::New(v8::Isolate::CreateParams const&) src/api/api.cc:9083:25 (d8+0x62cf27)
#11 v8::Worker::ExecuteInThread() src/d8/d8.cc:4745:14 (d8+0x5db3ed) (BuildId: 8b25ec4b66132a89)
#12 v8::Worker::WorkerThread::Run() src/d8/d8.cc:4622:11 (d8+0x5db334) (BuildId: 8b25ec4b66132a89)
#13 NotifyStartedAndRun src/base/platform/platform.h:596:5 (d8+0x200e592) (BuildId: 8b25ec4b66132a89)
#14 v8::base::ThreadEntry(void*) src/base/platform/platform-posix.cc:1123:11 (d8+0x200e592)
Mutex M4 (0x7b38000000a0) created at:
#0 pthread_mutex_init /b/s/w/ir/cache/builder/src/third_party/llvm/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1331:3 (d8+0x523300) (BuildId: 8b25ec4b66132a89)
#1 InitializeRecursiveNativeHandle src/base/platform/mutex.cc:112:12 (d8+0x200643a) (BuildId: 8b25ec4b66132a89)
#2 v8::base::RecursiveMutex::RecursiveMutex() src/base/platform/mutex.cc:187:3 (d8+0x200643a)
#3 v8::internal::IsolateSafepoint::IsolateSafepoint(v8::internal::Heap*) src/heap/safepoint.cc:29:19 (d8+0xa56fd8) (BuildId: 8b25ec4b66132a89)
#4 make_unique<v8::internal::IsolateSafepoint, v8::internal::Heap *> buildtools/third_party/libc++/trunk/include/__memory/unique_ptr.h:686:30 (d8+0x931778) (BuildId: 8b25ec4b66132a89)
#5 v8::internal::Heap::Heap() src/heap/heap.cc:232:18 (d8+0x931778)
#6 v8::internal::Isolate::Isolate(std::Cr::unique_ptr<v8::internal::IsolateAllocator, std::Cr::default_delete<v8::internal::IsolateAllocator>>, bool) src/execution/isolate.cc:3432:10 (d8+0x883e6c) (BuildId: 8b25ec4b66132a89)
#7 Allocate src/execution/isolate.cc:3350:25 (d8+0x882a60) (BuildId: 8b25ec4b66132a89)
#8 v8::internal::Isolate::New() src/execution/isolate.cc:3328:22 (d8+0x882a60)
#9 Allocate src/api/api.cc:8975:37 (d8+0x62cf27) (BuildId: 8b25ec4b66132a89)
#10 v8::Isolate::New(v8::Isolate::CreateParams const&) src/api/api.cc:9083:25 (d8+0x62cf27)
#11 v8::Shell::Main(int, char**) src/d8/d8.cc:5902:22 (d8+0x5dff2e) (BuildId: 8b25ec4b66132a89)
#12 main src/d8/d8.cc:6110:43 (d8+0x5e0e80) (BuildId: 8b25ec4b66132a89)
Mutex M5 (0x7b0c0001a670) created at:
#0 pthread_mutex_init /b/s/w/ir/cache/builder/src/third_party/llvm/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1331:3 (d8+0x523300) (BuildId: 8b25ec4b66132a89)
#1 InitializeNativeHandle src/base/platform/mutex.cc:99:12 (d8+0x200632b) (BuildId: 8b25ec4b66132a89)
#2 v8::base::Mutex::Mutex() src/base/platform/mutex.cc:152:3 (d8+0x200632b)
#3 v8::internal::MemoryChunk::MemoryChunk(v8::internal::Heap*, v8::internal::BaseSpace*, unsigned long, unsigned long, unsigned long, v8::internal::VirtualMemory, v8::internal::Executability, v8::internal::PageSize) src/heap/memory-chunk.cc:154:16 (d8+0xa31caf) (BuildId: 8b25ec4b66132a89)
#4 v8::internal::Page::Page(v8::internal::Heap*, v8::internal::BaseSpace*, unsigned long, unsigned long, unsigned long, v8::internal::VirtualMemory, v8::internal::Executability) src/heap/spaces.cc:53:7 (d8+0xa84c1f) (BuildId: 8b25ec4b66132a89)
#5 v8::internal::MemoryAllocator::AllocatePage(v8::internal::MemoryAllocator::AllocationMode, v8::internal::Space*, v8::internal::Executability) src/heap/memory-allocator.cc:579:40 (d8+0xa2e8a4) (BuildId: 8b25ec4b66132a89)
#6 v8::internal::PagedSpaceBase::TryExpandImpl() src/heap/paged-spaces.cc:393:44 (d8+0xa4d968) (BuildId: 8b25ec4b66132a89)
#7 PreallocatePages src/heap/new-spaces.cc:984:10 (d8+0xa3d120) (BuildId: 8b25ec4b66132a89)
#8 PagedSpaceForNewSpace src/heap/new-spaces.cc:901:8 (d8+0xa3d120)
#9 v8::internal::PagedNewSpace::PagedNewSpace(v8::internal::Heap*, unsigned long, unsigned long, v8::internal::LinearAllocationArea&) src/heap/new-spaces.cc:1016:7 (d8+0xa3d120)
#10 make_unique<v8::internal::PagedNewSpace, v8::internal::Heap *, unsigned long &, unsigned long &, v8::internal::LinearAllocationArea &> buildtools/third_party/libc++/trunk/include/__memory/unique_ptr.h:686:30 (d8+0x958151) (BuildId: 8b25ec4b66132a89)
#11 v8::internal::Heap::SetUpSpaces(v8::internal::LinearAllocationArea&, v8::internal::LinearAllocationArea&) src/heap/heap.cc:5564:27 (d8+0x958151)
#12 v8::internal::Isolate::Init(v8::internal::SnapshotData*, v8::internal::SnapshotData*, v8::internal::SnapshotData*, bool) src/execution/isolate.cc:4338:9 (d8+0x88877c) (BuildId: 8b25ec4b66132a89)
#13 v8::internal::Isolate::InitWithSnapshot(v8::internal::SnapshotData*, v8::internal::SnapshotData*, v8::internal::SnapshotData*, bool) src/execution/isolate.cc:4054:10 (d8+0x88a109) (BuildId: 8b25ec4b66132a89)
#14 v8::internal::Snapshot::Initialize(v8::internal::Isolate*) src/snapshot/snapshot.cc:182:27 (d8+0x10fee3d) (BuildId: 8b25ec4b66132a89)
#15 v8::Isolate::Initialize(v8::Isolate*, v8::Isolate::CreateParams const&) src/api/api.cc:9048:8 (d8+0x62cc79) (BuildId: 8b25ec4b66132a89)
#16 v8::Isolate::New(v8::Isolate::CreateParams const&) src/api/api.cc:9084:3 (d8+0x62cf35) (BuildId: 8b25ec4b66132a89)
#17 v8::Worker::ExecuteInThread() src/d8/d8.cc:4745:14 (d8+0x5db3ed) (BuildId: 8b25ec4b66132a89)
#18 v8::Worker::WorkerThread::Run() src/d8/d8.cc:4622:11 (d8+0x5db334) (BuildId: 8b25ec4b66132a89)
#19 NotifyStartedAndRun src/base/platform/platform.h:596:5 (d8+0x200e592) (BuildId: 8b25ec4b66132a89)
#20 v8::base::ThreadEntry(void*) src/base/platform/platform-posix.cc:1123:11 (d8+0x200e592)
Thread T3 'V8 DefaultWorke' (tid=10500, running) created by main thread at:
#0 pthread_create /b/s/w/ir/cache/builder/src/third_party/llvm/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1038:3 (d8+0x52198b) (BuildId: 8b25ec4b66132a89)
#1 v8::base::Thread::Start() src/base/platform/platform-posix.cc:1155:14 (d8+0x200e4a6) (BuildId: 8b25ec4b66132a89)
#2 WorkerThread src/libplatform/default-worker-threads-task-runner.cc:66:3 (d8+0x2019c07) (BuildId: 8b25ec4b66132a89)
#3 make_unique<v8::platform::DefaultWorkerThreadsTaskRunner::WorkerThread, v8::platform::DefaultWorkerThreadsTaskRunner *> buildtools/third_party/libc++/trunk/include/__memory/unique_ptr.h:686:30 (d8+0x2019c07)
#4 v8::platform::DefaultWorkerThreadsTaskRunner::DefaultWorkerThreadsTaskRunner(unsigned int, double (*)()) src/libplatform/default-worker-threads-task-runner.cc:16:28 (d8+0x2019c07)
#5 construct_at<v8::platform::DefaultWorkerThreadsTaskRunner, const int &, double (*)(), v8::platform::DefaultWorkerThreadsTaskRunner *> buildtools/third_party/libc++/trunk/include/__memory/construct_at.h:38:48 (d8+0x2010d60) (BuildId: 8b25ec4b66132a89)
#6 construct<v8::platform::DefaultWorkerThreadsTaskRunner, const int &, double (*)(), void, void> buildtools/third_party/libc++/trunk/include/__memory/allocator_traits.h:304:9 (d8+0x2010d60)
#7 __shared_ptr_emplace<const int &, double (*)()> buildtools/third_party/libc++/trunk/include/__memory/shared_ptr.h:275:9 (d8+0x2010d60)
#8 allocate_shared<v8::platform::DefaultWorkerThreadsTaskRunner, std::Cr::allocator<v8::platform::DefaultWorkerThreadsTaskRunner>, const int &, double (*)(), void> buildtools/third_party/libc++/trunk/include/__memory/shared_ptr.h:936:55 (d8+0x2010d60)
#9 make_shared<v8::platform::DefaultWorkerThreadsTaskRunner, const int &, double (*)(), void> buildtools/third_party/libc++/trunk/include/__memory/shared_ptr.h:945:12 (d8+0x2010d60)
#10 EnsureBackgroundTaskRunnerInitialized src/libplatform/default-platform.cc:132:7 (d8+0x2010d60)
#11 v8::platform::DefaultPlatform::DefaultPlatform(int, v8::platform::IdleTaskSupport, std::Cr::unique_ptr<v8::TracingController, std::Cr::default_delete<v8::TracingController>>) src/libplatform/default-platform.cc:108:5 (d8+0x2010d60)
#12 make_unique<v8::platform::DefaultPlatform, int &, v8::platform::IdleTaskSupport &, std::Cr::unique_ptr<v8::TracingController, std::Cr::default_delete<v8::TracingController> > > buildtools/third_party/libc++/trunk/include/__memory/unique_ptr.h:686:30 (d8+0x20103d2) (BuildId: 8b25ec4b66132a89)
#13 v8::platform::NewDefaultPlatform(int, v8::platform::IdleTaskSupport, v8::platform::InProcessStackDumping, std::Cr::unique_ptr<v8::TracingController, std::Cr::default_delete<v8::TracingController>>) src/libplatform/default-platform.cc:53:19 (d8+0x20103d2)
#14 v8::Shell::Main(int, char**) src/d8/d8.cc:5805:16 (d8+0x5dfa79) (BuildId: 8b25ec4b66132a89)
#15 main src/d8/d8.cc:6110:43 (d8+0x5e0e80) (BuildId: 8b25ec4b66132a89)
SUMMARY: ThreadSanitizer: data race src/heap/memory-chunk.cc in v8::internal::MemoryChunk::SetOldGenerationPageFlags(bool)
==================
ThreadSanitizer: reported 1 warnings
ThreadSanitizer: Matched 2 suppressions (pid=10493):
2 deadlock:GlobalSafepoint::EnterGlobalSafepointScope

View File

@ -0,0 +1,3 @@
__cxx_atomic_load<int>
load
atomic_load_explicit<int>

View File

@ -0,0 +1,112 @@
WARNING: ThreadSanitizer: data race (pid=18876)
Atomic read of size 4 at 0x7e8a017bb344 by thread T3 (mutexes: write M0):
#0 __cxx_atomic_load<int> buildtools/third_party/libc++/trunk/include/atomic:948:12 (d8+0xa91de9) (BuildId: 6011f09c007429d6)
#1 load buildtools/third_party/libc++/trunk/include/atomic:1537:17 (d8+0xa91de9)
#2 atomic_load_explicit<int> buildtools/third_party/libc++/trunk/include/atomic:1916:17 (d8+0xa91de9)
#3 Relaxed_Load src/base/atomicops.h:237:10 (d8+0xa91de9)
#4 Relaxed_Load<unsigned int> src/base/atomic-utils.h:87:9 (d8+0xa91de9)
#5 Relaxed_Load src/objects/compressed-slots-inl.h:75:26 (d8+0xa91de9)
#6 VisitPointer src/heap/sweeper.cc:674:50 (d8+0xa91de9)
#7 VisitPointers src/heap/sweeper.cc:690:7 (d8+0xa91de9)
#8 IteratePointers<v8::internal::(anonymous namespace)::PromotedPageRecordMigratedSlotVisitor> src/objects/objects-body-descriptors-inl.h:128:6 (d8+0xa91de9)
#9 IterateBody<v8::internal::(anonymous namespace)::PromotedPageRecordMigratedSlotVisitor> src/objects/objects-body-descriptors.h:135:5 (d8+0xa91de9)
#10 void v8::internal::CallIterateBody::apply<v8::internal::FixedArray::BodyDescriptor, v8::internal::(anonymous namespace)::PromotedPageRecordMigratedSlotVisitor>(v8::internal::Map, v8::internal::HeapObject, int, v8::internal::(anonymous namespace)::PromotedPageRecordMigratedSlotVisitor*) src/objects/objects-body-descriptors-inl.h:1432:5 (d8+0xa91de9)
#11 auto v8::internal::BodyDescriptorApply<v8::internal::CallIterateBody, v8::internal::Map&, v8::internal::HeapObject&, int&, v8::internal::(anonymous namespace)::PromotedPageRecordMigratedSlotVisitor*&>(v8::internal::InstanceType, v8::internal::Map&, v8::internal::HeapObject&, int&, v8::internal::(anonymous namespace)::PromotedPageRecordMigratedSlotVisitor*&) src/objects/objects-body-descriptors-inl.h (d8+0xa910c4) (BuildId: 6011f09c007429d6)
#12 IterateBodyFast<v8::internal::(anonymous namespace)::PromotedPageRecordMigratedSlotVisitor> src/objects/objects-body-descriptors-inl.h:1438:3 (d8+0xa8c512) (BuildId: 6011f09c007429d6)
#13 IterateBodyFast<v8::internal::(anonymous namespace)::PromotedPageRecordMigratedSlotVisitor> src/objects/objects-body-descriptors-inl.h:1425:3 (d8+0xa8c512)
#14 IterateFast<v8::internal::(anonymous namespace)::PromotedPageRecordMigratedSlotVisitor> src/objects/objects-body-descriptors-inl.h:1413:3 (d8+0xa8c512)
#15 v8::internal::(anonymous namespace)::HandlePromotedObject(v8::internal::HeapObject, v8::internal::NonAtomicMarkingState*, v8::internal::PretenuringHandler*, v8::internal::PtrComprCageBase, std::Cr::unordered_map<v8::internal::AllocationSite, unsigned long, v8::internal::Object::Hasher, std::Cr::equal_to<v8::internal::AllocationSite>, std::Cr::allocator<std::Cr::pair<v8::internal::AllocationSite const, unsigned long>>>*, v8::internal::(anonymous namespace)::PromotedPageRecordMigratedSlotVisitor*) src/heap/sweeper.cc:801:10 (d8+0xa8c512)
#16 v8::internal::Sweeper::RawIteratePromotedPageForRememberedSets(v8::internal::MemoryChunk*, std::Cr::unordered_map<v8::internal::AllocationSite, unsigned long, v8::internal::Object::Hasher, std::Cr::equal_to<v8::internal::AllocationSite>, std::Cr::allocator<std::Cr::pair<v8::internal::AllocationSite const, unsigned long>>>*, std::Cr::unordered_map<v8::internal::MemoryChunk*, v8::internal::SlotSet*, std::Cr::hash<v8::internal::MemoryChunk*>, std::Cr::equal_to<v8::internal::MemoryChunk*>, std::Cr::allocator<std::Cr::pair<v8::internal::MemoryChunk* const, v8::internal::SlotSet*>>>*) src/heap/sweeper.cc:837:7 (d8+0xa8c31b) (BuildId: 6011f09c007429d6)
#17 ParallelIteratePromotedPageForRememberedSets src/heap/sweeper.cc:984:3 (d8+0xa992fc) (BuildId: 6011f09c007429d6)
#18 v8::internal::Sweeper::ConcurrentSweeper::ConcurrentSweepForRememberedSet(v8::JobDelegate*) src/heap/sweeper.cc:60:17 (d8+0xa992fc)
#19 v8::internal::Sweeper::SweeperJob::RunImpl(v8::JobDelegate*, bool) src/heap/sweeper.cc:125:31 (d8+0xa98416) (BuildId: 6011f09c007429d6)
#20 v8::internal::Sweeper::SweeperJob::Run(v8::JobDelegate*) src/heap/sweeper.cc:97:5 (d8+0xa97a09) (BuildId: 6011f09c007429d6)
#21 v8::platform::DefaultJobWorker::Run() src/libplatform/default-job.h:147:18 (d8+0x200c72b) (BuildId: 6011f09c007429d6)
#22 v8::platform::DefaultWorkerThreadsTaskRunner::WorkerThread::Run() src/libplatform/default-worker-threads-task-runner.cc:73:11 (d8+0x2012240) (BuildId: 6011f09c007429d6)
#23 NotifyStartedAndRun src/base/platform/platform.h:596:5 (d8+0x2006592) (BuildId: 6011f09c007429d6)
#24 v8::base::ThreadEntry(void*) src/base/platform/platform-posix.cc:1123:11 (d8+0x2006592)
Previous write of size 4 at 0x7e8a017bb344 by main thread:
#0 __tsan_memcpy /b/s/w/ir/cache/builder/src/third_party/llvm/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:3105:3 (d8+0x564e00) (BuildId: 6011f09c007429d6)
#1 MemCopy src/utils/memcopy.h (d8+0x95e3a0) (BuildId: 6011f09c007429d6)
#2 void v8::internal::Heap::CopyRange<v8::internal::CompressedObjectSlot>(v8::internal::HeapObject, v8::internal::CompressedObjectSlot, v8::internal::CompressedObjectSlot, int, v8::internal::WriteBarrierMode) src/heap/heap.cc:2064:5 (d8+0x95e3a0)
#3 CopyElements src/objects/fixed-array-inl.h:274:20 (d8+0xc0fb96) (BuildId: 6011f09c007429d6)
#4 CopyObjectToObjectElements src/objects/elements.cc:228:6 (d8+0xc0fb96)
#5 v8::internal::(anonymous namespace)::FastSmiOrObjectElementsAccessor<v8::internal::(anonymous namespace)::FastPackedObjectElementsAccessor, v8::internal::(anonymous namespace)::ElementsKindTraits<(v8::internal::ElementsKind)2>>::CopyElementsImpl(v8::internal::Isolate*, v8::internal::FixedArrayBase, unsigned int, v8::internal::FixedArrayBase, v8::internal::ElementsKind, unsigned int, int, int) src/objects/elements.cc:2566:9 (d8+0xc0fb96)
#6 v8::internal::(anonymous namespace)::ElementsAccessorBase<v8::internal::(anonymous namespace)::FastPackedObjectElementsAccessor, v8::internal::(anonymous namespace)::ElementsKindTraits<(v8::internal::ElementsKind)2>>::CopyElements(v8::internal::JSObject, unsigned int, v8::internal::ElementsKind, v8::internal::Handle<v8::internal::FixedArrayBase>, unsigned int, int) src/objects/elements.cc:1045:5 (d8+0xc0f00a) (BuildId: 6011f09c007429d6)
#7 v8::internal::ElementsAccessor::Concat(v8::internal::Isolate*, v8::internal::BuiltinArguments*, unsigned int, unsigned int) src/objects/elements.cc:5424:15 (d8+0xbfcd07) (BuildId: 6011f09c007429d6)
#8 v8::internal::(anonymous namespace)::Fast_ArrayConcat(v8::internal::Isolate*, v8::internal::BuiltinArguments*) src/builtins/builtins-array.cc:1509:10 (d8+0x68def0) (BuildId: 6011f09c007429d6)
#9 v8::internal::Builtin_Impl_ArrayConcat(v8::internal::BuiltinArguments, v8::internal::Isolate*) src/builtins/builtins-array.cc:1531:9 (d8+0x686e5e) (BuildId: 6011f09c007429d6)
#10 v8::internal::Builtin_ArrayConcat(int, unsigned long*, v8::internal::Isolate*) src/builtins/builtins-array.cc:1515:1 (d8+0x686783) (BuildId: 6011f09c007429d6)
#11 Builtins_AsyncFromSyncIteratorPrototypeThrow setup-isolate-deserialize.cc (d8+0x1dcd837)
#12 v8::internal::Execution::CallScript(v8::internal::Isolate*, v8::internal::Handle<v8::internal::JSFunction>, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>) src/execution/execution.cc:538:10 (d8+0x85ba40) (BuildId: 6011f09c007429d6)
#13 v8::Script::Run(v8::Local<v8::Context>, v8::Local<v8::Data>) src/api/api.cc:2271:7 (d8+0x602527) (BuildId: 6011f09c007429d6)
#14 v8::Script::Run(v8::Local<v8::Context>) src/api/api.cc:2198:10 (d8+0x601ce0) (BuildId: 6011f09c007429d6)
#15 v8::Shell::ExecuteString(v8::Isolate*, v8::Local<v8::String>, v8::Local<v8::String>, v8::Shell::PrintResult, v8::Shell::ReportExceptions, v8::Shell::ProcessMessageQueue) src/d8/d8.cc:876:28 (d8+0x5bf3d6) (BuildId: 6011f09c007429d6)
#16 v8::SourceGroup::Execute(v8::Isolate*) src/d8/d8.cc:4483:10 (d8+0x5d90d3) (BuildId: 6011f09c007429d6)
#17 v8::Shell::RunMain(v8::Isolate*, bool) src/d8/d8.cc:5217:39 (d8+0x5dd08e) (BuildId: 6011f09c007429d6)
#18 v8::Shell::Main(int, char**) src/d8/d8.cc:6013:18 (d8+0x5df876) (BuildId: 6011f09c007429d6)
#19 main src/d8/d8.cc:6110:43 (d8+0x5dfe80) (BuildId: 6011f09c007429d6)
Mutex M0 (0x7b0c00005670) created at:
#0 pthread_mutex_init /b/s/w/ir/cache/builder/src/third_party/llvm/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1331:3 (d8+0x522300) (BuildId: 6011f09c007429d6)
#1 InitializeNativeHandle src/base/platform/mutex.cc:99:12 (d8+0x1ffe32b) (BuildId: 6011f09c007429d6)
#2 v8::base::Mutex::Mutex() src/base/platform/mutex.cc:152:3 (d8+0x1ffe32b)
#3 v8::internal::MemoryChunk::MemoryChunk(v8::internal::Heap*, v8::internal::BaseSpace*, unsigned long, unsigned long, unsigned long, v8::internal::VirtualMemory, v8::internal::Executability, v8::internal::PageSize) src/heap/memory-chunk.cc:154:16 (d8+0xa30b9f) (BuildId: 6011f09c007429d6)
#4 v8::internal::Page::Page(v8::internal::Heap*, v8::internal::BaseSpace*, unsigned long, unsigned long, unsigned long, v8::internal::VirtualMemory, v8::internal::Executability) src/heap/spaces.cc:53:7 (d8+0xa83b0f) (BuildId: 6011f09c007429d6)
#5 v8::internal::MemoryAllocator::AllocatePage(v8::internal::MemoryAllocator::AllocationMode, v8::internal::Space*, v8::internal::Executability) src/heap/memory-allocator.cc:579:40 (d8+0xa2d794) (BuildId: 6011f09c007429d6)
#6 v8::internal::PagedSpaceBase::TryExpandImpl() src/heap/paged-spaces.cc:393:44 (d8+0xa4c858) (BuildId: 6011f09c007429d6)
#7 PreallocatePages src/heap/new-spaces.cc:984:10 (d8+0xa3d952) (BuildId: 6011f09c007429d6)
#8 EnsureCurrentCapacity src/heap/new-spaces.cc:995:10 (d8+0xa3d952)
#9 v8::internal::PagedNewSpace::EnsureCurrentCapacity() src/heap/new-spaces.h:790:25 (d8+0xa3d952)
#10 v8::internal::MinorMarkSweepCollector::Finish() src/heap/mark-compact.cc:6041:31 (d8+0x9d3018) (BuildId: 6011f09c007429d6)
#11 v8::internal::MinorMarkSweepCollector::CollectGarbage() src/heap/mark-compact.cc:6076:3 (d8+0x9d41f9) (BuildId: 6011f09c007429d6)
#12 v8::internal::Heap::MinorMarkSweep() src/heap/heap.cc:2600:34 (d8+0x9491ad) (BuildId: 6011f09c007429d6)
#13 v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::internal::GarbageCollectionReason, char const*) src/heap/heap.cc:2258:5 (d8+0x942350) (BuildId: 6011f09c007429d6)
#14 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) src/heap/heap.cc:1714:13 (d8+0x93d77e) (BuildId: 6011f09c007429d6)
#15 v8::internal::HeapAllocator::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) src/heap/heap-allocator.cc:95:14 (d8+0x92c626) (BuildId: 6011f09c007429d6)
#16 v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) src/heap/heap-allocator.cc:110:7 (d8+0x92d73e) (BuildId: 6011f09c007429d6)
#17 AllocateRawWith<(v8::internal::HeapAllocator::AllocationRetryMode)1> src/heap/heap-allocator-inl.h:237:16 (d8+0x8fe787) (BuildId: 6011f09c007429d6)
#18 v8::internal::Factory::AllocateRaw(int, v8::internal::AllocationType, v8::internal::AllocationAlignment) src/heap/factory.cc:327:23 (d8+0x8fe787)
#19 AllocateRaw src/heap/factory-base.cc:1141:18 (d8+0x8f0283) (BuildId: 6011f09c007429d6)
#20 AllocateRawArray src/heap/factory-base.cc:1088:23 (d8+0x8f0283)
#21 AllocateRawFixedArray src/heap/factory-base.cc:1105:10 (d8+0x8f0283)
#22 v8::internal::FactoryBase<v8::internal::Factory>::NewFixedArrayWithFiller(v8::internal::Handle<v8::internal::Map>, int, v8::internal::Handle<v8::internal::Oddball>, v8::internal::AllocationType) src/heap/factory-base.cc:130:23 (d8+0x8f0283)
#23 v8::internal::FactoryBase<v8::internal::Factory>::NewFixedArray(int, v8::internal::AllocationType) src/heap/factory-base.cc:101:10 (d8+0x8f01f6) (BuildId: 6011f09c007429d6)
#24 NewJSArrayStorage src/heap/factory.cc:2829:14 (d8+0x9139ca) (BuildId: 6011f09c007429d6)
#25 v8::internal::Factory::NewJSArray(v8::internal::ElementsKind, int, int, v8::internal::ArrayStorageAllocationMode, v8::internal::AllocationType) src/heap/factory.cc:2728:7 (d8+0x9139ca)
#26 v8::internal::ElementsAccessor::Concat(v8::internal::Isolate*, v8::internal::BuiltinArguments*, unsigned int, unsigned int) src/objects/elements.cc:5409:54 (d8+0xbfcaaa) (BuildId: 6011f09c007429d6)
#27 v8::internal::(anonymous namespace)::Fast_ArrayConcat(v8::internal::Isolate*, v8::internal::BuiltinArguments*) src/builtins/builtins-array.cc:1509:10 (d8+0x68def0) (BuildId: 6011f09c007429d6)
#28 v8::internal::Builtin_Impl_ArrayConcat(v8::internal::BuiltinArguments, v8::internal::Isolate*) src/builtins/builtins-array.cc:1531:9 (d8+0x686e5e) (BuildId: 6011f09c007429d6)
#29 v8::internal::Builtin_ArrayConcat(int, unsigned long*, v8::internal::Isolate*) src/builtins/builtins-array.cc:1515:1 (d8+0x686783) (BuildId: 6011f09c007429d6)
#30 Builtins_AsyncFromSyncIteratorPrototypeThrow setup-isolate-deserialize.cc (d8+0x1dcd837)
#31 v8::internal::Execution::CallScript(v8::internal::Isolate*, v8::internal::Handle<v8::internal::JSFunction>, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>) src/execution/execution.cc:538:10 (d8+0x85ba40) (BuildId: 6011f09c007429d6)
#32 v8::Script::Run(v8::Local<v8::Context>, v8::Local<v8::Data>) src/api/api.cc:2271:7 (d8+0x602527) (BuildId: 6011f09c007429d6)
#33 v8::Script::Run(v8::Local<v8::Context>) src/api/api.cc:2198:10 (d8+0x601ce0) (BuildId: 6011f09c007429d6)
#34 v8::Shell::ExecuteString(v8::Isolate*, v8::Local<v8::String>, v8::Local<v8::String>, v8::Shell::PrintResult, v8::Shell::ReportExceptions, v8::Shell::ProcessMessageQueue) src/d8/d8.cc:876:28 (d8+0x5bf3d6) (BuildId: 6011f09c007429d6)
#35 v8::SourceGroup::Execute(v8::Isolate*) src/d8/d8.cc:4483:10 (d8+0x5d90d3) (BuildId: 6011f09c007429d6)
#36 v8::Shell::RunMain(v8::Isolate*, bool) src/d8/d8.cc:5217:39 (d8+0x5dd08e) (BuildId: 6011f09c007429d6)
#37 v8::Shell::Main(int, char**) src/d8/d8.cc:6013:18 (d8+0x5df876) (BuildId: 6011f09c007429d6)
#38 main src/d8/d8.cc:6110:43 (d8+0x5dfe80) (BuildId: 6011f09c007429d6)
Thread T3 'V8 DefaultWorke' (tid=18881, running) created by main thread at:
#0 pthread_create /b/s/w/ir/cache/builder/src/third_party/llvm/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1038:3 (d8+0x52098b) (BuildId: 6011f09c007429d6)
#1 v8::base::Thread::Start() src/base/platform/platform-posix.cc:1155:14 (d8+0x20064a6) (BuildId: 6011f09c007429d6)
#2 WorkerThread src/libplatform/default-worker-threads-task-runner.cc:66:3 (d8+0x2011c07) (BuildId: 6011f09c007429d6)
#3 make_unique<v8::platform::DefaultWorkerThreadsTaskRunner::WorkerThread, v8::platform::DefaultWorkerThreadsTaskRunner *> buildtools/third_party/libc++/trunk/include/__memory/unique_ptr.h:686:30 (d8+0x2011c07)
#4 v8::platform::DefaultWorkerThreadsTaskRunner::DefaultWorkerThreadsTaskRunner(unsigned int, double (*)()) src/libplatform/default-worker-threads-task-runner.cc:16:28 (d8+0x2011c07)
#5 construct_at<v8::platform::DefaultWorkerThreadsTaskRunner, const int &, double (*)(), v8::platform::DefaultWorkerThreadsTaskRunner *> buildtools/third_party/libc++/trunk/include/__memory/construct_at.h:38:48 (d8+0x2008d60) (BuildId: 6011f09c007429d6)
#6 construct<v8::platform::DefaultWorkerThreadsTaskRunner, const int &, double (*)(), void, void> buildtools/third_party/libc++/trunk/include/__memory/allocator_traits.h:304:9 (d8+0x2008d60)
#7 __shared_ptr_emplace<const int &, double (*)()> buildtools/third_party/libc++/trunk/include/__memory/shared_ptr.h:275:9 (d8+0x2008d60)
#8 allocate_shared<v8::platform::DefaultWorkerThreadsTaskRunner, std::Cr::allocator<v8::platform::DefaultWorkerThreadsTaskRunner>, const int &, double (*)(), void> buildtools/third_party/libc++/trunk/include/__memory/shared_ptr.h:936:55 (d8+0x2008d60)
#9 make_shared<v8::platform::DefaultWorkerThreadsTaskRunner, const int &, double (*)(), void> buildtools/third_party/libc++/trunk/include/__memory/shared_ptr.h:945:12 (d8+0x2008d60)
#10 EnsureBackgroundTaskRunnerInitialized src/libplatform/default-platform.cc:132:7 (d8+0x2008d60)
#11 v8::platform::DefaultPlatform::DefaultPlatform(int, v8::platform::IdleTaskSupport, std::Cr::unique_ptr<v8::TracingController, std::Cr::default_delete<v8::TracingController>>) src/libplatform/default-platform.cc:108:5 (d8+0x2008d60)
#12 make_unique<v8::platform::DefaultPlatform, int &, v8::platform::IdleTaskSupport &, std::Cr::unique_ptr<v8::TracingController, std::Cr::default_delete<v8::TracingController> > > buildtools/third_party/libc++/trunk/include/__memory/unique_ptr.h:686:30 (d8+0x20083d2) (BuildId: 6011f09c007429d6)
#13 v8::platform::NewDefaultPlatform(int, v8::platform::IdleTaskSupport, v8::platform::InProcessStackDumping, std::Cr::unique_ptr<v8::TracingController, std::Cr::default_delete<v8::TracingController>>) src/libplatform/default-platform.cc:53:19 (d8+0x20083d2)
#14 v8::Shell::Main(int, char**) src/d8/d8.cc:5805:16 (d8+0x5dea79) (BuildId: 6011f09c007429d6)
#15 main src/d8/d8.cc:6110:43 (d8+0x5dfe80) (BuildId: 6011f09c007429d6)
SUMMARY: ThreadSanitizer: data race buildtools/third_party/libc++/trunk/include/atomic:948:12 in __cxx_atomic_load<int>
==================
ThreadSanitizer: reported 1 warnings

View File

@ -0,0 +1,3 @@
pthread_mutex_lock
LockNativeHandle
v8::base::Mutex::Lock()

View File

@ -0,0 +1,510 @@
WARNING: ThreadSanitizer: use of an invalid mutex (e.g. uninitialized or destroyed) (pid=5297)
#0 pthread_mutex_lock sanitizer_common/sanitizer_common_interceptors.inc:4481:3 (d8+0x536ceb) (BuildId: e7949a0603ee0889)
#1 LockNativeHandle src/base/platform/mutex.cc:128:16 (d8+0x1fbfa49) (BuildId: e7949a0603ee0889)
#2 v8::base::Mutex::Lock() src/base/platform/mutex.cc:166:3 (d8+0x1fbfa49)
#3 LockGuard src/base/platform/mutex.h:311:30 (d8+0x10f75a0) (BuildId: e7949a0603ee0889)
#4 Register src/tasks/cancelable-task.cc:34:20 (d8+0x10f75a0)
#5 v8::internal::Cancelable::Cancelable(v8::internal::CancelableTaskManager*) src/tasks/cancelable-task.h:96:38 (d8+0x10f75a0)
#6 v8::internal::CancelableTask::CancelableTask(v8::internal::CancelableTaskManager*) src/tasks/cancelable-task.cc:125:7 (d8+0x10f74f3) (BuildId: e7949a0603ee0889)
#7 TerminateTask src/d8/d8.cc:4596:9 (d8+0x5c6e7a) (BuildId: e7949a0603ee0889)
#8 v8::Worker::Terminate() src/d8/d8.cc:4637:11 (d8+0x5c6e7a)
#9 TerminateAndWaitForThread src/d8/d8.cc:4622:3 (d8+0x5d13ce) (BuildId: e7949a0603ee0889)
#10 v8::Shell::WaitForRunningWorkers(v8::internal::ParkedScope const&) src/d8/d8.cc:5642:13 (d8+0x5d13ce)
#11 v8::Shell::RunMain(v8::Isolate*, bool) src/d8/d8.cc:5190:3 (d8+0x5d1168) (BuildId: e7949a0603ee0889)
#12 v8::Shell::Main(int, char**) src/d8/d8.cc:5939:22 (d8+0x5d3491) (BuildId: e7949a0603ee0889)
#13 main src/d8/d8.cc:6052:43 (d8+0x5d3bc0) (BuildId: e7949a0603ee0889)
Mutex M0 (0x7b24000090f0) created at:
#0 pthread_mutex_lock sanitizer_common/sanitizer_common_interceptors.inc:4481:3 (d8+0x536ceb) (BuildId: e7949a0603ee0889)
#1 LockNativeHandle src/base/platform/mutex.cc:128:16 (d8+0x1fbfa49) (BuildId: e7949a0603ee0889)
#2 v8::base::Mutex::Lock() src/base/platform/mutex.cc:166:3 (d8+0x1fbfa49)
#3 LockGuard src/base/platform/mutex.h:311:30 (d8+0x10f75a0) (BuildId: e7949a0603ee0889)
#4 Register src/tasks/cancelable-task.cc:34:20 (d8+0x10f75a0)
#5 v8::internal::Cancelable::Cancelable(v8::internal::CancelableTaskManager*) src/tasks/cancelable-task.h:96:38 (d8+0x10f75a0)
#6 v8::internal::CancelableTask::CancelableTask(v8::internal::CancelableTaskManager*) src/tasks/cancelable-task.cc:125:7 (d8+0x10f74f3) (BuildId: e7949a0603ee0889)
#7 TerminateTask src/d8/d8.cc:4596:9 (d8+0x5c6e7a) (BuildId: e7949a0603ee0889)
#8 v8::Worker::Terminate() src/d8/d8.cc:4637:11 (d8+0x5c6e7a)
#9 TerminateAndWaitForThread src/d8/d8.cc:4622:3 (d8+0x5d13ce) (BuildId: e7949a0603ee0889)
#10 v8::Shell::WaitForRunningWorkers(v8::internal::ParkedScope const&) src/d8/d8.cc:5642:13 (d8+0x5d13ce)
#11 v8::Shell::RunMain(v8::Isolate*, bool) src/d8/d8.cc:5190:3 (d8+0x5d1168) (BuildId: e7949a0603ee0889)
#12 v8::Shell::Main(int, char**) src/d8/d8.cc:5939:22 (d8+0x5d3491) (BuildId: e7949a0603ee0889)
#13 main src/d8/d8.cc:6052:43 (d8+0x5d3bc0) (BuildId: e7949a0603ee0889)
SUMMARY: ThreadSanitizer: use of an invalid mutex (e.g. uninitialized or destroyed) src/base/platform/mutex.cc:128:16 in LockNativeHandle
==================
==================
WARNING: ThreadSanitizer: heap-use-after-free (pid=5297)
Read of size 1 at 0x7b2400009118 by main thread (mutexes: write M0):
#0 Register src/tasks/cancelable-task.cc:35:7 (d8+0x10f75ac) (BuildId: e7949a0603ee0889)
#1 v8::internal::Cancelable::Cancelable(v8::internal::CancelableTaskManager*) src/tasks/cancelable-task.h:96:38 (d8+0x10f75ac)
#2 v8::internal::CancelableTask::CancelableTask(v8::internal::CancelableTaskManager*) src/tasks/cancelable-task.cc:125:7 (d8+0x10f74f3) (BuildId: e7949a0603ee0889)
#3 TerminateTask src/d8/d8.cc:4596:9 (d8+0x5c6e7a) (BuildId: e7949a0603ee0889)
#4 v8::Worker::Terminate() src/d8/d8.cc:4637:11 (d8+0x5c6e7a)
#5 TerminateAndWaitForThread src/d8/d8.cc:4622:3 (d8+0x5d13ce) (BuildId: e7949a0603ee0889)
#6 v8::Shell::WaitForRunningWorkers(v8::internal::ParkedScope const&) src/d8/d8.cc:5642:13 (d8+0x5d13ce)
#7 v8::Shell::RunMain(v8::Isolate*, bool) src/d8/d8.cc:5190:3 (d8+0x5d1168) (BuildId: e7949a0603ee0889)
#8 v8::Shell::Main(int, char**) src/d8/d8.cc:5939:22 (d8+0x5d3491) (BuildId: e7949a0603ee0889)
#9 main src/d8/d8.cc:6052:43 (d8+0x5d3bc0) (BuildId: e7949a0603ee0889)
Previous write of size 8 at 0x7b2400009118 by thread T9:
#0 operator delete(void*) /b/s/w/ir/cache/builder/src/third_party/llvm/compiler-rt/lib/tsan/rtl/tsan_new_delete.cpp:126:3 (d8+0x59aadf) (BuildId: e7949a0603ee0889)
#1 v8::internal::Isolate::~Isolate() src/execution/isolate.cc:3814:3 (d8+0x879749) (BuildId: e7949a0603ee0889)
#2 v8::internal::Isolate::Delete(v8::internal::Isolate*) src/execution/isolate.cc:3402:12 (d8+0x875e8f) (BuildId: e7949a0603ee0889)
#3 v8::Isolate::Dispose() src/api/api.cc:9095:3 (d8+0x5ecc4f) (BuildId: e7949a0603ee0889)
#4 v8::Shell::OnExit(v8::Isolate*, bool) src/d8/d8.cc:3874:12 (d8+0x5c7272) (BuildId: e7949a0603ee0889)
#5 v8::Shell::QuitOnce(v8::FunctionCallbackInfo<v8::Value>*) src/d8/d8.cc:2983:3 (d8+0x5c7220) (BuildId: e7949a0603ee0889)
#6 operator() src/base/once.h:101:32 (d8+0x5e069d) (BuildId: e7949a0603ee0889)
#7 __invoke<(lambda at ../../src/base/once.h:101:24) &> buildtools/third_party/libc++/trunk/include/__functional/invoke.h:394:23 (d8+0x5e069d)
#8 __call<(lambda at ../../src/base/once.h:101:24) &> buildtools/third_party/libc++/trunk/include/__functional/invoke.h:479:9 (d8+0x5e069d)
#9 operator() buildtools/third_party/libc++/trunk/include/__functional/function.h:232:12 (d8+0x5e069d)
#10 void std::Cr::__function::__policy_invoker<void ()>::__call_impl<std::Cr::__function::__default_alloc_func<void v8::base::CallOnce<v8::FunctionCallbackInfo<v8::Value>*, void>(std::Cr::atomic<unsigned char>*, v8::base::FunctionWithArgs<v8::FunctionCallbackInfo<v8::Value>*>::type, v8::FunctionCallbackInfo<v8::Value>*)::'lambda'(), void ()>>(std::Cr::__function::__policy_storage const*) buildtools/third_party/libc++/trunk/include/__functional/function.h:711:16 (d8+0x5e069d)
#11 operator() buildtools/third_party/libc++/trunk/include/__functional/function.h:842:16 (d8+0x1fbebb7) (BuildId: e7949a0603ee0889)
#12 operator() buildtools/third_party/libc++/trunk/include/__functional/function.h:1152:12 (d8+0x1fbebb7)
#13 v8::base::CallOnceImpl(std::Cr::atomic<unsigned char>*, std::Cr::function<void ()>) src/base/once.cc:36:5 (d8+0x1fbebb7)
#14 CallOnce<v8::FunctionCallbackInfo<v8::Value> *, void> src/base/once.h:101:5 (d8+0x5c80df) (BuildId: e7949a0603ee0889)
#15 v8::Shell::Quit(v8::FunctionCallbackInfo<v8::Value> const&) src/d8/d8.cc:2988:3 (d8+0x5c80df)
#16 v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo) src/api/api-arguments-inl.h:146:3 (d8+0x677b99) (BuildId: e7949a0603ee0889)
#17 v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<false>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, unsigned long*, int) src/builtins/builtins-api.cc:113:36 (d8+0x676bfe) (BuildId: e7949a0603ee0889)
#18 v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) src/builtins/builtins-api.cc:148:5 (d8+0x675bbf) (BuildId: e7949a0603ee0889)
#19 v8::internal::Builtin_HandleApiCall(int, unsigned long*, v8::internal::Isolate*) src/builtins/builtins-api.cc:135:1 (d8+0x6756b3) (BuildId: e7949a0603ee0889)
#20 Builtins_AsyncFromSyncIteratorPrototypeThrow setup-isolate-deserialize.cc (d8+0x1d93f37)
#21 v8::internal::Execution::CallScript(v8::internal::Isolate*, v8::internal::Handle<v8::internal::JSFunction>, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>) src/execution/execution.cc:538:10 (d8+0x84fc92) (BuildId: e7949a0603ee0889)
#22 v8::Script::Run(v8::Local<v8::Context>, v8::Local<v8::Data>) src/api/api.cc:2272:7 (d8+0x5f6034) (BuildId: e7949a0603ee0889)
#23 v8::Script::Run(v8::Local<v8::Context>) src/api/api.cc:2199:10 (d8+0x5f57d0) (BuildId: e7949a0603ee0889)
#24 v8::Shell::ExecuteString(v8::Isolate*, v8::Local<v8::String>, v8::Local<v8::String>, v8::Shell::PrintResult, v8::Shell::ReportExceptions, v8::Shell::ProcessMessageQueue) src/d8/d8.cc:876:28 (d8+0x5b33d9) (BuildId: e7949a0603ee0889)
#25 v8::Worker::ExecuteInThread() src/d8/d8.cc:4736:13 (d8+0x5ce6c1) (BuildId: e7949a0603ee0889)
#26 v8::Worker::WorkerThread::Run() src/d8/d8.cc:4564:11 (d8+0x5ce0c4) (BuildId: e7949a0603ee0889)
#27 NotifyStartedAndRun src/base/platform/platform.h:596:5 (d8+0x1fc7c52) (BuildId: e7949a0603ee0889)
#28 v8::base::ThreadEntry(void*) src/base/platform/platform-posix.cc:1123:11 (d8+0x1fc7c52)
Mutex M0 (0x7b4400002018) created at:
#0 pthread_mutex_init /b/s/w/ir/cache/builder/src/third_party/llvm/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1331:3 (d8+0x516300) (BuildId: e7949a0603ee0889)
#1 InitializeNativeHandle src/base/platform/mutex.cc:99:12 (d8+0x1fbf9eb) (BuildId: e7949a0603ee0889)
#2 v8::base::Mutex::Mutex() src/base/platform/mutex.cc:152:3 (d8+0x1fbf9eb)
#3 Worker src/d8/d8.cc:4526:9 (d8+0x5e0593) (BuildId: e7949a0603ee0889)
#4 v8::Worker* std::Cr::construct_at[abi:v160000]<v8::Worker, char*, v8::Worker*>(v8::Worker*, char*&&) buildtools/third_party/libc++/trunk/include/__memory/construct_at.h:36:48 (d8+0x5e0593)
#5 construct<v8::Worker, char *, void, void> buildtools/third_party/libc++/trunk/include/__memory/allocator_traits.h:297:9 (d8+0x5e02ba) (BuildId: e7949a0603ee0889)
#6 __shared_ptr_emplace<char *> buildtools/third_party/libc++/trunk/include/__memory/shared_ptr.h:276:9 (d8+0x5e02ba)
#7 std::Cr::shared_ptr<v8::Worker> std::Cr::allocate_shared[abi:v160000]<v8::Worker, std::Cr::allocator<v8::Worker>, char*, void>(std::Cr::allocator<v8::Worker> const&, char*&&) buildtools/third_party/libc++/trunk/include/__memory/shared_ptr.h:937:55 (d8+0x5e02ba)
#8 make_shared<v8::Worker, char *, void> buildtools/third_party/libc++/trunk/include/__memory/shared_ptr.h:946:12 (d8+0x5c5ee4) (BuildId: e7949a0603ee0889)
#9 v8::Shell::WorkerNew(v8::FunctionCallbackInfo<v8::Value> const&) src/d8/d8.cc:2888:19 (d8+0x5c5ee4)
#10 v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo) src/api/api-arguments-inl.h:146:3 (d8+0x677b99) (BuildId: e7949a0603ee0889)
#11 v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<true>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, unsigned long*, int) src/builtins/builtins-api.cc:113:36 (d8+0x67658a) (BuildId: e7949a0603ee0889)
#12 v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) src/builtins/builtins-api.cc:144:5 (d8+0x675b9f) (BuildId: e7949a0603ee0889)
#13 v8::internal::Builtin_HandleApiCall(int, unsigned long*, v8::internal::Isolate*) src/builtins/builtins-api.cc:135:1 (d8+0x6756b3) (BuildId: e7949a0603ee0889)
#14 Builtins_AsyncFromSyncIteratorPrototypeThrow setup-isolate-deserialize.cc (d8+0x1d93f37)
#15 v8::internal::Execution::CallScript(v8::internal::Isolate*, v8::internal::Handle<v8::internal::JSFunction>, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>) src/execution/execution.cc:538:10 (d8+0x84fc92) (BuildId: e7949a0603ee0889)
#16 v8::Script::Run(v8::Local<v8::Context>, v8::Local<v8::Data>) src/api/api.cc:2272:7 (d8+0x5f6034) (BuildId: e7949a0603ee0889)
#17 v8::Script::Run(v8::Local<v8::Context>) src/api/api.cc:2199:10 (d8+0x5f57d0) (BuildId: e7949a0603ee0889)
#18 v8::Shell::ExecuteString(v8::Isolate*, v8::Local<v8::String>, v8::Local<v8::String>, v8::Shell::PrintResult, v8::Shell::ReportExceptions, v8::Shell::ProcessMessageQueue) src/d8/d8.cc:876:28 (d8+0x5b33d9) (BuildId: e7949a0603ee0889)
#19 v8::SourceGroup::Execute(v8::Isolate*) src/d8/d8.cc:4425:10 (d8+0x5cce73) (BuildId: e7949a0603ee0889)
#20 v8::Shell::RunMain(v8::Isolate*, bool) src/d8/d8.cc:5159:39 (d8+0x5d0e0e) (BuildId: e7949a0603ee0889)
#21 v8::Shell::Main(int, char**) src/d8/d8.cc:5939:22 (d8+0x5d3491) (BuildId: e7949a0603ee0889)
#22 main src/d8/d8.cc:6052:43 (d8+0x5d3bc0) (BuildId: e7949a0603ee0889)
Thread T9 'WorkerThread' (tid=5330, running) created by main thread at:
#0 pthread_create /b/s/w/ir/cache/builder/src/third_party/llvm/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1038:3 (d8+0x51498b) (BuildId: e7949a0603ee0889)
#1 v8::base::Thread::Start() src/base/platform/platform-posix.cc:1155:14 (d8+0x1fc7b66) (BuildId: e7949a0603ee0889)
#2 v8::Worker::StartWorkerThread(v8::Isolate*, std::Cr::shared_ptr<v8::Worker>) src/d8/d8.cc:4548:16 (d8+0x5c61b7) (BuildId: e7949a0603ee0889)
#3 v8::Shell::WorkerNew(v8::FunctionCallbackInfo<v8::Value> const&) src/d8/d8.cc:2894:10 (d8+0x5c602d) (BuildId: e7949a0603ee0889)
#4 v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo) src/api/api-arguments-inl.h:146:3 (d8+0x677b99) (BuildId: e7949a0603ee0889)
#5 v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<true>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, unsigned long*, int) src/builtins/builtins-api.cc:113:36 (d8+0x67658a) (BuildId: e7949a0603ee0889)
#6 v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) src/builtins/builtins-api.cc:144:5 (d8+0x675b9f) (BuildId: e7949a0603ee0889)
#7 v8::internal::Builtin_HandleApiCall(int, unsigned long*, v8::internal::Isolate*) src/builtins/builtins-api.cc:135:1 (d8+0x6756b3) (BuildId: e7949a0603ee0889)
#8 Builtins_AsyncFromSyncIteratorPrototypeThrow setup-isolate-deserialize.cc (d8+0x1d93f37)
#9 v8::internal::Execution::CallScript(v8::internal::Isolate*, v8::internal::Handle<v8::internal::JSFunction>, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>) src/execution/execution.cc:538:10 (d8+0x84fc92) (BuildId: e7949a0603ee0889)
#10 v8::Script::Run(v8::Local<v8::Context>, v8::Local<v8::Data>) src/api/api.cc:2272:7 (d8+0x5f6034) (BuildId: e7949a0603ee0889)
#11 v8::Script::Run(v8::Local<v8::Context>) src/api/api.cc:2199:10 (d8+0x5f57d0) (BuildId: e7949a0603ee0889)
#12 v8::Shell::ExecuteString(v8::Isolate*, v8::Local<v8::String>, v8::Local<v8::String>, v8::Shell::PrintResult, v8::Shell::ReportExceptions, v8::Shell::ProcessMessageQueue) src/d8/d8.cc:876:28 (d8+0x5b33d9) (BuildId: e7949a0603ee0889)
#13 v8::SourceGroup::Execute(v8::Isolate*) src/d8/d8.cc:4425:10 (d8+0x5cce73) (BuildId: e7949a0603ee0889)
#14 v8::Shell::RunMain(v8::Isolate*, bool) src/d8/d8.cc:5159:39 (d8+0x5d0e0e) (BuildId: e7949a0603ee0889)
#15 v8::Shell::Main(int, char**) src/d8/d8.cc:5939:22 (d8+0x5d3491) (BuildId: e7949a0603ee0889)
#16 main src/d8/d8.cc:6052:43 (d8+0x5d3bc0) (BuildId: e7949a0603ee0889)
SUMMARY: ThreadSanitizer: heap-use-after-free src/tasks/cancelable-task.cc:35:7 in Register
==================
==================
WARNING: ThreadSanitizer: heap-use-after-free (pid=5297)
Atomic read of size 1 at 0x7b24000090f0 by main thread (mutexes: write M0):
#0 pthread_mutex_unlock sanitizer_common/sanitizer_common_interceptors.inc:4495:3 (d8+0x536ebb) (BuildId: e7949a0603ee0889)
#1 UnlockNativeHandle src/base/platform/mutex.cc:135:16 (d8+0x1fbfa79) (BuildId: e7949a0603ee0889)
#2 v8::base::Mutex::Unlock() src/base/platform/mutex.cc:173:3 (d8+0x1fbfa79)
#3 ~LockGuard src/base/platform/mutex.h:316:30 (d8+0x10f7651) (BuildId: e7949a0603ee0889)
#4 Register src/tasks/cancelable-task.cc:47:1 (d8+0x10f7651)
#5 v8::internal::Cancelable::Cancelable(v8::internal::CancelableTaskManager*) src/tasks/cancelable-task.h:96:38 (d8+0x10f7651)
#6 v8::internal::CancelableTask::CancelableTask(v8::internal::CancelableTaskManager*) src/tasks/cancelable-task.cc:125:7 (d8+0x10f74f3) (BuildId: e7949a0603ee0889)
#7 TerminateTask src/d8/d8.cc:4596:9 (d8+0x5c6e7a) (BuildId: e7949a0603ee0889)
#8 v8::Worker::Terminate() src/d8/d8.cc:4637:11 (d8+0x5c6e7a)
#9 TerminateAndWaitForThread src/d8/d8.cc:4622:3 (d8+0x5d13ce) (BuildId: e7949a0603ee0889)
#10 v8::Shell::WaitForRunningWorkers(v8::internal::ParkedScope const&) src/d8/d8.cc:5642:13 (d8+0x5d13ce)
#11 v8::Shell::RunMain(v8::Isolate*, bool) src/d8/d8.cc:5190:3 (d8+0x5d1168) (BuildId: e7949a0603ee0889)
#12 v8::Shell::Main(int, char**) src/d8/d8.cc:5939:22 (d8+0x5d3491) (BuildId: e7949a0603ee0889)
#13 main src/d8/d8.cc:6052:43 (d8+0x5d3bc0) (BuildId: e7949a0603ee0889)
Previous write of size 8 at 0x7b24000090f0 by thread T9:
#0 operator delete(void*) /b/s/w/ir/cache/builder/src/third_party/llvm/compiler-rt/lib/tsan/rtl/tsan_new_delete.cpp:126:3 (d8+0x59aadf) (BuildId: e7949a0603ee0889)
#1 v8::internal::Isolate::~Isolate() src/execution/isolate.cc:3814:3 (d8+0x879749) (BuildId: e7949a0603ee0889)
#2 v8::internal::Isolate::Delete(v8::internal::Isolate*) src/execution/isolate.cc:3402:12 (d8+0x875e8f) (BuildId: e7949a0603ee0889)
#3 v8::Isolate::Dispose() src/api/api.cc:9095:3 (d8+0x5ecc4f) (BuildId: e7949a0603ee0889)
#4 v8::Shell::OnExit(v8::Isolate*, bool) src/d8/d8.cc:3874:12 (d8+0x5c7272) (BuildId: e7949a0603ee0889)
#5 v8::Shell::QuitOnce(v8::FunctionCallbackInfo<v8::Value>*) src/d8/d8.cc:2983:3 (d8+0x5c7220) (BuildId: e7949a0603ee0889)
#6 operator() src/base/once.h:101:32 (d8+0x5e069d) (BuildId: e7949a0603ee0889)
#7 __invoke<(lambda at ../../src/base/once.h:101:24) &> buildtools/third_party/libc++/trunk/include/__functional/invoke.h:394:23 (d8+0x5e069d)
#8 __call<(lambda at ../../src/base/once.h:101:24) &> buildtools/third_party/libc++/trunk/include/__functional/invoke.h:479:9 (d8+0x5e069d)
#9 operator() buildtools/third_party/libc++/trunk/include/__functional/function.h:232:12 (d8+0x5e069d)
#10 void std::Cr::__function::__policy_invoker<void ()>::__call_impl<std::Cr::__function::__default_alloc_func<void v8::base::CallOnce<v8::FunctionCallbackInfo<v8::Value>*, void>(std::Cr::atomic<unsigned char>*, v8::base::FunctionWithArgs<v8::FunctionCallbackInfo<v8::Value>*>::type, v8::FunctionCallbackInfo<v8::Value>*)::'lambda'(), void ()>>(std::Cr::__function::__policy_storage const*) buildtools/third_party/libc++/trunk/include/__functional/function.h:711:16 (d8+0x5e069d)
#11 operator() buildtools/third_party/libc++/trunk/include/__functional/function.h:842:16 (d8+0x1fbebb7) (BuildId: e7949a0603ee0889)
#12 operator() buildtools/third_party/libc++/trunk/include/__functional/function.h:1152:12 (d8+0x1fbebb7)
#13 v8::base::CallOnceImpl(std::Cr::atomic<unsigned char>*, std::Cr::function<void ()>) src/base/once.cc:36:5 (d8+0x1fbebb7)
#14 CallOnce<v8::FunctionCallbackInfo<v8::Value> *, void> src/base/once.h:101:5 (d8+0x5c80df) (BuildId: e7949a0603ee0889)
#15 v8::Shell::Quit(v8::FunctionCallbackInfo<v8::Value> const&) src/d8/d8.cc:2988:3 (d8+0x5c80df)
#16 v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo) src/api/api-arguments-inl.h:146:3 (d8+0x677b99) (BuildId: e7949a0603ee0889)
#17 v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<false>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, unsigned long*, int) src/builtins/builtins-api.cc:113:36 (d8+0x676bfe) (BuildId: e7949a0603ee0889)
#18 v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) src/builtins/builtins-api.cc:148:5 (d8+0x675bbf) (BuildId: e7949a0603ee0889)
#19 v8::internal::Builtin_HandleApiCall(int, unsigned long*, v8::internal::Isolate*) src/builtins/builtins-api.cc:135:1 (d8+0x6756b3) (BuildId: e7949a0603ee0889)
#20 Builtins_AsyncFromSyncIteratorPrototypeThrow setup-isolate-deserialize.cc (d8+0x1d93f37)
#21 v8::internal::Execution::CallScript(v8::internal::Isolate*, v8::internal::Handle<v8::internal::JSFunction>, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>) src/execution/execution.cc:538:10 (d8+0x84fc92) (BuildId: e7949a0603ee0889)
#22 v8::Script::Run(v8::Local<v8::Context>, v8::Local<v8::Data>) src/api/api.cc:2272:7 (d8+0x5f6034) (BuildId: e7949a0603ee0889)
#23 v8::Script::Run(v8::Local<v8::Context>) src/api/api.cc:2199:10 (d8+0x5f57d0) (BuildId: e7949a0603ee0889)
#24 v8::Shell::ExecuteString(v8::Isolate*, v8::Local<v8::String>, v8::Local<v8::String>, v8::Shell::PrintResult, v8::Shell::ReportExceptions, v8::Shell::ProcessMessageQueue) src/d8/d8.cc:876:28 (d8+0x5b33d9) (BuildId: e7949a0603ee0889)
#25 v8::Worker::ExecuteInThread() src/d8/d8.cc:4736:13 (d8+0x5ce6c1) (BuildId: e7949a0603ee0889)
#26 v8::Worker::WorkerThread::Run() src/d8/d8.cc:4564:11 (d8+0x5ce0c4) (BuildId: e7949a0603ee0889)
#27 NotifyStartedAndRun src/base/platform/platform.h:596:5 (d8+0x1fc7c52) (BuildId: e7949a0603ee0889)
#28 v8::base::ThreadEntry(void*) src/base/platform/platform-posix.cc:1123:11 (d8+0x1fc7c52)
Mutex M0 (0x7b4400002018) created at:
#0 pthread_mutex_init /b/s/w/ir/cache/builder/src/third_party/llvm/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1331:3 (d8+0x516300) (BuildId: e7949a0603ee0889)
#1 InitializeNativeHandle src/base/platform/mutex.cc:99:12 (d8+0x1fbf9eb) (BuildId: e7949a0603ee0889)
#2 v8::base::Mutex::Mutex() src/base/platform/mutex.cc:152:3 (d8+0x1fbf9eb)
#3 Worker src/d8/d8.cc:4526:9 (d8+0x5e0593) (BuildId: e7949a0603ee0889)
#4 v8::Worker* std::Cr::construct_at[abi:v160000]<v8::Worker, char*, v8::Worker*>(v8::Worker*, char*&&) buildtools/third_party/libc++/trunk/include/__memory/construct_at.h:36:48 (d8+0x5e0593)
#5 construct<v8::Worker, char *, void, void> buildtools/third_party/libc++/trunk/include/__memory/allocator_traits.h:297:9 (d8+0x5e02ba) (BuildId: e7949a0603ee0889)
#6 __shared_ptr_emplace<char *> buildtools/third_party/libc++/trunk/include/__memory/shared_ptr.h:276:9 (d8+0x5e02ba)
#7 std::Cr::shared_ptr<v8::Worker> std::Cr::allocate_shared[abi:v160000]<v8::Worker, std::Cr::allocator<v8::Worker>, char*, void>(std::Cr::allocator<v8::Worker> const&, char*&&) buildtools/third_party/libc++/trunk/include/__memory/shared_ptr.h:937:55 (d8+0x5e02ba)
#8 make_shared<v8::Worker, char *, void> buildtools/third_party/libc++/trunk/include/__memory/shared_ptr.h:946:12 (d8+0x5c5ee4) (BuildId: e7949a0603ee0889)
#9 v8::Shell::WorkerNew(v8::FunctionCallbackInfo<v8::Value> const&) src/d8/d8.cc:2888:19 (d8+0x5c5ee4)
#10 v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo) src/api/api-arguments-inl.h:146:3 (d8+0x677b99) (BuildId: e7949a0603ee0889)
#11 v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<true>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, unsigned long*, int) src/builtins/builtins-api.cc:113:36 (d8+0x67658a) (BuildId: e7949a0603ee0889)
#12 v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) src/builtins/builtins-api.cc:144:5 (d8+0x675b9f) (BuildId: e7949a0603ee0889)
#13 v8::internal::Builtin_HandleApiCall(int, unsigned long*, v8::internal::Isolate*) src/builtins/builtins-api.cc:135:1 (d8+0x6756b3) (BuildId: e7949a0603ee0889)
#14 Builtins_AsyncFromSyncIteratorPrototypeThrow setup-isolate-deserialize.cc (d8+0x1d93f37)
#15 v8::internal::Execution::CallScript(v8::internal::Isolate*, v8::internal::Handle<v8::internal::JSFunction>, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>) src/execution/execution.cc:538:10 (d8+0x84fc92) (BuildId: e7949a0603ee0889)
#16 v8::Script::Run(v8::Local<v8::Context>, v8::Local<v8::Data>) src/api/api.cc:2272:7 (d8+0x5f6034) (BuildId: e7949a0603ee0889)
#17 v8::Script::Run(v8::Local<v8::Context>) src/api/api.cc:2199:10 (d8+0x5f57d0) (BuildId: e7949a0603ee0889)
#18 v8::Shell::ExecuteString(v8::Isolate*, v8::Local<v8::String>, v8::Local<v8::String>, v8::Shell::PrintResult, v8::Shell::ReportExceptions, v8::Shell::ProcessMessageQueue) src/d8/d8.cc:876:28 (d8+0x5b33d9) (BuildId: e7949a0603ee0889)
#19 v8::SourceGroup::Execute(v8::Isolate*) src/d8/d8.cc:4425:10 (d8+0x5cce73) (BuildId: e7949a0603ee0889)
#20 v8::Shell::RunMain(v8::Isolate*, bool) src/d8/d8.cc:5159:39 (d8+0x5d0e0e) (BuildId: e7949a0603ee0889)
#21 v8::Shell::Main(int, char**) src/d8/d8.cc:5939:22 (d8+0x5d3491) (BuildId: e7949a0603ee0889)
#22 main src/d8/d8.cc:6052:43 (d8+0x5d3bc0) (BuildId: e7949a0603ee0889)
Thread T9 'WorkerThread' (tid=5330, running) created by main thread at:
#0 pthread_create /b/s/w/ir/cache/builder/src/third_party/llvm/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1038:3 (d8+0x51498b) (BuildId: e7949a0603ee0889)
#1 v8::base::Thread::Start() src/base/platform/platform-posix.cc:1155:14 (d8+0x1fc7b66) (BuildId: e7949a0603ee0889)
#2 v8::Worker::StartWorkerThread(v8::Isolate*, std::Cr::shared_ptr<v8::Worker>) src/d8/d8.cc:4548:16 (d8+0x5c61b7) (BuildId: e7949a0603ee0889)
#3 v8::Shell::WorkerNew(v8::FunctionCallbackInfo<v8::Value> const&) src/d8/d8.cc:2894:10 (d8+0x5c602d) (BuildId: e7949a0603ee0889)
#4 v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo) src/api/api-arguments-inl.h:146:3 (d8+0x677b99) (BuildId: e7949a0603ee0889)
#5 v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<true>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, unsigned long*, int) src/builtins/builtins-api.cc:113:36 (d8+0x67658a) (BuildId: e7949a0603ee0889)
#6 v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) src/builtins/builtins-api.cc:144:5 (d8+0x675b9f) (BuildId: e7949a0603ee0889)
#7 v8::internal::Builtin_HandleApiCall(int, unsigned long*, v8::internal::Isolate*) src/builtins/builtins-api.cc:135:1 (d8+0x6756b3) (BuildId: e7949a0603ee0889)
#8 Builtins_AsyncFromSyncIteratorPrototypeThrow setup-isolate-deserialize.cc (d8+0x1d93f37)
#9 v8::internal::Execution::CallScript(v8::internal::Isolate*, v8::internal::Handle<v8::internal::JSFunction>, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>) src/execution/execution.cc:538:10 (d8+0x84fc92) (BuildId: e7949a0603ee0889)
#10 v8::Script::Run(v8::Local<v8::Context>, v8::Local<v8::Data>) src/api/api.cc:2272:7 (d8+0x5f6034) (BuildId: e7949a0603ee0889)
#11 v8::Script::Run(v8::Local<v8::Context>) src/api/api.cc:2199:10 (d8+0x5f57d0) (BuildId: e7949a0603ee0889)
#12 v8::Shell::ExecuteString(v8::Isolate*, v8::Local<v8::String>, v8::Local<v8::String>, v8::Shell::PrintResult, v8::Shell::ReportExceptions, v8::Shell::ProcessMessageQueue) src/d8/d8.cc:876:28 (d8+0x5b33d9) (BuildId: e7949a0603ee0889)
#13 v8::SourceGroup::Execute(v8::Isolate*) src/d8/d8.cc:4425:10 (d8+0x5cce73) (BuildId: e7949a0603ee0889)
#14 v8::Shell::RunMain(v8::Isolate*, bool) src/d8/d8.cc:5159:39 (d8+0x5d0e0e) (BuildId: e7949a0603ee0889)
#15 v8::Shell::Main(int, char**) src/d8/d8.cc:5939:22 (d8+0x5d3491) (BuildId: e7949a0603ee0889)
#16 main src/d8/d8.cc:6052:43 (d8+0x5d3bc0) (BuildId: e7949a0603ee0889)
SUMMARY: ThreadSanitizer: heap-use-after-free src/base/platform/mutex.cc:135:16 in UnlockNativeHandle
==================
==================
WARNING: ThreadSanitizer: unlock of an unlocked mutex (or by a wrong thread) (pid=5297)
#0 pthread_mutex_unlock sanitizer_common/sanitizer_common_interceptors.inc:4495:3 (d8+0x536ebb) (BuildId: e7949a0603ee0889)
#1 UnlockNativeHandle src/base/platform/mutex.cc:135:16 (d8+0x1fbfa79) (BuildId: e7949a0603ee0889)
#2 v8::base::Mutex::Unlock() src/base/platform/mutex.cc:173:3 (d8+0x1fbfa79)
#3 ~LockGuard src/base/platform/mutex.h:316:30 (d8+0x10f7651) (BuildId: e7949a0603ee0889)
#4 Register src/tasks/cancelable-task.cc:47:1 (d8+0x10f7651)
#5 v8::internal::Cancelable::Cancelable(v8::internal::CancelableTaskManager*) src/tasks/cancelable-task.h:96:38 (d8+0x10f7651)
#6 v8::internal::CancelableTask::CancelableTask(v8::internal::CancelableTaskManager*) src/tasks/cancelable-task.cc:125:7 (d8+0x10f74f3) (BuildId: e7949a0603ee0889)
#7 TerminateTask src/d8/d8.cc:4596:9 (d8+0x5c6e7a) (BuildId: e7949a0603ee0889)
#8 v8::Worker::Terminate() src/d8/d8.cc:4637:11 (d8+0x5c6e7a)
#9 TerminateAndWaitForThread src/d8/d8.cc:4622:3 (d8+0x5d13ce) (BuildId: e7949a0603ee0889)
#10 v8::Shell::WaitForRunningWorkers(v8::internal::ParkedScope const&) src/d8/d8.cc:5642:13 (d8+0x5d13ce)
#11 v8::Shell::RunMain(v8::Isolate*, bool) src/d8/d8.cc:5190:3 (d8+0x5d1168) (BuildId: e7949a0603ee0889)
#12 v8::Shell::Main(int, char**) src/d8/d8.cc:5939:22 (d8+0x5d3491) (BuildId: e7949a0603ee0889)
#13 main src/d8/d8.cc:6052:43 (d8+0x5d3bc0) (BuildId: e7949a0603ee0889)
Mutex M0 (0x7b24000090f0) created at:
#0 pthread_mutex_lock sanitizer_common/sanitizer_common_interceptors.inc:4481:3 (d8+0x536ceb) (BuildId: e7949a0603ee0889)
#1 LockNativeHandle src/base/platform/mutex.cc:128:16 (d8+0x1fbfa49) (BuildId: e7949a0603ee0889)
#2 v8::base::Mutex::Lock() src/base/platform/mutex.cc:166:3 (d8+0x1fbfa49)
#3 LockGuard src/base/platform/mutex.h:311:30 (d8+0x10f75a0) (BuildId: e7949a0603ee0889)
#4 Register src/tasks/cancelable-task.cc:34:20 (d8+0x10f75a0)
#5 v8::internal::Cancelable::Cancelable(v8::internal::CancelableTaskManager*) src/tasks/cancelable-task.h:96:38 (d8+0x10f75a0)
#6 v8::internal::CancelableTask::CancelableTask(v8::internal::CancelableTaskManager*) src/tasks/cancelable-task.cc:125:7 (d8+0x10f74f3) (BuildId: e7949a0603ee0889)
#7 TerminateTask src/d8/d8.cc:4596:9 (d8+0x5c6e7a) (BuildId: e7949a0603ee0889)
#8 v8::Worker::Terminate() src/d8/d8.cc:4637:11 (d8+0x5c6e7a)
#9 TerminateAndWaitForThread src/d8/d8.cc:4622:3 (d8+0x5d13ce) (BuildId: e7949a0603ee0889)
#10 v8::Shell::WaitForRunningWorkers(v8::internal::ParkedScope const&) src/d8/d8.cc:5642:13 (d8+0x5d13ce)
#11 v8::Shell::RunMain(v8::Isolate*, bool) src/d8/d8.cc:5190:3 (d8+0x5d1168) (BuildId: e7949a0603ee0889)
#12 v8::Shell::Main(int, char**) src/d8/d8.cc:5939:22 (d8+0x5d3491) (BuildId: e7949a0603ee0889)
#13 main src/d8/d8.cc:6052:43 (d8+0x5d3bc0) (BuildId: e7949a0603ee0889)
SUMMARY: ThreadSanitizer: unlock of an unlocked mutex (or by a wrong thread) src/base/platform/mutex.cc:135:16 in UnlockNativeHandle
==================
==================
WARNING: ThreadSanitizer: use of an invalid mutex (e.g. uninitialized or destroyed) (pid=5297)
#0 pthread_mutex_unlock sanitizer_common/sanitizer_common_interceptors.inc:4495:3 (d8+0x536ebb) (BuildId: e7949a0603ee0889)
#1 UnlockNativeHandle src/base/platform/mutex.cc:135:16 (d8+0x1fbfa79) (BuildId: e7949a0603ee0889)
#2 v8::base::Mutex::Unlock() src/base/platform/mutex.cc:173:3 (d8+0x1fbfa79)
#3 ~LockGuard src/base/platform/mutex.h:316:30 (d8+0x10f7651) (BuildId: e7949a0603ee0889)
#4 Register src/tasks/cancelable-task.cc:47:1 (d8+0x10f7651)
#5 v8::internal::Cancelable::Cancelable(v8::internal::CancelableTaskManager*) src/tasks/cancelable-task.h:96:38 (d8+0x10f7651)
#6 v8::internal::CancelableTask::CancelableTask(v8::internal::CancelableTaskManager*) src/tasks/cancelable-task.cc:125:7 (d8+0x10f74f3) (BuildId: e7949a0603ee0889)
#7 TerminateTask src/d8/d8.cc:4596:9 (d8+0x5c6e7a) (BuildId: e7949a0603ee0889)
#8 v8::Worker::Terminate() src/d8/d8.cc:4637:11 (d8+0x5c6e7a)
#9 TerminateAndWaitForThread src/d8/d8.cc:4622:3 (d8+0x5d13ce) (BuildId: e7949a0603ee0889)
#10 v8::Shell::WaitForRunningWorkers(v8::internal::ParkedScope const&) src/d8/d8.cc:5642:13 (d8+0x5d13ce)
#11 v8::Shell::RunMain(v8::Isolate*, bool) src/d8/d8.cc:5190:3 (d8+0x5d1168) (BuildId: e7949a0603ee0889)
#12 v8::Shell::Main(int, char**) src/d8/d8.cc:5939:22 (d8+0x5d3491) (BuildId: e7949a0603ee0889)
#13 main src/d8/d8.cc:6052:43 (d8+0x5d3bc0) (BuildId: e7949a0603ee0889)
Mutex M0 (0x7b24000090f0) created at:
#0 pthread_mutex_lock sanitizer_common/sanitizer_common_interceptors.inc:4481:3 (d8+0x536ceb) (BuildId: e7949a0603ee0889)
#1 LockNativeHandle src/base/platform/mutex.cc:128:16 (d8+0x1fbfa49) (BuildId: e7949a0603ee0889)
#2 v8::base::Mutex::Lock() src/base/platform/mutex.cc:166:3 (d8+0x1fbfa49)
#3 LockGuard src/base/platform/mutex.h:311:30 (d8+0x10f75a0) (BuildId: e7949a0603ee0889)
#4 Register src/tasks/cancelable-task.cc:34:20 (d8+0x10f75a0)
#5 v8::internal::Cancelable::Cancelable(v8::internal::CancelableTaskManager*) src/tasks/cancelable-task.h:96:38 (d8+0x10f75a0)
#6 v8::internal::CancelableTask::CancelableTask(v8::internal::CancelableTaskManager*) src/tasks/cancelable-task.cc:125:7 (d8+0x10f74f3) (BuildId: e7949a0603ee0889)
#7 TerminateTask src/d8/d8.cc:4596:9 (d8+0x5c6e7a) (BuildId: e7949a0603ee0889)
#8 v8::Worker::Terminate() src/d8/d8.cc:4637:11 (d8+0x5c6e7a)
#9 TerminateAndWaitForThread src/d8/d8.cc:4622:3 (d8+0x5d13ce) (BuildId: e7949a0603ee0889)
#10 v8::Shell::WaitForRunningWorkers(v8::internal::ParkedScope const&) src/d8/d8.cc:5642:13 (d8+0x5d13ce)
#11 v8::Shell::RunMain(v8::Isolate*, bool) src/d8/d8.cc:5190:3 (d8+0x5d1168) (BuildId: e7949a0603ee0889)
#12 v8::Shell::Main(int, char**) src/d8/d8.cc:5939:22 (d8+0x5d3491) (BuildId: e7949a0603ee0889)
#13 main src/d8/d8.cc:6052:43 (d8+0x5d3bc0) (BuildId: e7949a0603ee0889)
SUMMARY: ThreadSanitizer: use of an invalid mutex (e.g. uninitialized or destroyed) src/base/platform/mutex.cc:135:16 in UnlockNativeHandle
==================
==================
WARNING: ThreadSanitizer: heap-use-after-free (pid=5297)
Read of size 8 at 0x7bc000060008 by main thread (mutexes: write M0):
#0 v8::internal::StackGuard::RequestInterrupt(v8::internal::StackGuard::InterruptFlag) src/execution/stack-guard.cc:140:26 (d8+0x8990a0) (BuildId: e7949a0603ee0889)
#1 RequestTerminateExecution src/execution/stack-guard.h:65:3 (d8+0x61f632) (BuildId: e7949a0603ee0889)
#2 v8::Isolate::TerminateExecution() src/api/api.cc:8905:29 (d8+0x61f632)
#3 v8::Worker::Terminate() src/d8/d8.cc:4642:13 (d8+0x5c6f55) (BuildId: e7949a0603ee0889)
#4 TerminateAndWaitForThread src/d8/d8.cc:4622:3 (d8+0x5d13ce) (BuildId: e7949a0603ee0889)
#5 v8::Shell::WaitForRunningWorkers(v8::internal::ParkedScope const&) src/d8/d8.cc:5642:13 (d8+0x5d13ce)
#6 v8::Shell::RunMain(v8::Isolate*, bool) src/d8/d8.cc:5190:3 (d8+0x5d1168) (BuildId: e7949a0603ee0889)
#7 v8::Shell::Main(int, char**) src/d8/d8.cc:5939:22 (d8+0x5d3491) (BuildId: e7949a0603ee0889)
#8 main src/d8/d8.cc:6052:43 (d8+0x5d3bc0) (BuildId: e7949a0603ee0889)
Previous write of size 8 at 0x7bc000060008 by thread T9:
#0 operator delete(void*) /b/s/w/ir/cache/builder/src/third_party/llvm/compiler-rt/lib/tsan/rtl/tsan_new_delete.cpp:126:3 (d8+0x59aadf) (BuildId: e7949a0603ee0889)
#1 v8::internal::IsolateAllocator::~IsolateAllocator() src/init/isolate-allocator.cc:141:3 (d8+0xae2931) (BuildId: e7949a0603ee0889)
#2 operator() buildtools/third_party/libc++/trunk/include/__memory/unique_ptr.h:49:5 (d8+0x875e9c) (BuildId: e7949a0603ee0889)
#3 reset buildtools/third_party/libc++/trunk/include/__memory/unique_ptr.h:281:7 (d8+0x875e9c)
#4 v8::internal::Isolate::Delete(v8::internal::Isolate*) src/execution/isolate.cc:3404:21 (d8+0x875e9c)
#5 v8::Isolate::Dispose() src/api/api.cc:9095:3 (d8+0x5ecc4f) (BuildId: e7949a0603ee0889)
#6 v8::Shell::OnExit(v8::Isolate*, bool) src/d8/d8.cc:3874:12 (d8+0x5c7272) (BuildId: e7949a0603ee0889)
#7 v8::Shell::QuitOnce(v8::FunctionCallbackInfo<v8::Value>*) src/d8/d8.cc:2983:3 (d8+0x5c7220) (BuildId: e7949a0603ee0889)
#8 operator() src/base/once.h:101:32 (d8+0x5e069d) (BuildId: e7949a0603ee0889)
#9 __invoke<(lambda at ../../src/base/once.h:101:24) &> buildtools/third_party/libc++/trunk/include/__functional/invoke.h:394:23 (d8+0x5e069d)
#10 __call<(lambda at ../../src/base/once.h:101:24) &> buildtools/third_party/libc++/trunk/include/__functional/invoke.h:479:9 (d8+0x5e069d)
#11 operator() buildtools/third_party/libc++/trunk/include/__functional/function.h:232:12 (d8+0x5e069d)
#12 void std::Cr::__function::__policy_invoker<void ()>::__call_impl<std::Cr::__function::__default_alloc_func<void v8::base::CallOnce<v8::FunctionCallbackInfo<v8::Value>*, void>(std::Cr::atomic<unsigned char>*, v8::base::FunctionWithArgs<v8::FunctionCallbackInfo<v8::Value>*>::type, v8::FunctionCallbackInfo<v8::Value>*)::'lambda'(), void ()>>(std::Cr::__function::__policy_storage const*) buildtools/third_party/libc++/trunk/include/__functional/function.h:711:16 (d8+0x5e069d)
#13 operator() buildtools/third_party/libc++/trunk/include/__functional/function.h:842:16 (d8+0x1fbebb7) (BuildId: e7949a0603ee0889)
#14 operator() buildtools/third_party/libc++/trunk/include/__functional/function.h:1152:12 (d8+0x1fbebb7)
#15 v8::base::CallOnceImpl(std::Cr::atomic<unsigned char>*, std::Cr::function<void ()>) src/base/once.cc:36:5 (d8+0x1fbebb7)
#16 CallOnce<v8::FunctionCallbackInfo<v8::Value> *, void> src/base/once.h:101:5 (d8+0x5c80df) (BuildId: e7949a0603ee0889)
#17 v8::Shell::Quit(v8::FunctionCallbackInfo<v8::Value> const&) src/d8/d8.cc:2988:3 (d8+0x5c80df)
#18 v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo) src/api/api-arguments-inl.h:146:3 (d8+0x677b99) (BuildId: e7949a0603ee0889)
#19 v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<false>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, unsigned long*, int) src/builtins/builtins-api.cc:113:36 (d8+0x676bfe) (BuildId: e7949a0603ee0889)
#20 v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) src/builtins/builtins-api.cc:148:5 (d8+0x675bbf) (BuildId: e7949a0603ee0889)
#21 v8::internal::Builtin_HandleApiCall(int, unsigned long*, v8::internal::Isolate*) src/builtins/builtins-api.cc:135:1 (d8+0x6756b3) (BuildId: e7949a0603ee0889)
#22 Builtins_AsyncFromSyncIteratorPrototypeThrow setup-isolate-deserialize.cc (d8+0x1d93f37)
#23 v8::internal::Execution::CallScript(v8::internal::Isolate*, v8::internal::Handle<v8::internal::JSFunction>, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>) src/execution/execution.cc:538:10 (d8+0x84fc92) (BuildId: e7949a0603ee0889)
#24 v8::Script::Run(v8::Local<v8::Context>, v8::Local<v8::Data>) src/api/api.cc:2272:7 (d8+0x5f6034) (BuildId: e7949a0603ee0889)
#25 v8::Script::Run(v8::Local<v8::Context>) src/api/api.cc:2199:10 (d8+0x5f57d0) (BuildId: e7949a0603ee0889)
#26 v8::Shell::ExecuteString(v8::Isolate*, v8::Local<v8::String>, v8::Local<v8::String>, v8::Shell::PrintResult, v8::Shell::ReportExceptions, v8::Shell::ProcessMessageQueue) src/d8/d8.cc:876:28 (d8+0x5b33d9) (BuildId: e7949a0603ee0889)
#27 v8::Worker::ExecuteInThread() src/d8/d8.cc:4736:13 (d8+0x5ce6c1) (BuildId: e7949a0603ee0889)
#28 v8::Worker::WorkerThread::Run() src/d8/d8.cc:4564:11 (d8+0x5ce0c4) (BuildId: e7949a0603ee0889)
#29 NotifyStartedAndRun src/base/platform/platform.h:596:5 (d8+0x1fc7c52) (BuildId: e7949a0603ee0889)
#30 v8::base::ThreadEntry(void*) src/base/platform/platform-posix.cc:1123:11 (d8+0x1fc7c52)
Mutex M0 (0x7b4400002018) created at:
#0 pthread_mutex_init /b/s/w/ir/cache/builder/src/third_party/llvm/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1331:3 (d8+0x516300) (BuildId: e7949a0603ee0889)
#1 InitializeNativeHandle src/base/platform/mutex.cc:99:12 (d8+0x1fbf9eb) (BuildId: e7949a0603ee0889)
#2 v8::base::Mutex::Mutex() src/base/platform/mutex.cc:152:3 (d8+0x1fbf9eb)
#3 Worker src/d8/d8.cc:4526:9 (d8+0x5e0593) (BuildId: e7949a0603ee0889)
#4 v8::Worker* std::Cr::construct_at[abi:v160000]<v8::Worker, char*, v8::Worker*>(v8::Worker*, char*&&) buildtools/third_party/libc++/trunk/include/__memory/construct_at.h:36:48 (d8+0x5e0593)
#5 construct<v8::Worker, char *, void, void> buildtools/third_party/libc++/trunk/include/__memory/allocator_traits.h:297:9 (d8+0x5e02ba) (BuildId: e7949a0603ee0889)
#6 __shared_ptr_emplace<char *> buildtools/third_party/libc++/trunk/include/__memory/shared_ptr.h:276:9 (d8+0x5e02ba)
#7 std::Cr::shared_ptr<v8::Worker> std::Cr::allocate_shared[abi:v160000]<v8::Worker, std::Cr::allocator<v8::Worker>, char*, void>(std::Cr::allocator<v8::Worker> const&, char*&&) buildtools/third_party/libc++/trunk/include/__memory/shared_ptr.h:937:55 (d8+0x5e02ba)
#8 make_shared<v8::Worker, char *, void> buildtools/third_party/libc++/trunk/include/__memory/shared_ptr.h:946:12 (d8+0x5c5ee4) (BuildId: e7949a0603ee0889)
#9 v8::Shell::WorkerNew(v8::FunctionCallbackInfo<v8::Value> const&) src/d8/d8.cc:2888:19 (d8+0x5c5ee4)
#10 v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo) src/api/api-arguments-inl.h:146:3 (d8+0x677b99) (BuildId: e7949a0603ee0889)
#11 v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<true>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, unsigned long*, int) src/builtins/builtins-api.cc:113:36 (d8+0x67658a) (BuildId: e7949a0603ee0889)
#12 v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) src/builtins/builtins-api.cc:144:5 (d8+0x675b9f) (BuildId: e7949a0603ee0889)
#13 v8::internal::Builtin_HandleApiCall(int, unsigned long*, v8::internal::Isolate*) src/builtins/builtins-api.cc:135:1 (d8+0x6756b3) (BuildId: e7949a0603ee0889)
#14 Builtins_AsyncFromSyncIteratorPrototypeThrow setup-isolate-deserialize.cc (d8+0x1d93f37)
#15 v8::internal::Execution::CallScript(v8::internal::Isolate*, v8::internal::Handle<v8::internal::JSFunction>, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>) src/execution/execution.cc:538:10 (d8+0x84fc92) (BuildId: e7949a0603ee0889)
#16 v8::Script::Run(v8::Local<v8::Context>, v8::Local<v8::Data>) src/api/api.cc:2272:7 (d8+0x5f6034) (BuildId: e7949a0603ee0889)
#17 v8::Script::Run(v8::Local<v8::Context>) src/api/api.cc:2199:10 (d8+0x5f57d0) (BuildId: e7949a0603ee0889)
#18 v8::Shell::ExecuteString(v8::Isolate*, v8::Local<v8::String>, v8::Local<v8::String>, v8::Shell::PrintResult, v8::Shell::ReportExceptions, v8::Shell::ProcessMessageQueue) src/d8/d8.cc:876:28 (d8+0x5b33d9) (BuildId: e7949a0603ee0889)
#19 v8::SourceGroup::Execute(v8::Isolate*) src/d8/d8.cc:4425:10 (d8+0x5cce73) (BuildId: e7949a0603ee0889)
#20 v8::Shell::RunMain(v8::Isolate*, bool) src/d8/d8.cc:5159:39 (d8+0x5d0e0e) (BuildId: e7949a0603ee0889)
#21 v8::Shell::Main(int, char**) src/d8/d8.cc:5939:22 (d8+0x5d3491) (BuildId: e7949a0603ee0889)
#22 main src/d8/d8.cc:6052:43 (d8+0x5d3bc0) (BuildId: e7949a0603ee0889)
Thread T9 'WorkerThread' (tid=5330, running) created by main thread at:
#0 pthread_create /b/s/w/ir/cache/builder/src/third_party/llvm/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1038:3 (d8+0x51498b) (BuildId: e7949a0603ee0889)
#1 v8::base::Thread::Start() src/base/platform/platform-posix.cc:1155:14 (d8+0x1fc7b66) (BuildId: e7949a0603ee0889)
#2 v8::Worker::StartWorkerThread(v8::Isolate*, std::Cr::shared_ptr<v8::Worker>) src/d8/d8.cc:4548:16 (d8+0x5c61b7) (BuildId: e7949a0603ee0889)
#3 v8::Shell::WorkerNew(v8::FunctionCallbackInfo<v8::Value> const&) src/d8/d8.cc:2894:10 (d8+0x5c602d) (BuildId: e7949a0603ee0889)
#4 v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo) src/api/api-arguments-inl.h:146:3 (d8+0x677b99) (BuildId: e7949a0603ee0889)
#5 v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<true>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, unsigned long*, int) src/builtins/builtins-api.cc:113:36 (d8+0x67658a) (BuildId: e7949a0603ee0889)
#6 v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) src/builtins/builtins-api.cc:144:5 (d8+0x675b9f) (BuildId: e7949a0603ee0889)
#7 v8::internal::Builtin_HandleApiCall(int, unsigned long*, v8::internal::Isolate*) src/builtins/builtins-api.cc:135:1 (d8+0x6756b3) (BuildId: e7949a0603ee0889)
#8 Builtins_AsyncFromSyncIteratorPrototypeThrow setup-isolate-deserialize.cc (d8+0x1d93f37)
#9 v8::internal::Execution::CallScript(v8::internal::Isolate*, v8::internal::Handle<v8::internal::JSFunction>, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>) src/execution/execution.cc:538:10 (d8+0x84fc92) (BuildId: e7949a0603ee0889)
#10 v8::Script::Run(v8::Local<v8::Context>, v8::Local<v8::Data>) src/api/api.cc:2272:7 (d8+0x5f6034) (BuildId: e7949a0603ee0889)
#11 v8::Script::Run(v8::Local<v8::Context>) src/api/api.cc:2199:10 (d8+0x5f57d0) (BuildId: e7949a0603ee0889)
#12 v8::Shell::ExecuteString(v8::Isolate*, v8::Local<v8::String>, v8::Local<v8::String>, v8::Shell::PrintResult, v8::Shell::ReportExceptions, v8::Shell::ProcessMessageQueue) src/d8/d8.cc:876:28 (d8+0x5b33d9) (BuildId: e7949a0603ee0889)
#13 v8::SourceGroup::Execute(v8::Isolate*) src/d8/d8.cc:4425:10 (d8+0x5cce73) (BuildId: e7949a0603ee0889)
#14 v8::Shell::RunMain(v8::Isolate*, bool) src/d8/d8.cc:5159:39 (d8+0x5d0e0e) (BuildId: e7949a0603ee0889)
#15 v8::Shell::Main(int, char**) src/d8/d8.cc:5939:22 (d8+0x5d3491) (BuildId: e7949a0603ee0889)
#16 main src/d8/d8.cc:6052:43 (d8+0x5d3bc0) (BuildId: e7949a0603ee0889)
SUMMARY: ThreadSanitizer: heap-use-after-free src/execution/stack-guard.cc:140:26 in v8::internal::StackGuard::RequestInterrupt(v8::internal::StackGuard::InterruptFlag)
==================
==================
WARNING: ThreadSanitizer: use of an invalid mutex (e.g. uninitialized or destroyed) (pid=5297)
#0 pthread_mutex_lock sanitizer_common/sanitizer_common_interceptors.inc:4481:3 (d8+0x536ceb) (BuildId: e7949a0603ee0889)
#1 LockNativeHandle src/base/platform/mutex.cc:128:16 (d8+0x1fbfb69) (BuildId: e7949a0603ee0889)
#2 v8::base::RecursiveMutex::Lock() src/base/platform/mutex.cc:201:3 (d8+0x1fbfb69)
#3 Lock src/execution/isolate.h:2615:65 (d8+0x8990b1) (BuildId: e7949a0603ee0889)
#4 ExecutionAccess src/execution/isolate.h:2611:5 (d8+0x8990b1)
#5 v8::internal::StackGuard::RequestInterrupt(v8::internal::StackGuard::InterruptFlag) src/execution/stack-guard.cc:140:19 (d8+0x8990b1)
#6 RequestTerminateExecution src/execution/stack-guard.h:65:3 (d8+0x61f632) (BuildId: e7949a0603ee0889)
#7 v8::Isolate::TerminateExecution() src/api/api.cc:8905:29 (d8+0x61f632)
#8 v8::Worker::Terminate() src/d8/d8.cc:4642:13 (d8+0x5c6f55) (BuildId: e7949a0603ee0889)
#9 TerminateAndWaitForThread src/d8/d8.cc:4622:3 (d8+0x5d13ce) (BuildId: e7949a0603ee0889)
#10 v8::Shell::WaitForRunningWorkers(v8::internal::ParkedScope const&) src/d8/d8.cc:5642:13 (d8+0x5d13ce)
#11 v8::Shell::RunMain(v8::Isolate*, bool) src/d8/d8.cc:5190:3 (d8+0x5d1168) (BuildId: e7949a0603ee0889)
#12 v8::Shell::Main(int, char**) src/d8/d8.cc:5939:22 (d8+0x5d3491) (BuildId: e7949a0603ee0889)
#13 main src/d8/d8.cc:6052:43 (d8+0x5d3bc0) (BuildId: e7949a0603ee0889)
Mutex M0 (0x7bc00006e170) created at:
#0 pthread_mutex_lock sanitizer_common/sanitizer_common_interceptors.inc:4481:3 (d8+0x536ceb) (BuildId: e7949a0603ee0889)
#1 LockNativeHandle src/base/platform/mutex.cc:128:16 (d8+0x1fbfb69) (BuildId: e7949a0603ee0889)
#2 v8::base::RecursiveMutex::Lock() src/base/platform/mutex.cc:201:3 (d8+0x1fbfb69)
#3 Lock src/execution/isolate.h:2615:65 (d8+0x8990b1) (BuildId: e7949a0603ee0889)
#4 ExecutionAccess src/execution/isolate.h:2611:5 (d8+0x8990b1)
#5 v8::internal::StackGuard::RequestInterrupt(v8::internal::StackGuard::InterruptFlag) src/execution/stack-guard.cc:140:19 (d8+0x8990b1)
#6 RequestTerminateExecution src/execution/stack-guard.h:65:3 (d8+0x61f632) (BuildId: e7949a0603ee0889)
#7 v8::Isolate::TerminateExecution() src/api/api.cc:8905:29 (d8+0x61f632)
#8 v8::Worker::Terminate() src/d8/d8.cc:4642:13 (d8+0x5c6f55) (BuildId: e7949a0603ee0889)
#9 TerminateAndWaitForThread src/d8/d8.cc:4622:3 (d8+0x5d13ce) (BuildId: e7949a0603ee0889)
#10 v8::Shell::WaitForRunningWorkers(v8::internal::ParkedScope const&) src/d8/d8.cc:5642:13 (d8+0x5d13ce)
#11 v8::Shell::RunMain(v8::Isolate*, bool) src/d8/d8.cc:5190:3 (d8+0x5d1168) (BuildId: e7949a0603ee0889)
#12 v8::Shell::Main(int, char**) src/d8/d8.cc:5939:22 (d8+0x5d3491) (BuildId: e7949a0603ee0889)
#13 main src/d8/d8.cc:6052:43 (d8+0x5d3bc0) (BuildId: e7949a0603ee0889)
SUMMARY: ThreadSanitizer: use of an invalid mutex (e.g. uninitialized or destroyed) src/base/platform/mutex.cc:128:16 in LockNativeHandle
==================
==================
WARNING: ThreadSanitizer: heap-use-after-free (pid=5297)
Read of size 8 at 0x7bc000060030 by main thread (mutexes: write M0):
#0 v8::internal::StackGuard::RequestInterrupt(v8::internal::StackGuard::InterruptFlag) src/execution/stack-guard.cc:142:21 (d8+0x8990ba) (BuildId: e7949a0603ee0889)
#1 RequestTerminateExecution src/execution/stack-guard.h:65:3 (d8+0x61f632) (BuildId: e7949a0603ee0889)
#2 v8::Isolate::TerminateExecution() src/api/api.cc:8905:29 (d8+0x61f632)
#3 v8::Worker::Terminate() src/d8/d8.cc:4642:13 (d8+0x5c6f55) (BuildId: e7949a0603ee0889)
#4 TerminateAndWaitForThread src/d8/d8.cc:4622:3 (d8+0x5d13ce) (BuildId: e7949a0603ee0889)
#5 v8::Shell::WaitForRunningWorkers(v8::internal::ParkedScope const&) src/d8/d8.cc:5642:13 (d8+0x5d13ce)
#6 v8::Shell::RunMain(v8::Isolate*, bool) src/d8/d8.cc:5190:3 (d8+0x5d1168) (BuildId: e7949a0603ee0889)
#7 v8::Shell::Main(int, char**) src/d8/d8.cc:5939:22 (d8+0x5d3491) (BuildId: e7949a0603ee0889)
#8 main src/d8/d8.cc:6052:43 (d8+0x5d3bc0) (BuildId: e7949a0603ee0889)
Previous write of size 8 at 0x7bc000060030 by thread T9:
#0 operator delete(void*) /b/s/w/ir/cache/builder/src/third_party/llvm/compiler-rt/lib/tsan/rtl/tsan_new_delete.cpp:126:3 (d8+0x59aadf) (BuildId: e7949a0603ee0889)
#1 v8::internal::IsolateAllocator::~IsolateAllocator() src/init/isolate-allocator.cc:141:3 (d8+0xae2931) (BuildId: e7949a0603ee0889)
#2 operator() buildtools/third_party/libc++/trunk/include/__memory/unique_ptr.h:49:5 (d8+0x875e9c) (BuildId: e7949a0603ee0889)
#3 reset buildtools/third_party/libc++/trunk/include/__memory/unique_ptr.h:281:7 (d8+0x875e9c)
#4 v8::internal::Isolate::Delete(v8::internal::Isolate*) src/execution/isolate.cc:3404:21 (d8+0x875e9c)
#5 v8::Isolate::Dispose() src/api/api.cc:9095:3 (d8+0x5ecc4f) (BuildId: e7949a0603ee0889)
#6 v8::Shell::OnExit(v8::Isolate*, bool) src/d8/d8.cc:3874:12 (d8+0x5c7272) (BuildId: e7949a0603ee0889)
#7 v8::Shell::QuitOnce(v8::FunctionCallbackInfo<v8::Value>*) src/d8/d8.cc:2983:3 (d8+0x5c7220) (BuildId: e7949a0603ee0889)
#8 operator() src/base/once.h:101:32 (d8+0x5e069d) (BuildId: e7949a0603ee0889)
#9 __invoke<(lambda at ../../src/base/once.h:101:24) &> buildtools/third_party/libc++/trunk/include/__functional/invoke.h:394:23 (d8+0x5e069d)
#10 __call<(lambda at ../../src/base/once.h:101:24) &> buildtools/third_party/libc++/trunk/include/__functional/invoke.h:479:9 (d8+0x5e069d)
#11 operator() buildtools/third_party/libc++/trunk/include/__functional/function.h:232:12 (d8+0x5e069d)
#12 void std::Cr::__function::__policy_invoker<void ()>::__call_impl<std::Cr::__function::__default_alloc_func<void v8::base::CallOnce<v8::FunctionCallbackInfo<v8::Value>*, void>(std::Cr::atomic<unsigned char>*, v8::base::FunctionWithArgs<v8::FunctionCallbackInfo<v8::Value>*>::type, v8::FunctionCallbackInfo<v8::Value>*)::'lambda'(), void ()>>(std::Cr::__function::__policy_storage const*) buildtools/third_party/libc++/trunk/include/__functional/function.h:711:16 (d8+0x5e069d)
#13 operator() buildtools/third_party/libc++/trunk/include/__functional/function.h:842:16 (d8+0x1fbebb7) (BuildId: e7949a0603ee0889)
#14 operator() buildtools/third_party/libc++/trunk/include/__functional/function.h:1152:12 (d8+0x1fbebb7)
#15 v8::base::CallOnceImpl(std::Cr::atomic<unsigned char>*, std::Cr::function<void ()>) src/base/once.cc:36:5 (d8+0x1fbebb7)
#16 CallOnce<v8::FunctionCallbackInfo<v8::Value> *, void> src/base/once.h:101:5 (d8+0x5c80df) (BuildId: e7949a0603ee0889)
#17 v8::Shell::Quit(v8::FunctionCallbackInfo<v8::Value> const&) src/d8/d8.cc:2988:3 (d8+0x5c80df)
#18 v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo) src/api/api-arguments-inl.h:146:3 (d8+0x677b99) (BuildId: e7949a0603ee0889)
#19 v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<false>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, unsigned long*, int) src/builtins/builtins-api.cc:113:36 (d8+0x676bfe) (BuildId: e7949a0603ee0889)
#20 v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) src/builtins/builtins-api.cc:148:5 (d8+0x675bbf) (BuildId: e7949a0603ee0889)
#21 v8::internal::Builtin_HandleApiCall(int, unsigned long*, v8::internal::Isolate*) src/builtins/builtins-api.cc:135:1 (d8+0x6756b3) (BuildId: e7949a0603ee0889)
#22 Builtins_AsyncFromSyncIteratorPrototypeThrow setup-isolate-deserialize.cc (d8+0x1d93f37)
#23 v8::internal::Execution::CallScript(v8::internal::Isolate*, v8::internal::Handle<v8::internal::JSFunction>, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>) src/execution/execution.cc:538:10 (d8+0x84fc92) (BuildId: e7949a0603ee0889)
#24 v8::Script::Run(v8::Local<v8::Context>, v8::Local<v8::Data>) src/api/api.cc:2272:7 (d8+0x5f6034) (BuildId: e7949a0603ee0889)
#25 v8::Script::Run(v8::Local<v8::Context>) src/api/api.cc:2199:10 (d8+0x5f57d0) (BuildId: e7949a0603ee0889)
#26 v8::Shell::ExecuteString(v8::Isolate*, v8::Local<v8::String>, v8::Local<v8::String>, v8::Shell::PrintResult, v8::Shell::ReportExceptions, v8::Shell::ProcessMessageQueue) src/d8/d8.cc:876:28 (d8+0x5b33d9) (BuildId: e7949a0603ee0889)
#27 v8::Worker::ExecuteInThread() src/d8/d8.cc:4736:13 (d8+0x5ce6c1) (BuildId: e7949a0603ee0889)
#28 v8::Worker::WorkerThread::Run() src/d8/d8.cc:4564:11 (d8+0x5ce0c4) (BuildId: e7949a0603ee0889)
#29 NotifyStartedAndRun src/base/platform/platform.h:596:5 (d8+0x1fc7c52) (BuildId: e7949a0603ee0889)
#30 v8::base::ThreadEntry(void*) src/base/platform/platform-posix.cc:1123:11 (d8+0x1fc7c52)
Mutex M0 (0x7b4400002018) created at:
#0 pthread_mutex_init /b/s/w/ir/cache/builder/src/third_party/llvm/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1331:3 (d8+0x516300) (BuildId: e7949a0603ee0889)
#1 InitializeNativeHandle src/base/platform/mutex.cc:99:12 (d8+0x1fbf9eb) (BuildId: e7949a0603ee0889)
#2 v8::base::Mutex::Mutex() src/base/platform/mutex.cc:152:3 (d8+0x1fbf9eb)
#3 Worker src/d8/d8.cc:4526:9 (d8+0x5e0593) (BuildId: e7949a0603ee0889)
#4 v8::Worker* std::Cr::construct_at[abi:v160000]<v8::Worker, char*, v8::Worker*>(v8::Worker*, char*&&) buildtools/third_party/libc++/trunk/include/__memory/construct_at.h:36:48 (d8+0x5e0593)
#5 construct<v8::Worker, char *, void, void> buildtools/third_party/libc++/trunk/include/__memory/allocator_traits.h:297:9 (d8+0x5e02ba) (BuildId: e7949a0603ee0889)
#6 __shared_ptr_emplace<char *> buildtools/third_party/libc++/trunk/include/__memory/shared_ptr.h:276:9 (d8+0x5e02ba)
#7 std::Cr::shared_ptr<v8::Worker> std::Cr::allocate_shared[abi:v160000]<v8::Worker, std::Cr::allocator<v8::Worker>, char*, void>(std::Cr::allocator<v8::Worker> const&, char*&&) buildtools/third_party/libc++/trunk/include/__memory/shared_ptr.h:937:55 (d8+0x5e02ba)
#8 make_shared<v8::Worker, char *, void> buildtools/third_party/libc++/trunk/include/__memory/shared_ptr.h:946:12 (d8+0x5c5ee4) (BuildId: e7949a0603ee0889)
#9 v8::Shell::WorkerNew(v8::FunctionCallbackInfo<v8::Value> const&) src/d8/d8.cc:2888:19 (d8+0x5c5ee4)
#10 v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo) src/api/api-arguments-inl.h:146:3 (d8+0x677b99) (BuildId: e7949a0603ee0889)
#11 v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<true>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, unsigned long*, int) src/builtins/builtins-api.cc:113:36 (d8+0x67658a) (BuildId: e7949a0603ee0889)
#12 v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) src/builtins/builtins-api.cc:144:5 (d8+0x675b9f) (BuildId: e7949a0603ee0889)
#13 v8::internal::Builtin_HandleApiCall(int, unsigned long*, v8::internal::Isolate*) src/builtins/builtins-api.cc:135:1 (d8+0x6756b3) (BuildId: e7949a0603ee0889)
#14 Builtins_AsyncFromSyncIteratorPrototypeThrow setup-isolate-deserialize.cc (d8+0x1d93f37)
#15 v8::internal::Execution::CallScript(v8::internal::Isolate*, v8::internal::Handle<v8::internal::JSFunction>, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>) src/execution/execution.cc:538:10 (d8+0x84fc92) (BuildId: e7949a0603ee0889)
#16 v8::Script::Run(v8::Local<v8::Context>, v8::Local<v8::Data>) src/api/api.cc:2272:7 (d8+0x5f6034) (BuildId: e7949a0603ee0889)
#17 v8::Script::Run(v8::Local<v8::Context>) src/api/api.cc:2199:10 (d8+0x5f57d0) (BuildId: e7949a0603ee0889)
#18 v8::Shell::ExecuteString(v8::Isolate*, v8::Local<v8::String>, v8::Local<v8::String>, v8::Shell::PrintResult, v8::Shell::ReportExceptions, v8::Shell::ProcessMessageQueue) src/d8/d8.cc:876:28 (d8+0x5b33d9) (BuildId: e7949a0603ee0889)
#19 v8::SourceGroup::Execute(v8::Isolate*) src/d8/d8.cc:4425:10 (d8+0x5cce73) (BuildId: e7949a0603ee0889)
#20 v8::Shell::RunMain(v8::Isolate*, bool) src/d8/d8.cc:5159:39 (d8+0x5d0e0e) (BuildId: e7949a0603ee0889)
#21 v8::Shell::Main(int, char**) src/d8/d8.cc:5939:22 (d8+0x5d3491) (BuildId: e7949a0603ee0889)
#22 main src/d8/d8.cc:6052:43 (d8+0x5d3bc0) (BuildId: e7949a0603ee0889)
Thread T9 'WorkerThread' (tid=5330, running) created by main thread at:
#0 pthread_create /b/s/w/ir/cache/builder/src/third_party/llvm/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1038:3 (d8+0x51498b) (BuildId: e7949a0603ee0889)
#1 v8::base::Thread::Start() src/base/platform/platform-posix.cc:1155:14 (d8+0x1fc7b66) (BuildId: e7949a0603ee0889)
#2 v8::Worker::StartWorkerThread(v8::Isolate*, std::Cr::shared_ptr<v8::Worker>) src/d8/d8.cc:4548:16 (d8+0x5c61b7) (BuildId: e7949a0603ee0889)
#3 v8::Shell::WorkerNew(v8::FunctionCallbackInfo<v8::Value> const&) src/d8/d8.cc:2894:10 (d8+0x5c602d) (BuildId: e7949a0603ee0889)
#4 v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo) src/api/api-arguments-inl.h:146:3 (d8+0x677b99) (BuildId: e7949a0603ee0889)
#5 v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<true>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, unsigned long*, int) src/builtins/builtins-api.cc:113:36 (d8+0x67658a) (BuildId: e7949a0603ee0889)
#6 v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) src/builtins/builtins-api.cc:144:5 (d8+0x675b9f) (BuildId: e7949a0603ee0889)
#7 v8::internal::Builtin_HandleApiCall(int, unsigned long*, v8::internal::Isolate*) src/builtins/builtins-api.cc:135:1 (d8+0x6756b3) (BuildId: e7949a0603ee0889)
#8 Builtins_AsyncFromSyncIteratorPrototypeThrow setup-isolate-deserialize.cc (d8+0x1d93f37)
#9 v8::internal::Execution::CallScript(v8::internal::Isolate*, v8::internal::Handle<v8::internal::JSFunction>, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>) src/execution/execution.cc:538:10 (d8+0x84fc92) (BuildId: e7949a0603ee0889)
#10 v8::Script::Run(v8::Local<v8::Context>, v8::Local<v8::Data>) src/api/api.cc:2272:7 (d8+0x5f6034) (BuildId: e7949a0603ee0889)
#11 v8::Script::Run(v8::Local<v8::Context>) src/api/api.cc:2199:10 (d8+0x5f57d0) (BuildId: e7949a0603ee0889)
#12 v8::Shell::ExecuteString(v8::Isolate*, v8::Local<v8::String>, v8::Local<v8::String>, v8::Shell::PrintResult, v8::Shell::ReportExceptions, v8::Shell::ProcessMessageQueue) src/d8/d8.cc:876:28 (d8+0x5b33d9) (BuildId: e7949a0603ee0889)
#13 v8::SourceGroup::Execute(v8::Isolate*) src/d8/d8.cc:4425:10 (d8+0x5cce73) (BuildId: e7949a0603ee0889)
#14 v8::Shell::RunMain(v8::Isolate*, bool) src/d8/d8.cc:5159:39 (d8+0x5d0e0e) (BuildId: e7949a0603ee0889)
#15 v8::Shell::Main(int, char**) src/d8/d8.cc:5939:22 (d8+0x5d3491) (BuildId: e7949a0603ee0889)
#16 main src/d8/d8.cc:6052:43 (d8+0x5d3bc0) (BuildId: e7949a0603ee0889)
SUMMARY: ThreadSanitizer: heap-use-after-free src/execution/stack-guard.cc:142:21 in v8::internal::StackGuard::RequestInterrupt(v8::internal::StackGuard::InterruptFlag)
==================
ThreadSanitizer: reported 8 warnings

View File

@ -0,0 +1,3 @@
Get<(v8::internal::AccessMode)1>
IsImpossible<(v8::internal::AccessMode)1>
IsWhite<(v8::internal::AccessMode)1>

View File

@ -0,0 +1,128 @@
==================
WARNING: ThreadSanitizer: data race (pid=28525)
Read of size 4 at 0x7ee001a41a40 by thread T2:
#0 Get<(v8::internal::AccessMode)1> src/heap/marking.h:73:11 (libv8.so+0x2092dea) (BuildId: 6097afaf9be13b02)
#1 IsImpossible<(v8::internal::AccessMode)1> src/heap/marking.h:363:24 (libv8.so+0x2092dea)
#2 IsWhite<(v8::internal::AccessMode)1> src/heap/marking.h:387:5 (libv8.so+0x2092dea)
#3 IsWhite src/heap/marking-state-inl.h:48:10 (libv8.so+0x2092dea)
#4 v8::internal::CopyAndForwardResult v8::internal::Scavenger::SemiSpaceCopyObject<v8::internal::CompressedHeapObjectSlot>(v8::internal::Map, v8::internal::CompressedHeapObjectSlot, v8::internal::HeapObject, int, v8::internal::ObjectFields) src/heap/scavenger-inl.h:138:5 (libv8.so+0x2092dea)
#5 heap::base::SlotCallbackResult v8::internal::Scavenger::EvacuateObjectDefault<v8::internal::CompressedHeapObjectSlot, (v8::internal::Scavenger::PromotionHeapChoice)0>(v8::internal::Map, v8::internal::CompressedHeapObjectSlot, v8::internal::HeapObject, int, v8::internal::ObjectFields) src/heap/scavenger-inl.h:269:14 (libv8.so+0x20923f5) (BuildId: 6097afaf9be13b02)
#6 heap::base::SlotCallbackResult v8::internal::Scavenger::EvacuateShortcutCandidate<v8::internal::CompressedHeapObjectSlot>(v8::internal::Map, v8::internal::CompressedHeapObjectSlot, v8::internal::ConsString, int) src/heap/scavenger-inl.h:357:10 (libv8.so+0x2091b95) (BuildId: 6097afaf9be13b02)
#7 heap::base::SlotCallbackResult v8::internal::Scavenger::EvacuateObject<v8::internal::CompressedHeapObjectSlot>(v8::internal::CompressedHeapObjectSlot, v8::internal::Map, v8::internal::HeapObject) src/heap/scavenger-inl.h:395:14 (libv8.so+0x20916da) (BuildId: 6097afaf9be13b02)
#8 heap::base::SlotCallbackResult v8::internal::Scavenger::ScavengeObject<v8::internal::CompressedHeapObjectSlot>(v8::internal::CompressedHeapObjectSlot, v8::internal::HeapObject) src/heap/scavenger-inl.h:447:10 (libv8.so+0x20913d6) (BuildId: 6097afaf9be13b02)
#9 VisitHeapObjectImpl<v8::internal::CompressedObjectSlot> src/heap/scavenger-inl.h:548:17 (libv8.so+0x20a813a) (BuildId: 6097afaf9be13b02)
#10 void v8::internal::ScavengeVisitor::VisitPointersImpl<v8::internal::CompressedObjectSlot>(v8::internal::HeapObject, v8::internal::CompressedObjectSlot, v8::internal::CompressedObjectSlot) src/heap/scavenger-inl.h:560:7 (libv8.so+0x20a813a)
#11 VisitPointers src/heap/scavenger-inl.h:505:10 (libv8.so+0x20a41ce) (BuildId: 6097afaf9be13b02)
#12 IteratePointers<v8::internal::ScavengeVisitor> src/objects/objects-body-descriptors-inl.h:128:6 (libv8.so+0x20a41ce)
#13 IterateBody<v8::internal::ScavengeVisitor> src/objects/objects-body-descriptors.h:135:5 (libv8.so+0x20a41ce)
#14 VisitConsString src/heap/objects-visiting-inl.h:119:1 (libv8.so+0x20a41ce)
#15 v8::internal::HeapVisitor<int, v8::internal::ScavengeVisitor>::VisitShortcutCandidate(v8::internal::Map, v8::internal::ConsString) src/heap/objects-visiting-inl.h:125:47 (libv8.so+0x20a41ce)
#16 v8::internal::HeapVisitor<int, v8::internal::ScavengeVisitor>::Visit(v8::internal::Map, v8::internal::HeapObject) src/heap/objects-visiting-inl.h:69:23 (libv8.so+0x20a0a78) (BuildId: 6097afaf9be13b02)
#17 Visit src/heap/objects-visiting-inl.h:53:10 (libv8.so+0x2087504) (BuildId: 6097afaf9be13b02)
#18 v8::internal::Scavenger::Process(v8::JobDelegate*) src/heap/scavenger.cc:732:24 (libv8.so+0x2087504)
#19 v8::internal::ScavengerCollector::JobTask::ProcessItems(v8::JobDelegate*, v8::internal::Scavenger*) src/heap/scavenger.cc:237:16 (libv8.so+0x2086e1a) (BuildId: 6097afaf9be13b02)
#20 v8::internal::ScavengerCollector::JobTask::Run(v8::JobDelegate*) src/heap/scavenger.cc:216:5 (libv8.so+0x2086b77) (BuildId: 6097afaf9be13b02)
#21 v8::platform::DefaultJobWorker::Run() src/libplatform/default-job.h:147:18 (libv8_libplatform.so+0x1b2fb) (BuildId: c4a8dbf0cb01439d)
#22 v8::platform::DefaultWorkerThreadsTaskRunner::WorkerThread::Run() src/libplatform/default-worker-threads-task-runner.cc:73:11 (libv8_libplatform.so+0x1ee10) (BuildId: c4a8dbf0cb01439d)
#23 NotifyStartedAndRun src/base/platform/platform.h:596:5 (libv8_libbase.so+0x56a88) (BuildId: f47d114a6a0872c1)
#24 v8::base::ThreadEntry(void*) src/base/platform/platform-posix.cc:1123:11 (libv8_libbase.so+0x56a88)
Previous atomic write of size 4 at 0x7ee001a41a40 by main thread (mutexes: write M0, write M1):
#0 __cxx_atomic_compare_exchange_strong<int> buildtools/third_party/libc++/trunk/include/atomic:978:12 (libv8.so+0x1e32056) (BuildId: 6097afaf9be13b02)
#1 compare_exchange_strong buildtools/third_party/libc++/trunk/include/atomic:1566:17 (libv8.so+0x1e32056)
#2 atomic_compare_exchange_strong_explicit<int> buildtools/third_party/libc++/trunk/include/atomic:2033:17 (libv8.so+0x1e32056)
#3 Release_CompareAndSwap src/base/atomicops.h:166:3 (libv8.so+0x1e32056)
#4 Release_CompareAndSwap<unsigned int> src/base/atomic-utils.h:127:43 (libv8.so+0x1e32056)
#5 bool v8::base::AsAtomicImpl<int>::SetBits<unsigned int>(unsigned int*, unsigned int, unsigned int) src/base/atomic-utils.h:164:19 (libv8.so+0x1e32056)
#6 Set<(v8::internal::AccessMode)0> src/heap/marking.h:68:10 (libv8.so+0x1fd5322) (BuildId: 6097afaf9be13b02)
#7 GreyToBlack<(v8::internal::AccessMode)0> src/heap/marking.h:433:50 (libv8.so+0x1fd5322)
#8 GreyToBlack src/heap/marking-state-inl.h:78:8 (libv8.so+0x1fd5322)
#9 WhiteToBlack src/heap/marking-state-inl.h:71:30 (libv8.so+0x1fd5322)
#10 v8::internal::IncrementalMarking::TransferColor(v8::internal::HeapObject, v8::internal::HeapObject) src/heap/incremental-marking-inl.h:28:44 (libv8.so+0x1fd5322)
#11 v8::internal::Scavenger::MigrateObject(v8::internal::Map, v8::internal::HeapObject, v8::internal::HeapObject, int, v8::internal::Scavenger::PromotionHeapChoice) src/heap/scavenger-inl.h:116:36 (libv8.so+0x209455c) (BuildId: 6097afaf9be13b02)
#12 v8::internal::CopyAndForwardResult v8::internal::Scavenger::SemiSpaceCopyObject<v8::internal::CompressedHeapObjectSlot>(v8::internal::Map, v8::internal::CompressedHeapObjectSlot, v8::internal::HeapObject, int, v8::internal::ObjectFields) src/heap/scavenger-inl.h:140:9 (libv8.so+0x2092e84) (BuildId: 6097afaf9be13b02)
#13 heap::base::SlotCallbackResult v8::internal::Scavenger::EvacuateObjectDefault<v8::internal::CompressedHeapObjectSlot, (v8::internal::Scavenger::PromotionHeapChoice)0>(v8::internal::Map, v8::internal::CompressedHeapObjectSlot, v8::internal::HeapObject, int, v8::internal::ObjectFields) src/heap/scavenger-inl.h:269:14 (libv8.so+0x20923f5) (BuildId: 6097afaf9be13b02)
#14 heap::base::SlotCallbackResult v8::internal::Scavenger::EvacuateObject<v8::internal::CompressedHeapObjectSlot>(v8::internal::CompressedHeapObjectSlot, v8::internal::Map, v8::internal::HeapObject) src/heap/scavenger-inl.h:412:14 (libv8.so+0x20917b7) (BuildId: 6097afaf9be13b02)
#15 heap::base::SlotCallbackResult v8::internal::Scavenger::ScavengeObject<v8::internal::CompressedHeapObjectSlot>(v8::internal::CompressedHeapObjectSlot, v8::internal::HeapObject) src/heap/scavenger-inl.h:447:10 (libv8.so+0x20913d6) (BuildId: 6097afaf9be13b02)
#16 VisitHeapObjectImpl<v8::internal::CompressedObjectSlot> src/heap/scavenger-inl.h:548:17 (libv8.so+0x20a813a) (BuildId: 6097afaf9be13b02)
#17 void v8::internal::ScavengeVisitor::VisitPointersImpl<v8::internal::CompressedObjectSlot>(v8::internal::HeapObject, v8::internal::CompressedObjectSlot, v8::internal::CompressedObjectSlot) src/heap/scavenger-inl.h:560:7 (libv8.so+0x20a813a)
#18 VisitPointers src/heap/scavenger-inl.h:505:10 (libv8.so+0x20a4642) (BuildId: 6097afaf9be13b02)
#19 IteratePointers<v8::internal::ScavengeVisitor> src/objects/objects-body-descriptors-inl.h:128:6 (libv8.so+0x20a4642)
#20 IterateBody<v8::internal::ScavengeVisitor> src/objects/objects-body-descriptors-inl.h:234:5 (libv8.so+0x20a4642)
#21 v8::internal::HeapVisitor<int, v8::internal::ScavengeVisitor>::VisitJSObjectFast(v8::internal::Map, v8::internal::JSObject) src/heap/objects-visiting-inl.h:163:3 (libv8.so+0x20a4642)
#22 v8::internal::HeapVisitor<int, v8::internal::ScavengeVisitor>::Visit(v8::internal::Map, v8::internal::HeapObject) src/heap/objects-visiting-inl.h:74:23 (libv8.so+0x20a0971) (BuildId: 6097afaf9be13b02)
#23 Visit src/heap/objects-visiting-inl.h:53:10 (libv8.so+0x2087504) (BuildId: 6097afaf9be13b02)
#24 v8::internal::Scavenger::Process(v8::JobDelegate*) src/heap/scavenger.cc:732:24 (libv8.so+0x2087504)
#25 v8::internal::ScavengerCollector::JobTask::ProcessItems(v8::JobDelegate*, v8::internal::Scavenger*) src/heap/scavenger.cc:237:16 (libv8.so+0x2086e1a) (BuildId: 6097afaf9be13b02)
#26 v8::internal::ScavengerCollector::JobTask::Run(v8::JobDelegate*) src/heap/scavenger.cc:211:5 (libv8.so+0x2086941) (BuildId: 6097afaf9be13b02)
#27 v8::platform::DefaultJobState::Join() src/libplatform/default-job.cc:141:16 (libv8_libplatform.so+0x18f5e) (BuildId: c4a8dbf0cb01439d)
#28 v8::platform::DefaultJobHandle::Join() src/libplatform/default-job.cc:238:11 (libv8_libplatform.so+0x19b57) (BuildId: c4a8dbf0cb01439d)
#29 v8::internal::ScavengerCollector::CollectGarbage() src/heap/scavenger.cc:396:13 (libv8.so+0x2089742) (BuildId: 6097afaf9be13b02)
#30 v8::internal::Heap::Scavenge() src/heap/heap.cc:2656:25 (libv8.so+0x1f446e2) (BuildId: 6097afaf9be13b02)
#31 v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::internal::GarbageCollectionReason, char const*) src/heap/heap.cc:2257:5 (libv8.so+0x1f3f7d9) (BuildId: 6097afaf9be13b02)
#32 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) src/heap/heap.cc:1714:13 (libv8.so+0x1f3beda) (BuildId: 6097afaf9be13b02)
#33 v8::internal::HeapAllocator::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) src/heap/heap-allocator.cc:95:14 (libv8.so+0x1f299f0) (BuildId: 6097afaf9be13b02)
#34 v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) src/heap/heap-allocator.cc:110:7 (libv8.so+0x1f29ad0) (BuildId: 6097afaf9be13b02)
#35 AllocateRawWith<(v8::internal::HeapAllocator::AllocationRetryMode)1> src/heap/heap-allocator-inl.h:237:16 (libv8.so+0x1ed3697) (BuildId: 6097afaf9be13b02)
#36 v8::internal::Factory::NewFillerObject(int, v8::internal::AllocationAlignment, v8::internal::AllocationType, v8::internal::AllocationOrigin) src/heap/factory.cc:401:36 (libv8.so+0x1ed3697)
#37 v8::internal::__RT_impl_Runtime_AllocateInYoungGeneration(v8::internal::Arguments<(v8::internal::ArgumentsType)0>, v8::internal::Isolate*) src/runtime/runtime-internal.cc:477:31 (libv8.so+0x29494b4) (BuildId: 6097afaf9be13b02)
#38 v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) src/runtime/runtime-internal.cc:449:1 (libv8.so+0x2948dfa) (BuildId: 6097afaf9be13b02)
#39 Builtins_CEntry_Return1_ArgvOnStack_NoBuiltinExit setup-isolate-deserialize.cc (libv8.so+0x1122afe) (BuildId: 6097afaf9be13b02)
#40 v8::internal::Execution::CallScript(v8::internal::Isolate*, v8::internal::Handle<v8::internal::JSFunction>, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>) src/execution/execution.cc:538:10 (libv8.so+0x1d7be35) (BuildId: 6097afaf9be13b02)
#41 v8::Script::Run(v8::Local<v8::Context>, v8::Local<v8::Data>) src/api/api.cc:2272:7 (libv8.so+0x189aad3) (BuildId: 6097afaf9be13b02)
#42 v8::Script::Run(v8::Local<v8::Context>) src/api/api.cc:2199:10 (libv8.so+0x189a1a0) (BuildId: 6097afaf9be13b02)
#43 v8::Shell::ExecuteString(v8::Isolate*, v8::Local<v8::String>, v8::Local<v8::String>, v8::Shell::PrintResult, v8::Shell::ReportExceptions, v8::Shell::ProcessMessageQueue) src/d8/d8.cc:876:28 (d8+0x14e4fd) (BuildId: a8447ccee3b50949)
#44 v8::SourceGroup::Execute(v8::Isolate*) src/d8/d8.cc:4367:12 (d8+0x1697d7) (BuildId: a8447ccee3b50949)
#45 v8::Shell::RunMain(v8::Isolate*, bool) src/d8/d8.cc:5159:39 (d8+0x16e112) (BuildId: a8447ccee3b50949)
#46 v8::Shell::Main(int, char**) src/d8/d8.cc:5960:18 (d8+0x170d30) (BuildId: a8447ccee3b50949)
#47 main src/d8/d8.cc:6052:43 (d8+0x171350) (BuildId: a8447ccee3b50949)
Mutex M0 (0x7b3c000000a8) created at:
#0 pthread_mutex_init /b/s/w/ir/cache/builder/src/third_party/llvm/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1331:3 (d8+0xae510) (BuildId: a8447ccee3b50949)
#1 InitializeRecursiveNativeHandle src/base/platform/mutex.cc:112:12 (libv8_libbase.so+0x426f4) (BuildId: f47d114a6a0872c1)
#2 v8::base::RecursiveMutex::RecursiveMutex() src/base/platform/mutex.cc:187:3 (libv8_libbase.so+0x426f4)
#3 v8::internal::IsolateSafepoint::IsolateSafepoint(v8::internal::Heap*) src/heap/safepoint.cc:29:19 (libv8.so+0x2082798) (BuildId: 6097afaf9be13b02)
#4 make_unique<v8::internal::IsolateSafepoint, v8::internal::Heap *> buildtools/third_party/libc++/trunk/include/__memory/unique_ptr.h:670:30 (libv8.so+0x1f2d4ae) (BuildId: 6097afaf9be13b02)
#5 v8::internal::Heap::Heap() src/heap/heap.cc:232:18 (libv8.so+0x1f2d4ae)
#6 v8::internal::Isolate::Isolate(std::Cr::unique_ptr<v8::internal::IsolateAllocator, std::Cr::default_delete<v8::internal::IsolateAllocator>>, bool) src/execution/isolate.cc:3436:10 (libv8.so+0x1dbb88c) (BuildId: 6097afaf9be13b02)
#7 Allocate src/execution/isolate.cc:3354:25 (libv8.so+0x1dba331) (BuildId: 6097afaf9be13b02)
#8 v8::internal::Isolate::New() src/execution/isolate.cc:3332:22 (libv8.so+0x1dba331)
#9 Allocate src/api/api.cc:8976:37 (libv8.so+0x191bcd7) (BuildId: 6097afaf9be13b02)
#10 v8::Isolate::New(v8::Isolate::CreateParams const&) src/api/api.cc:9084:25 (libv8.so+0x191bcd7)
#11 v8::Shell::Main(int, char**) src/d8/d8.cc:5844:22 (d8+0x1704c9) (BuildId: a8447ccee3b50949)
#12 main src/d8/d8.cc:6052:43 (d8+0x171350) (BuildId: a8447ccee3b50949)
Mutex M1 (0x7bc00000df20) created at:
#0 pthread_mutex_init /b/s/w/ir/cache/builder/src/third_party/llvm/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1331:3 (d8+0xae510) (BuildId: a8447ccee3b50949)
#1 InitializeNativeHandle src/base/platform/mutex.cc:94:12 (libv8_libbase.so+0x41f34) (BuildId: f47d114a6a0872c1)
#2 v8::base::Mutex::Mutex() src/base/platform/mutex.cc:152:3 (libv8_libbase.so+0x41f34)
#3 v8::internal::Heap::Heap() src/heap/heap.cc:228:7 (libv8.so+0x1f2d599) (BuildId: 6097afaf9be13b02)
#4 v8::internal::Isolate::Isolate(std::Cr::unique_ptr<v8::internal::IsolateAllocator, std::Cr::default_delete<v8::internal::IsolateAllocator>>, bool) src/execution/isolate.cc:3436:10 (libv8.so+0x1dbb88c) (BuildId: 6097afaf9be13b02)
#5 Allocate src/execution/isolate.cc:3354:25 (libv8.so+0x1dba331) (BuildId: 6097afaf9be13b02)
#6 v8::internal::Isolate::New() src/execution/isolate.cc:3332:22 (libv8.so+0x1dba331)
#7 Allocate src/api/api.cc:8976:37 (libv8.so+0x191bcd7) (BuildId: 6097afaf9be13b02)
#8 v8::Isolate::New(v8::Isolate::CreateParams const&) src/api/api.cc:9084:25 (libv8.so+0x191bcd7)
#9 v8::Shell::Main(int, char**) src/d8/d8.cc:5844:22 (d8+0x1704c9) (BuildId: a8447ccee3b50949)
#10 main src/d8/d8.cc:6052:43 (d8+0x171350) (BuildId: a8447ccee3b50949)
Thread T2 'V8 DefaultWorke' (tid=28528, running) created by main thread at:
#0 pthread_create /b/s/w/ir/cache/builder/src/third_party/llvm/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1038:3 (d8+0xacb9b) (BuildId: a8447ccee3b50949)
#1 v8::base::Thread::Start() src/base/platform/platform-posix.cc:1155:14 (libv8_libbase.so+0x5691a) (BuildId: f47d114a6a0872c1)
#2 v8::platform::DefaultWorkerThreadsTaskRunner::WorkerThread::WorkerThread(v8::platform::DefaultWorkerThreadsTaskRunner*) src/libplatform/default-worker-threads-task-runner.cc:66:3 (libv8_libplatform.so+0x1ecdf) (BuildId: c4a8dbf0cb01439d)
#3 make_unique<v8::platform::DefaultWorkerThreadsTaskRunner::WorkerThread, v8::platform::DefaultWorkerThreadsTaskRunner *> buildtools/third_party/libc++/trunk/include/__memory/unique_ptr.h:670:30 (libv8_libplatform.so+0x1e6ff) (BuildId: c4a8dbf0cb01439d)
#4 v8::platform::DefaultWorkerThreadsTaskRunner::DefaultWorkerThreadsTaskRunner(unsigned int, double (*)()) src/libplatform/default-worker-threads-task-runner.cc:16:28 (libv8_libplatform.so+0x1e6ff)
#5 construct_at<v8::platform::DefaultWorkerThreadsTaskRunner, const int &, double (*)(), v8::platform::DefaultWorkerThreadsTaskRunner *> buildtools/third_party/libc++/trunk/include/__memory/construct_at.h:36:48 (libv8_libplatform.so+0x1c051) (BuildId: c4a8dbf0cb01439d)
#6 construct<v8::platform::DefaultWorkerThreadsTaskRunner, const int &, double (*)(), void, void> buildtools/third_party/libc++/trunk/include/__memory/allocator_traits.h:297:9 (libv8_libplatform.so+0x1c051)
#7 __shared_ptr_emplace<const int &, double (*)()> buildtools/third_party/libc++/trunk/include/__memory/shared_ptr.h:276:9 (libv8_libplatform.so+0x1c051)
#8 allocate_shared<v8::platform::DefaultWorkerThreadsTaskRunner, std::Cr::allocator<v8::platform::DefaultWorkerThreadsTaskRunner>, const int &, double (*)(), void> buildtools/third_party/libc++/trunk/include/__memory/shared_ptr.h:937:55 (libv8_libplatform.so+0x1c051)
#9 make_shared<v8::platform::DefaultWorkerThreadsTaskRunner, const int &, double (*)(), void> buildtools/third_party/libc++/trunk/include/__memory/shared_ptr.h:946:12 (libv8_libplatform.so+0x1c051)
#10 v8::platform::DefaultPlatform::EnsureBackgroundTaskRunnerInitialized() src/libplatform/default-platform.cc:132:7 (libv8_libplatform.so+0x1c051)
#11 v8::platform::DefaultPlatform::DefaultPlatform(int, v8::platform::IdleTaskSupport, std::Cr::unique_ptr<v8::TracingController, std::Cr::default_delete<v8::TracingController>>) src/libplatform/default-platform.cc:108:5 (libv8_libplatform.so+0x1bf94) (BuildId: c4a8dbf0cb01439d)
#12 make_unique<v8::platform::DefaultPlatform, int &, v8::platform::IdleTaskSupport &, std::Cr::unique_ptr<v8::TracingController, std::Cr::default_delete<v8::TracingController> > > buildtools/third_party/libc++/trunk/include/__memory/unique_ptr.h:670:30 (libv8_libplatform.so+0x1b3f4) (BuildId: c4a8dbf0cb01439d)
#13 v8::platform::NewDefaultPlatform(int, v8::platform::IdleTaskSupport, v8::platform::InProcessStackDumping, std::Cr::unique_ptr<v8::TracingController, std::Cr::default_delete<v8::TracingController>>) src/libplatform/default-platform.cc:53:19 (libv8_libplatform.so+0x1b3f4)
#14 v8::Shell::Main(int, char**) src/d8/d8.cc:5747:16 (d8+0x16ffee) (BuildId: a8447ccee3b50949)
#15 main src/d8/d8.cc:6052:43 (d8+0x171350) (BuildId: a8447ccee3b50949)
SUMMARY: ThreadSanitizer: data race src/heap/marking.h:73:11 in Get<(v8::internal::AccessMode)1>
==================
ThreadSanitizer: reported 1 warnings

View File

@ -0,0 +1,39 @@
# Copyright 2018 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import faulthandler
import logging
import time
from . import base
class TimeoutProc(base.TestProcObserver):
@staticmethod
def create(options):
if not options.total_timeout_sec:
return None
return TimeoutProc(options.total_timeout_sec)
def __init__(self, duration_sec):
super(TimeoutProc, self).__init__()
self._duration_sec = duration_sec
self._start = time.time()
def _on_next_test(self, test):
self.__on_event()
def _on_result_for(self, test, result):
self.__on_event()
def _on_heartbeat(self):
self.__on_event()
def __on_event(self):
if not self.is_stopped:
if time.time() - self._start > self._duration_sec:
logging.info('Total timeout reached.')
self.stop()
if logging.getLogger().isEnabledFor(logging.INFO):
faulthandler.dump_traceback()

View File

@ -0,0 +1,110 @@
#!/usr/bin/env python3
# Copyright 2020 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import heapq
import logging
import os
import platform
import re
import signal
import subprocess
# Base dir of the build products for Release and Debug.
OUT_DIR = os.path.abspath(
os.path.join(os.path.dirname(__file__), '..', '..', '..', 'out'))
def list_processes_linux():
"""Returns list of tuples (pid, command) of processes running in the same out
directory as this checkout.
"""
if platform.system() != 'Linux':
return []
try:
cmd = 'pgrep -fa %s' % OUT_DIR
output = subprocess.check_output(cmd, shell=True, text=True) or ''
processes = [
(int(line.split()[0]), line[line.index(OUT_DIR):])
for line in output.splitlines()
]
# Filter strange process with name as out dir.
return [p for p in processes if p[1] != OUT_DIR]
except subprocess.CalledProcessError as e:
# Return code 1 means no processes found.
if e.returncode != 1:
# TODO(https://crbug.com/v8/13101): Remove after investigation.
logging.exception('Fetching process list failed.')
return []
def kill_processes_linux():
"""Kill stray processes on the system that started in the same out directory.
All swarming tasks share the same out directory location.
"""
if platform.system() != 'Linux':
return
for pid, cmd in list_processes_linux():
try:
logging.warning('Attempting to kill %d - %s', pid, cmd)
os.kill(pid, signal.SIGKILL)
except:
logging.exception('Failed to kill process')
def base_test_record(test, result, run):
record = {
'expected': test.expected_outcomes,
'flags': result.cmd.args,
'framework_name': test.framework_name,
'name': test.full_name,
'random_seed': test.random_seed,
'run': run + 1,
'shard_id': test.shard_id,
'shard_count': test.shard_count,
'target_name': test.shell,
'variant': test.variant,
'variant_flags': test.variant_flags,
}
if result.output:
record.update(
exit_code=result.output.exit_code,
duration=result.output.duration,
max_rss=result.output.stats.max_rss,
max_vms=result.output.stats.max_vms,
)
return record
class FixedSizeTopList():
"""Utility collection for gathering a fixed number of elements with the
biggest value for the given key. It employs a heap from which we pop the
smallest element when the collection is 'full'.
If you need a reversed behaviour (collect min values) just provide an
inverse key."""
def __init__(self, size, key=None):
self.size = size
self.key = key or (lambda x: x)
self.data = []
self.discriminator = 0
def add(self, elem):
elem_k = self.key(elem)
heapq.heappush(self.data, (elem_k, self.extra_key(), elem))
if len(self.data) > self.size:
heapq.heappop(self.data)
def extra_key(self):
# Avoid key clash in tuples sent to the heap.
# We want to avoid comparisons on the last element of the tuple
# since those elements might not be comparable.
self.discriminator += 1
return self.discriminator
def as_list(self):
original_data = [rec for (_, _, rec) in self.data]
return sorted(original_data, key=self.key, reverse=True)

View File

@ -0,0 +1,70 @@
#!/usr/bin/env python3
# Copyright 2020 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
import sys
import unittest
TOOLS_PATH = os.path.dirname(
os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
sys.path.append(TOOLS_PATH)
from testrunner.testproc.util import FixedSizeTopList
class TestOrderedFixedSizeList(unittest.TestCase):
def test_empty(self):
ofsl = FixedSizeTopList(3)
self.assertEqual(ofsl.as_list(), [])
def test_12(self):
ofsl = FixedSizeTopList(3)
ofsl.add(1)
ofsl.add(2)
self.assertEqual(ofsl.as_list(), [2, 1])
def test_4321(self):
ofsl = FixedSizeTopList(3)
ofsl.add(4)
ofsl.add(3)
ofsl.add(2)
ofsl.add(1)
data = ofsl.as_list()
self.assertEqual(data, [4, 3, 2])
def test_544321(self):
ofsl = FixedSizeTopList(4)
ofsl.add(5)
ofsl.add(4)
ofsl.add(4)
ofsl.add(3)
ofsl.add(2)
ofsl.add(1)
data = ofsl.as_list()
self.assertEqual(data, [5, 4, 4, 3])
def test_withkey(self):
ofsl = FixedSizeTopList(3, key=lambda x: x['val'])
ofsl.add({'val': 4, 'something': 'four'})
ofsl.add({'val': 3, 'something': 'three'})
ofsl.add({'val': -1, 'something': 'minusone'})
ofsl.add({'val': 5, 'something': 'five'})
ofsl.add({'val': 0, 'something': 'zero'})
data = [e['something'] for e in ofsl.as_list()]
self.assertEqual(data, ['five', 'four', 'three'])
def test_withkeyclash(self):
# Test that a key clash does not throw exeption
ofsl = FixedSizeTopList(2, key=lambda x: x['val'])
ofsl.add({'val': 2, 'something': 'two'})
ofsl.add({'val': 2, 'something': 'two'})
ofsl.add({'val': 0, 'something': 'zero'})
data = [e['something'] for e in ofsl.as_list()]
self.assertEqual(data, ['two', 'two'])
if __name__ == '__main__':
unittest.main()

View File

@ -0,0 +1,67 @@
# Copyright 2018 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from . import base
STANDARD_VARIANT = set(["default"])
class VariantProc(base.TestProcProducer):
"""Processor creating variants.
For each test it keeps generator that returns variant, flags and id suffix.
It produces variants one at a time, so it's waiting for the result of one
variant to create another variant of the same test.
It maintains the order of the variants passed to the init.
There are some cases when particular variant of the test is not valid. To
ignore subtests like that, StatusFileFilterProc should be placed somewhere
after the VariantProc.
"""
def __init__(self, variants):
super(VariantProc, self).__init__('VariantProc')
self._requirement = base.DROP_RESULT
self._next_variant = {}
self._variant_gens = {}
self._variants = variants
def test_suffix(self, test):
return test.variant
def _next_test(self, test):
gen = self._variants_gen(test)
self._next_variant[test.procid] = gen
return self._try_send_new_subtest(test, gen)
def _result_for(self, test, subtest, result):
# The generator might have been removed after cycling through all subtests
# below. If some of the subtests are heavy, they get buffered and return
# their results later.
gen = self._next_variant.get(test.procid)
if not gen or not self._try_send_new_subtest(test, gen):
self._send_result(test, None)
def _try_send_new_subtest(self, test, variants_gen):
for variant, flags, suffix in variants_gen:
subtest = test.create_subtest(
self, '%s-%s' % (variant, suffix), variant=variant, flags=flags)
if self._send_test(subtest):
return True
del self._next_variant[test.procid]
return False
def _variants_gen(self, test):
"""Generator producing (variant, flags, procid suffix) tuples."""
return self._get_variants_gen(test).gen(test)
def _get_variants_gen(self, test):
key = test.suite.name
variants_gen = self._variant_gens.get(key)
if not variants_gen:
variants_gen = test.suite.get_variants_gen(self._variants)
self._variant_gens[key] = variants_gen
return variants_gen

View File

@ -0,0 +1,176 @@
#!/usr/bin/env python3
# Copyright 2019 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
import sys
import unittest
# Needed because the test runner contains relative imports.
TOOLS_PATH = os.path.dirname(
os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
sys.path.append(TOOLS_PATH)
from testrunner.testproc import base
from testrunner.testproc.variant import VariantProc
class FakeResultObserver(base.TestProcObserver):
def __init__(self):
super(FakeResultObserver, self).__init__()
self.results = set()
def result_for(self, test, result):
self.results.add((test, result))
class FakeFilter(base.TestProcFilter):
def __init__(self, filter_predicate):
super(FakeFilter, self).__init__()
self._filter_predicate = filter_predicate
self.loaded = set()
self.call_counter = 0
def next_test(self, test):
self.call_counter += 1
if self._filter_predicate(test):
return False
self.loaded.add(test)
return True
class FakeSuite(object):
def __init__(self, name):
self.name = name
class FakeTest(object):
def __init__(self, procid):
self.suite = FakeSuite("fake_suite")
self.procid = procid
self.keep_output = False
def create_subtest(self, proc, subtest_id, **kwargs):
variant = kwargs['variant']
variant.origin = self
return variant
class FakeVariantGen(object):
def __init__(self, variants):
self._variants = variants
def gen(self, test):
for variant in self._variants:
yield variant, [], "fake_suffix"
class TestVariantProcLoading(unittest.TestCase):
def setUp(self):
self.test = FakeTest("test")
def _simulate_proc(self, variants):
"""Expects the list of instantiated test variants to load into the
VariantProc."""
# Creates a Variant processor containing the possible types of test
# variants.
self.variant_proc = VariantProc(variants=["to_filter", "to_load"])
self.variant_proc._variant_gens = {"fake_suite": FakeVariantGen(variants)}
# FakeFilter only lets tests passing the predicate to be loaded.
self.fake_filter = FakeFilter(
filter_predicate=(lambda t: t.procid == "to_filter"))
# FakeResultObserver to verify that VariantProc calls result_for correctly.
self.fake_result_observer = FakeResultObserver()
# Links up processors together to form a test processing pipeline.
self.variant_proc._prev_proc = self.fake_result_observer
self.fake_filter._prev_proc = self.variant_proc
self.variant_proc._next_proc = self.fake_filter
# Injects the test into the VariantProc
is_loaded = self.variant_proc.next_test(self.test)
# Verifies the behavioral consistency by using the instrumentation in
# FakeFilter
loaded_variants = list(self.fake_filter.loaded)
self.assertEqual(is_loaded, any(loaded_variants))
return self.fake_filter.loaded, self.fake_filter.call_counter
def test_filters_first_two_variants(self):
variants = [
FakeTest('to_filter'),
FakeTest('to_filter'),
FakeTest('to_load'),
FakeTest('to_load'),
]
expected_load_results = {variants[2]}
load_results, call_count = self._simulate_proc(variants)
self.assertSetEqual(expected_load_results, load_results)
self.assertEqual(call_count, 3)
def test_stops_loading_after_first_successful_load(self):
variants = [
FakeTest('to_load'),
FakeTest('to_load'),
FakeTest('to_filter'),
]
expected_load_results = {variants[0]}
loaded_tests, call_count = self._simulate_proc(variants)
self.assertSetEqual(expected_load_results, loaded_tests)
self.assertEqual(call_count, 1)
def test_return_result_when_out_of_variants(self):
variants = [
FakeTest('to_filter'),
FakeTest('to_load'),
]
self._simulate_proc(variants)
self.variant_proc.result_for(variants[1], None)
expected_results = {(self.test, None)}
self.assertSetEqual(expected_results, self.fake_result_observer.results)
def test_return_result_after_running_variants(self):
variants = [
FakeTest('to_filter'),
FakeTest('to_load'),
FakeTest('to_load'),
]
self._simulate_proc(variants)
self.variant_proc.result_for(variants[1], None)
self.assertSetEqual(set(variants[1:]), self.fake_filter.loaded)
self.variant_proc.result_for(variants[2], None)
expected_results = {(self.test, None)}
self.assertSetEqual(expected_results, self.fake_result_observer.results)
if __name__ == '__main__':
unittest.main()