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

Empty cluster-config-file crashes redis-server #1349

Closed
PAStheLoD opened this issue Oct 28, 2013 · 3 comments
Closed

Empty cluster-config-file crashes redis-server #1349

PAStheLoD opened this issue Oct 28, 2013 · 3 comments

Comments

@PAStheLoD
Copy link

Hello!

=== REDIS BUG REPORT START: Cut & paste starting from here ===
[28333] 28 Oct 03:25:43.842 # === ASSERTION FAILED ===
[28333] 28 Oct 03:25:43.842 # ==> cluster.c:212 'server.cluster->myself != NULL' is not true
[28333] 28 Oct 03:25:43.842 # (forcing SIGSEGV to print the bug report.)
[28333] 28 Oct 03:25:43.842 #     Redis 2.9.11 crashed by signal: 11
[28333] 28 Oct 03:25:43.842 #     Failed assertion: server.cluster->myself != NULL (cluster.c:212)
[28333] 28 Oct 03:25:43.842 # --- STACK TRACE
redis-server(logStackTrace+0x43)[0x449783]
redis-server(_redisAssert+0x6f)[0x44932f]
/lib/libpthread.so.0(+0xeff0)[0x7f637ed9aff0]
redis-server(_redisAssert+0x6f)[0x44932f]
redis-server(clusterLoadConfig+0x4e5)[0x451ee5]
redis-server(clusterInit+0xdf)[0x45202f]
redis-server(initServer+0x454)[0x4214c4]
redis-server(main+0x1f0)[0x421810]
/lib/libc.so.6(__libc_start_main+0xfd)[0x7f637ea48c8d]
redis-server[0x419339]
[28333] 28 Oct 03:25:43.842 # --- INFO OUTPUT

After deleting cluster-config-file and configuring it to a path where the redis user can write, it started up without a problem.

@antirez
Copy link
Contributor

antirez commented Nov 7, 2013

It sounds like you manually emptied the file... so this is a normal behavior, but probably it could be handled in a more friendly way.

@PAStheLoD
Copy link
Author

Yes, I created an empty file and gave it to the redis user. Indeed, deleting it and giving the whole directory to redis solved it.

mattsta added a commit to mattsta/redis that referenced this issue Mar 12, 2014
If someone has a blank (`touch nodes.conf`) config
file, Redis would fail with an assert error, which isn't
very user friendly.

This commit treats empty files as if the server created
the file itself and operations continue as expected.

Logic: if no lines successfully processed, treat as new
configuration file.

Fixes redis#1349
mattsta added a commit to mattsta/redis that referenced this issue Mar 14, 2014
If someone has a blank (`touch nodes.conf`) config
file, Redis would fail with an assert error, which isn't
very user friendly.

This commit treats empty files as if the server created
the file itself and operations continue as expected.

Logic: if no lines successfully processed, treat as new
configuration file.

Fixes redis#1349
mattsta added a commit to mattsta/redis that referenced this issue Mar 27, 2014
If someone has a blank (`touch nodes.conf`) config
file, Redis would fail with an assert error, which isn't
very user friendly.

This commit treats empty files as if the server created
the file itself and operations continue as expected.

Logic: if no lines successfully processed, treat as new
configuration file.

Fixes redis#1349
@mattsta
Copy link
Contributor

mattsta commented Aug 1, 2014

Tracking in #1597

@mattsta mattsta closed this as completed Aug 1, 2014
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