Project

General

Profile

Bug #5809

Blowaway full receive in v1 pool causes kernel panic

Added by Matthew Ahrens over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Category:
zfs - Zettabyte File System
Start date:
2015-04-09
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

Steps to reproduce:
1. Create v1 pool "test".
2. Create filesystem "test/fs"
3. Create filesystem "test/fs2"
4. Add an empty file to "test/fs"
5. snapshot "test/fs@A"
6. zfs send test/fs@A | zfs receive F test/fs2@A2
Kernel panics during the receive above. Stack trace is as follows:
ffffff0007d97920 dsl_dataset_rele+0x10(0, fffffffff7a5ea30)
ffffff0007d979c0 dmu_recv_begin_sync+0xc5(ffffff0009a0f960, ffffff01dd0ca100)
ffffff0007d97a00 dsl_sync_task_sync+0x10a(ffffff0009a0f870, ffffff01dd0ca100)
ffffff0007d97a90 dsl_pool_sync+0x285(ffffff01fa7140c0, b)
ffffff0007d97b70 spa_sync+0x3b1(ffffff022a989000, b)
ffffff0007d97c20 txg_sync_thread+0x21f(ffffff01fa7140c0)
ffffff0007d97c30 thread_start+8()
Looking at this, it looks like the cause is that dmu_recv_begin_sync's first argument has drba_snapobj == 0, and the target of the receive exists. In that case, the dsl_dataset_rele gets passed NULL as its first argument every time. drba_snapobj could be 0 during a full send on an old pool, because the code sets the snapobj to "ds
>ds_phys->ds_prev_snap_obj", which is $ORIGIN in a new pool, but on an old pool it's 0.

History

#1

Updated by Electric Monk over 4 years ago

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

git commit f40b29ce2a815bcc0787acf6f520a2b74258b785

commit  f40b29ce2a815bcc0787acf6f520a2b74258b785
Author: Paul Dagnelie <pcd@delphix.com>
Date:   2015-04-26T22:26:13.000Z

    5809 Blowaway full receive in v1 pool causes kernel panic
    Reviewed by: Matthew Ahrens <mahrens@delphix.com>
    Reviewed by: Alex Reece <alex@delphix.com>
    Reviewed by: Will Andrews <will@freebsd.org>
    Approved by: Gordon Ross <gwr@nexenta.com>

Also available in: Atom PDF