You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After updating to PiTest 1.9.3 we are seeing RUN_ERROR when running PiTest. I have tested with PiTest 1.9.2 that does not fail.
When running with verbose logging I get the following error
stdout : Hotswap loader jdk.internal.loader.ClassLoaders$AppClassLoader@5e2de80c
stdout : java.lang.UnsupportedOperationException: class redefinition failed: attempted to delete a method
stdout : at java.instrument/sun.instrument.InstrumentationImpl.redefineClasses0(Native Method)
stdout : at java.instrument/sun.instrument.InstrumentationImpl.redefineClasses(InstrumentationImpl.java:195)
stdout : at org.pitest.boot.HotSwapAgent.hotSwap(HotSwapAgent.java:46)
stdout : at org.pitest.mutationtest.execute.HotSwap.apply(HotSwap.java:30)
stdout : at org.pitest.mutationtest.execute.HotSwap.apply(HotSwap.java:9)
stdout : at org.pitest.mutationtest.execute.MutationTestWorker.handleCoveredMutation(MutationTestWorker.java:149)
stdout : at org.pitest.mutationtest.execute.MutationTestWorker.handleMutation(MutationTestWorker.java:126)
stdout : at org.pitest.mutationtest.execute.MutationTestWorker.processMutation(MutationTestWorker.java:108)
stdout : at org.pitest.mutationtest.execute.MutationTestWorker.run(MutationTestWorker.java:79)
stdout : at org.pitest.mutationtest.execute.MutationTestMinion.run(MutationTestMinion.java:99)
stdout : at org.pitest.mutationtest.execute.MutationTestMinion.main(MutationTestMinion.java:148)
stderr : 19.16.45 PIT >> WARNING : Error during mutation test
stderr : java.lang.UnsupportedOperationException: class redefinition failed: attempted to delete a method
stderr : at java.instrument/sun.instrument.InstrumentationImpl.redefineClasses0(Native Method)
stderr : at java.instrument/sun.instrument.InstrumentationImpl.redefineClasses(InstrumentationImpl.java:195)
stderr : at org.pitest.boot.HotSwapAgent.hotSwap(HotSwapAgent.java:46)
stderr : at org.pitest.mutationtest.execute.HotSwap.apply(HotSwap.java:30)
stderr : at org.pitest.mutationtest.execute.HotSwap.apply(HotSwap.java:9)
stderr : at org.pitest.mutationtest.execute.MutationTestWorker.handleCoveredMutation(MutationTestWorker.java:149)
stderr : at org.pitest.mutationtest.execute.MutationTestWorker.handleMutation(MutationTestWorker.java:126)
stderr : at org.pitest.mutationtest.execute.MutationTestWorker.processMutation(MutationTestWorker.java:108)
stderr : at org.pitest.mutationtest.execute.MutationTestWorker.run(MutationTestWorker.java:79)
stderr : at org.pitest.mutationtest.execute.MutationTestMinion.run(MutationTestMinion.java:99)
stderr : at org.pitest.mutationtest.execute.MutationTestMinion.main(MutationTestMinion.java:148)
19.16.45 PIT >> FINE : Exit code was - UNKNOWN_ERROR
19.16.45 PIT >> WARNING : Minion exited abnormally due to RUN_ERROR
19.16.45 PIT >> FINE : Setting 1 unfinished runs to RUN_ERROR state
Digging into the changes between 1.9.2 and 1.9.3 I have tried modifying the argLine parameter and this seems to be the problematic change. The JaCoCo agent is accidentally enabled if the argLine has not been explicitly set. See below.
The options here are limited as prior to the change other users had the opposite problem (important argline arguments weren't picked up by default).
Possibilities include
Toggle argline inclusion on/off with a flag (but this just moved the problem so one group or another has to debug in order to switch off the defauilt value).
If jacoco is on the argline throw an error telling the user to remove it
Try and automatically remove jacoco from the argline (or otherwise disable it)
Option 3 seems best, but would be easy to mess up as there will be some variation in what the argline looks like.
Option 2 should be straigthforward
Not sure Option 1 really solves or improves anything.
5. Try and remove jacoco from the argline
After updating to PiTest 1.9.3 we are seeing RUN_ERROR when running PiTest. I have tested with PiTest 1.9.2 that does not fail.
When running with verbose logging I get the following error
Digging into the changes between 1.9.2 and 1.9.3 I have tried modifying the argLine parameter and this seems to be the problematic change. The JaCoCo agent is accidentally enabled if the argLine has not been explicitly set. See below.
Without setting ArgLine:
"C:\Program Files\Eclipse Foundation\jdk-17.0.0.35-hotspot\bin\java" -Djava.awt.headless=true -javaagent:C:\\Users\\ebo\\.m2\\repository\\org\\jacoco\\org.jacoco.agent\\0.8.8\\org.jacoco.agent-0.8.8-runtime.jar=destfile=C:\\Users\\ebo\\src\\pbc\\core\\contract\\target\\jacoco.exec -javaagent:C:\Users\ebo\AppData\Local\Temp\16593783398090350423204432893312611738940937464797.jar "-Dclassworlds.conf=C:/Program Files (x86)/apache-maven-3.6.3/bin/m2.conf" "-Dmaven.home=C:/Program Files (x86)/apache-maven-3.6.3" "-Dlibrary.jansi.path=C:/Program Files (x86)/apache-maven-3.6.3/lib/jansi-native" -Dmaven.multiModuleProjectDirectory=C:/Users/ebo/src/pbc/core/contract org.pitest.mutationtest.execute.MutationTestMinion 54271
With ArgLine set with -DargLine='':
"C:\Program Files\Eclipse Foundation\jdk-17.0.0.35-hotspot\bin\java" -Djava.awt.headless=true -javaagent:C:\Users\ebo\AppData\Local\Temp\1659378250879088791656585998567406604286261976640.jar "-Dclassworlds.conf=C:/Program Files (x86)/apache-maven-3.6.3/bin/m2.conf" "-Dmaven.home=C:/Program Files (x86)/apache-maven-3.6.3" "-Dlibrary.jansi.path=C:/Program Files (x86)/apache-maven-3.6.3/lib/jansi-native" -Dmaven.multiModuleProjectDirectory=C:/Users/ebo/src/pbc/core/contract org.pitest.mutationtest.execute.MutationTestMinion 53977
With PiTest 1.9.2
"C:\Program Files\Eclipse Foundation\jdk-17.0.0.35-hotspot\bin\java" -Djava.awt.headless=true -javaagent:C:\Users\ebo\AppData\Local\Temp\165937861524900867023834234013112109174415442643105.jar "-Dclassworlds.conf=C:/Program Files (x86)/apache-maven-3.6.3/bin/m2.conf" "-Dmaven.home=C:/Program Files (x86)/apache-maven-3.6.3" "-Dlibrary.jansi.path=C:/Program Files (x86)/apache-maven-3.6.3/lib/jansi-native" -Dmaven.multiModuleProjectDirectory=C:/Users/ebo/src/pbc/core/contract org.pitest.mutationtest.execute.MutationTestMinion 51602
The text was updated successfully, but these errors were encountered: