Flexible I/O Tester development
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: "Bruce Cran" <bruce@cran.org.uk>,
	"Sébastien Bouchex Bellomié" <sbouchex@infovista.com>,
	"fio@vger.kernel.org" <fio@vger.kernel.org>,
	bcran@fusionio.com
Subject: Re: ioengine=sync issue on Windows
Date: Thu, 03 Apr 2014 21:28:09 -0600	[thread overview]
Message-ID: <533E26C9.9040609@kernel.dk> (raw)
In-Reply-To: <533E230D.8050301@cran.org.uk>

On 2014-04-03 21:12, Bruce Cran wrote:
> On 4/3/2014 8:35 PM, Jens Axboe wrote:
>> So next question... If you replace that fill_io_buffer() call with a
>> memset(b, 0, bs); does it then work?
>>
>
> The io error goes away, but now it occasionally crashes:
>
> (gdb) bt
>
> #0  0x64942e9e in pthread_mutex_unlock () from
> /cygdrive/c/Users/bcran/workspace/fio/libwinpthread-1.dll
> #1  0x0043997c in run_threads () at backend.c:1791
> #2  0x00439d9f in fio_backend () at backend.c:1904
> #3  0x0044c274 in main (argc=2, argv=0x821728, envp=0x821988) at fio.c:50
>
> (gdb) info threads
>    Id   Target Id         Frame
>    3    Thread 7256.0x4618 fio_pin_memory (td=td@entry=0x2820000) at
> memory.c:27
>    2    Thread 7256.0xc8  0x7787bf3c in ?? ()
> * 1    Thread 7256.0x5e04 0x64942e9e in pthread_mutex_unlock () from
> /cygdrive/c/Users/bcran/workspace/fio/libwinpthread-1.dll
> (gdb) thread 3
> (gdb) bt
> #0  fio_pin_memory (td=td@entry=0x2820000) at memory.c:27
> #1  0x00437076 in thread_main (data=0x2820000) at backend.c:1226
> #2  0x64944ecb in pthread_create_wrapper () from
> /cygdrive/c/Users/bcran/workspace/fio/libwinpthread-1.dll
> #3  0x752d0bc4 in wtoi64 () from /cygdrive/c/Windows/SysWOW64/msvcrt.dll
> #4  0x752d0cec in msvcrt!_beginthreadex () from
> /cygdrive/c/Windows/SysWOW64/msvcrt.dll
> #5  0x7699495d in KERNEL32!BaseThreadInitThunk () from
> /cygdrive/c/Windows/SysWOW64/KERNEL32.DLL
> #6  0x778898ee in ?? ()
> #7  0x778898c4 in ?? ()
> #8  0x00000000 in ?? ()

This really sounds like an issue with write() on windows. The change 
looks fine, and the fact that moving the memset around makes a 
difference - well, that's just bizarre. Do you have time to dig into 
this? Was read/write really completely reliable before this change?

What if we allocate a bigger buffer, does that change anything? Change 
that malloc() to:

b = fio_memalign(4096, 2 * td->o.max_bs[DDIR_WRITE]);

(and the corresponding free to fio_memfree(b, 2 * td->o.max_bs[DDIR_WRITE])

-- 
Jens Axboe



  reply	other threads:[~2014-04-04  3:28 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-12 15:41 ioengine=sync issue on Windows Sébastien Bouchex Bellomié
2014-03-12 16:33 ` Jens Axboe
2014-03-12 17:48   ` Bruce Cran
2014-03-12 18:02   ` Bruce Cran
2014-03-12 19:11     ` Jens Axboe
2014-03-12 19:24       ` Bruce Cran
2014-03-12 19:30         ` Jens Axboe
2014-03-12 19:36           ` Bruce Cran
2014-03-12 19:38             ` Jens Axboe
2014-03-12 19:41               ` Jens Axboe
2014-03-12 19:44                 ` Bruce Cran
2014-04-02  3:11   ` Bruce Cran
2014-04-03 22:42     ` Bruce Cran
2014-04-04  1:57       ` Jens Axboe
2014-04-04  2:14         ` Bruce Cran
2014-04-04  2:17           ` Jens Axboe
2014-04-04  2:26             ` Bruce Cran
2014-04-04  2:35               ` Jens Axboe
2014-04-04  3:12                 ` Bruce Cran
2014-04-04  3:28                   ` Jens Axboe [this message]
2014-04-28 22:04                     ` Bruce Cran

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=533E26C9.9040609@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=bcran@fusionio.com \
    --cc=bruce@cran.org.uk \
    --cc=fio@vger.kernel.org \
    --cc=sbouchex@infovista.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