All of lore.kernel.org
 help / color / mirror / Atom feed
* Testing --blocksize_range
@ 2018-12-12 13:41 Mohan Mohan
  2018-12-13  6:33 ` Sitsofe Wheeler
  0 siblings, 1 reply; 4+ messages in thread
From: Mohan Mohan @ 2018-12-12 13:41 UTC (permalink / raw)
  To: fio

Hi

I am testing fio with bs ranges 1k-10k 2k-10k 3k-10k 4k-10k 5k-10k 6k-10k.

The test works fine for the below run:
fio --name=App2 --size=10m --rw=read --blocksize_range=1k-10k
# fio --name=App2 --size=10m --rw=read --blocksize_range=2k-10k
# fio --name=App2 --size=10m --rw=read --blocksize_range=5k-10k

But error throws on below runs
# fio --name=App2 --size=10m --rw=read --blocksize_range=3k-10k
# fio --name=App2 --size=10m --rw=read --blocksize_range=4k-10k
# fio --name=App2 --size=10m --rw=read --blocksize_range=6k-10k

App2: (g=0): rw=read, bs=(R) 3072B-10.0KiB, (W) 3072B-10.0KiB, (T) 3072B-10.0KiB, ioengine=psync, iodepth=1
fio-3.12-17-g0fcbc0
Starting 1 process
*** Error in `fio': double free or corruption (!prev): 0x0000555f92a80a60 ***
fio: pid=1468, got signal=6

App2: (groupid=0, jobs=1): err= 0: pid=1468: Wed Dec 12 19:09:07 2018
  read: IOPS=8365, BW=52.9MiB/s (55.5MB/s)(9.00MiB/189msec)
    clat (nsec): min=874, max=74912k, avg=116222.51, stdev=2186743.16
     lat (nsec): min=912, max=74912k, avg=116373.83, stdev=2186743.70
    clat percentiles (nsec):
     |  1.00th=[     964],  5.00th=[    1128], 10.00th=[    1368],
     | 20.00th=[    1672], 30.00th=[    2008], 40.00th=[    2288],
     | 50.00th=[    2704], 60.00th=[    3088], 70.00th=[    3536],
     | 80.00th=[    4768], 90.00th=[    6304], 95.00th=[    8160],
     | 99.00th=[  544768], 99.50th=[ 2113536], 99.90th=[30539776],
     | 99.95th=[74973184], 99.99th=[74973184]
  lat (nsec)   : 1000=1.52%
  lat (usec)   : 2=28.34%, 4=44.85%, 10=21.70%, 20=0.51%, 50=0.32%
  lat (usec)   : 250=0.25%, 500=1.20%, 750=0.76%
  lat (msec)   : 4=0.25%, 20=0.13%, 50=0.13%, 100=0.06%
  cpu          : usr=3.72%, sys=3.72%, ctx=43, majf=0, minf=14
  IO depths    : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.0%
     submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
     complete  : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
     issued rwts: total=1581,0,0,0 short=0,0,0,0 dropped=0,0,0,0
     latency   : target=0, window=0, percentile=100.00%, depth=1

Run status group 0 (all jobs):
   READ: bw=52.9MiB/s (55.5MB/s), 52.9MiB/s-52.9MiB/s (55.5MB/s-55.5MB/s), io=9.00MiB (10.5MB), run=189-189msec

Disk stats (read/write):
  sda: ios=24/0, merge=0/0, ticks=188/0, in_queue=260, util=55.70%

I believe the expected test has run properly but why the error has thrown for the particular ranges.

Thanks and Regards,
Mohan

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Testing --blocksize_range
  2018-12-12 13:41 Testing --blocksize_range Mohan Mohan
@ 2018-12-13  6:33 ` Sitsofe Wheeler
  2018-12-13 13:50   ` Jens Axboe
  0 siblings, 1 reply; 4+ messages in thread
From: Sitsofe Wheeler @ 2018-12-13  6:33 UTC (permalink / raw)
  To: mohan; +Cc: fio

Hi,

