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

IllegalStateException in TwoValuesContainer triggered from Index.insert(Chunk). #652

Closed
jcferretti opened this issue May 21, 2021 · 0 comments
Labels
bug Something isn't working triage

Comments

@jcferretti
Copy link
Member

jcferretti commented May 21, 2021

The following test fails:

    @Test
    public void testAddValuesUnsafeRegression() {
        RspBitmap rb = new RspBitmap();
        rb = rb.add(3);
        final WritableLongChunk<OrderedKeyIndices> chunk = WritableLongChunk.makeWritableChunk(4);
        chunk.setSize(0);
        chunk.add(4);
        chunk.add(BLOCK_SIZE + 10);
        // we saw: "java.lang.IllegalStateException: iv1=3, iv2=4"
        rb.addValuesUnsafeNoWriteCheck(chunk, 0, 2);
    }

Originally reported by Charles on the DHE side, where he saw:

java.lang.IllegalStateException: iv1=1, iv2=2
         at com.illumon.iris.db.v2.utils.rsp.container.TwoValuesContainer.<init>(TwoValuesContainer.java:23)
         at com.illumon.iris.db.v2.utils.rsp.RspBitmap.createOrUpdateContainerForValues(RspBitmap.java:260)
         at com.illumon.iris.db.v2.utils.rsp.RspBitmap.addValuesUnsafeNoWriteCheck(RspBitmap.java:199)
         at com.illumon.iris.db.v2.utils.rsp.RspBitmap.addValuesUnsafe(RspBitmap.java:173)
         at com.illumon.iris.db.v2.utils.rsp.RspBitmap.ixInsertSecondHalf(RspBitmap.java:1704)
         at com.illumon.iris.db.v2.utils.TreeIndexImpl.ixInsert(TreeIndexImpl.java:42)
         at com.illumon.iris.db.v2.utils.CurrentOnlyIndex.insert(CurrentOnlyIndex.java:68)
         at com.illumon.iris.db.v2.by.FirstOrLastChunkedOperator.addChunk(FirstOrLastChunkedOperator.java:169)
         at com.illumon.iris.db.v2.by.FirstOrLastChunkedOperator.addChunk(FirstOrLastChunkedOperator.java:52)
         at com.illumon.iris.db.v2.by.ChunkedOperatorAggregationHelper$KeyedUpdateContext.propagateInsertsToOperators(ChunkedOperatorAggregationHelper.java:592)
         at com.illumon.iris.db.v2.by.ChunkedOperatorAggregationHelper$KeyedUpdateContext.doInsertsForChunk(ChunkedOperatorAggregationHelper.java:564)
         at com.illumon.iris.db.v2.by.ChunkedOperatorAggregationHelper$KeyedUpdateContext.doInserts(ChunkedOperatorAggregationHelper.java:551)
         at com.illumon.iris.db.v2.by.ChunkedOperatorAggregationHelper$KeyedUpdateContext.computeDownstreamIndicesAndCopyKeys(ChunkedOperatorAggregationHelper.java:458)
         at com.illumon.iris.db.v2.by.ChunkedOperatorAggregationHelper$KeyedUpdateContext.access$100(ChunkedOperatorAggregationHelper.java:240)
         at com.illumon.iris.db.v2.by.ChunkedOperatorAggregationHelper$1.onUpdate(ChunkedOperatorAggregationHelper.java:175)
         at com.illumon.iris.db.v2.InstrumentedShiftAwareListener$Notification.lambda$run$0(InstrumentedShiftAwareListener.java:36)
         at com.illumon.iris.db.v2.InstrumentedListenerBase$NotificationBase.doRunInternal(InstrumentedListenerBase.java:241)
         at com.illumon.iris.db.v2.InstrumentedListenerBase$NotificationBase.doRun(InstrumentedListenerBase.java:223)
         at com.illumon.iris.db.v2.InstrumentedShiftAwareListener$Notification.run(InstrumentedShiftAwareListener.java:36)
         at com.illumon.iris.db.tables.live.LiveTableMonitor$QueueNotificationProcessor.doWork(LiveTableMonitor.java:1208)
         at com.illumon.iris.db.tables.live.LiveTableMonitor.flushNormalNotifications(LiveTableMonitor.java:1015)
         at com.illumon.iris.db.tables.live.LiveTableMonitor.flushNotificationsAndCompleteCycle(LiveTableMonitor.java:975)
         at com.illumon.iris.db.tables.live.LiveTableMonitor.lambda$refreshAllTables$7(LiveTableMonitor.java:1444)
         at com.illumon.util.locks.FunctionalLock.computeLocked(FunctionalLock.java:62)
         at com.illumon.iris.db.tables.live.LiveTableMonitor.refreshAllTables(LiveTableMonitor.java:1428)
         at com.illumon.iris.db.tables.live.LiveTableMonitor.refreshTablesAndFlushNotifications(LiveTableMonitor.java:1245)
         at com.illumon.iris.db.tables.live.LiveTableMonitor.access$200(LiveTableMonitor.java:61)
         at com.illumon.iris.db.tables.live.LiveTableMonitor$1.run(LiveTableMonitor.java:183)
