[JBoss JIRA] (JBTM-2553) Investigate the test with byteman do not work with the jacoco
by Andrew Dinn (JIRA)
[ https://issues.jboss.org/browse/JBTM-2553?page=com.atlassian.jira.plugin.... ]
Andrew Dinn edited comment on JBTM-2553 at 11/26/15 4:18 AM:
-------------------------------------------------------------
Doh! I see Amos is way ahead of me here (nice work, Amos :-)
The trace statement Amos inserted shows that the local variable checking code has found an entry in the local var table for $this but one that starts at bytecode offset 4 and ends at offset 535. The injection code is trying to inject the rule at offset 0 i.e. at entry to the code. This is after transformation by Jacoco. With no transformation the local var this is found starting at offset 0.
I have not yet looked at the Jacoco code but it seems pretty obvious what is happening. When Jacoco inserts profiling instructions into the method it updates the start and end offsets for entries in the local variable table to take account of the new code. One of those profiling instruction sequences will be injected at the start of the method and Jacoco appears to be shifting the local var start offset for this so that it comes into scope after the profiling code rather than at bytecode 0. No doubt it is also shifting the start position for method parameter entries.
This is at best unhelpful; actually, I think it is an error because this and the parameters are /always/ in scope from the start of the method even if code is inserted before the start. I thought that ASM fixed this as a special case. Which version of Jacoco is being used here? The latest Jacoco version uses ASM 5 which shoudl deal with this problem. Have you tried updating to a later Jacoco? If that doesn't work I'll take this up with the Jacoco developers.
was (Author: adinn):
Doh! I see Amos is way ahead of me here (nice work, Amos :-)
The trace statement Amos inserted shows that the local variable checking code has found an entry in the local var table for $this but one that starts at bytecode offset 4 and ends at offset 535. The injection code is trying to inject the rule at offset 0 i.e. at entry to the code. This is after transformation by Jacoco. With no transformation the local var this is found tarting at offset 0.
I have not yet looked at the Jacoco code but it seems pretty obvious what is happening. When Jacoco inserts profiling instructions into the method it updates the start and end offsets for entries in the local variable table to take account of the new code. One of those profiling instruction sequences will be injected at the start of the method and Jacoco appears to be shifting the local var start offset for this so that it comes into scope after the profiling code rather than at bytecode 0. No doubt it is also shifting the start position for method parameter entries.
This is at best unhelpful; actually, I think it is an error because this and the parameters are /always/ in scope from the start of the method even if code is inserted before the start. I thought that ASM fixed this as a special case. Which version of Jacoco is being used here? The latest Jacoco version uses ASM 5 which shoudl deal with this problem. Have you tried updating to a later Jacoco? If that doesn't work I'll take this up with the Jacoco developers.
> Investigate the test with byteman do not work with the jacoco
> -------------------------------------------------------------
>
> Key: JBTM-2553
> URL: https://issues.jboss.org/browse/JBTM-2553
> Project: JBoss Transaction Manager
> Issue Type: Sub-task
> Components: Testing
> Reporter: Amos Feng
> Assignee: Amos Feng
> Fix For: 5.next
>
>
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 1 month
[JBoss JIRA] (JBTM-2553) Investigate the test with byteman do not work with the jacoco
by Andrew Dinn (JIRA)
[ https://issues.jboss.org/browse/JBTM-2553?page=com.atlassian.jira.plugin.... ]
Andrew Dinn commented on JBTM-2553:
-----------------------------------
Doh! I see Amos is way ahead of me here (nice work, Amos :-)
The trace statement Amos inserted shows that the local variable checking code has found an entry in the local var table for $this but one that starts at bytecode offset 4 and ends at offset 535. The injection code is trying to inject the rule at offset 0 i.e. at entry to the code. This is after transformation by Jacoco. With no transformation the local var this is found tarting at offset 0.
I have not yet looked at the Jacoco code but it seems pretty obvious what is happening. When Jacoco inserts profiling instructions into the method it updates the start and end offsets for entries in the local variable table to take account of the new code. One of those profiling instruction sequences will be injected at the start of the method and Jacoco appears to be shifting the local var start offset for this so that it comes into scope after the profiling code rather than at bytecode 0. No doubt it is also shifting the start position for method parameter entries.
This is at best unhelpful; actually, I think it is an error because this and the parameters are /always/ in scope from the start of the method even if code is inserted before the start. I thought that ASM fixed this as a special case. Which version of Jacoco is being used here? The latest Jacoco version uses ASM 5 which shoudl deal with this problem. Have you tried updating to a later Jacoco? If that doesn't work I'll take this up with the Jacoco developers.
> Investigate the test with byteman do not work with the jacoco
> -------------------------------------------------------------
>
> Key: JBTM-2553
> URL: https://issues.jboss.org/browse/JBTM-2553
> Project: JBoss Transaction Manager
> Issue Type: Sub-task
> Components: Testing
> Reporter: Amos Feng
> Assignee: Amos Feng
> Fix For: 5.next
>
>
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 1 month
[JBoss JIRA] (JBTM-2553) Investigate the test with byteman do not work with the jacoco
by Amos Feng (JIRA)
[ https://issues.jboss.org/browse/JBTM-2553?page=com.atlassian.jira.plugin.... ]
Amos Feng commented on JBTM-2553:
---------------------------------
I did some debug with the CrashRecovery2
Run with the following command
{code}
./build.sh -f ArjunaJTA/jta/pom.xml clean test -Dtest=CrashRecovery2 -Dorg.jboss.byteman.debug -Dorg.jboss.byteman.verbose -PcodeCoverage
{code}
check the output of the test and it looks like the rule does not be triggered as it can not find the local binding var "$this"
The fail2pc rule is
{code}
RULE Fail 2PC
CLASS com.arjuna.ats.arjuna.coordinator.BasicAction
METHOD phase2Commit
AT ENTRY
BIND NOTHING
IF readCounter("phase2commit") == 0
DO debug("Called"),
incrementCounter("phase2commit");
com.arjuna.ats.arjuna.coordinator.ActionManager.manager().remove($this.get_uid());
RETURN
ENDRULE
{code}
The failure is
{code}
start:4 triggerPos:0 end:535 (I add this debug message in agent/src/main/java/org/jboss/byteman/agent/adapter/RuleCheckMethodAdapter.java)
RuleCheckMethodAdapter.checkBindings : invalid local variable binding $this checking method phase2Commit(Z)V
{code}
if we run without the jacoco, the start and end is {code} start:0 triggerPos:0 end:327 {code}
[~adinn] how do you think about this ?
> Investigate the test with byteman do not work with the jacoco
> -------------------------------------------------------------
>
> Key: JBTM-2553
> URL: https://issues.jboss.org/browse/JBTM-2553
> Project: JBoss Transaction Manager
> Issue Type: Sub-task
> Components: Testing
> Reporter: Amos Feng
> Assignee: Amos Feng
> Fix For: 5.next
>
>
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 1 month
[JBoss JIRA] (JBTM-2568) Add config options to enable fine grained control of what's tested in a PR
by Michael Musgrove (JIRA)
[ https://issues.jboss.org/browse/JBTM-2568?page=com.atlassian.jira.plugin.... ]
Michael Musgrove commented on JBTM-2568:
----------------------------------------
I updated narayana.sh to read any name=value pairs from the pull description and set them as environment variables in the job. In addition, a pair of the form PROFILE=xyz where xyz is one of our standard job axes (QA_JTS_JDKORB, QA_JTA, XTS, MAIN, BLACKTIE, PERF) will just run that single axis for the PR. For example the PR description:
bq. PROFILE=QA_JTS_JDKORB QA_PROFILE=-Dprofile=hornetq QA_TESTGROUP=crashrecovery02_2 QA_TESTMETHODS=CrashRecovery02_2_Test31 NARAYANA_TESTS=0
will result in just the QA_JTS_JDKORB axis being run (PROFILE=QA_JTS_JDKORB) using the journal store (QA_PROFILE=-Dprofile=hornetq). The QA_TESTGROUP and QA_TESTMETHODS environment variable settings will result in just a single method being tested.
> Add config options to enable fine grained control of what's tested in a PR
> --------------------------------------------------------------------------
>
> Key: JBTM-2568
> URL: https://issues.jboss.org/browse/JBTM-2568
> Project: JBoss Transaction Manager
> Issue Type: Feature Request
> Components: Testing
> Affects Versions: 5.2.8.Final
> Reporter: Michael Musgrove
> Assignee: Michael Musgrove
> Priority: Optional
> Fix For: 5.next
>
>
> Currently we have a fixed set of Jenkins CI config profiles when testing PRs (QA_JTS_JDKORB, QA_JTA, XTS, MAIN, BLACKTIE and PERF) and we are allowed to selectively disable one or more of them.
> It would be handy to be able to control other things such as running QA tests using the journal store (which none of the above QA profiles allow). It would also be a handy shortcut to explicitly set which profile to run (as opposed to which ones to disable).
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 1 month