Skip to content
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

Understand and fix luckily catched dangerous irreproducible bug #16

Closed
leventov opened this issue Feb 5, 2014 · 1 comment
Closed
Assignees
Labels
Milestone

Comments

@leventov
Copy link
Owner

leventov commented Feb 5, 2014

Once I tried to build the project I catched an irreproducible bug. A single failed test among 300K. It occured with the map with byte keys, therefore it's probability should be in order 1/256-1/128, and it is probably related to replacement of special free/removed values during insertion.

JUnit message:

testIterator_unknownOrderRemoveSupported[Tests of mutable ByteFloatMaps. Key samples: [0, -128, 127, 1, -2]. Value samples: [0.0, NaN, 3.4028235E38, 1.0, -2.0]. Factory: HashByteFloatMapFactory[keyConfig=ByteHashConfig[hashConfig=HashConfig[loadFactor[loadFactor=0.5,shrinkCondition=null,defaultExpectedSize=10],lowerKeyDomainBound=-128,upperKeyDomainBound=127],defaultValue=0.0]. Special features: [RESTRICTS_KEYS, RESTRICTS_VALUES]. [collection size: several] values [collection size: several]]

junit.framework.AssertionFailedError: failed with stimuli [hasNext, next, next, remove]
    at com.google.common.collect.testing.Helpers.fail(Helpers.java:164)
    at com.google.common.collect.testing.AbstractIteratorTester.compareResultsForThisListOfStimuli(AbstractIteratorTester.java:418)
    at com.google.common.collect.testing.AbstractIteratorTester.recurse(AbstractIteratorTester.java:383)
    at com.google.common.collect.testing.AbstractIteratorTester.recurse(AbstractIteratorTester.java:388)
    at com.google.common.collect.testing.AbstractIteratorTester.recurse(AbstractIteratorTester.java:388)
    at com.google.common.collect.testing.AbstractIteratorTester.recurse(AbstractIteratorTester.java:388)
    at com.google.common.collect.testing.AbstractIteratorTester.recurse(AbstractIteratorTester.java:388)
    at com.google.common.collect.testing.AbstractIteratorTester.recurse(AbstractIteratorTester.java:388)
    at com.google.common.collect.testing.AbstractIteratorTester.test(AbstractIteratorTester.java:372)
    at com.google.common.collect.testing.testers.CollectionIteratorTester.runIteratorTest(CollectionIteratorTester.java:96)
    at com.google.common.collect.testing.testers.CollectionIteratorTester.testIterator_unknownOrderRemoveSupported(CollectionIteratorTester.java:84)
    at sun.reflect.GeneratedMethodAccessor53.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    at junit.framework.TestCase.runTest(TestCase.java:176)
    at junit.framework.TestCase.runBare(TestCase.java:141)
    at junit.framework.TestResult$1.protect(TestResult.java:122)
    at junit.framework.TestResult.runProtected(TestResult.java:142)
    at junit.framework.TestResult.run(TestResult.java:125)
    at junit.framework.TestCase.run(TestCase.java:129)
    at junit.framework.TestSuite.runTest(TestSuite.java:255)
    at junit.framework.TestSuite.run(TestSuite.java:250)
    at junit.framework.TestSuite.runTest(TestSuite.java:255)
    at junit.framework.TestSuite.run(TestSuite.java:250)
    at junit.framework.TestSuite.runTest(TestSuite.java:255)
    at junit.framework.TestSuite.run(TestSuite.java:250)
    at junit.framework.TestSuite.runTest(TestSuite.java:255)
    at junit.framework.TestSuite.run(TestSuite.java:250)
    at junit.framework.TestSuite.runTest(TestSuite.java:255)
    at junit.framework.TestSuite.run(TestSuite.java:250)
    at junit.framework.TestSuite.runTest(TestSuite.java:255)
    at junit.framework.TestSuite.run(TestSuite.java:250)
    at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:84)
    at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecuter.runTestClass(JUnitTestClassExecuter.java:86)
    at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecuter.execute(JUnitTestClassExecuter.java:49)
    at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassProcessor.processTestClass(JUnitTestClassProcessor.java:69)
    at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:50)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
    at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
    at org.gradle.messaging.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:32)
    at org.gradle.messaging.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
    at com.sun.proxy.$Proxy2.processTestClass(Unknown Source)
    at org.gradle.api.internal.tasks.testing.worker.TestWorker.processTestClass(TestWorker.java:103)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
    at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
    at org.gradle.messaging.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:355)
    at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:64)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:744)
Caused by: junit.framework.AssertionFailedError: did not contain expected element 0.0, expected = [NaN, 0.0], actual = [NaN]
    at junit.framework.Assert.fail(Assert.java:57)
    at com.google.common.collect.testing.Helpers.assertEqualIgnoringOrder(Helpers.java:91)
    at com.google.common.collect.testing.AbstractContainerTester.expectContents(AbstractContainerTester.java:110)
    at com.google.common.collect.testing.testers.CollectionIteratorTester.access$200(CollectionIteratorTester.java:48)
    at com.google.common.collect.testing.testers.CollectionIteratorTester$1.verify(CollectionIteratorTester.java:104)
    at com.google.common.collect.testing.AbstractIteratorTester.compareResultsForThisListOfStimuli(AbstractIteratorTester.java:416)
    ... 56 more
