{"action":"created","issue":{"url":"https://api.github.com/repos/zfsonlinux/zfs/issues/3165","labels_url":"https://api.github.com/repos/zfsonlinux/zfs/issues/3165/labels{/name}","comments_url":"https://api.github.com/repos/zfsonlinux/zfs/issues/3165/comments","events_url":"https://api.github.com/repos/zfsonlinux/zfs/issues/3165/events","html_url":"https://github.com/zfsonlinux/zfs/issues/3165","id":60539614,"number":3165,"title":"ida_remove called for id=24 which is not allocated.","user":{"login":"nedbass","id":320381,"avatar_url":"https://avatars.githubusercontent.com/u/320381?v=3","gravatar_id":"","url":"https://api.github.com/users/nedbass","html_url":"https://github.com/nedbass","followers_url":"https://api.github.com/users/nedbass/followers","following_url":"https://api.github.com/users/nedbass/following{/other_user}","gists_url":"https://api.github.com/users/nedbass/gists{/gist_id}","starred_url":"https://api.github.com/users/nedbass/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nedbass/subscriptions","organizations_url":"https://api.github.com/users/nedbass/orgs","repos_url":"https://api.github.com/users/nedbass/repos","events_url":"https://api.github.com/users/nedbass/events{/privacy}","received_events_url":"https://api.github.com/users/nedbass/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/zfsonlinux/zfs/labels/Bug%20-%20Minor","name":"Bug - Minor","color":"e11d21"},{"url":"https://api.github.com/repos/zfsonlinux/zfs/labels/Test%20Suite","name":"Test Suite","color":"d7e102"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-03-10T17:44:34Z","updated_at":"2015-04-07T17:47:29Z","closed_at":null,"body":"The buildbot hit this WARNING and GPF while destroying a snapshot during the `zfsstress` test.\r\n\r\n```\r\n[ 6289.734169] ------------[ cut here ]------------\r\n[ 6289.734336] WARNING: CPU: 1 PID: 27397 at /build/buildd/linux-3.11.0/lib/idr.c:1065 ida_remove+0xb7/0xf0()\r\n[ 6289.734340] ida_remove called for id=24 which is not allocated.\r\n[ 6289.734343] Modules linked in: zfs(POF) zunicode(POF) zavl(POF) zcommon(POF) znvpair(POF) spl(OF) zlib_deflate aesni_intel aes_x86_64 lrw gf128mul glue_helper ablk_helper cryptd qxl psmouse ttm microcode virtio_balloon serio_raw virtio_console drm_kms_helper drm i2c_piix4 mac_hid lp parport ext2 raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq virtio_scsi raid1 raid0 floppy multipath linear [last unloaded: spl]\r\n[ 6289.734424] CPU: 1 PID: 27397 Comm: zfs Tainted: PF          O 3.11.0-26-generic #45-Ubuntu\r\n[ 6289.734427] Hardware name: Red Hat RHEV Hypervisor, BIOS 0.5.1 01/01/2007\r\n[ 6289.734431]  0000000000000009 ffff8800503dbcb8 ffffffff816ea0a1 ffff8800503dbd00\r\n[ 6289.734437]  ffff8800503dbcf0 ffffffff81061e2d ffff88007d005300 ffffffff81fa13c0\r\n[ 6289.734442]  000000000000000a 0000000000000b10 ffff88005ef38d28 ffff8800503dbd50\r\n[ 6289.734447] Call Trace:\r\n[ 6289.734515]  [<ffffffff816ea0a1>] dump_stack+0x45/0x56\r\n[ 6289.734561]  [<ffffffff81061e2d>] warn_slowpath_common+0x7d/0xa0\r\n[ 6289.734568]  [<ffffffff81061e9c>] warn_slowpath_fmt+0x4c/0x50\r\n[ 6289.734573]  [<ffffffff81061e55>] ? warn_slowpath_fmt+0x5/0x50\r\n[ 6289.734578]  [<ffffffff8135f997>] ida_remove+0xb7/0xf0\r\n[ 6289.734613]  [<ffffffff811aa91c>] free_anon_bdev+0x2c/0x50\r\n[ 6289.734618]  [<ffffffff811aa959>] kill_anon_super+0x19/0x20\r\n[ 6289.734676]  [<ffffffffa039d77a>] zpl_kill_sb+0x1a/0x20 [zfs]\r\n[ 6289.734683]  [<ffffffff811aad3d>] deactivate_locked_super+0x3d/0x60\r\n[ 6289.734687]  [<ffffffff811aada6>] deactivate_super+0x46/0x60\r\n[ 6289.734728]  [<ffffffffa0365196>] zfs_sb_rele+0x26/0x50 [zfs]\r\n[ 6289.734764]  [<ffffffffa036815d>] zfs_unmount_snap+0xdd/0x110 [zfs]\r\n[ 6289.734799]  [<ffffffffa03682d0>] zfs_ioc_destroy_snaps+0x70/0xc0 [zfs]\r\n[ 6289.734835]  [<ffffffffa036867c>] zfsdev_ioctl+0x1ac/0x4a0 [zfs]\r\n[ 6289.734841]  [<ffffffff811ba555>] do_vfs_ioctl+0x2e5/0x4d0\r\n[ 6289.734856]  [<ffffffff811ba275>] ? do_vfs_ioctl+0x5/0x4d0\r\n[ 6289.734861]  [<ffffffff811ba7c1>] SyS_ioctl+0x81/0xa0\r\n[ 6289.734895]  [<ffffffff816f9f1d>] system_call_fastpath+0x1a/0x1f\r\n[ 6289.734900] ---[ end trace 92a360c255fa8c60 ]---\r\n[ 6289.734960] general protection fault: 0000 [#1] SMP \r\n[ 6289.735108] Modules linked in: zfs(POF) zunicode(POF) zavl(POF) zcommon(POF) znvpair(POF) spl(OF) zlib_deflate aesni_intel aes_x86_64 lrw gf128mul glue_helper ablk_helper cryptd qxl psmouse ttm microcode virtio_balloon serio_raw virtio_console drm_kms_helper drm i2c_piix4 mac_hid lp parport ext2 raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq virtio_scsi raid1 raid0 floppy multipath linear [last unloaded: spl]\r\n[ 6289.735337] CPU: 1 PID: 27397 Comm: zfs Tainted: PF       W  O 3.11.0-26-generic #45-Ubuntu\r\n[ 6289.735445] Hardware name: Red Hat RHEV Hypervisor, BIOS 0.5.1 01/01/2007\r\n[ 6289.735463] task: ffff88000bcc9770 ti: ffff8800503da000 task.ti: ffff8800503da000\r\n[ 6289.735478] RIP: 0010:[<ffffffff8114f7c8>]  [<ffffffff8114f7c8>] unregister_shrinker+0x28/0x60\r\n[ 6289.735502] RSP: 0018:ffff8800503dbdb0  EFLAGS: 00010246\r\n[ 6289.735513] RAX: dead000000200200 RBX: ffff880045e0abb0 RCX: ffff8800503dbfd8\r\n[ 6289.735526] RDX: dead000000100100 RSI: 0000000000000000 RDI: ffffffff81c5a140\r\n[ 6289.735540] RBP: ffff8800503dbdb8 R08: 000000002d2d2d5d R09: 0000000000000368\r\n[ 6289.735554] R10: 3532633036336132 R11: 2030366338616635 R12: ffffffffa04162e0\r\n[ 6289.735587] R13: 000000000000000a R14: 0000000000000b10 R15: ffff88005ef38d28\r\n[ 6289.735602] FS:  00007f5d569d8b80(0000) GS:ffff88007fc80000(0000) knlGS:0000000000000000\r\n[ 6289.735623] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b\r\n[ 6289.735635] CR2: 0000000001d517e4 CR3: 0000000023a59000 CR4: 00000000000006e0\r\n[ 6289.735660] Stack:\r\n[ 6289.735667]  ffff880045e0a800 ffff8800503dbdd8 ffffffff811aad49 ffff880045e0a800\r\n[ 6289.735710]  ffff880078ba9440 ffff8800503dbdf0 ffffffff811aada6 ffff88006ed70000\r\n[ 6289.735734]  ffff8800503dbe08 ffffffffa0365196 ffff880070e5d820 ffff8800503dbe38\r\n[ 6289.735761] Call Trace:\r\n[ 6289.735773]  [<ffffffff811aad49>] deactivate_locked_super+0x49/0x60\r\n[ 6289.735791]  [<ffffffff811aada6>] deactivate_super+0x46/0x60\r\n[ 6289.735836]  [<ffffffffa0365196>] zfs_sb_rele+0x26/0x50 [zfs]\r\n[ 6289.735893]  [<ffffffffa036815d>] zfs_unmount_snap+0xdd/0x110 [zfs]\r\n[ 6289.735943]  [<ffffffffa03682d0>] zfs_ioc_destroy_snaps+0x70/0xc0 [zfs]\r\n[ 6289.735995]  [<ffffffffa036867c>] zfsdev_ioctl+0x1ac/0x4a0 [zfs]\r\n[ 6289.736018]  [<ffffffff811ba555>] do_vfs_ioctl+0x2e5/0x4d0\r\n[ 6289.736048]  [<ffffffff811ba275>] ? do_vfs_ioctl+0x5/0x4d0\r\n[ 6289.736064]  [<ffffffff811ba7c1>] SyS_ioctl+0x81/0xa0\r\n[ 6289.736078]  [<ffffffff816f9f1d>] system_call_fastpath+0x1a/0x1f\r\n[ 6289.736093] Code: 00 00 00 e8 2b a3 5a 00 55 48 89 e5 53 48 89 fb 48 c7 c7 40 a1 c5 81 e8 c7 ee 59 00 48 8b 43 20 48 8b 53 18 48 c7 c7 40 a1 c5 81 <48> 89 42 08 48 89 10 48 b8 00 01 10 00 00 00 ad de 48 89 43 18 \r\n[ 6289.736287] RIP  [<ffffffff8114f7c8>] unregister_shrinker+0x28/0x60\r\n[ 6289.736299]  RSP <ffff8800503dbdb0>\r\n[ 6289.736797] ---[ end trace 92a360c255fa8c61 ]---\r\n```"},"comment":{"url":"https://api.github.com/repos/zfsonlinux/zfs/issues/comments/90670170","html_url":"https://github.com/zfsonlinux/zfs/issues/3165#issuecomment-90670170","issue_url":"https://api.github.com/repos/zfsonlinux/zfs/issues/3165","id":90670170,"user":{"login":"nedbass","id":320381,"avatar_url":"https://avatars.githubusercontent.com/u/320381?v=3","gravatar_id":"","url":"https://api.github.com/users/nedbass","html_url":"https://github.com/nedbass","followers_url":"https://api.github.com/users/nedbass/followers","following_url":"https://api.github.com/users/nedbass/following{/other_user}","gists_url":"https://api.github.com/users/nedbass/gists{/gist_id}","starred_url":"https://api.github.com/users/nedbass/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nedbass/subscriptions","organizations_url":"https://api.github.com/users/nedbass/orgs","repos_url":"https://api.github.com/users/nedbass/repos","events_url":"https://api.github.com/users/nedbass/events{/privacy}","received_events_url":"https://api.github.com/users/nedbass/received_events","type":"User","site_admin":false},"created_at":"2015-04-07T17:47:29Z","updated_at":"2015-04-07T17:47:29Z","body":"I would speculate that `zfs destroy -r <dataset>` is racing with `zfs destroy <snapshot>`.  `zfsstress` destroys snapshots and recursively destroys datasets in an uncoordinated fashion. That could explain how the device goes away from underneath us."}}