Project

General

Profile

Bug #9329

panic in zap_leaf_lookup() due to concurrent zapification

Added by Brad Lewis over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Start date:
2018-03-22
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

For the null pointer issue shown below, the solution is to initialize the contents of the object before changing its type, so that concurrent accessors will see it as non-zapified until it is ready for access via the ZAP.

ale-dlpx-5.1.5.0-ILLIUM-2.scale-dc genunix: [ID 335743 kern.notice] BAD TRAP: type=e (#pf Page fault) rp=ffffff00ff520440 addr=20 occurred in module "zfs" due to a NULL pointer dereference

UM-2.scale-dc genunix: [ID 655072 kern.notice] ffffff00ff520320 unix:die+df ()
Jan 27 00:37:20 scale-dlpx-5.1.5.0-ILLIUM-2.scale-dc genunix: [ID 655072 kern.notice] ffffff00ff520430 unix:trap+dc0 ()
Jan 27 00:37:20 scale-dlpx-5.1.5.0-ILLIUM-2.scale-dc genunix: [ID 655072 kern.notice] ffffff00ff520440 unix:cmntrap+e6 ()
Jan 27 00:37:20 scale-dlpx-5.1.5.0-ILLIUM-2.scale-dc genunix: [ID 655072 kern.notice] ffffff00ff520590 zfs:zap_leaf_lookup+46 ()
Jan 27 00:37:20 scale-dlpx-5.1.5.0-ILLIUM-2.scale-dc genunix: [ID 655072 kern.notice] ffffff00ff520640 zfs:fzap_lookup+a9 ()
Jan 27 00:37:20 scale-dlpx-5.1.5.0-ILLIUM-2.scale-dc genunix: [ID 655072 kern.notice] ffffff00ff5206e0 zfs:zap_lookup_norm+111 ()
Jan 27 00:37:20 scale-dlpx-5.1.5.0-ILLIUM-2.scale-dc genunix: [ID 655072 kern.notice] ffffff00ff520730 zfs:zap_contains+42 ()
Jan 27 00:37:20 scale-dlpx-5.1.5.0-ILLIUM-2.scale-dc genunix: [ID 655072 kern.notice] ffffff00ff520760 zfs:dsl_dataset_has_resume_receive_state+47 ()
Jan 27 00:37:20 scale-dlpx-5.1.5.0-ILLIUM-2.scale-dc genunix: [ID 655072 kern.notice] ffffff00ff520900 zfs:get_receive_resume_stats+3e ()
Jan 27 00:37:20 scale-dlpx-5.1.5.0-ILLIUM-2.scale-dc genunix: [ID 655072 kern.notice] ffffff00ff520a90 zfs:dsl_dataset_stats+262 ()
Jan 27 00:37:20 scale-dlpx-5.1.5.0-ILLIUM-2.scale-dc genunix: [ID 655072 kern.notice] ffffff00ff520ac0 zfs:dmu_objset_stats+2b ()
Jan 27 00:37:20 scale-dlpx-5.1.5.0-ILLIUM-2.scale-dc genunix: [ID 655072 kern.notice] ffffff00ff520b10 zfs:zfs_ioc_objset_stats_impl+64 ()
Jan 27 00:37:20 scale-dlpx-5.1.5.0-ILLIUM-2.scale-dc genunix: [ID 655072 kern.notice] ffffff00ff520b60 zfs:zfs_ioc_objset_stats+33 ()
Jan 27 00:37:20 scale-dlpx-5.1.5.0-ILLIUM-2.scale-dc genunix: [ID 655072 kern.notice] ffffff00ff520bd0 zfs:zfs_ioc_dataset_list_next+140 ()
Jan 27 00:37:20 scale-dlpx-5.1.5.0-ILLIUM-2.scale-dc genunix: [ID 655072 kern.notice] ffffff00ff520c80 zfs:zfsdev_ioctl+4d7 ()
Jan 27 00:37:20 scale-dlpx-5.1.5.0-ILLIUM-2.scale-dc genunix: [ID 655072 kern.notice] ffffff00ff520cc0 genunix:cdev_ioctl+39 ()
Jan 27 00:37:20 scale-dlpx-5.1.5.0-ILLIUM-2.scale-dc genunix: [ID 655072 kern.notice] ffffff00ff520d10 specfs:spec_ioctl+60 ()
Jan 27 00:37:20 scale-dlpx-5.1.5.0-ILLIUM-2.scale-dc genunix: [ID 655072 kern.notice] ffffff00ff520da0 genunix:fop_ioctl+55 ()
Jan 27 00:37:20 scale-dlpx-5.1.5.0-ILLIUM-2.scale-dc genunix: [ID 655072 kern.notice] ffffff00ff520ec0 genunix:ioctl+9b ()
Jan 27 00:37:20 scale-dlpx-5.1.5.0-ILLIUM-2.scale-dc genunix: [ID 655072 kern.notice] ffffff00ff520f10 unix:brand_sys_sysenter+1c9 ()


Files

diff (5.46 KB) diff Matthew Ahrens, 2018-05-07 08:31 PM

History

#1

Updated by Matthew Ahrens over 1 year ago

Specifically, we will change dmu_object_zapify() to call mzap_create_impl() before setting dn_type. This also necessitated relocating a few assertions.

#2

Updated by Electric Monk over 1 year ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

git commit bf26014c5541b6119f34e0d95294b7f2eb105ac2

commit  bf26014c5541b6119f34e0d95294b7f2eb105ac2
Author: Matthew Ahrens <mahrens@delphix.com>
Date:   2018-05-09T21:18:42.000Z

    9328 zap code can take advantage of c99
    9329 panic in zap_leaf_lookup() due to concurrent zapification
    Reviewed by: Steve Gonczi <steve.gonczi@delphix.com>
    Reviewed by: George Wilson <george.wilson@delphix.com>
    Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
    Reviewed by: Brad Lewis <brad.lewis@delphix.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Also available in: Atom PDF