-
Notifications
You must be signed in to change notification settings - Fork 597
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
Runtime injection of detailed method trace fails for a CDI bean #16007
Comments
I talked to @JDUNNIN but was unable to reproduce the problem in my environment using their code and the same Java and liberty version, so there seems to be something a little more subtle going on. We do have CDI bean classes within liberty which are instrumented successfully and indeed when I tried to reproduce the problem, I could see trace messaged emitted by the class. Based on this, I don't think the problem is related to CDI, and I'm transferring this to @cbridgha who's more familiar with our trace instrumentation, but I'm happy to answer any questions which might come up regarding CDI. |
Hi @cbridgha have you got any update on this at all? This will start to become a bigger problem for us in next couple of months. |
Hi - using |
Re-opening as the issue is present still - I can only think I must have tested it wrong. |
Currently using version:
|
Stack trace for failure:
|
We are still hitting this at 22.0.0.3
|
See the included "notes/notes-09-Nov-2022.txt" for more information. |
Followups will depend on the prognosis of having the ASM issue accepted, and on the timeliness of a fix to ASM. |
Per ObjectWorks, this is a Liberty bug: Thanks for the detailed report! COMPUTE_MAXS does not generate any frames. For me the invalid frame is generated by OpenLiberty, here: You can see that the FULL frame is generated from the constructor parameters, and only from these parameters. But this is incorrect. In your case this is missing the local variable from the ASTORE 1 instruction (instruction #1). In summary, I think this is a bug in OpenLiberty. |
My best sense is that a problem occurs in particular with ZosAssetFactoryManager because of the presence of other injected code. In the problem method: public com.ibm.zosconnect.engine.impl.ZosAssetFactoryManager(); Note that injected invocation of $jacocoInit. I'm thinking the Liberty trace does not account for this added injected code, and as a result generates an incorrect stack frame. |
The customer confirmed that removal of the JaCoCo injected code fixes the problem. |
Describe the bug
Trace injection may generate non-valid byte codes. For example:
Steps to Reproduce
Start the server with problem classes. A project which reproduces the problem with a test class is attached. See also the linked ASM issue.
Expected behavior
Correct byte codes should be generated. A VerifyError should not occur.
Diagnostic information:
** Additional information:**
This seemed to be a problem in ASM (both 9.3 and 9.4 reproduce the problem), and an issue was raised:
https://gitlab.ow2.org/asm/asm/-/issues/317986
ASM helpfully reviewed the issue and discovered a step in Liberty code generation which is adding the incorrect stack frame. From the ASM issue:
My best sense is that a problem occurs in particular with ZosAssetFactoryManager because of the presence of other injected code. In the problem method:
Note that injected invocation of
$jacocoInit
. I'm thinking the Liberty trace does not account for this added injected code, and as a result generates an incorrect stack frame.The text was updated successfully, but these errors were encountered: