Actions
Bug #4169
closedverbatim import causes zdb to segfault
Start date:
2013-10-01
Due date:
% Done:
100%
Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:
Description
Analysis by George Wilson:
Running zdb after a ztest failure caused zdb to segmentation fault: > $c libzpool.so.1`spa_history_log_internal+0x47(888e000, fed8f6d0, 0, fed937a8, 0, 0 ) libzpool.so.1`spa_history_log_version+0x63(888e000, fed8f6d0, 1, fed1e77a) libzpool.so.1`spa_import+0x102(87a8920, 87a8928, 0, 1, 0, 82ce89c) main+0x4e8(1, 8047bf0, 8047c0c, 8047bac) _start+0x7d(6, 8047ccc, 8047cd0, 8047cd3, 8047ce0, 8047ce3) This happens to be a verbatim import so it ends up going through this code path: /* * Verbatim import - Take a pool and insert it into the namespace * as if it had been loaded at boot. */ if (spa->spa_import_flags & ZFS_IMPORT_VERBATIM) { if (props != NULL) spa_configfile_set(spa, props, B_FALSE); spa_config_sync(spa, B_FALSE, B_TRUE); mutex_exit(&spa_namespace_lock); spa_history_log_version(spa, "import"); return (0); } The problem is that calling spa_history_log_version() will try to access the dsl_pool_t which has not been opened yet. Since verbatim imports are equivalent to a pool open we can simply remove the call to spa_history_log_version() and allow it to get called in the open code path.
Updated by Christopher Siden almost 9 years ago
- Status changed from In Progress to Closed
commit 7fdd916c474ea52896c671bbe7b56ba34a1ca132 Author: George Wilson <george.wilson@delphix.com> Date: Fri Oct 4 15:13:23 2013 4168 ztest assertion failure in dbuf_undirty 4169 verbatim import causes zdb to segfault 4170 zhack leaves pool in ACTIVE state Reviewed by: Adam Leventhal <ahl@delphix.com> Reviewed by: Eric Schrock <eric.schrock@delphix.com> Reviewed by: Matthew Ahrens <mahrens@delphix.com> Approved by: Dan McDonald <danmcd@nexenta.com>
Actions