From e48676baa53074b429460c71fb2c9e0ac7ac7d8c Mon Sep 17 00:00:00 2001 From: gurudas pai Date: Wed, 11 Apr 2007 12:44:27 +0200 Subject: [PATCH] Fix bug with stonewall option causing segfault fio core dumped , with stonewall, [global] ioengine=libaio direct=1 bs=8k iodepth=1024 iodepth_batch=60 randrepeat=1 size=1024m directory=/home/oracle [job1] rw=randread filename=file1 [job2] rw=randwrite filename=file1 stonewall [job3] rw=randread filename=file1 [job4] rw=randwrite filename=file1 >fio myjob job1: (g=0): rw=randread, bs=8K-8K/8K-8K, ioengine=libaio, iodepth=1024 job2: (g=1): rw=randwrite, bs=8K-8K/8K-8K, ioengine=libaio, iodepth=1024 job3: (g=1): rw=randread, bs=8K-8K/8K-8K, ioengine=libaio, iodepth=1024 job4: (g=1): rw=randwrite, bs=8K-8K/8K-8K, ioengine=libaio, iodepth=1024 Starting 4 processes Quit (core dumped)PP] [99.3% done] [ 1298/ 0 kb/s] [eta 00m:03s] (gdb) bt t_rate=0xfeeee790, m_rate=0xfeeee794) at fio.c:1011 Signed-off-by: Jens Axboe --- fio.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fio.c b/fio.c index 89cc5996..edc6b495 100644 --- a/fio.c +++ b/fio.c @@ -990,6 +990,7 @@ static void reap_threads(int *nr_running, int *t_rate, int *m_rate) /* * thread is not dead, continue */ + pending++; continue; reaped: if (td->o.use_thread) { @@ -1002,6 +1003,7 @@ reaped: (*nr_running)--; (*m_rate) -= td->o.ratemin; (*t_rate) -= td->o.rate; + pending--; if (td->error) exit_value++; -- 2.25.1