Flexible I/O Tester development
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Sitsofe Wheeler <sitsofe@gmail.com>
Cc: Bart Van Assche <bart.vanassche@sandisk.com>,
	"fio@vger.kernel.org" <fio@vger.kernel.org>
Subject: Re: valgrind spews
Date: Thu, 22 Mar 2018 11:01:18 -0600	[thread overview]
Message-ID: <ed74b20d-cd3b-2b0a-89d1-188be58a5dae@kernel.dk> (raw)
In-Reply-To: <CALjAwxgaVddxmgzkM6S7d6SP0FTdBT9y6QeO58L870qxBYDqAg@mail.gmail.com>

On 3/22/18 10:53 AM, Sitsofe Wheeler wrote:
> On 22 March 2018 at 16:14, Jens Axboe <axboe@kernel.dk> wrote:
>> Hi Bart,
>>
>> After your commit:
>>
>> commit 0ffccc21fcd67d1e1d2a360e90f3fe8efc0d6b52
>> Author: Bart Van Assche <bart.vanassche@wdc.com>
>> Date:   Thu Mar 8 13:41:36 2018 -0800
>>
>>     Improve Valgrind instrumentation of memory allocations
>>
>> running valgrind on a fio spews a lot of warnings:
>>
>> ==14331== Invalid write of size 8
>> ==14331==    at 0x4C3451F: memset (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
>> ==14331==    by 0x4595F8: memset (string3.h:90)
>> ==14331==    by 0x4595F8: smalloc_pool (smalloc.c:434)
>> ==14331==    by 0x4595F8: __smalloc (smalloc.c:452)
>> ==14331==    by 0x4727CD: flow_init (flow.c:112)
>> ==14331==    by 0x421886: setup_thread_area (init.c:391)
>> ==14331==    by 0x42552A: get_new_job (init.c:468)
>> ==14331==    by 0x42552A: __parse_jobs_ini (init.c:1928)
>> ==14331==    by 0x42585F: parse_jobs_ini (init.c:2082)
>> [...]
>>
>> Basically off any path that ends up in smalloc, on the memset()
>> that we do:
>>
>>         ptr = __smalloc_pool(pool, alloc_size);
>>         if (ptr) {
>>                 struct block_hdr *hdr = ptr;
>>
>>                 hdr->size = alloc_size;
>>                 fill_redzone(hdr);
>>
>>                 ptr += sizeof(*hdr);
>>                 memset(ptr, 0, size);
>>                 ^^^
>>         }
>>
>> for every alloc. From configure:
>>
>> Valgrind headers              yes
> 
> I can't reproduce that one here with the following:
> 
> valgrind ./fio --ioengine=libaio --thread --rw=read
> --filename=/tmp/fio.tmp --size=1M  --flow=2 --stonewall --name=test
> --name=test2
> 
> My configure says this:
> 
> Valgrind headers              yes
> 
> Additionally after a
> make clean
> do you find that
> git clean -xn
> still finds built files to remove?

Run it as a server:

$ valgrind ./fio --server
$ ./fio --client=localhost null.fio

$ cat null.fio
[null]
bs=4k
ioengine=null
size=1g
rw=read

The above was supposed to say "fio server", but apparently I missed
putting that in...

-- 
Jens Axboe



  reply	other threads:[~2018-03-22 17:01 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-22 16:14 valgrind spews Jens Axboe
2018-03-22 16:53 ` Sitsofe Wheeler
2018-03-22 17:01   ` Jens Axboe [this message]
2018-03-22 17:12     ` Bart Van Assche
2018-03-22 17:23       ` Jens Axboe
2018-03-22 17:27         ` Bart Van Assche
2018-03-22 17:29           ` Jens Axboe
2018-03-23 14:39             ` Sitsofe Wheeler
2018-03-23 14:49               ` Jens Axboe
2018-03-23 15:15                 ` Bart Van Assche
2018-03-23 21:43                   ` Sitsofe Wheeler
2018-03-23 21:49                     ` Bart Van Assche
2018-03-23 22:18                       ` Sitsofe Wheeler
2018-03-23 22:53                         ` Jens Axboe
2018-03-22 17:08 ` Bart Van Assche

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ed74b20d-cd3b-2b0a-89d1-188be58a5dae@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=bart.vanassche@sandisk.com \
    --cc=fio@vger.kernel.org \
    --cc=sitsofe@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox