Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

divide error: 0000 [#1] SMP when counting snapshot size (inside .zfs) with midnight commander #617

Closed
marcin-github opened this issue Mar 22, 2012 · 4 comments
Milestone

Comments

@marcin-github
Copy link

Hello!
Thank you for new funcionality (snapshot dir)!
I started to test it and i found bug. I can reproduce only when use midnigh commander and press ctr+space (mc counts dir size). I couldn't reproduce it using du (or du --apparent-size).

[ 364.169879] divide error: 0000 [#1] SMP
[ 364.169999] CPU 1
[ 364.170041] Modules linked in: act_police sch_ingress cls_u32 sch_sfq sch_htb sha256_generic ansi_cprng krng eseqiv rng aes_x86_64 aes_generic cbc cryptomgr dm_crypt crypto_hash crypto_blkcipher dm_mod ip6table_mangle xt_TCPMSS xt_mark xt_DSCP ipt_REJECT nf_conntrack_ipv6 nf_defrag_ipv6 ip6table_filter ip6_tables xt_state xt_tcpudp ipt_MASQUERADE iptable_mangle iptable_nat iptable_filter ip_tables x_tables sit tunnel4 af_packet cpufreq_ondemand pcrypt aead crypto_algapi crypto nf_nat_ftp nf_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_conntrack_ftp nf_conntrack ipv6 acpi_cpufreq freq_table mperf zfs(P) zcommon(P) znvpair(P) zavl(P) zunicode(P) spl(O) zlib_deflate evdev processor thermal_sys button i2c_i801 e100 sky2 hwmon sg mei(C) mii i2c_core raid1 sr_mod cdrom md_mod ehci_hcd pata_jmicron [last unloaded: microcode]
[ 364.173101]
[ 364.173144] Pid: 537, comm: arc_reclaim Tainted: P C O 3.2.1-gentoo-r2 #1 Gigabyte Technology Co., Ltd. 965P-S3/965P-S3
[ 364.173311] RIP: 0010:[] [] prune_super+0x9f/0x1b0
[ 364.173407] RSP: 0018:ffff88005beb3cd0 EFLAGS: 00010246
[ 364.173454] RAX: 0000000000000000 RBX: ffff88005b5fff00 RCX: 0000000000000000
[ 364.173505] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 000000000000044d
[ 364.173570] RBP: ffff88005beb3d00 R08: fffffbcdf8a88219 R09: 000000000000fff7
[ 364.173634] R10: 0000000000000023 R11: 0000000000000000 R12: ffff88005b5ffc00
[ 364.173699] R13: 00000000ffffffef R14: 00000000000044d0 R15: ffff88005beb3d10
[ 364.173764] FS: 0000000000000000(0000) GS:ffff88005f480000(0000) knlGS:0000000000000000
[ 364.173854] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[ 364.173917] CR2: 00007f2dd22f5000 CR3: 00000000525bc000 CR4: 00000000000006e0
[ 364.173982] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 364.174047] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[ 364.174112] Process arc_reclaim (pid: 537, threadinfo ffff88005beb2000, task ffff88005bbb4200)
[ 364.174192] Stack:
[ 364.174247] 0000000000000000 ffff88005bf60358 ffff88005beb3d7c ffff88005bf60000
[ 364.174468] ffff88005b5ffc00 ffff88005b5ff800 ffff88005beb3d40 ffffffffa024afea
[ 364.174688] ffffffff000000d0 000000000000044d ffffffffa0273240 ffffffffa02b76d0
[ 364.174909] Call Trace:
[ 364.174987] [] zfs_sb_prune+0x9a/0xc0 [zfs]
[ 364.175062] [] ? zpl_vap_init+0xb00/0xb80 [zfs]
[ 364.175138] [] zpl_vap_init+0xb1b/0xb80 [zfs]
[ 364.175206] [] ? __wake_up+0x4e/0x70
[ 364.175269] [] iterate_supers_type+0x77/0xd0
[ 364.175344] [] zpl_prune_sbs+0x3b/0x1090 [zfs]
[ 364.175420] [] arc_adjust_meta+0x115/0x230 [zfs]
[ 364.175494] [] ? zpl_vap_init+0xb80/0xb80 [zfs]
[ 364.175571] [] arc_shrink+0x37e/0x550 [zfs]
[ 364.175647] [] ? arc_shrink+0x2f0/0x550 [zfs]
[ 364.175716] [] ? __thread_create+0x360/0x440 [spl]
[ 364.175785] [] __thread_create+0x3dc/0x440 [spl]
[ 364.175853] [] ? __thread_create+0x360/0x440 [spl]
[ 364.175922] [] ? __thread_create+0x360/0x440 [spl]
[ 364.175989] [] kthread+0x96/0xa0
[ 364.176053] [] kernel_thread_helper+0x4/0x10
[ 364.176117] [] ? kthread_worker_fn+0x190/0x190
[ 364.176181] [] ? gs_change+0xb/0xb
[ 364.176240] Code: 49 8b 7f 08 42 8d 4c 36 01 44 01 e9 48 85 ff 0f 84 e1 00 00 00 48 63 c9 31 d2 48 63 f6 4d 63 f6 48 0f af f7 4c 0f af f7 48 89 f0 <48> f7 f1 31 d2 48 89 c6 4c 89 f0 48 f7 f1 45 85 ed 49 89 c6 0f
[ 364.177833] RIP [] prune_super+0x9f/0x1b0
[ 364.177833] RSP
[ 364.178842] ---[ end trace 1fe500cedd81acf1 ]---

but everything still works.
I'm using gentoo x64, kernel 3.2.1-gentoo-r2. Please let me know if i should add more information.

@behlendorf
Copy link
Contributor

Please try the above patch is should resolve this issue. Thanks for the quick feedback, I was wondering how long it would be before the first bug surfaced after I merged the snapshot code. It turns out that it was less than an hour, I was hoping to do better. :)

@marcin-github
Copy link
Author

Now it's ok.
Sorry, next time i'll wait until next day ;)
BTW, should .zfs directory be always visible? Without need to do cd .zfs ?
Thank you.

@behlendorf
Copy link
Contributor

By default .zfs isn't visible to prevent utilities which walk the filesystem from traversing in to all your snapshots. However, if you'ld like it to be visible you can set the snapdir property on the dataset. From the man page.

       File system snapshots can be accessed  under  the  .zfs/snapshot
       directory in the root of the file system. Snapshots are automat-
       ically mounted on demand and may be unmounted at regular  inter-
       vals.  The visibility of the .zfs directory can be controlled by
       the snapdir property.

@marcin-github
Copy link
Author

snapdir=hidden and cd .zfs works correctly;)
Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants