Martin Ziegler
2012-Jul-02 11:06 UTC
kmem_cache_destroy called for cache that still has objects
When I umounted my USB-disk today, I got the following message: FSSync ''/usb'' ============================================================================BUG btrfs_transaction_cache (Tainted: G W ): Objects remaining on kmem_cache_close() ----------------------------------------------------------------------------- INFO: Slab 0xffffea00001c7580 objects=27 used=1 fp=0xffff8800071d7e10 flags=0x4000000000004080 INFO: Object 0xffff8800071d6250 @offset=592 SLUB btrfs_transaction_cache: kmem_cache_destroy called for cache that still has objects. This had no bad consequences (I hope), but may interest the developers. The kernel is Linux zertz 3.5.0-rc4+ #278 SMP Thu Jun 28 21:17:37 CEST 2012 x86_64 GNU/Linux. Regards, Martin -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Josef Bacik
2012-Jul-02 12:48 UTC
Re: kmem_cache_destroy called for cache that still has objects
On Mon, Jul 02, 2012 at 05:06:27AM -0600, Martin Ziegler wrote:> When I umounted my USB-disk today, I got the following > message: > > FSSync ''/usb'' > ============================================================================> BUG btrfs_transaction_cache (Tainted: G W ): > Objects remaining on kmem_cache_close() > ----------------------------------------------------------------------------- > > INFO: Slab 0xffffea00001c7580 objects=27 used=1 > fp=0xffff8800071d7e10 flags=0x4000000000004080 > INFO: Object 0xffff8800071d6250 @offset=592 > SLUB btrfs_transaction_cache: kmem_cache_destroy called for > cache that still has objects. > > > This had no bad consequences (I hope), but may interest the > developers. The kernel is > > Linux zertz 3.5.0-rc4+ #278 SMP Thu Jun 28 21:17:37 CEST > 2012 x86_64 GNU/Linux. >Did you have an aborted transaction or anything, any other errors in your dmesg? Thanks, Josef -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Martin Ziegler
2012-Jul-02 13:52 UTC
Re: kmem_cache_destroy called for cache that still has objects
I print the insteresting part of syslog below. I mount the disk with mount -t btrfs -o compress,noatime,nodiratime,noacl,noexec,nosuid /dev/sdb1 /usb The error parts in the syslog come from the the mistaken "mount /usb" and the line /dev/sdb1 /usb auto defaults,noauto,noatime,nodiratime,users,noexec,nosuid,nodev,nobarrier,noauto_da_alloc,data=writeback 0 0 in fstab. I could not see other errors. Regards, Martin #################################### Jul 2 12:33:57 zertz kernel: sd 10:0:0:0: [sdb] Attached SCSI disk Jul 2 12:33:59 zertz kernel: Btrfs loaded Jul 2 12:33:59 zertz kernel: device fsid e8f96f55-a297-4bb5-8e8e-2dbf7db7e7af devid 1 transid 2627 /dev/sdb1 Jul 2 12:33:59 zertz kernel: btrfs: turning off barriers Jul 2 12:33:59 zertz kernel: btrfs: unrecognized mount option ''noauto_da_alloc'' Jul 2 12:33:59 zertz kernel: btrfs: open_ctree failed Jul 2 12:34:07 zertz kernel: device fsid e8f96f55-a297-4bb5-8e8e-2dbf7db7e7af devid 1 transid 2627 /dev/sdb1 Jul 2 12:34:07 zertz kernel: btrfs: use zlib compression Jul 2 12:34:07 zertz kernel: btrfs: disk space caching is enabled Jul 2 12:34:07 zertz kernel: btrfs: bdev /dev/sdb1 errs: wr 0, rd 0, flush 0, corrupt 0, gen 0 Jul 2 12:35:01 zertz /USR/SBIN/CRON[8308]: (root) CMD (zanacron) Jul 2 12:35:01 zertz zanacron[8309](root): zanacron Jul 2 12:35:01 zertz zanacron[8309](root): runs zanacron daily_online in 2 minutes Jul 2 12:36:23 zertz kernel: Btrfs loaded Jul 2 12:36:23 zertz kernel: device fsid e8f96f55-a297-4bb5-8e8e-2dbf7db7e7af devid 1 transid 2635 /dev/sdb1 Jul 2 12:36:23 zertz kernel: btrfs: use zlib compression Jul 2 12:36:23 zertz kernel: btrfs: disk space caching is enabled Jul 2 12:36:23 zertz kernel: btrfs: bdev /dev/sdb1 errs: wr 0, rd 0, flush 0, corrupt 0, gen 0 Jul 2 12:37:00 zertz zanacron[8421](root): zanacron daily_online Jul 2 12:37:00 zertz zanacron[8421](root): runs /bin/run-parts --report /usr/local/etc/cron/cron.daily/online Jul 2 12:43:25 zertz kernel: ============================================================================Jul 2 12:43:25 zertz kernel: BUG btrfs_transaction_cache (Tainted: G W ): Objects remaining on kmem_cache_close() Jul 2 12:43:25 zertz kernel: ----------------------------------------------------------------------------- Jul 2 12:43:25 zertz kernel: Jul 2 12:43:25 zertz kernel: INFO: Slab 0xffffea00001c7580 objects=27 used=1 fp=0xffff8800071d7e10 flags=0x4000000000004080 Jul 2 12:43:25 zertz kernel: Pid: 8613, comm: modprobe Tainted: G W 3.5.0-rc4+ #278 Jul 2 12:43:25 zertz kernel: Call Trace: Jul 2 12:43:25 zertz kernel: [<ffffffff810c3688>] ? slab_err+0xb1/0xd3 Jul 2 12:43:25 zertz kernel: [<ffffffff810c4079>] ? unfreeze_partials+0x1b7/0x1b7 Jul 2 12:43:25 zertz kernel: [<ffffffff810c19fc>] ? ksm_migrate_page+0x2f/0x2f Jul 2 12:43:25 zertz kernel: [<ffffffff8109a85b>] ? free_one_page+0x15c/0x20a Jul 2 12:43:25 zertz kernel: [<ffffffff810c4a73>] ? __kmalloc+0x43/0x129 Jul 2 12:43:25 zertz kernel: [<ffffffff810c5281>] ? kmem_cache_destroy+0x146/0x2a3 Jul 2 12:43:25 zertz kernel: [<ffffffffa0414e6c>] ? btrfs_destroy_cachep+0x34/0x59 [btrfs] Jul 2 12:43:25 zertz kernel: [<ffffffffa0451c10>] ? btrfs_log_inode+0x448/0x448 [btrfs] Jul 2 12:43:25 zertz kernel: [<ffffffff81065b4e>] ? sys_delete_module+0x1ca/0x24e Jul 2 12:43:25 zertz kernel: [<ffffffff810e1e7d>] ? mntput_no_expire+0x13/0x11c Jul 2 12:43:25 zertz kernel: [<ffffffff810cacb2>] ? filp_close+0x56/0x5d Jul 2 12:43:25 zertz kernel: [<ffffffff8137a7e2>] ? system_call_fastpath+0x16/0x1b Jul 2 12:43:25 zertz kernel: INFO: Object 0xffff8800071d6250 @offset=592 Jul 2 12:43:25 zertz kernel: SLUB btrfs_transaction_cache: kmem_cache_destroy called for cache that still has objects. Jul 2 12:43:25 zertz kernel: Pid: 8613, comm: modprobe Tainted: G W 3.5.0-rc4+ #278 Jul 2 12:43:25 zertz kernel: Call Trace: Jul 2 12:43:25 zertz kernel: [<ffffffff810c53cd>] ? kmem_cache_destroy+0x292/0x2a3 Jul 2 12:43:25 zertz kernel: [<ffffffffa0414e6c>] ? btrfs_destroy_cachep+0x34/0x59 [btrfs] Jul 2 12:43:25 zertz kernel: [<ffffffffa0451c10>] ? btrfs_log_inode+0x448/0x448 [btrfs] Jul 2 12:43:25 zertz kernel: [<ffffffffa0451c16>] ? exit_btrfs_fs+0x6/0x36 [btrfs] Jul 2 12:43:25 zertz kernel: [<ffffffffa0451c10>] ? btrfs_log_inode+0x448/0x448 [btrfs] Jul 2 12:43:25 zertz kernel: [<ffffffff81065b4e>] ? sys_delete_module+0x1ca/0x24e Jul 2 12:43:25 zertz kernel: [<ffffffff810e1e7d>] ? mntput_no_expire+0x13/0x11c Jul 2 12:43:25 zertz kernel: [<ffffffff810cacb2>] ? filp_close+0x56/0x5d Jul 2 12:43:25 zertz kernel: [<ffffffff8137a7e2>] ? system_call_fastpath+0x16/0x1b Jul 2 12:43:52 zertz kernel: Btrfs loaded Jul 2 12:43:52 zertz kernel: device fsid e8f96f55-a297-4bb5-8e8e-2dbf7db7e7af devid 1 transid 2639 /dev/sdb1 Jul 2 12:43:52 zertz kernel: btrfs: use zlib compression Jul 2 12:43:52 zertz kernel: btrfs: disk space caching is enabled Jul 2 12:43:52 zertz kernel: btrfs: bdev /dev/sdb1 errs: wr 0, rd 0, flush 0, corrupt 0, gen 0 ############################################################################################### -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Jan Schmidt
2012-Jul-02 15:41 UTC
Re: kmem_cache_destroy called for cache that still has objects
> I print the insteresting part of syslog below. > > I mount the disk with > mount -t btrfs -o compress,noatime,nodiratime,noacl,noexec,nosuid /dev/sdb1 /usb > > The error parts in the syslog come from the the mistaken > "mount /usb" and the line > /dev/sdb1 /usb auto defaults,noauto,noatime,nodiratime,users,noexec,nosuid,nodev,nobarrier,noauto_da_alloc,data=writeback 0 0 > in fstab. I could not see other errors. > > Regards, > Martin > > #################################### > Jul 2 12:33:57 zertz kernel: sd 10:0:0:0: [sdb] Attached SCSI disk > Jul 2 12:33:59 zertz kernel: Btrfs loaded > Jul 2 12:33:59 zertz kernel: device fsid e8f96f55-a297-4bb5-8e8e-2dbf7db7e7af devid 1 transid 2627 /dev/sdb1 > Jul 2 12:33:59 zertz kernel: btrfs: turning off barriers > Jul 2 12:33:59 zertz kernel: btrfs: unrecognized mount option ''noauto_da_alloc'' > Jul 2 12:33:59 zertz kernel: btrfs: open_ctree failed > Jul 2 12:34:07 zertz kernel: device fsid e8f96f55-a297-4bb5-8e8e-2dbf7db7e7af devid 1 transid 2627 /dev/sdb1 > Jul 2 12:34:07 zertz kernel: btrfs: use zlib compression > Jul 2 12:34:07 zertz kernel: btrfs: disk space caching is enabled > Jul 2 12:34:07 zertz kernel: btrfs: bdev /dev/sdb1 errs: wr 0, rd 0, flush 0, corrupt 0, gen 0 > Jul 2 12:35:01 zertz /USR/SBIN/CRON[8308]: (root) CMD (zanacron) > Jul 2 12:35:01 zertz zanacron[8309](root): zanacron > Jul 2 12:35:01 zertz zanacron[8309](root): runs zanacron daily_online in 2 minutes > Jul 2 12:36:23 zertz kernel: Btrfs loaded > Jul 2 12:36:23 zertz kernel: device fsid e8f96f55-a297-4bb5-8e8e-2dbf7db7e7af devid 1 transid 2635 /dev/sdb1 > Jul 2 12:36:23 zertz kernel: btrfs: use zlib compression > Jul 2 12:36:23 zertz kernel: btrfs: disk space caching is enabled > Jul 2 12:36:23 zertz kernel: btrfs: bdev /dev/sdb1 errs: wr 0, rd 0, flush 0, corrupt 0, gen 0 > Jul 2 12:37:00 zertz zanacron[8421](root): zanacron daily_online > Jul 2 12:37:00 zertz zanacron[8421](root): runs /bin/run-parts --report /usr/local/etc/cron/cron.daily/online > Jul 2 12:43:25 zertz kernel: ============================================================================> Jul 2 12:43:25 zertz kernel: BUG btrfs_transaction_cache (Tainted: G W ): Objects remaining on kmem_cache_close() > Jul 2 12:43:25 zertz kernel: ----------------------------------------------------------------------------- > Jul 2 12:43:25 zertz kernel: > Jul 2 12:43:25 zertz kernel: INFO: Slab 0xffffea00001c7580 objects=27 used=1 fp=0xffff8800071d7e10 flags=0x4000000000004080 > Jul 2 12:43:25 zertz kernel: Pid: 8613, comm: modprobe Tainted: G W 3.5.0-rc4+ #278 > Jul 2 12:43:25 zertz kernel: Call Trace: > Jul 2 12:43:25 zertz kernel: [<ffffffff810c3688>] ? slab_err+0xb1/0xd3 > Jul 2 12:43:25 zertz kernel: [<ffffffff810c4079>] ? unfreeze_partials+0x1b7/0x1b7 > Jul 2 12:43:25 zertz kernel: [<ffffffff810c19fc>] ? ksm_migrate_page+0x2f/0x2f > Jul 2 12:43:25 zertz kernel: [<ffffffff8109a85b>] ? free_one_page+0x15c/0x20a > Jul 2 12:43:25 zertz kernel: [<ffffffff810c4a73>] ? __kmalloc+0x43/0x129 > Jul 2 12:43:25 zertz kernel: [<ffffffff810c5281>] ? kmem_cache_destroy+0x146/0x2a3 > Jul 2 12:43:25 zertz kernel: [<ffffffffa0414e6c>] ? btrfs_destroy_cachep+0x34/0x59 [btrfs] > Jul 2 12:43:25 zertz kernel: [<ffffffffa0451c10>] ? btrfs_log_inode+0x448/0x448 [btrfs] > Jul 2 12:43:25 zertz kernel: [<ffffffff81065b4e>] ? sys_delete_module+0x1ca/0x24e > Jul 2 12:43:25 zertz kernel: [<ffffffff810e1e7d>] ? mntput_no_expire+0x13/0x11c > Jul 2 12:43:25 zertz kernel: [<ffffffff810cacb2>] ? filp_close+0x56/0x5d > Jul 2 12:43:25 zertz kernel: [<ffffffff8137a7e2>] ? system_call_fastpath+0x16/0x1b > Jul 2 12:43:25 zertz kernel: INFO: Object 0xffff8800071d6250 @offset=592 > Jul 2 12:43:25 zertz kernel: SLUB btrfs_transaction_cache: kmem_cache_destroy called for cache that still has objects. > Jul 2 12:43:25 zertz kernel: Pid: 8613, comm: modprobe Tainted: G W 3.5.0-rc4+ #278 > Jul 2 12:43:25 zertz kernel: Call Trace: > Jul 2 12:43:25 zertz kernel: [<ffffffff810c53cd>] ? kmem_cache_destroy+0x292/0x2a3 > Jul 2 12:43:25 zertz kernel: [<ffffffffa0414e6c>] ? btrfs_destroy_cachep+0x34/0x59 [btrfs] > Jul 2 12:43:25 zertz kernel: [<ffffffffa0451c10>] ? btrfs_log_inode+0x448/0x448 [btrfs] > Jul 2 12:43:25 zertz kernel: [<ffffffffa0451c16>] ? exit_btrfs_fs+0x6/0x36 [btrfs] > Jul 2 12:43:25 zertz kernel: [<ffffffffa0451c10>] ? btrfs_log_inode+0x448/0x448 [btrfs] > Jul 2 12:43:25 zertz kernel: [<ffffffff81065b4e>] ? sys_delete_module+0x1ca/0x24e > Jul 2 12:43:25 zertz kernel: [<ffffffff810e1e7d>] ? mntput_no_expire+0x13/0x11c > Jul 2 12:43:25 zertz kernel: [<ffffffff810cacb2>] ? filp_close+0x56/0x5d > Jul 2 12:43:25 zertz kernel: [<ffffffff8137a7e2>] ? system_call_fastpath+0x16/0x1b > Jul 2 12:43:52 zertz kernel: Btrfs loaded > Jul 2 12:43:52 zertz kernel: device fsid e8f96f55-a297-4bb5-8e8e-2dbf7db7e7af devid 1 transid 2639 /dev/sdb1 > Jul 2 12:43:52 zertz kernel: btrfs: use zlib compression > Jul 2 12:43:52 zertz kernel: btrfs: disk space caching is enabled > Jul 2 12:43:52 zertz kernel: btrfs: bdev /dev/sdb1 errs: wr 0, rd 0, flush 0, corrupt 0, gen 0 > ###############################################################################################I''m recently seeing such buffer leaks as well. It''s always about tree blocks, and it''s always just two or three refs left for a buffer. I can somehow reproduce it and will be looking into it probably tomorrow. (May still be unrelated, of course.) Martin, please try to maintain In-Reply-To headers. -Jan -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Jan Schmidt
2012-Jul-04 13:53 UTC
Re: kmem_cache_destroy called for cache that still has objects
Hi Martin, On 02.07.2012 17:41, Jan Schmidt wrote:> I''m recently seeing such buffer leaks as well. It''s always about tree blocks, > and it''s always just two or three refs left for a buffer. I can somehow > reproduce it and will be looking into it probably tomorrow. (May still be > unrelated, of course.)Okay, I''ve tracked my buffer leak down. It''s most likely unrelated to yours, as you need Chris'' current for-linus for that to occur. Second, you need to trigger a lot of tree mod log operations (i.e. by calling "btrfs inspect-internal" while modifying the trees). I''m sending a fix for the problem I found. However, there''s no obvious reproducer for your problem yet. Can you reproduce it? -Jan -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html