linux 4.1 - memory leak (possibly dedup related)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I've been running some btrfs tests (mainly duperemove related) with
linux kernel 4.1 for the last few days.

Now I noticed by accident (dying processes), that all my memory (128
GB!) is gone.
"Gone" meaning, there's no user space process allocating this memory.

Digging deeper I found the missing memory using slabtop (see output of
/proc/slabinfo is attached): Looks like I got a lot of kernel memory
allocated by kmalloc-1024 (memory leak?).
Given the fact that the test machine does little more than btrfs
testing I think this may be btrfs related.

I was running duperemove on a 1.5 TB volume around the time the first
"Out of memory" error were logged, so maybe the memory leak can be
found somewhere in this code path.

I'm still waiting for a scrub run to finish, after that I'll reboot
the machine and try to reproduce this behaviour with a fresh btrfs
filesystem.

Have there been any fixes concerning memory leaks since 4.1 release I could try?
Any other ideas how to track down this potential memory leak?

Bye,
   Marcel
slabinfo - version: 2.1
# name            <active_objs> <num_objs> <objsize> <objperslab> <pagesperslab> : tunables <limit> <batchcount> <sharedfactor> : slabdata <active_slabs> <num_slabs> <sharedavail>
btrfs_delayed_data_ref   2394   2982     96   42    1 : tunables    0    0    0 : slabdata     71     71      0
btrfs_delayed_tree_ref   3726   4600     88   46    1 : tunables    0    0    0 : slabdata    100    100      0
btrfs_delayed_ref_head   1900   2100    160   25    1 : tunables    0    0    0 : slabdata     84     84      0
btrfs_delayed_node   1561   1794    304   26    2 : tunables    0    0    0 : slabdata     69     69      0
btrfs_ordered_extent   1140   1558    424   38    4 : tunables    0    0    0 : slabdata     41     41      0
bio-2               1600   1625    320   25    2 : tunables    0    0    0 : slabdata     65     65      0
btrfs_extent_buffer    688   1276    280   29    2 : tunables    0    0    0 : slabdata     44     44      0
btrfs_extent_state   4539   4590     80   51    1 : tunables    0    0    0 : slabdata     90     90      0
btrfs_delalloc_work      0      0    152   26    1 : tunables    0    0    0 : slabdata      0      0      0
btrfs_transaction    176    176    360   22    2 : tunables    0    0    0 : slabdata      8      8      0
btrfs_trans_handle    184    184    176   23    1 : tunables    0    0    0 : slabdata      8      8      0
btrfs_inode         1636   6388    984   33    8 : tunables    0    0    0 : slabdata    205    205      0
nfs4_layout_stateid      0      0    240   34    2 : tunables    0    0    0 : slabdata      0      0      0
nfsd4_delegations      0      0    224   36    2 : tunables    0    0    0 : slabdata      0      0      0
nfsd4_files            0      0    288   28    2 : tunables    0    0    0 : slabdata      0      0      0
nfsd4_openowners       0      0    440   37    4 : tunables    0    0    0 : slabdata      0      0      0
nfs_direct_cache       0      0    352   23    2 : tunables    0    0    0 : slabdata      0      0      0
nfs_commit_data       23     23    704   23    4 : tunables    0    0    0 : slabdata      1      1      0
nfs_inode_cache        0      0   1000   32    8 : tunables    0    0    0 : slabdata      0      0      0
rpc_inode_cache       50     50    640   25    4 : tunables    0    0    0 : slabdata      2      2      0
fscache_cookie_jar     46     46     88   46    1 : tunables    0    0    0 : slabdata      1      1      0
ext3_inode_cache     160    160    808   20    4 : tunables    0    0    0 : slabdata      8      8      0
journal_handle      1360   1360     24  170    1 : tunables    0    0    0 : slabdata      8      8      0
ext4_groupinfo_4k   3887   6636    144   28    1 : tunables    0    0    0 : slabdata    237    237      0
ip6-frags              0      0    216   37    2 : tunables    0    0    0 : slabdata      0      0      0
UDPLITEv6              0      0   1088   30    8 : tunables    0    0    0 : slabdata      0      0      0
UDPv6                240    240   1088   30    8 : tunables    0    0    0 : slabdata      8      8      0
tw_sock_TCPv6         58     58    280   29    2 : tunables    0    0    0 : slabdata      2      2      0
TCPv6                112    112   2240   14    8 : tunables    0    0    0 : slabdata      8      8      0
kcopyd_job             0      0   3312    9    8 : tunables    0    0    0 : slabdata      0      0      0
dm_uevent              0      0   2632   12    8 : tunables    0    0    0 : slabdata      0      0      0
cfq_queue              0      0    232   35    2 : tunables    0    0    0 : slabdata      0      0      0
bsg_cmd                0      0    312   26    2 : tunables    0    0    0 : slabdata      0      0      0
mqueue_inode_cache     36     36    896   36    8 : tunables    0    0    0 : slabdata      1      1      0
fuse_request           0      0    400   20    2 : tunables    0    0    0 : slabdata      0      0      0
fuse_inode             0      0    704   23    4 : tunables    0    0    0 : slabdata      0      0      0
ecryptfs_key_record_cache      0      0    576   28    4 : tunables    0    0    0 : slabdata      0      0      0
ecryptfs_inode_cache      0      0   1024   32    8 : tunables    0    0    0 : slabdata      0      0      0
ecryptfs_auth_tok_list_item      0      0    832   39    8 : tunables    0    0    0 : slabdata      0      0      0
fat_inode_cache        0      0    688   23    4 : tunables    0    0    0 : slabdata      0      0      0
fat_cache              0      0     40  102    1 : tunables    0    0    0 : slabdata      0      0      0
hugetlbfs_inode_cache     28     28    568   28    4 : tunables    0    0    0 : slabdata      1      1      0
jbd2_journal_handle    680    680     48   85    1 : tunables    0    0    0 : slabdata      8      8      0
jbd2_journal_head   2844   3384    112   36    1 : tunables    0    0    0 : slabdata     94     94      0
jbd2_revoke_table_s    512    512     16  256    1 : tunables    0    0    0 : slabdata      2      2      0
jbd2_revoke_record_s   1408   1408     32  128    1 : tunables    0    0    0 : slabdata     11     11      0
ext4_inode_cache     808   1803   1080   30    8 : tunables    0    0    0 : slabdata     61     61      0
ext4_free_data     87488  87488     64   64    1 : tunables    0    0    0 : slabdata   1367   1367      0
ext4_allocation_context    256    256    128   32    1 : tunables    0    0    0 : slabdata      8      8      0
ext4_io_end         1400   1400     72   56    1 : tunables    0    0    0 : slabdata     25     25      0
ext4_extent_status   4182   6120     40  102    1 : tunables    0    0    0 : slabdata     60     60      0
dquot                288    288    256   32    2 : tunables    0    0    0 : slabdata      9      9      0
pid_namespace          0      0   2224   14    8 : tunables    0    0    0 : slabdata      0      0      0
posix_timers_cache      0      0    248   33    2 : tunables    0    0    0 : slabdata      0      0      0
UDP-Lite               0      0    960   34    8 : tunables    0    0    0 : slabdata      0      0      0
xfrm_dst_cache         0      0    448   36    4 : tunables    0    0    0 : slabdata      0      0      0
RAW                  468    468    896   36    8 : tunables    0    0    0 : slabdata     13     13      0
UDP                  272    272    960   34    8 : tunables    0    0    0 : slabdata      8      8      0
tw_sock_TCP           58     58    280   29    2 : tunables    0    0    0 : slabdata      2      2      0
TCP                  128    128   2048   16    8 : tunables    0    0    0 : slabdata      8      8      0
blkdev_queue         160    160   1944   16    8 : tunables    0    0    0 : slabdata     10     10      0
blkdev_requests     1681   2013    368   22    2 : tunables    0    0    0 : slabdata     92     92      0
blkdev_ioc           468    468    104   39    1 : tunables    0    0    0 : slabdata     12     12      0
user_namespace        52     52    304   26    2 : tunables    0    0    0 : slabdata      2      2      0
dmaengine-unmap-256     15     15   2112   15    8 : tunables    0    0    0 : slabdata      1      1      0
dmaengine-unmap-128     60     60   1088   30    8 : tunables    0    0    0 : slabdata      2      2      0
sock_inode_cache     475    475    640   25    4 : tunables    0    0    0 : slabdata     19     19      0
file_lock_cache      312    312    208   39    2 : tunables    0    0    0 : slabdata      8      8      0
file_lock_ctx        584    584     56   73    1 : tunables    0    0    0 : slabdata      8      8      0
net_namespace          0      0   4416    7    8 : tunables    0    0    0 : slabdata      0      0      0
shmem_inode_cache   2322   2425    640   25    4 : tunables    0    0    0 : slabdata     97     97      0
taskstats            192    192    328   24    2 : tunables    0    0    0 : slabdata      8      8      0
proc_inode_cache    1775   2158    608   26    4 : tunables    0    0    0 : slabdata     83     83      0
sigqueue             200    200    160   25    1 : tunables    0    0    0 : slabdata      8      8      0
bdev_cache           312    312    832   39    8 : tunables    0    0    0 : slabdata      8      8      0
kernfs_node_cache  34476  34476    120   34    1 : tunables    0    0    0 : slabdata   1014   1014      0
mnt_cache            210    210    384   21    2 : tunables    0    0    0 : slabdata     10     10      0
inode_cache        10477  10556    552   29    4 : tunables    0    0    0 : slabdata    364    364      0
dentry             12278  16149    192   21    1 : tunables    0    0    0 : slabdata    769    769      0
iint_cache             0      0     72   56    1 : tunables    0    0    0 : slabdata      0      0      0
buffer_head         4174   4329    104   39    1 : tunables    0    0    0 : slabdata    111    111      0
vm_area_struct      3902   4422    184   22    1 : tunables    0    0    0 : slabdata    201    201      0
mm_struct            272    272    960   34    8 : tunables    0    0    0 : slabdata      8      8      0
files_cache          300    300    640   25    4 : tunables    0    0    0 : slabdata     12     12      0
signal_cache         941   1101   1152   28    8 : tunables    0    0    0 : slabdata     42     42      0
sighand_cache        563    690   2112   15    8 : tunables    0    0    0 : slabdata     46     46      0
task_struct          376    425   6432    5    8 : tunables    0    0    0 : slabdata     85     85      0
Acpi-ParseExt       1960   1960     72   56    1 : tunables    0    0    0 : slabdata     35     35      0
Acpi-State           255    255     80   51    1 : tunables    0    0    0 : slabdata      5      5      0
Acpi-Namespace     15615  17034     40  102    1 : tunables    0    0    0 : slabdata    167    167      0
anon_vma            6023   6273     80   51    1 : tunables    0    0    0 : slabdata    123    123      0
numa_policy          170    170     24  170    1 : tunables    0    0    0 : slabdata      1      1      0
radix_tree_node    81015 740628    584   28    4 : tunables    0    0    0 : slabdata  26451  26451      0
ftrace_event_file   1472   1472     88   46    1 : tunables    0    0    0 : slabdata     32     32      0
ftrace_event_field  11050  11050     48   85    1 : tunables    0    0    0 : slabdata    130    130      0
idr_layer_cache      495    495   2096   15    8 : tunables    0    0    0 : slabdata     33     33      0
dma-kmalloc-8192       0      0   8192    4    8 : tunables    0    0    0 : slabdata      0      0      0
dma-kmalloc-4096       0      0   4096    8    8 : tunables    0    0    0 : slabdata      0      0      0
dma-kmalloc-2048       0      0   2048   16    8 : tunables    0    0    0 : slabdata      0      0      0
dma-kmalloc-1024       0      0   1024   32    8 : tunables    0    0    0 : slabdata      0      0      0
dma-kmalloc-512       32     32    512   32    4 : tunables    0    0    0 : slabdata      1      1      0
dma-kmalloc-256        0      0    256   32    2 : tunables    0    0    0 : slabdata      0      0      0
dma-kmalloc-128        0      0    128   32    1 : tunables    0    0    0 : slabdata      0      0      0
dma-kmalloc-64         0      0     64   64    1 : tunables    0    0    0 : slabdata      0      0      0
dma-kmalloc-32         0      0     32  128    1 : tunables    0    0    0 : slabdata      0      0      0
dma-kmalloc-16         0      0     16  256    1 : tunables    0    0    0 : slabdata      0      0      0
dma-kmalloc-8          0      0      8  512    1 : tunables    0    0    0 : slabdata      0      0      0
dma-kmalloc-192        0      0    192   21    1 : tunables    0    0    0 : slabdata      0      0      0
dma-kmalloc-96         0      0     96   42    1 : tunables    0    0    0 : slabdata      0      0      0
kmalloc-8192         132    156   8192    4    8 : tunables    0    0    0 : slabdata     39     39      0
kmalloc-4096        1826   2528   4096    8    8 : tunables    0    0    0 : slabdata    323    323      0
kmalloc-2048        1334   1552   2048   16    8 : tunables    0    0    0 : slabdata     97     97      0
kmalloc-1024      129547355 129547940   1024   32    8 : tunables    0    0    0 : slabdata 4547600 4547600      0
kmalloc-512         3707   4032    512   32    4 : tunables    0    0    0 : slabdata    126    126      0
kmalloc-256         3471   5632    256   32    2 : tunables    0    0    0 : slabdata    176    176      0
kmalloc-192         7967  12306    192   21    1 : tunables    0    0    0 : slabdata    586    586      0
kmalloc-128        19529  22912    128   32    1 : tunables    0    0    0 : slabdata    716    716      0
kmalloc-96          6580   9786     96   42    1 : tunables    0    0    0 : slabdata    233    233      0
kmalloc-64         21305  68800     64   64    1 : tunables    0    0    0 : slabdata   1075   1075      0
kmalloc-32         12971  13824     32  128    1 : tunables    0    0    0 : slabdata    108    108      0
kmalloc-16          6144   6656     16  256    1 : tunables    0    0    0 : slabdata     26     26      0
kmalloc-8          30506  38912      8  512    1 : tunables    0    0    0 : slabdata     76     76      0
kmem_cache_node      884    896     64   64    1 : tunables    0    0    0 : slabdata     14     14      0
kmem_cache           225    225    320   25    2 : tunables    0    0    0 : slabdata      9      9      0

[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux