Skip to content

Commit

Permalink
Support detection of pthread mutex deadlock caused by double lock
Browse files Browse the repository at this point in the history
  • Loading branch information
chenBright committed Oct 13, 2024
1 parent 1ac526b commit 08d7194
Show file tree
Hide file tree
Showing 5 changed files with 229 additions and 90 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ option(WITH_THRIFT "With thrift framed protocol supported" OFF)
option(WITH_SNAPPY "With snappy" OFF)
option(WITH_RDMA "With RDMA" OFF)
option(WITH_DEBUG_BTHREAD_SCHE_SAFETY "With debugging bthread sche safety" OFF)
option(WITH_DEBUG_LOCK "With debugging mutex" OFF)
option(WITH_DEBUG_LOCK "With debugging lock" OFF)
option(BUILD_UNIT_TESTS "Whether to build unit tests" OFF)
option(BUILD_FUZZ_TESTS "Whether to build fuzz tests" OFF)
option(BUILD_BRPC_TOOLS "Whether to build brpc tools" ON)
Expand Down
4 changes: 2 additions & 2 deletions config_brpc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ WITH_RDMA=0
WITH_MESALINK=0
BRPC_DEBUG_BTHREAD_SCHE_SAFETY=0
DEBUGSYMBOLS=-g
BRPC_DEBUG_MUTEX=0
BRPC_DEBUG_LOCK=0

if [ $? != 0 ] ; then >&2 $ECHO "Terminating..."; exit 1 ; fi

Expand All @@ -70,7 +70,7 @@ while true; do
--with-rdma) WITH_RDMA=1; shift 1 ;;
--with-mesalink) WITH_MESALINK=1; shift 1 ;;
--with-debug-bthread-sche-safety ) BRPC_DEBUG_BTHREAD_SCHE_SAFETY=1; shift 1 ;;
--with-debug-lock ) BRPC_DEBUG_MUTEX=1; shift 1 ;;
--with-debug-lock ) BRPC_DEBUG_LOCK=1; shift 1 ;;
--nodebugsymbols ) DEBUGSYMBOLS=; shift 1 ;;
-- ) shift; break ;;
* ) break ;;
Expand Down
Loading

0 comments on commit 08d7194

Please sign in to comment.