-
Notifications
You must be signed in to change notification settings - Fork 316
FISH-10615 Fix deployment bugs discovered while implementing EAR enhancements #7212
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
Conversation
|
|
8701480 to
39f8f2e
Compare
|
Ready to go. |
fba4f2e to
ca72244
Compare
- fixed current deployment context - made it a regular thread local, not queue - only add CDI bundles that are not UNKNOWN - disable injection on EAR-root context (wrong context mode) - actually destroy deployment ClassLoader shareableTemp correctly - added fish.payara.ear-combined-cdi-deployment property to force combined EAR CDI deployment - Jax-JS Json-B injection retrives the correct BeanManager based on the actual type of the injection point desired
a374a3e to
4f4383c
Compare
|
Kindly asking to include this in 6.2025.3! 👍 🙏 |
|
It looks like the previous PRs (#7032 and #7097) actually break the CDI TCK. They are being reverted for now to allow Jakarta certification to proceed. This PR reduces the number of TCK failures from ~30 to 9, but doesn't give us a clean bill of health. |
|
@Pandrex247 you're so quick to revert everything :( This PR would have probably fixed all the CDK issues... plus it introduces feature flag |
Note that this comes with a cost: It effectively prevents people from upgrading 6.2025.1 to 6.2025.2 due to the severe injection faults reported recently! So unless this PR is merged there should not be another broken 6.2025.3 released, to not confuse users even more with existing-but-not-contained bug fixes. Thanks! BTW, as you are working on that currently, I am about to file another bug report against 6.2025.2: Edit: Documented the new bug in #7233 (comment). |
|
I've created a feature branch to aid collaboration and changed the target of this PR to it. CDI TCK results with everything removed (current state of main - 7eab25d): CDI TCK results of the feature branch without this PR (755db21): CDI TCK results of this PR (4f4383c): |
|
Have you reapplied all 3 PRs? Can you try the feature flag? to see if that helps? |
|
FYI: I assume this new bug (the one in exactly the linked comment, not just the general issue) is related? 🤔 If not, please tell me. Thanks. |
|
With all three applied, and with So no difference, unless I'm applying the system property incorrectly |
|
Sorry yes. Set the property to true |
|
No difference with the property set to true |
|
Any news? 🤔 |
|
I've had limited time to look at this. The descriptions from the two EnterpriseSelectedAlternative TCK tests seem to indicate things are bleeding across when they shouldn't, regardless of
Meanwhile the ResourceAdapterArchiveTest fails to deploy with a class cast / class loader exception: Another test seems to fail with a similar error, though not at deployment time: ApplicationContextSharedTest @lprimak if you want to have a crack at it yourself, running the CDI TCK is possible locally though it takes a bit of set up:
Running against remote profile is also possible, but requires moving into |
|
Andrew, can I roll all 3 PRs into one? That would make things a lot easier... |
|
Which three are you referring to? If you're talking about also pulling in #7165 to this PR (or vice versa) - are they related? I just worry you'll end up with a monster PR that'll be hard to review. |
Fine for me! I really appreciate your dedication! Also, this gives me some time for the missing |
|
Don't cry! 🤗 Looks like this really will be the very last bug (at least if we don't break existing fixes, at least for our real-world EAR 😅):
Good luck! 🎯 |
|
Got the reproducer. However, I am not sure I understand what the desired behavior is, as it looks like the reproducer is working properly. |
|
|
|
I only need to execute That exception of yours is what everybody expects to actually get: It is what should happen without the bug! So it proofs that the bug exists only on Windows. I assume that on Windows (and only on Windows) some special thread group is used. I can hide the bug (and get your correct stack trace) as soon as I don't spawn a process, but simply use my own thread group. Also I get your correct stack trace as soon as the binary (here: So how to proceed? 🤔 I can offer to install remote access software on my dev VM so you can remote debug on Windows (you did that some years back in a related case). |
|
Anyways, you are right. I have deploy the reproducer to Payara CE 6.2025.4 and the bug shows up there, too. So the bug is not related to your PR. Hence, the bug does not stand in the way of merging it. 😃 I will report it against 6.2025.4 in a separate issue. |
|
Reported against Payara CE 6.2025.4: #7324 |
|
@Pandrex247 I hereby confirm that this PR has no more open issues with our real-world EAR. Hence I do not see any need to further delay merging it to trunk. Having said that, as code was changed since the last TCK run, it might make sense to first run the TCK and all other CDI-related tests before merging. |
|
I kicked off a full run last night. I'm verifying if these are valid or if Jenkins just had a blip. |
This is weird. I cannot see how full server can succeed while web-only fails?! 🤔 |
appserver/web/weld-integration/src/main/java/org/glassfish/weld/ACLSingletonProvider.java
Outdated
Show resolved
Hide resolved
@Pandrex247 Yes, this is weird. Do you have a sample stack trace I could look at? I'd just like to sanity check if this is at all related, or could be related. Thank you |
|
They seem to be failing consistently. |
|
So... The CDI TCK fails on So the only thing I can give you is the source and the line it fails on really: ExcludeFiltersTest For WebSockets, I'm really not sure what goes wrong - the web profile distribution of the server just seems to immediately zombie. The TCK runner starts off by deleting domain1 and recreating it with some different ports (which seems to work fine) before then attempting to start the domain - this start just hangs almost immediately. As far as I can tell from the runner it hasn't copied any extra libraries in or done any other config yet - it just immediately hangs on startup. I can actually verify this locally too - any attempt to start even a clean payara-web has it immediately hang. |
|
Ok, I'm able to reproduce the initial hang. This is the root cause of the web TCK failure. It's really weird. Must be some other bug that was uncovered. This is not related to my changes... stay tuned |
|
Well, I take it back. The issue is with the code I touched :) |
|
@Pandrex247 Please run the TCK on the other branch (which is up-to-date with main) |
…I-enabled library JARs (payara#7212) - correctly copy BDA sets for each war in EAR - Make WAR's CDI beans available in EAR-libs - read web-fragment.xml from EAR-libs - processing ear-lib manifest - de-duplicate BDAs in CDI processing by using LinkedHashSet intead of ArrayList - made some structures final (cleanup) - fixed ear and concurrent classloader leaks, including refactored reflection caching enh: loading JARs from <domain_dir>/lib/warlibs if --properies warlibs=true is specified (payara#7097) bugfix: EAR deployment bugs found - fixed current deployment context - made it a regular thread local, not queue - actually destroy deployment ClassLoader shareableTemp correctly - added fish.payara.ear-combined-cdi-deployment property to force combined EAR CDI deployment - Jax-JS Json-B injection retrives the correct BeanManager based on the actual type of the injection point desired
…I-enabled library JARs (payara#7032) - correctly copy BDA sets for each war in EAR - Make WAR's CDI beans available in EAR-libs - read web-fragment.xml from EAR-libs - processing ear-lib manifest - de-duplicate BDAs in CDI processing by using LinkedHashSet intead of ArrayList - made some structures final (cleanup) - fixed ear and concurrent classloader leaks, including refactored reflection caching enh: loading JARs from <domain_dir>/lib/warlibs if --properies warlibs=true is specified (payara#7097) bugfix: EAR deployment bugs found (payara#7212) - fixed current deployment context - made it a regular thread local, not queue - actually destroy deployment ClassLoader shareableTemp correctly - added fish.payara.ear-combined-cdi-deployment property to force combined EAR CDI deployment - Jax-JS Json-B injection retrives the correct BeanManager based on the actual type of the injection point desired
…I-enabled library JARs (payara#7032) - correctly copy BDA sets for each war in EAR - Make WAR's CDI beans available in EAR-libs - read web-fragment.xml from EAR-libs - processing ear-lib manifest - de-duplicate BDAs in CDI processing by using LinkedHashSet intead of ArrayList - made some structures final (cleanup) - fixed ear and concurrent classloader leaks, including refactored reflection caching enh: loading JARs from <domain_dir>/lib/warlibs if --properies warlibs=true is specified (payara#7097) bugfix: EAR deployment bugs found (payara#7212) - fixed current deployment context - made it a regular thread local, not queue - actually destroy deployment ClassLoader shareableTemp correctly - added fish.payara.ear-combined-cdi-deployment property to force combined EAR CDI deployment - Jax-JS Json-B injection retrives the correct BeanManager based on the actual type of the injection point desired
…n-ear-libs` system proeprty that's no longer necessary
…I-enabled library JARs (payara#7032) - correctly copy BDA sets for each war in EAR - Make WAR's CDI beans available in EAR-libs - read web-fragment.xml from EAR-libs - processing ear-lib manifest - de-duplicate BDAs in CDI processing by using LinkedHashSet intead of ArrayList - made some structures final (cleanup) - fixed ear and concurrent classloader leaks, including refactored reflection caching enh: loading JARs from <domain_dir>/lib/warlibs if --properies warlibs=true is specified (payara#7097) bugfix: EAR deployment bugs found (payara#7212) - fixed current deployment context - made it a regular thread local, not queue - actually destroy deployment ClassLoader shareableTemp correctly - added fish.payara.ear-combined-cdi-deployment property to force combined EAR CDI deployment - Jax-JS Json-B injection retrives the correct BeanManager based on the actual type of the injection point desired
…I-enabled library JARs (payara#7032) - correctly copy BDA sets for each war in EAR - Make WAR's CDI beans available in EAR-libs - read web-fragment.xml from EAR-libs - processing ear-lib manifest - de-duplicate BDAs in CDI processing by using LinkedHashSet intead of ArrayList - made some structures final (cleanup) - fixed ear and concurrent classloader leaks, including refactored reflection caching enh: loading JARs from <domain_dir>/lib/warlibs if --properies warlibs=true is specified (payara#7097) bugfix: EAR deployment bugs found (payara#7212) - fixed current deployment context - made it a regular thread local, not queue - actually destroy deployment ClassLoader shareableTemp correctly - added fish.payara.ear-combined-cdi-deployment property to force combined EAR CDI deployment - Jax-JS Json-B injection retrives the correct BeanManager based on the actual type of the injection point desired
|
Superseded by #7314 |
…I-enabled library JARs (payara#7032) - correctly copy BDA sets for each war in EAR - Make WAR's CDI beans available in EAR-libs - read web-fragment.xml from EAR-libs - processing ear-lib manifest - de-duplicate BDAs in CDI processing by using LinkedHashSet intead of ArrayList - made some structures final (cleanup) - fixed ear and concurrent classloader leaks, including refactored reflection caching enh: loading JARs from <domain_dir>/lib/warlibs if --properies warlibs=true is specified (payara#7097) bugfix: EAR deployment bugs found (payara#7212) - fixed current deployment context - made it a regular thread local, not queue - actually destroy deployment ClassLoader shareableTemp correctly - added fish.payara.ear-combined-cdi-deployment property to force combined EAR CDI deployment - Jax-JS Json-B injection retrives the correct BeanManager based on the actual type of the injection point desired
Description
While working on EAR enhancements, I ran into a few bugs. These are fixed by this PR:
leading to deployment failures on artifacts that should succeed.
nullkey discovered inbundleToBeanDeploymentArchive.put()methodcurrentDeploymentContextfromThreadLocal<Deque>toThreadLocalasDequewas unnecessary and causing bugsfish.payara.ear-combined-cdi-deploymentApplication and System property to force "old" EAR behaviorCommit message:
Fixes #7201
Fixes #7214
Fixes #7215
Fixes #7233