ort: Stuck at JNI boundary?
Background
A Java application has ties to a C/C++ program via the JNI.
Problem
ORT did not complete processing the build.gradle file, yet gave no indication as to an error.
~/dev/ort/bin/ort --info analyze -f JSON -i . -o ./ort/analyzer
12:34:06.484 [DefaultDispatcher-worker-1] INFO org.ossreviewtoolkit.analyzer.PackageManager - Resolving Gradle dependencies for path 'conformance/build.gradle'...
Expected
ORT shows an error to indicate that it encountered an issue resolving licensing information or the hanging loop prints a progress report to the user to indicate what’s happening.
Actual
ORT hangs. After 30 minutes, no progress made, I stopped ORT.
Work around
- Comment out the references to JNI projects in
conformance/build.gradle
. - Re-run ORT.
This allowed ORT to proceed without hanging. (At least until the troublesome JNI project was referenced from another project, which resulted in another hang, but it appears to be the same issue.)
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 26 (13 by maintainers)
Alright! Big shout outs for helping on such short notice. Really appreciate it, thanks!
Unfortunately I cannot strip down the project to publish it (too much effort), so I took your example and adapted it step by step. I found three dependencies responsible for ORT hanging at the
Connecting from tooling...
message in combination with a setting in ourgradle.properties
file. Project is uploaded here: https://github.com/mpbecker/OSS_debug Further information how to reproduce are found here: https://github.com/mpbecker/OSS_debug/blob/c00626e9b178acfcdfb8f7adb03707bfda431c21/app/build.gradle#L63 All tested with the latest Android Studio version on a Ubuntu machine. Please let me know if you can reproduce, so maybe we can do some further investigations. Thanks!