Project

General

Profile

Bug #3139

zdb dies when it tries to determine path of unlinked file

Added by Christopher Siden about 7 years ago. Updated about 7 years ago.

Status:
Resolved
Priority:
Normal
Category:
zfs - Zettabyte File System
Start date:
2012-08-31
Due date:
% Done:

90%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

From Matt Ahrens's original bug report at Delphix:

"zdb -vvv" prints the path of files and directores. However, if a file is on
the delete queue (aka unlinked set), its parent pointer is no longer valid. If
the parent object has been freed and its object number reused for a plain file,
zdb will fail this assertion when it tries to use the ZAP to access a non-ZAP
object:

Assertion failed: (((doi.doi_type) & 0x80) ? ((doi.doi_type) & 0x3f) :
dmu_ot[(doi.doi_type)].ot_byteswap) DMU_BSWAP_ZAP (0x0 0x4), file
../../../uts/common/fs/zfs/zap_micro.c, line 464

A kernel panic could happen if userland passed this deleted object ID to
zfs_ioc_obj_to_path().

The fix is to make zfs_obj_to_path() not try to determine the path if the file
has zero links. zfs_obj_to_pobj() should look up the number of links, and if
it is zero then return EINVAL.

History

#1

Updated by Eric Schrock about 7 years ago

  • Status changed from In Progress to Resolved

changeset: 13820:2ce1147810ed
tag: tip
user: Jeremy Jones <>
date: Thu Sep 20 08:39:18 2012 -0700

description:
3139 zdb dies when it tries to determine path of unlinked file
Reviewed by: Matt Ahrens <>
Reviewed by: Christopher Siden <>
Reviewed by: Eric Schrock <>
Approved by: Dan McDonald <>

Also available in: Atom PDF