[Spce-user] [EXTERNAL] Recurring Valkey Crashes Affecting Kamailio and CDR Processing – SIPWise mr14.0.1
Jose Antonio Su Ng
jsung at sipwise.com
Thu Oct 15 03:32:42 EDT 2026
Dear Jeremie,
To reply to your questions:
1. Is this a known Valkey 8.1.x bug involving expireScanCallback or
activeExpireCycle?
Yes, this is a known bug and has been reported in github by the
community. https://github.com/valkey-io/valkey/issues/2114
2. Is there a confirmed upstream patch or Valkey version that resolves
this specific segmentation fault?
Yes, it is confirmed by upstream and a fix has been released in version
8.1.4 but this version is no longer in testing as Debian upstream has
moved on to Forky testing.
But if you wish to test it out you can get it from here:
https://snapshot.debian.org/package/valkey/8.1.4%2Bdfsg1-2/
Note: The 8.1.4 version is not supported by Debian neither by us.
3. Is that version compatible with SIPWise CE mr14.0.1?
No, as the latest supported valkey version in Debian Trixie is
8.1.1+dfsg1-3+deb13u2
4. Is there a recommended workaround that can prevent this crash without
restarting Valkey or interrupting production SIP traffic?
Unfortunately there is no workaround for this specific case.
5. Is it expected behavior for Kamailio LB to stop and restart when
Valkey crashes?
Yes, there are a few services that are linked to Valkey as it is a core
service for it to run.
6. Is our mediator automatic restart configuration appropriate, or is
there a SIPWise-supported method to ensure CDR processing resumes
automatically after Valkey recovery?
Normally mediator retries to connect to valkey but if valkey takes too
long to restart then it might stops mediator.
7. Is the accumulation of approximately 1.25 million accounting keys in
Valkey DB21 expected, given the configured max-acc-age of 14 days?
This amount of keys is definitely not normal unless you are processing a
huge amount of calls and mediator is not able to keep up.
Could you provide the log for cdr.log to see if there may be any issues
with mediator processing those acc records in valkey?
Best regards,
Jose Su
On 10/11/26 05:01, Jeremie Chism wrote:
>
> Hello SIPWise Support,
>
> We are experiencing recurring Valkey crashes on our primary production
> SIPWise CE mr14.0.1 server running Debian 13.
>
> Both crashes occurred at the exact same instruction in Valkey's
> expiration-processing code.
>
> Server: Dallas (Primary Production) SIPWise Version: mr14.0.1
> Operating System: Debian 13 Valkey Version: 8.1.1+dfsg1-3+deb13u1
>
> Confirmed Crashes (Server Time):
>
> October 8, 2026 – 09:56:36 October 10, 2026 – 19:54:55
>
> Both incidents resulted in Valkey terminating with SIGSEGV (signal 11).
>
> The stack traces from both crashes contain identical executable offsets:
>
> expireScanCallback +0x1996fe activeExpireCycle +0x199a35 databasesCron
> +0x8e3bd serverCron +0x8f033
>
> This strongly suggests that the same failure is recurring.
>
> PRODUCTION IMPACT
>
> During the October 10 incident:
>
> 1. Valkey crashed and restarted automatically.
>
> 2. Kamailio LB stopped and restarted approximately 11 seconds later,
> creating a potential interruption to SIP signaling.
>
> 3. ngcp-mediator exited successfully but did not automatically restart.
>
> 4. CDR processing remained interrupted until mediator was manually
> restarted.
>
> As a temporary safeguard, we configured ngcp-mediator with:
>
> Restart=always RestartSec=15s
>
> Valkey itself is configured with Restart=always and RestartSec=100ms.
>
> ADDITIONAL FINDINGS
>
> Valkey database 21 currently contains approximately 1.25 million
> accounting keys, none of which have expiration timers.
>
> The mediator configuration includes:
>
> redis-db=21 max-acc-age=1209600 interval=10
>
> We have also identified historical accounting records in DB21 older
> than the configured 14-day maximum accounting age.
>
> We have not established whether the retained accounting records
> contribute to the crashes.
>
> All three of our production SIPWise switches (Dallas, Chicago, and
> LAX) use Valkey 8.1.1. However, we have only confirmed these crashes
> on Dallas.
>
> We also identified an available Debian security update:
>
> 8.1.1+dfsg1-3+deb13u2
>
> We have not installed this update because we cannot confirm whether it
> addresses the expireScanCallback segmentation fault.
>
> REQUEST FOR ENGINEERING ASSISTANCE
>
> Could your engineering team please advise on the following?
>
> 1. Is this a known Valkey 8.1.x bug involving expireScanCallback or
> activeExpireCycle?
>
> 2. Is there a confirmed upstream patch or Valkey version that resolves
> this specific segmentation fault?
>
> 3. Is that version compatible with SIPWise CE mr14.0.1?
>
> 4. Is there a recommended workaround that can prevent this crash
> without restarting Valkey or interrupting production SIP traffic?
>
> 5. Is it expected behavior for Kamailio LB to stop and restart when
> Valkey crashes?
>
> 6. Is our mediator automatic restart configuration appropriate, or is
> there a SIPWise-supported method to ensure CDR processing resumes
> automatically after Valkey recovery?
>
> 7. Is the accumulation of approximately 1.25 million accounting keys
> in Valkey DB21 expected, given the configured max-acc-age of 14 days?
>
> Dallas is our primary production switch handling live customer
> traffic. We cannot risk an untested update or a prolonged service
> interruption.
>
> We would appreciate guidance on a confirmed fix and the safest
> supported deployment procedure.
>
> We can provide the complete crash stack traces, relevant syslog
> entries, and additional diagnostic information if needed.
>
> --
> Jeremie Chism
> Triton Communications
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sipwise.com/pipermail/spce-user_lists.sipwise.com/attachments/20261015/505c23b1/attachment-0001.htm>
More information about the Spce-user
mailing list