@jcferretti jcferretti added bug Something isn't working triage labels May 21, 2021
jcferretti pushed a commit to jcferretti/deephaven-core that referenced this issue May 21, 2021
devinrsmith added a commit to devinrsmith/deephaven-core that referenced this issue May 25, 2021
…-check

* upstream/main:
  Check documentation labels, fixes deephaven#627 (deephaven#671)
  Fix integer overflow in SortedRanges.invertOnNew.  Fixes deephaven#666. (deephaven#667)
  Fix integer overflow in SortedRanges.subRangeByPos. Fixes deephaven#664 (deephaven#665)
  Deploy example scripts and data (deephaven#562)
  port the numba integration prototype from Enterprise to OSS, fixes feature-523 (deephaven#638)
  Fix IllegalStateException in TwoValuesContainer triggered from Index.insert(Chunk). Fixes deephaven#652. (deephaven#653)
  Javadoc search (deephaven#645)
  Support for jpy integration junit tests (deephaven#632)
  Populate snapshot request in js api, handle optional left table (deephaven#648)
  Fix a link formatting bug in CONTRIBUTING.md (deephaven#629)
devinrsmith added a commit to devinrsmith/deephaven-core that referenced this issue May 28, 2021
* tag 'v0.0.2': (29 commits)
  Move label information to CI
  remove labels
  try pushing to my own org
  try actor
  Upgrade to GITHUB_TOKEN instead of PAT
  Explicit about docker/build-push-action version
  Explicit about docker/login-action version
  Explicit about docker/setup-buildx-action version
  Remove extraneous comments
  Update docker metadata steps
  Remove top level building of deephaven-jpy in CI, is handled implicitly in grpc-api step
  Fix nightly check (deephaven#641)
  Address `QueryTableTest.testReverseClipping` table reachability bug, and unit test listeners using `RetentionCache` (deephaven#644)
  Rename symbols in .proto files to follow standard conventions (deephaven#674)
  Check documentation labels, fixes deephaven#627 (deephaven#671)
  Fix integer overflow in SortedRanges.invertOnNew.  Fixes deephaven#666. (deephaven#667)
  Fix integer overflow in SortedRanges.subRangeByPos. Fixes deephaven#664 (deephaven#665)
  Deploy example scripts and data (deephaven#562)
  port the numba integration prototype from Enterprise to OSS, fixes feature-523 (deephaven#638)
  Fix IllegalStateException in TwoValuesContainer triggered from Index.insert(Chunk). Fixes deephaven#652. (deephaven#653)
  ...
jmao-denver pushed a commit to jmao-denver/deephaven-core that referenced this issue Apr 11, 2022
…insert(Chunk). Fixes deephaven#652. (deephaven#653)

* Fix IllegalStateException in TwoValuesContainer triggered from Index.insert(Chunk). Fixes deephaven#652.

* Add empty check to RspBitmapSequentialBuildder.appendTreeIndexImpl too.

Co-authored-by: Cristian Ferretti <cristianferretti@illumon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage
Projects
None yet
Development

No branches or pull requests

1 participant