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

Error when using CPU: resource deadlock #293

Closed
JuliaBorgesSilva opened this issue Dec 15, 2023 · 14 comments
Closed

Error when using CPU: resource deadlock #293

JuliaBorgesSilva opened this issue Dec 15, 2023 · 14 comments

Comments

@JuliaBorgesSilva
Copy link

I have installed Sionna on a AMD Ryzen 5 5600G CPU running on Windows 11 and am facing de problem shown on the screenshots below when running the RT Tutorial : "Error while loading "F:\DroneAPRegression\Sionna\fga.xml" (at line 11, col 3): resource deadlock would occur: resource deadlock would occur."
It happens when trying to run both the Sionna models and the maps I loaded from Blender, which work properly on a Linux computer. Is there any configuration needed when using AMD processors/ am I doing something wrong during set up?

image

@merlinND
Copy link
Collaborator

merlinND commented Dec 18, 2023

Hello @JuliaBorgesSilva,

There shouldn't be any issue with AMD processors, but this might be a filesystem or Windows 11-related issue.
As far as I can tell, you are encountering a filesystem-related error when multiple threads are used to load the scene in parallel.

There were two new releases of Mitsuba last week, I'm wondering whether this is related. Could you try again by installing either:

pip install mitsuba===3.4.1

or

pip install mitsuba===3.4.0

If this doesn't fix it, could you please try replacing this line in your Sionna installation (sionna/sionna/rt/scene.py):

self._scene = mi.load_file(env_filename)

with:

self._scene = mi.load_file(env_filename, parallel=False)

@JuliaBorgesSilva
Copy link
Author

Hello,
Thank you for the help, the issue does seem to come from a file-system error, but the the message is still the same after updating Mitsuba and editing scene.py.:

RuntimeError: ​[xml.cpp:215] Error while loading "FGA_2_6.xml" (at line 39, col 4): resource deadlock would occur: resource deadlock would occur.

@PhilSoy
Copy link

PhilSoy commented Mar 11, 2024

I have the same problem. I tried the solutions above but they do not solve my problem. It is possible that the problem comes from a bad combination of versions

@merlinND
Copy link
Collaborator

Hello @PhilSoy,

This seems to be a Mitsuba-related issue. Does the following script work?

import mitsuba as mi
mi.set_variant("cuda_ad_rgb")  # Or whichever variant you were using

scene = mi.load_file("path/to/file.xml")
print(scene)

If not, could you please open an issue describing the problem and sharing your full scene (XML file + meshes) on the Mitsuba repo.

@PhilSoy
Copy link

PhilSoy commented Mar 14, 2024 via email

@merlinND
Copy link
Collaborator

Hello @PhilSoy,

Since Sionna does not use the scalar_rgb variant, I don't think this is helpful to narrow down the issue.
You need to set the variant to what was used when you encountered the problem when running Sionna. This will be either cuda_ad_rgb or llvm_ad_rgb.

@PhilSoy
Copy link

PhilSoy commented Mar 14, 2024 via email

@merlinND
Copy link
Collaborator

Thanks for checking. This is good since it means you can reproduce the issue with a minimal script.
As mentioned earlier, could you then please open an issue describing the problem and sharing your full scene (XML file + meshes) on the Mitsuba repo.

@PhilSoy
Copy link

PhilSoy commented Mar 14, 2024 via email

@JuliaBorgesSilva
Copy link
Author

I've revised the LLVM path and library versions, but still get the same problem when running my scene, which is attached below as well as the code:

meshes.zip

@merlinND
Copy link
Collaborator

For reference, here is @PhilSoy's issue on the Mitsuba repo: mitsuba-renderer/mitsuba3#1105

@JuliaBorgesSilva, could you please try @PhilSoy's solution described in this comment: mitsuba-renderer/mitsuba3#1105 (comment)

@PhilSoy
Copy link

PhilSoy commented Mar 18, 2024 via email

@merlinND
Copy link
Collaborator

Thanks for reporting back @PhilSoy. Glad to hear it works with Jupyterlab.

Do I understand correctly that previously, you were not running either Python scripts from the command line nor Jupyter / Jupyterlab notebooks, but running notebooks from Spyder?
I don't think we've ever tested Spyder, it might affect the library resolution path (I don't know).

Please note that os.environ['DRJIT_LIBLLVM_PATH'] = 'C:/Program Files/LLVM/bin’ would be incorrect, since as you noticed the DRJIT_LIBLLVM_PATH environment variable should point directly to the LLVM DLL on Windows.

@PhilSoy
Copy link

PhilSoy commented Mar 18, 2024 via email

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

No branches or pull requests

3 participants