-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Apache Felix Framework class loading failures #3450
Comments
I am going to try to upgrade Felix the latest 7.x version which should address this issue. |
@ryanmkurtz looking like this broke my build, cannot open browser only front end. I removed my eclipse workspace and tried a fresh one along with redoing the gradle commands (init/prepDev/eclipse). Cannot say 100% its not some env issue on my end (20.04 / 11.0.11), but nothing looks different. Among the stack traces the only string I saw was felix (91f94b8 works)
|
This is the second report of this but I am having trouble reproducing it. I'll keep trying. |
@ryanmkurtz I got a similar exception when I open CodeBrowser or Debugger. The stack trace is:
Ghidra version: locally built (master, 0aff588) |
Thanks. I'll likely roll back to the older version on Monday until I can figure out what is going wrong. |
@ryanmkurtz I don't have any eclipse projects. Yes, the error still happens. This is what I did:
Here is the log: |
It's looking like a classpath ordering issue with the jars. I've reverted the change locally, which will soon be mirrored up to GitHub. I'll re-close this issue when I have the proper solution in place. |
@jpleasu Did you run into issues with |
Sorry, that doesn't sound familiar. |
dont know if this is a side effect of moving around so many things/red herring/bad setup... or if you saw similar @ryanmkurtz and this is what you were talking about on
which gets caught, so this never happens ghidra/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/osgi/BundleHost.java Line 473 in 95aa622
which mostly results in this getting spammed as exception popups in code browser (i think at least, get ~24 errors) ghidra/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/osgi/BundleHost.java Line 526 in 95aa622
|
I saw that behavior too. It happens when Having to rely on a certain classpath ordering should be avoided at all costs. Having said that, I couldn't reproduce this at first because my classpath was ordered differently. We should put some more work into having a deterministic classpath to at least make problems like this more consistent. |
This classpath issue was fixed in |
@jpleasu, do you think it's feasible to drop the |
Yeah - You could probably cover most script directories with a simpler manifest generator? Fallback to an external call to |
Thanks for feedback. Yes, I'll experiment with a simpler manifest generator. |
The experiment has failed. I just upgraded the minimal set of needed jars. |
Describe the bug
A plugin built for Ghidra 10.0.3 is failing in some aspects of its functionality, raising exceptions that library classes cannot be found. This occurs under JDK 16, but not JDK 11. These classes are present in one of the jars included with the plugin, and this same plugin functions without issue when built for/installed in 10.0.2. Here is the error that appears:
I found that error mostly unhelpful, and after reverting to the 10.0.2
launch.properties
(which fixes it) I captured this more relevant illegal access warning that reveals the culprit as the felix framework included within Ghidra:This led me to the changes I submitted in a pull request which add
--add-opens
statements for each illegal access I ended up encountering. These line up nicely with those listed on the Apache Felix Jira project about this problem. Other Ghidra plugins might be affected by this as well, but I haven't been able to find any existing issues that mention it.To Reproduce
I don't know of a way to trigger this without a plugin. That doesn't mean there isn't one, I just haven't looked very hard for it. To reproduce the specific instance of the issue that I see, you would need to download the plugin build for 10.0.3 and try to open an interactive Ruby scripting window.
Expected behavior
I would expect Ghidra to be able to find classes that are in the lib jars, of course! Really though, I'm just looking for a resolution that doesn't involve manually modifying
launch.properties
every time someone wants to use this plugin in newer JDK environments. I briefly played with the classloaders used in my plugin, but I wasn't successful in resolving it with that technique.Environment
Additional context
The Felix page linked above says that this is fixed in 7.0.0. I didn't try that out as a fix, but just wanted to mention it as an alternate path to my proposed patch.
I do realize that JDK 11 is the supported version of Ghidra and not 16 where the error happens. But I think this is still worth at least reporting and proposing a patch for, given that it was previously working until the recent "illegal reflective access" changes. Fixing this also seems inline with the changes from #3355 currently pinned on the issue list. At a minimum, perhaps it will at least help others with the same issue.
The text was updated successfully, but these errors were encountered: