Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Issue 2602123002: Fix the following tsan errors: (Closed)

Created:
3 years, 11 months ago by siva
Modified:
3 years, 11 months ago
Reviewers:
regis
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Fix the following tsan errors: 1. Race updating the allocation stats for a class WARNING: ThreadSanitizer: data race (pid=16346) Write of size 8 at 0x7bac00011930 by thread T4: #0 dart::AllocStats<long>::AddOld(long, long) /usr/local/google/home/asiva/workspace/dart-ws3/sdk/out/DebugX64/../../runtime/vm/class_table.h:56 (dart+0x000000769278) #1 dart::ClassTable::UpdateAllocatedOld(long, long) /usr/local/google/home/asiva/workspace/dart-ws3/sdk/out/DebugX64/../../runtime/vm/class_table.cc:423 (dart+0x00000076923a) #2 dart::Object::Allocate(long, long, dart::Heap::Space) /usr/local/google/home/asiva/workspace/dart-ws3/sdk/out/DebugX64/../../runtime/vm/object.cc:1880 (dart+0x00000092ddff) #3 dart::Array::New(long, long, dart::Heap::Space) /usr/local/google/home/asiva/workspace/dart-ws3/sdk/out/DebugX64/../../runtime/vm/object.cc:21586 (dart+0x00000098d3fd) Previous write of size 8 at 0x7bac00011930 by thread T3: #0 dart::AllocStats<long>::AddOld(long, long) /usr/local/google/home/asiva/workspace/dart-ws3/sdk/out/DebugX64/../../runtime/vm/class_table.h:56 (dart+0x000000769278) #1 dart::ClassTable::UpdateAllocatedOld(long, long) /usr/local/google/home/asiva/workspace/dart-ws3/sdk/out/DebugX64/../../runtime/vm/class_table.cc:423 (dart+0x00000076923a) #2 dart::Object::Allocate(long, long, dart::Heap::Space) /usr/local/google/home/asiva/workspace/dart-ws3/sdk/out/DebugX64/../../runtime/vm/object.cc:1880 (dart+0x00000092ddff) #3 dart::Array::New(long, long, dart::Heap::Space) /usr/local/google/home/asiva/workspace/dart-ws3/sdk/out/DebugX64/../../runtime/vm/object.cc:21586 (dart+0x00000098d3fd) #4 dart::Array::New(long, dart::Heap::Space) /usr/local/google/home/asiva/workspace/dart-ws3/sdk/out/DebugX64/../../runtime/vm/object.cc:21575 (dart+0x000000932f6d) 2. Race while updating c++ table entry into Object::builtin_vtables_ WARNING: ThreadSanitizer: data race (pid=16346) Atomic write of size 8 at 0x00000210c970 by main thread: #0 __tsan_atomic64_compare_exchange_val <null> (dart+0x0000005bad8a) #1 dart::AtomicOperations::CompareAndSwapWord(unsigned long*, unsigned long, unsigned long) /usr/local/google/home/asiva/workspace/dart-ws3/sdk/out/DebugX64/../../runtime/vm/atomic_linux.h:63 (dart+0x00000074b744) #2 dart::ClassTable::Register(dart::Class const&) /usr/local/google/home/asiva/workspace/dart-ws3/sdk/out/DebugX64/../../runtime/vm/class_table.cc:127 (dart+0x000000767cbc) #3 dart::Isolate::RegisterClass(dart::Class const&) /usr/local/google/home/asiva/workspace/dart-ws3/sdk/out/DebugX64/../../runtime/vm/isolate.cc:170 (dart+0x0000008e0046) #4 dart::RawClass* dart::Class::New<dart::Array>() /usr/local/google/home/asiva/workspace/dart-ws3/sdk/out/DebugX64/../../runtime/vm/object.cc:2037 (dart+0x000000931055) Previous read of size 8 at 0x00000210c970 by thread T3: #0 dart::ClassTable::Register(dart::Class const&) /usr/local/google/home/asiva/workspace/dart-ws3/sdk/out/DebugX64/../../runtime/vm/class_table.cc:130 (dart+0x000000767cc9) #1 dart::Isolate::RegisterClass(dart::Class const&) /usr/local/google/home/asiva/workspace/dart-ws3/sdk/out/DebugX64/../../runtime/vm/isolate.cc:170 (dart+0x0000008e0046) #2 dart::RawClass* dart::Class::New<dart::Array>() /usr/local/google/home/asiva/workspace/dart-ws3/sdk/out/DebugX64/../../runtime/vm/object.cc:2037 (dart+0x000000931055) BUG= R=regis@google.com Committed: https://github.com/dart-lang/sdk/commit/d77809e15fded186470ae6813643ca4a5ba12a37

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+10 lines, -7 lines) Patch
M runtime/vm/class_table.h View 3 chunks +5 lines, -4 lines 0 comments Download
M runtime/vm/class_table.cc View 1 chunk +5 lines, -3 lines 0 comments Download

Messages

Total messages: 5 (2 generated)
siva
3 years, 11 months ago (2016-12-29 20:29:07 UTC) #2
regis
lgtm
3 years, 11 months ago (2016-12-29 20:45:19 UTC) #3
siva
3 years, 11 months ago (2016-12-29 21:21:03 UTC) #5
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
d77809e15fded186470ae6813643ca4a5ba12a37 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698