On Wed, 12 Dec 2018 at 13:43, Mohan Mohan <mohan@ertino.com> wrote:
>
> I am testing fio with bs ranges 1k-10k 2k-10k 3k-10k 4k-10k 5k-10k 6k-10k.
>
> The test works fine for the below run:
> fio --name=App2 --size=10m --rw=read --blocksize_range=1k-10k
> # fio --name=App2 --size=10m --rw=read --blocksize_range=2k-10k
> # fio --name=App2 --size=10m --rw=read --blocksize_range=5k-10k
>
> But error throws on below runs
> # fio --name=App2 --size=10m --rw=read --blocksize_range=3k-10k
> # fio --name=App2 --size=10m --rw=read --blocksize_range=4k-10k
> # fio --name=App2 --size=10m --rw=read --blocksize_range=6k-10k
>
> App2: (g=0): rw=read, bs=(R) 3072B-10.0KiB, (W) 3072B-10.0KiB, (T) 3072B-10.0KiB, ioengine=psync, iodepth=1
> fio-3.12-17-g0fcbc0
> Starting 1 process
> *** Error in `fio': double free or corruption (!prev): 0x0000555f92a80a60 ***
> fio: pid=1468, got signal=6

[snip]

> I believe the expected test has run properly but why the error has thrown for the particular ranges.

This is a real bug and it's occurring because the end of the range is
not a multiple of the start of the range (10k is a multiple of 1k but
10k is not a multiple of 3k). I've reproduced it here:

$ rm fio.tmp; ./fio --name=App2 --size=128k --rw=read
--blocksize_range=3k-10k --filename=fio.tmp
App2: (g=0): rw=read, bs=(R) 3072B-10.0KiB, (W) 3072B-10.0KiB, (T)
3072B-10.0KiB, ioengine=psync, iodepth=1
fio-3.12-20-g4cf3
Starting 1 process
App2: Laying out IO file (1 file / 0MiB)
=================================================================
==2593==ERROR: AddressSanitizer: heap-buffer-overflow on address
0x626000005900 at pc 0x7f7053ff346e bp 0x7ffc0e6a1bb0 sp
0x7ffc0e6a1358
WRITE of size 12288 at 0x626000005900 thread T0
    #0 0x7f7053ff346d  (/usr/lib/x86_64-linux-gnu/libasan.so.4+0x4e46d)
    #1 0x55c316d440d5 in fio_psyncio_queue engines/sync.c:182
    #2 0x55c316cab788 in td_io_queue /home/user/git/fio/ioengines.c:331
    #3 0x55c316d9334e in io_u_submit /home/user/git/fio/backend.c:613
    #4 0x55c316d961ab in do_io /home/user/git/fio/backend.c:1063
    #5 0x55c316d9e871 in thread_main /home/user/git/fio/backend.c:1785
    #6 0x55c316da255f in run_threads /home/user/git/fio/backend.c:2362
    #7 0x55c316da338f in fio_backend /home/user/git/fio/backend.c:2498
    #8 0x55c316e1e60d in main /home/user/git/fio/fio.c:60
    #9 0x7f7052be2b96 in __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
    #10 0x55c316c7f2f9 in _start (/home/user/git/fio/fio+0x632f9)

0x626000005900 is located 0 bytes to the right of 10240-byte region
[0x626000003100,0x626000005900)
allocated by thread T0 here:
    #0 0x7f7054083b50 in __interceptor_malloc
(/usr/lib/x86_64-linux-gnu/libasan.so.4+0xdeb50)
    #1 0x55c316d118b5 in alloc_mem_malloc /home/user/git/fio/memory.c:200
    #2 0x55c316d11e90 in allocate_io_mem /home/user/git/fio/memory.c:318
    #3 0x55c316d9828d in init_io_u_buffers /home/user/git/fio/backend.c:1311
    #4 0x55c316d97e66 in init_io_u /home/user/git/fio/backend.c:1264
    #5 0x55c316d9d701 in thread_main /home/user/git/fio/backend.c:1704
    #6 0x55c316da255f in run_threads /home/user/git/fio/backend.c:2362
    #7 0x55c316da338f in fio_backend /home/user/git/fio/backend.c:2498
    #8 0x55c316e1e60d in main /home/user/git/fio/fio.c:60
    #9 0x7f7052be2b96 in __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x21b96)

SUMMARY: AddressSanitizer: heap-buffer-overflow
(/usr/lib/x86_64-linux-gnu/libasan.so.4+0x4e46d)
Shadow bytes around the buggy address:
  0x0c4c7fff8ad0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c4c7fff8ae0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c4c7fff8af0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c4c7fff8b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c4c7fff8b10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x0c4c7fff8b20:[fa]fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c4c7fff8b30: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c4c7fff8b40: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c4c7fff8b50: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c4c7fff8b60: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c4c7fff8b70: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
==2593==ABORTING

Perhaps it would make sense to file this one over on Github so it
doesn't get lost but regardless, thank you for the very clear
reproduction steps!

-- 
Sitsofe | http://sucs.org/~sits/


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Testing --blocksize_range
  2018-12-13  6:33 ` Sitsofe Wheeler