@leventov leventov self-assigned this Feb 5, 2014
@leventov leventov added Tests and removed Tests labels Feb 5, 2014
@peter-lawrey
Copy link
Contributor

Good work.
On 5 Feb 2014 19:05, "Roman Leventov" notifications@github.com wrote:

Once I tried to build the project I catched an irreproducible bug. A
single failed test among 300K. It occured with the map with byte keys,
therefore it's probability should be in order 1/256-1/128, and it is
probably related to replacement of special free/removed values during
insertion.

JUnit message:

testIterator_unknownOrderRemoveSupported[Tests of mutable ByteFloatMaps. Key samples: [0, -128, 127, 1, -2]. Value samples: [0.0, NaN, 3.4028235E38, 1.0, -2.0]. Factory: HashByteFloatMapFactory[keyConfig=ByteHashConfig[hashConfig=HashConfig[loadFactor[loadFactor=0.5,shrinkCondition=null,defaultExpectedSize=10],lowerKeyDomainBound=-128,upperKeyDomainBound=127],defaultValue=0.0]. Special features: [RESTRICTS_KEYS, RESTRICTS_VALUES]. [collection size: several] values [collection size: several]]

junit.framework.AssertionFailedError: failed with stimuli [hasNext, next, next, remove]
at com.google.common.collect.testing.Helpers.fail(Helpers.java:164)
at com.google.common.collect.testing.AbstractIteratorTester.compareResultsForThisListOfStimuli(AbstractIteratorTester.java:418)
at com.google.common.collect.testing.AbstractIteratorTester.recurse(AbstractIteratorTester.java:383)
at com.google.common.collect.testing.AbstractIteratorTester.recurse(AbstractIteratorTester.java:388)
at com.google.common.collect.testing.AbstractIteratorTester.recurse(AbstractIteratorTester.java:388)
at com.google.common.collect.testing.AbstractIteratorTester.recurse(AbstractIteratorTester.java:388)
at com.google.common.collect.testing.AbstractIteratorTester.recurse(AbstractIteratorTester.java:388)
at com.google.common.collect.testing.AbstractIteratorTester.recurse(AbstractIteratorTester.java:388)
at com.google.common.collect.testing.AbstractIteratorTester.test(AbstractIteratorTester.java:372)
at com.google.common.collect.testing.testers.CollectionIteratorTester.runIteratorTest(CollectionIteratorTester.java:96)
at com.google.common.collect.testing.testers.CollectionIteratorTester.testIterator_unknownOrderRemoveSupported(CollectionIteratorTester.java:84)
at sun.reflect.GeneratedMethodAccessor53.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at junit.framework.TestCase.runTest(TestCase.java:176)
at junit.framework.TestCase.runBare(TestCase.java:141)
at junit.framework.TestResult$1.protect(TestResult.java:122)
at junit.framework.TestResult.runProtected(TestResult.java:142)
at junit.framework.TestResult.run(TestResult.java:125)
at junit.framework.TestCase.run(TestCase.java:129)
at junit.framework.TestSuite.runTest(TestSuite.java:255)
at junit.framework.TestSuite.run(TestSuite.java:250)
at junit.framework.TestSuite.runTest(TestSuite.java:255)
at junit.framework.TestSuite.run(TestSuite.java:250)
at junit.framework.TestSuite.runTest(TestSuite.java:255)
at junit.framework.TestSuite.run(TestSuite.java:250)
at junit.framework.TestSuite.runTest(TestSuite.java:255)
at junit.framework.TestSuite.run(TestSuite.java:250)
at junit.framework.TestSuite.runTest(TestSuite.java:255)
at junit.framework.TestSuite.run(TestSuite.java:250)
at junit.framework.TestSuite.runTest(TestSuite.java:255)
at junit.framework.TestSuite.run(TestSuite.java:250)
at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:84)
at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecuter.runTestClass(JUnitTestClassExecuter.java:86)
at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecuter.execute(JUnitTestClassExecuter.java:49)
at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassProcessor.processTestClass(JUnitTestClassProcessor.java:69)
at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:50)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
at org.gradle.messaging.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:32)
at org.gradle.messaging.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
at com.sun.proxy.$Proxy2.processTestClass(Unknown Source)
at org.gradle.api.internal.tasks.testing.worker.TestWorker.processTestClass(TestWorker.java:103)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
at org.gradle.messaging.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:355)
at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:64)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:744)
Caused by: junit.framework.AssertionFailedError: did not contain expected element 0.0, expected = [NaN, 0.0], actual = [NaN]
at junit.framework.Assert.fail(Assert.java:57)
at com.google.common.collect.testing.Helpers.assertEqualIgnoringOrder(Helpers.java:91)
at com.google.common.collect.testing.AbstractContainerTester.expectContents(AbstractContainerTester.java:110)
at com.google.common.collect.testing.testers.CollectionIteratorTester.access$200(CollectionIteratorTester.java:48)
at com.google.common.collect.testing.testers.CollectionIteratorTester$1.verify(CollectionIteratorTester.java:104)
at com.google.common.collect.testing.AbstractIteratorTester.compareResultsForThisListOfStimuli(AbstractIteratorTester.java:416)
... 56 more

Reply to this email directly or view it on GitHubhttps://github.com//issues/16
.

leventov added a commit that referenced this issue Feb 28, 2014
…tical in impl.hash.CharHashFactory. Added tests for this.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants