Snapchat / KeyDB

A Multithreaded Fork of Redis
https://keydb.dev
BSD 3-Clause "New" or "Revised" License
11.34k stars 572 forks source link

[BUG] KeyDB Crashes with Assertion Failure at db.cpp:2732 in Helm Chart 0.48.0 #861

Open ibadullaev-inc4 opened 3 weeks ago

ibadullaev-inc4 commented 3 weeks ago

Describe the bug

KeyDB crashes due to an assertion failure during runtime. The issue occurs with the Helm chart version keydb-0.48.0 and KeyDB version 6.3.2, deployed in a Kubernetes cluster.

To reproduce

1) Deploy KeyDB using the following Helm chart: Chart version: keydb-0.48.0 App version: 6.3.2

2) Monitor the logs for crashes.

3) The crash occurs with an assertion failure:

'kde != NULL' is not true at db.cpp:2732

Expected behavior

KeyDB should not crash and should remain stable under normal operations.

Log output:

=== KEYDB BUG REPORT START: Cut & paste starting from here ===
1:18:S 09 Sep 2024 13:36:24.107 # === ASSERTION FAILED OBJECT CONTEXT ===
1:18:S 09 Sep 2024 13:36:24.107 # Object type: 0
1:18:S 09 Sep 2024 13:36:24.107 # Object encoding: 0
1:18:S 09 Sep 2024 13:36:24.107 # Object refcount: 1
1:18:S 09 Sep 2024 13:36:24.107 # === ASSERTION FAILED ===
1:18:S 09 Sep 2024 13:36:24.107 # ==> db.cpp:2732 'kde != NULL' is not true

------ STACK TRACE ------

Backtrace:
keydb-server 0.0.0.0:6379(redisDbPersistentData::setExpire(redisObject*, redisObject*, long long)+0xb15) [0x5627d23d4f95]
keydb-server 0.0.0.0:6379(setExpire(client*, redisDb*, redisObject*, redisObject*, long long)+0xb8) [0x5627d23d5138]
keydb-server 0.0.0.0:6379(getexCommand(client*)+0x156) [0x5627d237eb56]
keydb-server 0.0.0.0:6379(call(client*, int)+0xb1) [0x5627d2413ae1]
keydb-server 0.0.0.0:6379(processCommand(client*, int)+0x954) [0x5627d2414c64]
keydb-server 0.0.0.0:6379(processCommandAndResetClient(client*, int)+0x66) [0x5627d235bef6]
keydb-server 0.0.0.0:6379(processInputBuffer(client*, bool, int)+0x174) [0x5627d2362084]
keydb-server 0.0.0.0:6379(processClients()+0xd9) [0x5627d2362219]
keydb-server 0.0.0.0:6379(+0x19ab62) [0x5627d239ab62]
keydb-server 0.0.0.0:6379(beforeSleep(aeEventLoop*)+0x160) [0x5627d2347330]
keydb-server 0.0.0.0:6379(aeProcessEvents+0x10b) [0x5627d2341b0b]
keydb-server 0.0.0.0:6379(aeMain+0x47) [0x5627d23484e7]
keydb-server 0.0.0.0:6379(workerThreadMain(void*)+0x73) [0x5627d24165b3]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x76db) [0x7f54e21806db]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x3f) [0x7f54e1ea961f]

Additional information

[nariman@notebook KeyDB]$ helm ls -n keydb
NAME   NAMESPACE  REVISION  UPDATED                                 STATUS   CHART        APP VERSION
keydb  keydb      7         2024-09-04 19:53:20.857976129 +0400 +04  deployed keydb-0.48.0 6.3.2

Nodes: 3 (default active-active configuration)

kubectl -n keydb get statefulsets.apps keydb
NAME    READY   AGE
keydb   3/3     5d14h