@ 2018-12-13 13:50   ` Jens Axboe
  2018-12-13 16:11     ` Jens Axboe
  0 siblings, 1 reply; 4+ messages in thread
From: Jens Axboe @ 2018-12-13 13:50 UTC (permalink / raw)
  To: Sitsofe Wheeler, mohan; +Cc: fio

On 12/12/18 11:33 PM, Sitsofe Wheeler wrote:
> Hi,
> 
> On Wed, 12 Dec 2018 at 13:43, Mohan Mohan <mohan@ertino.com> wrote:
>>
>> I am testing fio with bs ranges 1k-10k 2k-10k 3k-10k 4k-10k 5k-10k 6k-10k.
>>
>> The test works fine for the below run:
>> fio --name=App2 --size=10m --rw=read --blocksize_range=1k-10k
>> # fio --name=App2 --size=10m --rw=read --blocksize_range=2k-10k
>> # fio --name=App2 --size=10m --rw=read --blocksize_range=5k-10k
>>
>> But error throws on below runs
>> # fio --name=App2 --size=10m --rw=read --blocksize_range=3k-10k
>> # fio --name=App2 --size=10m --rw=read --blocksize_range=4k-10k
>> # fio --name=App2 --size=10m --rw=read --blocksize_range=6k-10k
>>
>> App2: (g=0): rw=read, bs=(R) 3072B-10.0KiB, (W) 3072B-10.0KiB, (T) 3072B-10.0KiB, ioengine=psync, iodepth=1
>> fio-3.12-17-g0fcbc0
>> Starting 1 process
>> *** Error in `fio': double free or corruption (!prev): 0x0000555f92a80a60 ***
>> fio: pid=1468, got signal=6
> 
> [snip]
> 
>> I believe the expected test has run properly but why the error has thrown for the particular ranges.
> 
> This is a real bug and it's occurring because the end of the range is
> not a multiple of the start of the range (10k is a multiple of 1k but
> 10k is not a multiple of 3k). I've reproduced it here:

Oops, I'll take a look at this one, thanks for reporting.

-- 
Jens Axboe



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Testing --blocksize_range
  2018-12-13 13:50   ` Jens Axboe
@ 2018-12-13 16:11     ` Jens Axboe
  0 siblings, 0 replies; 4+ messages in thread
From: Jens Axboe @ 2018-12-13 16:11 UTC (permalink / raw)
  To: Sitsofe Wheeler, mohan; +Cc: fio

On 12/13/18 6:50 AM, Jens Axboe wrote:
> On 12/12/18 11:33 PM, Sitsofe Wheeler wrote:
>> Hi,
>>
>> On Wed, 12 Dec 2018 at 13:43, Mohan Mohan <mohan@ertino.com> wrote:
>>>
>>> I am testing fio with bs ranges 1k-10k 2k-10k 3k-10k 4k-10k 5k-10k 6k-10k.
>>>
>>> The test works fine for the below run:
>>> fio --name=App2 --size=10m --rw=read --blocksize_range=1k-10k
>>> # fio --name=App2 --size=10m --rw=read --blocksize_range=2k-10k
>>> # fio --name=App2 --size=10m --rw=read --blocksize_range=5k-10k
>>>
>>> But error throws on below runs
>>> # fio --name=App2 --size=10m --rw=read --blocksize_range=3k-10k
>>> # fio --name=App2 --size=10m --rw=read --blocksize_range=4k-10k
>>> # fio --name=App2 --size=10m --rw=read --blocksize_range=6k-10k
>>>
>>> App2: (g=0): rw=read, bs=(R) 3072B-10.0KiB, (W) 3072B-10.0KiB, (T) 3072B-10.0KiB, ioengine=psync, iodepth=1
>>> fio-3.12-17-g0fcbc0
>>> Starting 1 process
>>> *** Error in `fio': double free or corruption (!prev): 0x0000555f92a80a60 ***
>>> fio: pid=1468, got signal=6
>>
>> [snip]
>>
>>> I believe the expected test has run properly but why the error has thrown for the particular ranges.
>>
>> This is a real bug and it's occurring because the end of the range is
>> not a multiple of the start of the range (10k is a multiple of 1k but
>> 10k is not a multiple of 3k). I've reproduced it here:
> 
> Oops, I'll take a look at this one, thanks for reporting.

Pushed out a fix for this.

-- 
Jens Axboe



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-12-13 16:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-12 13:41 Testing --blocksize_range Mohan Mohan
2018-12-13  6:33 ` Sitsofe Wheeler
2018-12-13 13:50   ` Jens Axboe
2018-12-13 16:11     ` Jens Axboe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.