Skip to content

Bug: ALP DOUBLE exception chunk can reach invalid state and crash during checkpoint #998

Description

@ericyuanhui

Ladybug version

main release version

What operating system are you using?

ubuntu24.04

What happened?

Problem

A separate crash was observed in:

InMemoryExceptionChunk<double>::finalizeAndFlushToDisk

The core showed an invalid ALP exception chunk / invalid internal ColumnChunkData state during checkpoint finalization.

Relevant path:

COPY / COMMIT
  -> StorageManager::checkpoint
  -> Column::checkpointSegment
  -> InMemoryExceptionChunk<double>::finalizeAndFlushToDisk
  -> SIGSEGV

The ALP exception code uses several debug-only checks:

DASSERT(exceptionCount < exceptionCapacity);
DASSERT(exceptionIdx < exceptionCount);
DASSERT(exceptionPageOffset == (page_idx_t)exceptionPageOffset);

These checks are removed in Release and RelWithDebInfo builds. If ALP metadata is inconsistent, an exception index is invalid, or the exception buffer is full, the engine may read or write outside valid memory. This can corrupt memory before the final checkpoint crash becomes visible.

Are there known steps to reproduce?

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions