Skip to content
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

Update LLDB integration documentation #5

Open
taugoust opened this issue Aug 26, 2024 · 0 comments
Open

Update LLDB integration documentation #5

taugoust opened this issue Aug 26, 2024 · 0 comments
Assignees
Labels
bug Something isn't working priority:low Low priority item

Comments

@taugoust
Copy link
Collaborator

Depending on the Linux distribution used, the Python version and the LLDB version, focaccia may be completely unusable.

The following error is thrown:

Fatal Python error: PyImport_AppendInittab: PyImport_AppendInittab() may not be called after Py_Initialize()
Python runtime state: initialized

Current thread 0x00007efe1b5d1740 (most recent call first):
  File "/usr/lib64/python3.12/site-packages/lldb/__init__.py", line 4394 in Initialize
  File "/usr/lib64/python3.12/site-packages/lldb/__init__.py", line 16172 in <module>
  File "<frozen importlib._bootstrap>", line 488 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 995 in exec_module
  File "<frozen importlib._bootstrap>", line 935 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 1331 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1360 in _find_and_load
  File "/home/taugoust/Research/tum/dos/focaccia/focaccia/lldb_target.py", line 3 in <module>
  File "<frozen importlib._bootstrap>", line 488 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 995 in exec_module
  File "<frozen importlib._bootstrap>", line 935 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 1331 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1360 in _find_and_load
  File "/home/taugoust/Research/tum/dos/focaccia/focaccia/symbolic.py", line 17 in <module>
  File "<frozen importlib._bootstrap>", line 488 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 995 in exec_module
  File "<frozen importlib._bootstrap>", line 935 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 1331 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1360 in _find_and_load
  File "/home/taugoust/Research/tum/dos/focaccia/focaccia/parser.py", line 10 in <module>
  File "<frozen importlib._bootstrap>", line 488 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 995 in exec_module
  File "<frozen importlib._bootstrap>", line 935 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 1331 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1360 in _find_and_load
  File "/home/taugoust/Research/tum/dos/focaccia/./focaccia.py", line 7 in <module>

Extension modules: lldb._lldb (total: 1)
[1]    1540383 IOT instruction (core dumped)  ./focaccia.py

The setup used to reproduce this issue is Python 3.12.4 on Fedora 40 with LLDB version 18.1.6. The reason for the error is due to changes in the Python API and are already known to the LLVM developers: llvm/llvm-project#70453.

We should note this down in the docs and require a sufficiently up to date setup. Also, we should provide a proper nix setup for the project.

Note: setups that reproduce the error can avoid it by executing Focaccia using PYTHONPATH=$(lldb -P) python3.11 ./tools/convert.py, provided a python3.11 installation exists on the system.

@taugoust taugoust added bug Something isn't working priority:low Low priority item labels Aug 26, 2024
@taugoust taugoust self-assigned this Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority:low Low priority item
Projects
None yet
Development

No branches or pull requests

1 participant