[wildfly-dev] issues with IBM JVM on Linux

Jason T. Greene jason.greene at redhat.com
Fri Sep 25 09:41:57 EDT 2015


Sounds like bad opto. Can you try with -Xint?

> On Sep 25, 2015, at 8:09 AM, Alexey Loubyansky <alexey.loubyansky at redhat.com> wrote:
> 
> I've been trying to narrow down sporadic failures in the wfcore patching 
> tests on the IBM JVM on Linux (version info below) for the last few 
> days. I wanted to share this because what I see doesn't make sense to 
> me. And I am not sure whether other modules have similar issues.
> 
> So, in patching tests the (sporadic) problem appears when parsing XML 
> attributes. E.g. if there is an element with attributes 'name' and 
> 'add-on', sometimes the value of name will end up containing the value 
> of add-on attribute. Here is the actual code for this (Attribute is an 
> enum) from org.jboss.as.patching.metadata.PatchXmlUtils:
> 
> String name = null;
> boolean isAddOn = false;
> final int count = reader.getAttributeCount();
> for (int i = 0; i < count; i++) {
>     final String value = reader.getAttributeValue(i);
>     final Attribute attribute = 
> Attribute.forName(reader.getAttributeLocalName(i));
>     if(Attribute.NAME == attribute) {
>         name = value;
>     } else if (Attribute.ADD_ON == attribute) {
>         isAddOn = Boolean.valueOf(value);
>     } else {
>         throw unexpectedAttribute(reader, i);
>     }
> }
> 
> So, sometimes the tests fail because the value of name is 'true', 
> apparently. This is just one example. It affects parsing attributes in 
> general in this class.
> 
> I noticed that if I do anything with variable 'value' in the loop (or 
> pass it as an argument to some method and actually do something with it 
> in that method), e.g. System.err.println("value=" + value); the problem 
> goes away.
> 
> Another workaround I've found is to inline the variable, i.e. use 
> reader.getAttributeValue(i) directly instead of using a variable.
> 
> By the "problem goes away" I mean that I haven't seen these kind of 
> failures anymore with the changes I mentioned. To give some statistics, 
> with the original code the tests would fail from 2 to 5 times out of 10 
> runs.
> With the inlined variable value they pass 100%. I've be running them for 
> 3 days now.
> 
> Here is the JVM info.
> 
> java version "1.8.0"
> Java(TM) SE Runtime Environment (build pxi3280-20150129_02)
> IBM J9 VM (build 2.8, JRE 1.8.0 Linux x86-32 20150116_231420 (JIT 
> enabled, AOT enabled)
> J9VM - R28_Java8_GA_20150116_2030_B231420
> JIT  - tr.r14.java_20150109_82886.02
> GC   - R28_Java8_GA_20150116_2030_B231420
> J9CL - 20150116_231420)
> JCL - 20150123_01 based on Oracle jdk8u31-b12
> 
> 
> Any ideas or suggestions?
> 
> 
> Thanks,
> Alexey
> _______________________________________________
> wildfly-dev mailing list
> wildfly-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/wildfly-dev



More information about the wildfly-dev mailing list