Skip to content

Commit 72b33a3

Browse files
committed
[lldb/crashlog] Make image loading in tests single-threaded
This patch has a temporary fix for a non-deterministic deadlock when loading crashlog images in parallel by making it single-threaded. Also given that dSYMForUUID is disabled on the CI (following f8afa76), this shouldn't cause any noticeable slowdown while running the test suite. Signed-off-by: Med Ismail Bennani <[email protected]>
1 parent 460f998 commit 72b33a3

10 files changed

+12
-12
lines changed

lldb/test/Shell/ScriptInterpreter/Python/Crashlog/altered_threadState.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# RUN: %clang_host -g %S/Inputs/test.c -o %t.out
22
# RUN: cp %S/Inputs/altered_threadState.crash %t.crash
33
# RUN: %python %S/patch-crashlog.py --binary %t.out --crashlog %t.crash --offsets '{"main":20, "bar":9, "foo":16}'
4-
# RUN: %lldb %t.out -o 'command script import lldb.macosx.crashlog' -o 'crashlog %t.crash' 2>&1 | FileCheck %s
4+
# RUN: %lldb %t.out -o 'command script import lldb.macosx.crashlog' -o 'crashlog --no-parallel-image-loading %t.crash' 2>&1 | FileCheck %s
55

66
# CHECK: "crashlog" {{.*}} commands have been installed, use the "--help" options on these commands
77

lldb/test/Shell/ScriptInterpreter/Python/Crashlog/app_specific_backtrace_crashlog.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# RUN: mkdir -p %t.dir
44
# RUN: yaml2obj %S/Inputs/application_specific_info/asi.yaml > %t.dir/asi
55
# RUN: %lldb -o 'command script import lldb.macosx.crashlog' \
6-
# RUN: -o 'crashlog -a -i -t %t.dir/asi %S/Inputs/application_specific_info/asi.txt' \
6+
# RUN: -o 'crashlog -a -i --no-parallel-image-loading -t %t.dir/asi %S/Inputs/application_specific_info/asi.txt' \
77
# RUN: -o "thread list" -o "bt all" 2>&1 | FileCheck %s
88

99
# CHECK: "crashlog" {{.*}} commands have been installed, use the "--help" options on these commands

lldb/test/Shell/ScriptInterpreter/Python/Crashlog/interactive_crashlog_invalid_target.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# RUN: %lldb -o 'command script import lldb.macosx.crashlog' \
44
# RUN: -o 'crashlog -V' \
5-
# RUN: -o 'crashlog -a -i -t /this_file_does_not_exist %S/Inputs/interactive_crashlog/multithread-test.ips' 2>&1 | FileCheck %s
5+
# RUN: -o 'crashlog -a -i --no-parallel-image-loading -t /this_file_does_not_exist %S/Inputs/interactive_crashlog/multithread-test.ips' 2>&1 | FileCheck %s
66

77
# CHECK: "crashlog" {{.*}} commands have been installed, use the "--help" options on these commands
88

lldb/test/Shell/ScriptInterpreter/Python/Crashlog/interactive_crashlog_json.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# RUN: mkdir -p %t.dir
44
# RUN: yaml2obj %S/Inputs/interactive_crashlog/multithread-test.yaml > %t.dir/multithread-test
55
# RUN: %lldb -o 'command script import lldb.macosx.crashlog' \
6-
# RUN: -o 'crashlog -a -i -t %t.dir/multithread-test %S/Inputs/interactive_crashlog/multithread-test.ips' \
6+
# RUN: -o 'crashlog -a -i --no-parallel-image-loading -t %t.dir/multithread-test %S/Inputs/interactive_crashlog/multithread-test.ips' \
77
# RUN: -o "thread list" -o "bt all" 2>&1 | FileCheck %s
88

99
# CHECK: "crashlog" {{.*}} commands have been installed, use the "--help" options on these commands

lldb/test/Shell/ScriptInterpreter/Python/Crashlog/interactive_crashlog_legacy.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# RUN: mkdir -p %t.dir
44
# RUN: yaml2obj %S/Inputs/interactive_crashlog/multithread-test.yaml > %t.dir/multithread-test
55
# RUN: %lldb -o 'command script import lldb.macosx.crashlog' \
6-
# RUN: -o 'crashlog -a -i -t %t.dir/multithread-test %S/Inputs/interactive_crashlog/multithread-test.crash' \
6+
# RUN: -o 'crashlog -a -i --no-parallel-image-loading -t %t.dir/multithread-test %S/Inputs/interactive_crashlog/multithread-test.crash' \
77
# RUN: -o "thread list" -o "bt all" 2>&1 | FileCheck %s
88

99
# CHECK: "crashlog" {{.*}} commands have been installed, use the "--help" options on these commands

