Actions
Bug #5562
closedZFS sa_handle's violate kmem invariants, debug kernels panic on boot
Status:
Closed
Priority:
Urgent
Assignee:
-
Category:
zfs - Zettabyte File System
Start date:
2015-01-26
Due date:
% Done:
100%
Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:
Description
debug kernels panic with the message:
assertion failed: dbu->dbu_evict_func == NULL
The stack is:
fffffffffbc7fca0 zfs`sa_handle_get_from_db+0x143(ffffff00a63ff540, ffffff00a65f7c68, ffffff00a6655e90, 0, ffffff00a6655f78) fffffffffbc7fd20 zfs`zfs_znode_sa_init+0x179(ffffff00a5b95000, ffffff00a6655e90 , ffffff00a65f7c68, 2c, 0) fffffffffbc7ff20 zfs`zfs_znode_alloc+0xdc(ffffff00a5b95000, ffffff00a65f7c68, 800, 2c, 0) fffffffffbc7ffd0 zfs`zfs_zget+0x101(ffffff00a5b95000, 4, fffffffffbc7ffe8) fffffffffbc80020 zfs`zfs_mountroot+0x163(fffffffffbff3da0, 0) fffffffffbc80040 fsop_mountroot+0x17(fffffffffbff3da0, 0) fffffffffbc80070 rootconf+0x12d() fffffffffbc800b0 vfs_mountroot+0x6f() fffffffffbc800f0 main+0x198() fffffffffbc80100 _locore_start+0x90()
(the assert is via the inlined and thus invisible (which really gets my goat, fwiw) dmu_buf_init_user)
This code violates the invariant spelled out in kmem_cache_create(9F) that upon freeing an object with kmem_cache_free() it must be "in its constructed state", thus the handle we get from kmem_cache_alloc in the NULL case of sa_handle_get_from_db() might not be in its constructed state, and thus will fail the NULL assertion.
In my case, this causes us to panic when mounting /.
Updated by Justin Gibbs over 7 years ago
Review available at: https://reviews.csiden.org/r/154/
Updated by Electric Monk over 7 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
git commit 0fda3cc5c1c5a1d9bdea6d52637bef6e781549c9
commit 0fda3cc5c1c5a1d9bdea6d52637bef6e781549c9 Author: Justin T. Gibbs <justing@spectralogic.com> Date: 2015-01-27T16:13:19.000Z 5562 ZFS sa_handle's violate kmem invariants, debug kernels panic on boot Reviewed by: Matthew Ahrens <mahrens@delphix.com> Reviewed by: Robert Mustacchi <rm@fingolfin.org> Reviewed by: George Wilson <george@delphix.com> Reviewed by: Rich Lowe <richlowe@richlowe.net> Approved by: Dan McDonald <danmcd@omniti.com>
Actions