]> git-server-git.apps.pok.os.sepia.ceph.com Git - rocksdb.git/log
rocksdb.git
10 years agoFix transaction locking
agiardullo [Wed, 10 Feb 2016 02:24:41 +0000 (18:24 -0800)]
Fix transaction locking

Summary: Broke transaction locking in 4.4 in D52197.  Will cherry-pick this change into 4.4 (which hasn't yet been fully released).  Repro'd using db_bench.

Test Plan: unit tests and db_Bench

Reviewers: sdong, yhchiang, kradhakrishnan, ngbronson

Reviewed By: ngbronson

Subscribers: ngbronson, dhruba, leveldb

Differential Revision: https://reviews.facebook.net/D54021

(cherry picked from commit d08d50295cfaae2153c88c4065be1881e5ca0c99)

10 years agoRemove the SyncPoint usage in the destructor of PosixEnv
Yueh-Hsuan Chiang [Thu, 18 Feb 2016 07:32:14 +0000 (23:32 -0800)]
Remove the SyncPoint usage in the destructor of PosixEnv

Summary:
Remove the SyncPoint usage in the destructor of PosixEnv as none
of any active tests is using it.

SyncPoint is a test-only utility class, and it's a static varible.
As a result, using SyncPoint in the destructor of PosixEnv will
make default Env depends on SyncPoint.  Removing such dependency
could solve the problem crash issue only reproducable in Mac
environment.

Test Plan: OPT=-DTRAVIS V=1 make -j4 check on Mac environment

Reviewers: sdong, anthony

Subscribers: dhruba, leveldb

Differential Revision: https://reviews.facebook.net/D54333

10 years agoAdd missing SyncPoint::DisableProcessing in compact_file_test
Yueh-Hsuan Chiang [Thu, 18 Feb 2016 07:19:06 +0000 (23:19 -0800)]
Add missing SyncPoint::DisableProcessing in compact_file_test

Summary: Add missing SyncPoint::DisableProcessing in compact_file_test

Test Plan: compact_file_test

Reviewers: anthony, sdong

Subscribers: dhruba, leveldb

Differential Revision: https://reviews.facebook.net/D54327

10 years agoFixed a dependency issue of ThreadLocalPtr
Yueh-Hsuan Chiang [Thu, 11 Feb 2016 00:56:01 +0000 (16:56 -0800)]
Fixed a dependency issue of ThreadLocalPtr

Summary:
When a child thread that uses ThreadLocalPtr, ThreadLocalPtr::OnThreadExit
will be called when that child thread is destroyed.  However,
OnThreadExit will try to access a static singleton of ThreadLocalPtr,
which will be destroyed when the main thread exit.  As a result,
when a child thread that uses ThreadLocalPtr exits AFTER the main thread
exits, illegal memory access will occur.

This diff includes a test that reproduce this legacy bug.

    ==2095206==ERROR: AddressSanitizer: heap-use-after-free on address
    0x608000007fa0 at pc 0x959b79 bp 0x7f5fa7426b60 sp 0x7f5fa7426b58
    READ of size 8 at 0x608000007fa0 thread T1

This patch fix this issue by having the thread local mutex never be deleted
(but will leak small piece of memory at the end.)   The patch also describe
a better solution (thread_local) in the comment that requires gcc 4.8.1 and
in latest clang as a future work once we agree to move toward gcc 4.8.

Test Plan:
COMPILE_WITH_ASAN=1 make thread_local_test -j32
./thread_local_test --gtest_filter="*MainThreadDiesFirst"

Reviewers: anthony, hermanlee4, sdong

Reviewed By: sdong

Subscribers: dhruba, leveldb

Differential Revision: https://reviews.facebook.net/D53013

10 years agoFix LITE db_test build broken by previous commit
sdong [Fri, 5 Feb 2016 22:26:26 +0000 (14:26 -0800)]
Fix LITE db_test build broken by previous commit

Summary: Previous commit introduces a test that is not supported in LITE. Fix it.

Test Plan: Build the test with ROCKSDB_LITE.

Reviewers: kradhakrishnan, IslamAbdelRahman, anthony, yhchiang, andrewkr

Subscribers: leveldb, dhruba

Differential Revision: https://reviews.facebook.net/D53901