Martin Schwenke discovered that
517f05e42f17766b1e8db8f1f4789cbad968e304
("freeze: abort vacuuming when we're going to freeze.") used ctdb_db for
a logging message which is in fact uninitialized, causing a crash (even
if it wasn't actually logged).
Initialize it properly. Also fix incorrect format in another logging
message introduced in that same change.
CQ:S1019093
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
vdata->repack_limit = repack_limit;
vdata->delete_tree = trbt_create(vdata, 0);
vdata->abortfd = abortfd;
vdata->repack_limit = repack_limit;
vdata->delete_tree = trbt_create(vdata, 0);
vdata->abortfd = abortfd;
+ vdata->ctdb_db = ctdb_db;
if (vdata->delete_tree == NULL) {
DEBUG(DEBUG_ERR,(__location__ " Out of memory\n"));
talloc_free(vdata);
if (vdata->delete_tree == NULL) {
DEBUG(DEBUG_ERR,(__location__ " Out of memory\n"));
talloc_free(vdata);
/* FIXME: We don't just free them, since current TDB is not robust
* against death during transaction commit. */
for (i = ctdb->vacuumers; i; i = i->next) {
/* FIXME: We don't just free them, since current TDB is not robust
* against death during transaction commit. */
for (i = ctdb->vacuumers; i; i = i->next) {
- DEBUG(DEBUG_INFO, ("Aborting vacuuming for %s (%p)\n",
+ DEBUG(DEBUG_INFO, ("Aborting vacuuming for %s (%i)\n",
i->vacuum_handle->ctdb_db->db_name,
i->vacuum_handle->ctdb_db->db_name,
write(i->abortfd[1], &c, 1);
}
}
write(i->abortfd[1], &c, 1);
}
}