Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internal error in RDB reading function at rdb.c:1546 -> Duplicate keys detected #6379

Open
Venorcis opened this issue Sep 12, 2019 · 3 comments

Comments

@Venorcis
Copy link

We were surprised today with the error in the title when trying to sync a new replica to its master. Upon this error, the whole replica even crashed (which I don't think is appropriate handling of this issue).

The exact same error appeared when running redis-check-rdb on the master's RDB file, only luckily in that output there was some additional info, i.e. the key of the database entry that caused the error and the fact that it happened whilst 'reading type 4 (hash-hashtable)'.

It turned out that for some unknown reason (IMO a Redis bug), indeed a key existed twice in a hash, as visible in this image:
image

Running 'HDEL key "key"' removed the first entry (with value "msg.save", the correct entry) and luckily allowed our sync to work again. However, under no circumstances can I now delete or edit the second entry; only in an 'HGETALL key' does it show up (i.e. HDEL and/or HGET do not work; HSET actually creates a new entry with key "key").

@itamarhaber
Copy link
Member

Hello @Venorcis

Thanks for reporting this - which version of Redis are you experiencing this issue with?

P.S. epic issue number.

@Venorcis
Copy link
Author

This is on latest (5.0.5).

P.S. didn't notice, awesome indeed!

antirez added a commit that referenced this issue Jan 13, 2020
antirez added a commit that referenced this issue Feb 4, 2020
JackieXie168 pushed a commit to JackieXie168/redis that referenced this issue Feb 20, 2020
antirez added a commit that referenced this issue Mar 5, 2020
kasiawasiuta pushed a commit to kasiawasiuta/redis that referenced this issue Mar 11, 2020
michalbiesek pushed a commit to michalbiesek/redis that referenced this issue Mar 23, 2020
jschmieg pushed a commit to jschmieg/redis that referenced this issue Mar 23, 2020
jschmieg pushed a commit to jschmieg/redis that referenced this issue Mar 24, 2020
jschmieg pushed a commit to pmem/redis that referenced this issue Mar 24, 2020
michalbiesek pushed a commit to pmem/redis that referenced this issue Apr 9, 2020
jschmieg pushed a commit to pmem/redis that referenced this issue Apr 29, 2020
pulllock pushed a commit to pulllock/redis that referenced this issue Jun 28, 2023
@haochensust
Copy link

Is this problem solved? I also had this problem in version 5.0.11.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants