Skip to content

[lldb][test] Fix PythonDataObjectsTest #8846

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

Michael137
Copy link

@Michael137 Michael137 commented Jun 5, 2024

This is using FileSystem::Instance() w/o calling FileSystem::Initialize(). Use SubsystemRAII to do that.

This cherry-pick fixes the swift-ci LLDB ubuntu ScriptInterpreterTests crash: https://ci.swift.org/view/LLDB/job/oss-lldb-linux-ubuntu-22_04/9528/execution/node/387/log/

Which locally reproduced in a Linux VM looks as follows:

/usr/lib/gcc/aarch64-linux-gnu/11/../../../../include/c++/11/optional:439: _Tp &std::_Optional_base_impl<lldb_private::FileSystem, std::_Optional_base<lldb_private::FileSystem, false, false>>::_M_get() [_Tp = lldb_private::FileSystem, _Dp = std::_Optional_base<lldb_private::FileSystem, false, false>]: Assertion 'this->_M_is_engaged()' failed.
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
0  ScriptInterpreterPythonTests 0x0000aaaaca63504c
1  ScriptInterpreterPythonTests 0x0000aaaaca633008
2  ScriptInterpreterPythonTests 0x0000aaaaca635b00
3  linux-vdso.so.1              0x0000ffff8d11e7ac __kernel_rt_sigreturn + 0
4  libc.so.6                    0x0000ffff8a8bf200
5  libc.so.6                    0x0000ffff8a87a67c raise + 28
6  libc.so.6                    0x0000ffff8a867130 abort + 228
7  ScriptInterpreterPythonTests 0x0000aaaaca5fc4e4
8  ScriptInterpreterPythonTests 0x0000aaaaca700e6c
9  ScriptInterpreterPythonTests 0x0000aaaaca6ffe4c
10 ScriptInterpreterPythonTests 0x0000aaaaca6fdb18
11 ScriptInterpreterPythonTests 0x0000aaaaca5ef29c
12 ScriptInterpreterPythonTests 0x0000aaaaca6c93c4
13 ScriptInterpreterPythonTests 0x0000aaaaca6cae04
14 ScriptInterpreterPythonTests 0x0000aaaaca6cb63c
15 ScriptInterpreterPythonTests 0x0000aaaaca6da580
16 ScriptInterpreterPythonTests 0x0000aaaaca6d9df0
17 ScriptInterpreterPythonTests 0x0000aaaaca6b947c
18 libc.so.6                    0x0000ffff8a8673fc
19 libc.so.6                    0x0000ffff8a8674cc __libc_start_main + 152
20 ScriptInterpreterPythonTests 0x0000aaaaca5e7bf0
zsh: abort      

(cherry picked from commit 6757913)

This is using `FileSystem::Instance()` w/o calling `FileSystem::Initialize()`. Use `SubsystemRAII` to do that.

(cherry picked from commit 6757913)
@Michael137
Copy link
Author

@swift-ci test

@adrian-prantl adrian-prantl merged commit 303596b into swiftlang:swift/release/6.0 Jun 5, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants