Comments (9)
@svilenvul let me confirm: are your Maven uses -T option, to run modules in parallel?
No, currently it is not being used.
from spotbugs-maven-plugin.
note from my investigation:
ICodeBase
,IClassPath
isAutoCloseable
.IClassPath
is responsible to close allICodeBase
instances inside itFindBugs2#clearCaches()
closes generatedIClassPath
- It seems that this plugin doesn't invoke
FindBugs2#clearCaches()
for now
So I guess that we should invoke this FindBugs2#clearCaches()
method, or create classloader to GC FindBugs2.classpath
that is singleton field?
I will test following patch later.
diff --git a/spotbugs/src/main/java/edu/umd/cs/findbugs/FindBugs2.java b/spotbugs/src/main/java/edu/umd/cs/findbugs/FindBugs2.java
index dc061d2a8..1be3e9691 100644
--- a/spotbugs/src/main/java/edu/umd/cs/findbugs/FindBugs2.java
+++ b/spotbugs/src/main/java/edu/umd/cs/findbugs/FindBugs2.java
@@ -1185,7 +1185,7 @@ public class FindBugs2 implements IFindBugsEngine {
FindBugs.runMain(findBugs, commandLine);
-
+ findBugs.clearCaches();
}
UPDATE
findBugs.clearCaches()
are already invoked inFindBugs2#execute()
which is called byFindBugs#runMain(...)
.
from spotbugs-maven-plugin.
spotbugs/spotbugs#589 is similar with this issue, but this issue's target is mainly jar files in classpath to scan.
from spotbugs-maven-plugin.
@svilenvul let me confirm: are your Maven uses -T
option, to run modules in parallel?
from spotbugs-maven-plugin.
WIP: https://github.com/spotbugs/spotbugs/compare/fix-resource-leaks
from spotbugs-maven-plugin.
We started investigating the problem and found out that there is a huge number of opened files (spotbugs plugins).
Almost all opened file isn't not spotbugs plugin, but libraries in aux classpath.
In current architecture, spotbugs keeps all jar files opened during analysis (because IClassPath
is keep opened), so we should face problem like this. To fix this issue, I think we need to change internal architecture to handle libraries in aux & app classpaths as stream.
from spotbugs-maven-plugin.
Has there been any progress? We are now seeing this frequently on our Jenkins CI server (we are using -T and there can also be concurrent builds).
from spotbugs-maven-plugin.
This issue is likely related to #535 that has existed in this code base since its original inception with findbugs. Has to do with the -T and it getting locks as system.in was being called. This is to be removed in upcoming release 4.7.3.1 within the week.
from spotbugs-maven-plugin.
closing as believe fixed with 4.7.3.1. If still an issue, please open a new ticket based off current data.
from spotbugs-maven-plugin.
Related Issues (20)
- Make sarif output file name customisable
- Spotbugs Xml Output file Locked After Execution (Windows only) HOT 2
- WARNING: A terminally deprecated method in java.lang.System has been called HOT 3
- Auxiliary classpath is broken HOT 2
- Extraneous "following classes needed for analysis were missing" message introduced in 4.7.3.1? HOT 3
- SuppressFBWarnings is ignored HOT 10
- spotbugs:gui not working HOT 3
- Extend via dependencies rather than custom configuration HOT 8
- Uses deprecated maven components HOT 8
- Does spotbugs report plugin support aggregation HOT 2
- Review replacing usage of 'ant'
- FindBugsAntBuildLogic 3.7 generates invalid findbugs_report.xml file HOT 2
- java 22 support will be in groovy 4.0.16 which isn't out yet HOT 2
- plugin build setting HOT 8
- makeConcatWithConstants + apply classes needed for analysis were missing HOT 1
- check does not fail if called as defaultGoal of profile HOT 4
- Build repeats "Unable to create Maven project for" warning and fails HOT 5
- NOTICE: Maven support will be moved to 3.6.3 as minimum on next release
- Sporadic spotbugs failure
- Spotbugs Maven Plugin 4.8.4 waiting on groovy! HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spotbugs-maven-plugin.