You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When ctl_backups lock attempts to obtain a lock on a backup file that is already locked, the lock attempt correctly fails but the program crashes with a segmentation fault on cleanup.
Version: 3.0.11, Debian x86_64
Steps to reproduce:
Run a compaction in the background: /usr/lib/cyrus/bin/ctl_backups -F compact -A &
Take a note of which file is currently being compacted.
Try to lock this file with -x option: /usr/lib/cyrus/bin/ctl_backups lock -x 'echo foo' -f FILE_BEING_COMPACTED
I think this should fix it, but I don't have anything big enough lying around to test it in the wild. Can you try it out? Will try to set up a Cassandane test for it in the meantime.
diff --git a/backup/lcb.c b/backup/lcb.c
index 5800b7c77..2ea77d959 100644
--- a/backup/lcb.c
+++ b/backup/lcb.c
@@ -459,6 +459,8 @@ EXPORTED int backup_close(struct backup **backupp)
gzFile gzfile = NULL;
int r1 = 0, r2 = 0;
+ if (!backup) return 0;
+
if (backup->append_state) {
if (backup->append_state->mode != BACKUP_APPEND_INACTIVE)
r1 = backup_append_end(backup, NULL);
When ctl_backups lock attempts to obtain a lock on a backup file that is already locked, the lock attempt correctly fails but the program crashes with a segmentation fault on cleanup.
Version: 3.0.11, Debian x86_64
Steps to reproduce:
Backtrace:
Probable cause: backupp contains a pointer to NULL:
The text was updated successfully, but these errors were encountered: