-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Eclipse Maven Update "Too Many Files" with 2.7.1 #23655
Comments
/cc @quarkusio/devtools |
FYI, this is still an issue in 2.7.2 and is also not resolved by upgrading the Eclipse EMBEDDED Maven to 3.8.4 (was 3.8.1) which I believe is the one used by Eclipse to resolve dependencies. |
Here are the lists of open files for two different copies of https://github.com/jimbogithub/sse (a reproducer I have for a different issue).
Both lists obtained from distinct newly created Eclipse Workspaces. |
2.6.3 does not have this issue. |
@Postremus FWIW, jars are loaded multiple times in that 2.7.2 dump, e.g.:
Those are loaded at most 2 times in the 2.5.1 dump. But you probably already noticed that. |
This is concerning. @Postremus do you think you will have the time to look at it before tomorrow evening? If not, we will need to have someone else having a look. |
@gsmet My plan was to start looking at this issue in detail today. But I honestly don't think that I am able to fix this in todays remaining 3 hours. Yesterday, I did some tests with only quarkus-fs-util, found nothing so far. Calling |
I guess I figured it out. During a "Maven Update" in eclipse, the following goals are invoked:
The generate-code goal uses a QuarkusClassLoader (the dev mode classloader), which internally opens a lot of This never happens though during this goal invocation. For cli uses, this does not matter, the whole maven process shuts down at the end of execution, and all locks are freed. This is at only my first assumption at this point. I am unable to confirm this as the root cause, since my fedora installation is out of order. Let me prepare a fix though, which someone on linux can verify. /cc @gsmet @aloubyansky |
Nice work. 2.7.3 is now showing a little over half the files open that even 2.5.1 had. Thanks. |
Great! Thanks for checking @jimbogithub |
@aloubyansky Same problem is occurring when building (mvn clean install). More mojos impacted? Raise another issue or re-open this one? |
|
On the command line whilst building multiple Quarkus based apps as part of a multi-module build. |
@jimbogithub would you be able to build Quarkus from a custom branch and test it in your builds? |
Yes I could. |
@jimbogithub before I ask you to give it a try, do you need |
These goals are in the default generated project. So we will need them to work OK. |
Absolutely. It's just before asking @jimbogithub to build the thing and test it I thought we could try to narrow down the issue. |
We do have In the meantime I've added two branches to the https://github.com/jimbogithub/sse reproducer from earlier on. The |
Removed Without those removed the counts go into the many 1,000s. Can I safely leave those out then? I always thought they were mandatory. |
#24173 should help then. Hopefully it'll make it in 2.7.4.Final scheduled to be released tomorrow. |
Thanks a lot for testing @jimbogithub |
@aloubyansky maybe those mojos should log something as INFO if they are not needed. |
I am not sure about that, tbh. |
Describe the bug
Upgraded an existing 2.5.1 project to 2.7.1 and then in Eclipse, ran Maven Update. The Maven Update failed with IO errors for "Too Many Files".
On 2.5.1
lsof -p <PID> | wc -l
on the Eclipse process shows just over 1,000 open files for my project.On 2.7.1 it blows through the 10,420 limit and fails. Examining the raw list of files from
lsof -p <PID>
shows many duplicate references to the same files which does not occur for 2.5.1. Looks like it's loading each dependent jar once for each and every project/module.Expected behavior
Maven Update should succeed.
Actual behavior
Maven Update fails.
How to Reproduce?
Create a multi-module Maven project.
Import into Eclipse.
Perform "Maven Update" in Eclipse.
Use
lsof -p <PID>
to observe loaded files.You may not hit the "Too Many Files" error unless you add enough modules, but you'll still see the increased file count and duplicates versus the 2.5.1 behaviour.
P.S. Can be useful to open Eclipse with the
-clean
option between tests to ensure there aren't cached files included (mine was showing some 2.7.1 files even after switching back to 2.5.1).Output of
uname -a
orver
Darwin Kernel Version 21.3.0: Wed Jan 5 21:37:58 PST 2022; root:xnu-8019.80.24~20/RELEASE_ARM64_T6000 arm64
Output of
java -version
Java(TM) SE Runtime Environment (build 17.0.2+8-LTS-86)
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.7.1
Build tool (ie. output of
mvnw --version
orgradlew --version
)Maven 3.8.4
Additional information
Also tested on non Apple Silicon, same result.
The text was updated successfully, but these errors were encountered: