diff options
author | Andrew Morton <andrew.morton@mongodb.com> | 2023-05-15 21:40:42 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2023-05-16 02:14:04 +0000 |
commit | c258ce452318f389dd5c2d971e3cebfc974b2caf (patch) | |
tree | 079c3c9aae945190c9778f0e7d36f0d0ba1750cf | |
parent | 35598246ab32cf617c44b6afdaf210cd68cf4cb1 (diff) | |
download | mongo-c258ce452318f389dd5c2d971e3cebfc974b2caf.tar.gz |
Import wiredtiger: 13fbda20ff0f2383c13dd9669273f393f12c4ecb from branch mongodb-master
ref: 572d039366..13fbda20ff
for: 7.1.0-rc0
WT-11069 Improve container debugging
-rw-r--r-- | src/third_party/wiredtiger/import.data | 2 | ||||
-rw-r--r-- | src/third_party/wiredtiger/tools/antithesis/README | 8 | ||||
-rwxr-xr-x | src/third_party/wiredtiger/tools/antithesis/launch_gdb.sh | 20 |
3 files changed, 29 insertions, 1 deletions
diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data index 743d8877d7f..1512570cc5e 100644 --- a/src/third_party/wiredtiger/import.data +++ b/src/third_party/wiredtiger/import.data @@ -2,5 +2,5 @@ "vendor": "wiredtiger", "github": "wiredtiger/wiredtiger.git", "branch": "mongodb-master", - "commit": "572d039366c32c7640e61dac02970d9bfce10adb" + "commit": "13fbda20ff0f2383c13dd9669273f393f12c4ecb" } diff --git a/src/third_party/wiredtiger/tools/antithesis/README b/src/third_party/wiredtiger/tools/antithesis/README index 10b3d8a43fb..57504bfc6a2 100644 --- a/src/third_party/wiredtiger/tools/antithesis/README +++ b/src/third_party/wiredtiger/tools/antithesis/README @@ -24,3 +24,11 @@ Alternatively, you can create an evergreen patch build from this branch and trig which will build the containers and upload to Antithesis directly. We are including libstarvoid which helps with Antithesis integration. + +Using the debugger +To launch a debugger for a core that has been generated by a container, you can do the following: + +1. Spawn a host from the task that generated the container. +2. Untar the artifacts so you have the same binaries. +3. Change directory to the tools/antithesis directory (this directory). +4. Execute "./launch_gdb.sh <core>" where core is the core file you wish to debug. This will launch gdb in the container. diff --git a/src/third_party/wiredtiger/tools/antithesis/launch_gdb.sh b/src/third_party/wiredtiger/tools/antithesis/launch_gdb.sh new file mode 100755 index 00000000000..fd6c5c0bd4e --- /dev/null +++ b/src/third_party/wiredtiger/tools/antithesis/launch_gdb.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +# This script will create the docker container if not present and then launch it executing gdb with the given core. + +[[ `pwd` = */tools/antithesis ]] || { + echo "You must execute this script from the tools/antithesis directory" + exit 1 +} + +sudo docker image ls | grep wt-test-format > /dev/null 2>&1 +[[ $? -ne 0 ]] && { + sudo docker build -f test_format.dockerfile -t wt-test-format:latest ../.. +} + +SRC=$1 +[[ $SRC = /* ]] || SRC=`pwd`/$1 + +T_DIR=/opt/bin/test/format + +sudo docker run --rm --mount type=bind,src=$SRC,dst=$T_DIR/core -it wt-test-format:latest /bin/bash -c "cd $T_DIR;gdb t core" |