[redis]github-108 Report


1. Symptom

Redis server crashes (assertion failure) when sorted set contains a score valued NaN.

1.1 Severity


1.2 Was there exception thrown?

Yes. Assertion failure.

1.2.1 Were there multiple exceptions?


1.3 Scope of the failure

Single client.

2. How to reproduce this failure

2.0 Version


2.1 Configuration


2.2 Reproduction procedure

1. follow instructions in issue 264 to introduce a “NaN” in the sorted set

2. ZADD to this member/score pair

2.2.1 Timing order

In this order

2.2.2 Events order externally controllable?


2.3 Can the logs tell how to reproduce the failure?

Yes. client log.

2.4 How many machines needed?

2 (need a client)

3. Diagnosis procedure

3.1 Detailed Symptom (where you start)

Assertion failure

3.2 Backward inference

The backward inference is hard. From the stack trace we can know a NaN score value took down the server, but we don’t know how it became “NaN’.

4. Root cause

This failure is the interplay of two bugs: 264 (that result an NaN in score), and this NaN further took down the server.

4.1 Category:

Incorrect error handling (the NaN error)