1) Change AsyncSocket's SignalReadEvent and SignalWriteEvent's thread mode to multi_threaded_local as they can be accessed from different threads.
2) Protect NATServer::TransEntry::whitelist.
3) Protect PhysicalSocket:error_.
Detail failures can be seen from issue 2080, comment #5.
TBR=fischman@webrtc.org
RISK=P1
TEST=try bots and tsanv2
BUG=2080
Review URL: https://webrtc-codereview.appspot.com/2669005
git-svn-id: http://webrtc.googlecode.com/svn/trunk@5026 4adac7df-926f-26a2-2b94-8c16560cd09d
1) init start_time_ns_ before the file_read_thread_ is started to avoid data racing as the start_time_ns_ will also be read by the file_read_thread_.
2) add CriticalSection to protect |finished_| that is accessed by FileReadThread and the main thread
Also remove the suppression for filemediaengine.cc, which has already been fixed in other cl.
TBR=henrike@webrtc.org
TEST=try bots and manual tsan v2 test
BUG=2078
Review URL: https://webrtc-codereview.appspot.com/2509004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@5018 4adac7df-926f-26a2-2b94-8c16560cd09d
Update Thread documentation, fix all subclasses that had a problem.
This is to avoid a data racing between the destructor modifying the vtable, and
Thread::PreRun calling virtual method Run at the same time.
For example:
[ RUN ] FileMediaEngineTest.TestGetCapabilities
==================
WARNING: ThreadSanitizer: data race on vptr (ctor/dtor vs virtual call) (pid=2967)
Read of size 8 at 0x7d480000bd00 by thread T1:
#0 talk_base::Thread::PreRun(void*) /mnt/data/b/build/slave/Linux_Tsan_v2/build/src/out/Release/../../talk/base/thread.cc:353 (libjingle_media_unittest+0x000000234da8)
Previous write of size 8 at 0x7d480000bd00 by main thread:
#0 talk_base::Thread::~Thread() /mnt/data/b/build/slave/Linux_Tsan_v2/build/src/out/Release/../../talk/base/thread.cc:158 (libjingle_media_unittest+0x00000023478c)
#1 ~RtpSenderReceiver /mnt/data/b/build/slave/Linux_Tsan_v2/build/src/out/Release/../../talk/media/base/filemediaengine.cc:122 (libjingle_media_unittest+0x0000001b551f)
...
RISK=P2
TESTED=try bots and tsan
BUG=2078,2080
R=fischman@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/2428004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@4999 4adac7df-926f-26a2-2b94-8c16560cd09d
Turns out I was running libjingle_unittest
instead of libjingle_peerconnection_unittest
on the bot machine when I was verifying the
suppressions added in r4991 on the bot.
This will hopefully be the last round.
BUG=2528
TEST=running libjingle_unittest with these
suppressions applied locally on the bot.
TBR=phoglund@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/2426004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@4993 4adac7df-926f-26a2-2b94-8c16560cd09d
Since we don't have a trybot for LSan, this is the only
way to resolve errors only happening on the bots
(except running at the bot themselves).
I suspect some errors only occurs on the bots since
the compiler version differs (4.6 on bots, 4.6.3 on
my machine).
This last suppressions round was tested on an actual
Chrome infra VM as well, with no errors.
BUG=2528
TEST=ran successfully on the bot.
TBR=phoglund@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/2424004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@4991 4adac7df-926f-26a2-2b94-8c16560cd09d
The suppressions in r4988 were not enough to green
up the LSan+ASan bot.
Here's another round of suppressions to get the bot green
which I have tested multiple runs without any leaks reported.
BUG=2527,2528
TEST=
GYP_DEFINES='asan=1 lsan=1 linux_use_tcmalloc=0 release_extra_cflags="-gline-tables-only"' gclient runhooks
ninja -C out/Release libjingle_unittest
export ASAN_SYMBOLIZER_PATH=`(pwd)`/third_party/llvm-build/Release+Asserts/bin/llvm-symbolizer
export ASAN_OPTIONS="detect_leaks=1 strict_memcmp=0"
export LSAN_OPTIONS="suppressions=tools/lsan/suppressions.txt"
out/Release/libjingle_peerconnection_unittest
out/Release/libjingle_unittest
TBR=phoglund@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/2422004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@4990 4adac7df-926f-26a2-2b94-8c16560cd09d
Add suppressions for libjingle tests so they pass under TSan v2.
Disable the following tests for TSan v2 (only) since they're failing:
* StunServerTest.TestGood
* JsepPeerConnectionP2PTestClient.*
See build logs at:
http://build.chromium.org/p/client.webrtc.fyi/builders/Linux%20Tsan%20v2/
for more details.
BUG=1205,2078,2079,2080,2517
TEST=Ran a successful run of each test locally on Linux using:
GYP_DEFINES='tsan=1 linux_use_tcmalloc=0 release_extra_cflags="-gline-tables-only"' gclient runhooks
ninja -C out/Release
For each test, run standing in trunk/:
TSAN_OPTIONS="suppressions=tools/valgrind-webrtc/tsan_v2/suppressions.txt print_suppressions=1 report_signal_unsafe=0 report_thread_leaks=0 history_size=7" out/Release/[libjingle_testname]
R=wu@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/2411004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@4977 4adac7df-926f-26a2-2b94-8c16560cd09d
In https://codereview.chromium.org/26190002 Chromium
started a cleanup of their wrapper script, by adding
the --target flag and start passing build dir similar
to how the bots are setting it (i.e. pass out and not
out/Release).
This CL adds --target support for our wrapper script,
without changing the existing behavior (I'll do a
larger update at a later stage).
BUG=none
TEST=Ran the following successfully:
tools/valgrind-webrtc/webrtc_tests.sh --build_dir out/Release --target Release --test test_support_unittests
tools/valgrind-webrtc/webrtc_tests.sh --build_dir out --target Release --test test_support_unittests
tools/valgrind-webrtc/webrtc_tests.sh --target Release --test out/Release/test_support_unittests
TBR=phoglund@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/2396004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@4957 4adac7df-926f-26a2-2b94-8c16560cd09d
When WebRTC is built as a part of Chromium, some of
the stuff in webrtc.gyp will not be found. This CL
fixes this.
TEST=trybots passing. I also did some manual builds for Android with the android_builder_webrtc target in build/all_android.gyp of a Chromium checkout.
BUG=chromium:304143
R=andrew@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/2353004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@4949 4adac7df-926f-26a2-2b94-8c16560cd09d
a different thread.
One example is the _playWarning can be changed in AudioDeviceLinuxALSA::Init, which is called on the application's thread. At the same time it can be read via PlayoutWarning() on the VoE's process_thread.
RISK=P2
TESTED=try bots and tsan test:
tools/valgrind-webrtc/webrtc_tests.sh --tool=tsan -t out/Debug/libjingle_peerconnection_unittest --gtest_filter=PeerConnectionFactoryTestInternal.CreatePCUsingInternalModules
BUG=1205
R=xians@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/2315004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@4866 4adac7df-926f-26a2-2b94-8c16560cd09d
Implements the ExternalVideoDecoder interface for VideoReceiveStream.
Also adds a FakeDecoder used in tests, removing the overhead of running
the EngineTest tests with VP8 under Memcheck/TSan, allowing us to enable
them under Memcheck/TSan as well.
BUG=2346,2312
R=stefan@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/2172004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@4702 4adac7df-926f-26a2-2b94-8c16560cd09d
I mistakenly ommitted the checks when logging.h was ported from
libjingle to webrtc. This caused a significant CPU cost for logs which
were later filtered out anyway.
Verified with LS_VERBOSE logging in neteq4, running:
$ out/Release/modules_unittests \
--gtest_filter=NetEqDecodingTest.TestBitExactness \
--gtest_repeat=50 > time.txt
$ grep "case ran" time.txt | grep "[0-9]* ms" -o | sort
Results on a MacBook Retina, averaged over 5 runs:
Verbose logs disabled: 666 ms
Exisiting implementation, verbose logs enabled: 944 ms (1.42x)
New implementation, verbose logs enabled: 673 ms (1.01x)
BUG=2314
R=henrik.lundin@webrtc.org, henrike@webrtc.org, kjellander@webrtc.org, turaj@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/2160005
git-svn-id: http://webrtc.googlecode.com/svn/trunk@4682 4adac7df-926f-26a2-2b94-8c16560cd09d