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
Analogous to the recent libjingle change: http://cl/54929753-p10.
This supports scoped_ptr<T[]> and scoped_ptr<C, FreeDeleter> rather
than scoped_array and scoped_ptr_malloc respectively.
- Add Chromium's template-based COMPILE_ASSERT. We didn't have this
previously in order to support the macro in C. Instead, move the
existing macro to compile_assert_c.h.
- Additionally copy the move.h and template_util.h depedencies and add
the WARN_UNUSED_RESULT macro.
- Leave scoped_array and scoped_ptr_malloc for now, but mark as
deprecated.
- Remove scoped_ptr foo(NULL) use. The default constructor handles it.
- Remove the now redundant COMPILE_ASSERT from peerconnection_jni.cc.
- Add a CHECK_ARRAY_SIZE macro to rtp_format_vp8_unittest.cc to remove
some repeated code.
TESTED=trybots
R=pbos@webrtc.org, tommi@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/2449005
git-svn-id: http://webrtc.googlecode.com/svn/trunk@5015 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
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
This makes audio flow well bidirectionally to an iPod Touch (5th gen).
Also:
- Update to new turnserver JSON style:
- separate username field
- multiple URLs for the same server (e.g. both UDP & TCP)
- Added more explicit logging for ICE Connected since it's useful for debugging
- Give focus to the input field on app launch since that's the only useful
thing to have focus on, anyway.
- Fix minor typos
- Cleaned up trailing whitespace and hard tabs
BUG=2191
R=wu@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/2127004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@4687 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