lldb/test/Shell/ScriptInterpreter/Python/Crashlog/json.test

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
# RUN: cp %S/Inputs/a.out.ips %t.crash
44
# RUN: %python %S/patch-crashlog.py --binary %t.out --crashlog %t.crash --offsets '{"main":20, "bar":9, "foo":16}' --json
5-
# RUN: %lldb %t.out -o 'command script import lldb.macosx.crashlog' -o 'crashlog %t.crash' 2>&1 | FileCheck %s
6-
# RUN: %lldb %t.out -o 'command script import lldb.macosx.crashlog' -o 'crashlog -c %t.crash' 2>&1 | FileCheck %s
5+
# RUN: %lldb %t.out -o 'command script import lldb.macosx.crashlog' -o 'crashlog --no-parallel-image-loading %t.crash' 2>&1 | FileCheck %s
6+
# RUN: %lldb %t.out -o 'command script import lldb.macosx.crashlog' -o 'crashlog --no-parallel-image-loading -c %t.crash' 2>&1 | FileCheck %s
77

88
# RUN: cp %S/Inputs/a.out.ips %t.nometadata.crash
99
# RUN: %python %S/patch-crashlog.py --binary %t.out --crashlog %t.nometadata.crash --offsets '{"main":20, "bar":9, "foo":16}' --json --no-metadata
10-
# RUN: %lldb %t.out -o 'command script import lldb.macosx.crashlog' -o 'crashlog %t.nometadata.crash' 2>&1 | FileCheck %s
10+
# RUN: %lldb %t.out -o 'command script import lldb.macosx.crashlog' -o 'crashlog --no-parallel-image-loading %t.nometadata.crash' 2>&1 | FileCheck %s
1111

1212
# CHECK: "crashlog" {{.*}} commands have been installed, use the "--help" options on these commands
1313

lldb/test/Shell/ScriptInterpreter/Python/Crashlog/last_exception_backtrace_crashlog.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# RUN: mkdir -p %t.dir
44
# RUN: yaml2obj %S/Inputs/application_specific_info/asi.yaml > %t.dir/asi
55
# RUN: %lldb -o 'command script import lldb.macosx.crashlog' \
6-
# RUN: -o 'crashlog -a -i -t %t.dir/asi %S/Inputs/application_specific_info/leb.txt' \
6+
# RUN: -o 'crashlog -a -i --no-parallel-image-loading -t %t.dir/asi %S/Inputs/application_specific_info/leb.txt' \
77
# RUN: -o "thread list" -o "bt all" 2>&1 | FileCheck %s
88

99
# CHECK: "crashlog" {{.*}} commands have been installed, use the "--help" options on these commands

lldb/test/Shell/ScriptInterpreter/Python/Crashlog/no_threadState.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# RUN: cp %S/Inputs/no_threadState.ips %t.crash
44
# RUN: %python %S/patch-crashlog.py --binary %t.out --crashlog %t.crash --offsets '{"main":20, "bar":9, "foo":16}' --json
5-
# RUN: %lldb %t.out -o 'command script import lldb.macosx.crashlog' -o 'crashlog %t.crash' 2>&1 | FileCheck %s
5+
# RUN: %lldb %t.out -o 'command script import lldb.macosx.crashlog' -o 'crashlog --no-parallel-image-loading %t.crash' 2>&1 | FileCheck %s
66

77
# CHECK: "crashlog" {{.*}} commands have been installed, use the "--help" options on these commands
88

lldb/test/Shell/ScriptInterpreter/Python/Crashlog/skipped_status_interactive_crashlog.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# RUN: mkdir -p %t.dir
44
# RUN: yaml2obj %S/Inputs/interactive_crashlog/multithread-test.yaml > %t.dir/multithread-test
55
# RUN: %lldb -b -o 'command script import lldb.macosx.crashlog' \
6-
# RUN: -o 'crashlog -a -i -s -t %t.dir/multithread-test %S/Inputs/interactive_crashlog/multithread-test.ips' \
6+
# RUN: -o 'crashlog -a -i --no-parallel-image-loading -s -t %t.dir/multithread-test %S/Inputs/interactive_crashlog/multithread-test.ips' \
77
# RUN: -o 'command source -s 0 %s' 2>&1 | FileCheck %s
88

99
# CHECK: "crashlog" {{.*}} commands have been installed, use the "--help" options on these commands

lldb/test/Shell/ScriptInterpreter/Python/Crashlog/text.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# RUN: %clang_host -g %S/Inputs/test.c -o %t.out
22
# RUN: cp %S/Inputs/a.out.crash %t.crash
33
# RUN: %python %S/patch-crashlog.py --binary %t.out --crashlog %t.crash --offsets '{"main":20, "bar":9, "foo":16}'
4-
# RUN: %lldb %t.out -o 'command script import lldb.macosx.crashlog' -o 'crashlog %t.crash' 2>&1 | FileCheck %s
4+
# RUN: %lldb %t.out -o 'command script import lldb.macosx.crashlog' -o 'crashlog --no-parallel-image-loading %t.crash' 2>&1 | FileCheck %s
55

66
# CHECK: "crashlog" {{.*}} commands have been installed, use the "--help" options on these commands
77

0 commit comments

Comments
 (0)