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

SecurityManager interfering with regular Eclipse Code #10

Open
guw opened this issue Jan 2, 2020 · 3 comments
Open

SecurityManager interfering with regular Eclipse Code #10

guw opened this issue Jan 2, 2020 · 3 comments

Comments

@guw
Copy link

guw commented Jan 2, 2020

Running with the connector installed I get the following exception when accessing Preferences > Plug-in Development > Target Platform.

An internal error occurred during: "Resolving "Running Platform" target definition".
access denied ("io.takari.builder.enforcer.SimpleFilePermission$FileReadPermission" "/Users/.../Applications/Eclipse.app/Contents/Eclipse/plugins/org.eclipse.core.databinding.source_1.7.700.v20191122-2109.jar")

java.security.AccessControlException: access denied ("io.takari.builder.enforcer.SimpleFilePermission$FileReadPermission" "/Users/.../Applications/Eclipse.app/Contents/Eclipse/plugins/org.eclipse.core.databinding.source_1.7.700.v20191122-2109.jar")
	at java.base/java.security.AccessControlContext.checkPermission(AccessControlContext.java:472)
	at java.base/java.security.AccessController.checkPermission(AccessController.java:897)
	at java.base/java.lang.SecurityManager.checkPermission(SecurityManager.java:322)
	at io.takari.builder.enforcer.ExecCommandPassingSecurityManager.checkRead(ExecCommandPassingSecurityManager.java:19)
	at java.base/java.io.File.exists(File.java:815)
	at org.eclipse.pde.core.target.TargetBundle.initialize(TargetBundle.java:164)
	at org.eclipse.pde.core.target.TargetBundle.<init>(TargetBundle.java:84)
	at org.eclipse.pde.internal.core.target.ProfileBundleContainer.lambda$0(ProfileBundleContainer.java:167)
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
	at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
	at java.base/java.util.stream.Nodes$CollectorTask.doLeaf(Nodes.java:2191)
	at java.base/java.util.stream.Nodes$CollectorTask.doLeaf(Nodes.java:2157)
	at java.base/java.util.stream.AbstractTask.compute(AbstractTask.java:327)
	at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:746)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177)

I don't see problems in other areas of Eclipse. Thus, something must be different with this particular stack, which leads me to the ForkJoinPool issue (takari/io.takari.incrementalbuild#36)

@guw
Copy link
Author

guw commented Jan 2, 2020

@ifedorenko this is probably a side effect of ForkJoinPool behavior change in JDK 11 (takari/io.takari.incrementalbuild#36)

Do you have a suggestion? Is it sane to just disable the SecurityManager inside Eclipse altogether?

@atanasenko
Copy link
Contributor

@guw Did you get anywhere with this problem? I've seen these exceptions occasionally, but recent eclipse update seems to have made it much worse. Now all ForkJoinPool tasks throw access denied exceptions whenever there is a takari-lifecycle project in the workspace.

@guw
Copy link
Author

guw commented Apr 1, 2021

No real solution. I have hacked another Eclipse plug-in with Early Startup extension to install a no-op SecurityManager and block Takari from installing its SecurityManager.

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

2 participants