Skip to content

[Test Failure] Odd crash in HashTable scan on macos #1518

@madolson

Description

@madolson

We saw a crash on macos during a replication + expire test:

EIP:
0   valkey-server                       0x0000000102a6c9e4 expireScanCallback + 24

Backtrace:
0   libsystem_platform.dylib            0x0000000194a76584 _sigtramp + 56
1   valkey-server                       0x0000000102948480 hashtableScanDefrag + 520
2   valkey-server                       0x0000000102948480 hashtableScanDefrag + 520
3   valkey-server                       0x000000010294a4d0 kvstoreScan + 164
4   valkey-server                       0x0000000102a6cedc activeExpireCycle + 772
5   valkey-server                       0x000000010295184c serverCron + 5148
6   valkey-server                       0x00000001029428f8 aeProcessEvents + 688
7   valkey-server                       0x000000010296d94c main + 27132
8   dyld                                0x00000001946bb154 start + 2476

On my intel, +24 of expire Scan callback is here:

long long ttl = objectGetExpire(val) - data->now;
. It's doing the offset check to see if the key has an embedded TTL and finding a NULL pointer. Since it's trying to access 0x4. I don't clearly see how it's possible atm.

https://github.com/valkey-io/valkey/actions/runs/12642566507/job/35227110056

Metadata

Metadata

Assignees

No one assigned

    Labels

    test-failureAn issue indicating a test failure

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions