Re: Memory leak in BFQ?

2017-09-04 Thread Paolo Valente

> Il giorno 31 ago 2017, alle ore 22:42, Bart Van Assche 
>  ha scritto:
> 
> Hello Paolo,
> 
> If I run the following commands:
> 
> # echo bfq > /sys/block/sda/queue/scheduler 
> # echo 3 >/proc/sys/vm/drop_caches; find / -xdev >/dev/null
> # echo none > /sys/block/sda/queue/scheduler
> # echo scan > /sys/kernel/debug/kmemleak
> 
> Then kmemleak reports the following:
> 
> unreferenced object 0x880405149158 (size 4096):
>  comm "bash", pid 1716, jiffies 4294960386 (age 75256.970s)
>  hex dump (first 32 bytes):
>48 a5 f4 a3 04 88 ff ff 01 00 00 00 00 00 00 00  H...
>00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
>  backtrace:
>[] kmemleak_alloc+0x4a/0xa0
>[] kmem_cache_alloc_node_trace+0x154/0x310
>[] bfq_pd_alloc+0x3c/0x3f0 [bfq]
>[] blkcg_activate_policy+0xac/0x170
>[] bfq_create_group_hierarchy+0x1c/0x66 [bfq]
>[] bfq_init_queue+0x28b/0x350 [bfq]
>[] blk_mq_init_sched+0xbb/0x150
>[] elevator_switch+0x62/0x210
>[] elv_iosched_store+0xe2/0x180
>[] queue_attr_store+0x59/0x90
>[] sysfs_kf_write+0x45/0x60
>[] kernfs_fop_write+0x124/0x1c0
>[] __vfs_write+0x28/0x150
>[] vfs_write+0xc7/0x1b0
>[] SyS_write+0x49/0xa0
>[] entry_SYSCALL_64_fastpath+0x18/0xad
> 
> Could this indicate a memory leak in the BFQ code?
> 

I guess so.  But I've been trying to reproduce it at no avail.  Is it
readily reproducible in your system?  If so, did you happen, by chance,
to find also some other way to reproduce it?

Thanks,
Paolo

> Thanks,
> 
> Bart.



Memory leak in BFQ?

2017-08-31 Thread Bart Van Assche
Hello Paolo,

If I run the following commands:

# echo bfq > /sys/block/sda/queue/scheduler 
# echo 3 >/proc/sys/vm/drop_caches; find / -xdev >/dev/null
# echo none > /sys/block/sda/queue/scheduler
# echo scan > /sys/kernel/debug/kmemleak

Then kmemleak reports the following:

unreferenced object 0x880405149158 (size 4096):
  comm "bash", pid 1716, jiffies 4294960386 (age 75256.970s)
  hex dump (first 32 bytes):
48 a5 f4 a3 04 88 ff ff 01 00 00 00 00 00 00 00  H...
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
  backtrace:
[] kmemleak_alloc+0x4a/0xa0
[] kmem_cache_alloc_node_trace+0x154/0x310
[] bfq_pd_alloc+0x3c/0x3f0 [bfq]
[] blkcg_activate_policy+0xac/0x170
[] bfq_create_group_hierarchy+0x1c/0x66 [bfq]
[] bfq_init_queue+0x28b/0x350 [bfq]
[] blk_mq_init_sched+0xbb/0x150
[] elevator_switch+0x62/0x210
[] elv_iosched_store+0xe2/0x180
[] queue_attr_store+0x59/0x90
[] sysfs_kf_write+0x45/0x60
[] kernfs_fop_write+0x124/0x1c0
[] __vfs_write+0x28/0x150
[] vfs_write+0xc7/0x1b0
[] SyS_write+0x49/0xa0
[] entry_SYSCALL_64_fastpath+0x18/0xad

Could this indicate a memory leak in the BFQ code?

Thanks,

Bart.