We're updating the issue view to help you get more done. 

AddressInputStreamTest fails transiently on gcstress configuration

Description

The test testReadOfByteArray() from the unit test AddressInputStreamTest fails transiently on the gcstress configuration. The method reads 3 values from a byte array and one of the read values is 0 instead of the expected 127:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 Testsuite: org.jikesrvm.util.AddressInputStreamTest Tests run: 11, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 8.248 sec [...] Testcase: testReadOfByteArray took 1.395 sec FAILED Expected: is <127> got: <0> junit.framework.AssertionFailedError: Expected: is <127> got: <0> at org.jikesrvm.util.AddressInputStreamTest.testReadOfByteArray(AddressInputStreamTest.java:82) at org.jikesrvm.classloader.ReflectionBase$$Reflect37914.invokeInternal(Unknown Source:0) at org.jikesrvm.runtime.ReflectionBase.invoke(ReflectionBase.java:164) at org.jikesrvm.runtime.Reflection.invoke(Reflection.java:91) at java.lang.reflect.VMCommonLibrarySupport.invokeVirtual(VMCommonLibrarySupport.java:234) at java.lang.reflect.VMCommonLibrarySupport.invoke(VMCommonLibrarySupport.java:175) at java.lang.reflect.VMMethod.invoke(VMMethod.java:89) at org.jikesrvm.junit.runners.VMRequirements.runChild(VMRequirements.java:51) at org.jikesrvm.junit.runners.VMRequirements.runChild(VMRequirements.java:31)

The problem occurs on both IA32 (32-bit) and PPC64, so it's likely to be in a machine-independent part of the VM.

On my IA32 machine, the failure rate seems to be at least 20% so it should be easy to reproduce this problem.

Environment

IA32 (32-bit), ppc64

Status

Assignee

Erik Brangs

Reporter

Erik Brangs

Labels

None

External issue ID

None

Components

Fix versions

Affects versions

3.1.3

Priority

Medium