[redis]github-480 Report

https://github.com/antirez/redis/issues/480

1. Symptom

Redis server crash for a user with EVAL in LUA script + slow log.

1.1 Severity

Critical

1.2 Was there exception thrown?

Yes. Crash

1.2.1 Were there multiple exceptions?

No

1.3 Scope of the failure

Single client

2. How to reproduce this failure

2.0 Version

2.9.7

2.1 Configuration

Standard

2.2 Reproduction procedure

1. use LUA script to repeat EVAL command:

Run: eval "local a; for b = 1,100000 do redis.call('sadd','set1',b) end return a" 0

Run: eval "local a; for b = 50000,100000 do redis.call('sadd','set2',b) end return a" 0

2.2.1 Timing order

In this order

2.2.2 Events order externally controllable?

Yes

2.3 Can the logs tell how to reproduce the failure?

No

2.4 How many machines needed?

2

3. Diagnosis procedure

3.1 Detailed Symptom (where you start)

Crash back trace

3.2 Backward inference

From the backtrace, can infer the server.lua_caller == NULL in evalGenericCommand.

4. Root cause

server.lua_caller was set to NULL, which was incorrect.

4.1 Category:

Semantic

4.2 Are there multiple fault?

No