Redis: Keys * crashes CLI

Created on 14 Mar 2018  路  12Comments  路  Source: tporadowski/redis

Hi,

I have a DB size of 24730 hash keys:
Command: Keys * crashes the CLI
Command: Scan 0 returns the first x keys (OK)
Command: Keys A* returns the keys that start with A (OK)

It seems that if the CLI receives a long list of keys it will crash...

bug win-port-only

Most helpful comment

Issue is solved in V4.0.2.1Alpha

All 12 comments

Tried to repeat this with the "old" cli against the new Redis 4.0.2 --> CLI keeps crashing.
So, it seems not to be the CLI that is failing but Redis itself...

From what I've seen and read about "KEYS" command in general is that its usage is highly discouraged and basically I can observe the same (no way to list 100k+ keys that I have with that command). This is however working pretty fine under Linux (I've just tested some simple 50k+ keys), so indeed it might be some bug in the server.

Hi @tporadowski,
Thanks for the quick reply!
I forgot to mention that this worked perfecly fine in the last official Windows release, so it's either someting in V4.0.2 or in this fork. I agree that you generally should not use "keys *" but since I was testdriving, I thought I should mention it.

I now know the reason why it's failing - it's an issue in Redis server. I have a working solution already, but I still need to see if this issue affects only Windows port or is a general one.

Thanks @Kortenbach for the report. This turned out to be quite important (sending back larger amounts of data to the client), so I will create a new release today.

Thank you! I will start using it again. I stopt using it because I had another crash this week. This time the server was repeatedly crashing and restarting itself over and over. I believe it was after a flushdb. I will keep you posted...

4.0.2.1 released, please test it :)

Issue is solved in V4.0.2.1Alpha

I noticed a side-effect (?) in release 4.0.2.1: I can now edit my previous commands in the CLI by using the up/down arrow on my keyboard.

:) I fixed this issue "in the meantime", but didn't do a full release just for that - it was added as a side-download to first 4.0.2-alpha release. See commit 1d95d353 and antirez/redis#4536

Super!

Yup, it was frustrating to type everything over and over again ;)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JHeLiu picture JHeLiu  路  3Comments

tporadowski picture tporadowski  路  33Comments

ramlaxman picture ramlaxman  路  9Comments

linrb picture linrb  路  8Comments

israellot picture israellot  路  25Comments