Re: FIO Segfault

From: Jens Axboe <jens.axboe_at_oracle.com>
Date: Thu, 31 Jul 2008 19:47:28 +0200

On Thu, Jul 31 2008, James Ray wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Desc: FIO Segfaults with specific config (lots of files maybe?)
> Env: CentOS 5.2.
> Version: Git HEAD
> Reproduce: Run with following config:
> [imap]
> size=4G
> filesize=4-1024k
> directory=/mnt/store
> fadvise_hint=0
> blocksize=65k
> direct=0
> numjobs=9
> nrfiles=3000
> exec_prerun=echo 3 > /proc/sys/vm/drop_caches
> file_service_type=random
> rw=randread
>
> ~/fio.git/fio --debug=all ./JOB.fio2
>
> Last part of debug logs:
> file 18633 add file imap.4.443
> file 18633 resize file array to 444 files
> file 18633 file 0x2b39a59b8d68 "/mnt/store/imap.4.443" added at 443
> file 18633 add file imap.4.444
> file 18633 resize file array to 445 files
> file 18633 file 0x2b39a59b8e48 "/mnt/store/imap.4.444" added at 444
> file 18633 add file imap.4.445
> file 18633 resize file array to 446 files
> file 18633 file 0x2b39a59b8f28 "/mnt/store/imap.4.445" added at 445
> file 18633 add file imap.4.446
> Segmentation fault

It's the shared pool running out, I should make that able to grow a lot
bigger. Try this patch.

diff --git a/smalloc.c b/smalloc.c
index 0a86c43..1c975df 100644
--- a/smalloc.c
+++ b/smalloc.c
@@ -22,7 +22,7 @@
 #define SMALLOC_BPL (SMALLOC_BPB * SMALLOC_BPI)
 
 #define INITIAL_SIZE 1024*1024 /* new pool size */
-#define MAX_POOLS 4 /* maximum number of pools to setup */
+#define MAX_POOLS 128 /* maximum number of pools to setup */
 
 #define SMALLOC_PRE_RED 0xdeadbeefU
 #define SMALLOC_POST_RED 0x5aa55aa5U

-- 
Jens Axboe
Received on Thu Jul 31 2008 - 19:47:28 CEST

This archive was generated by hypermail 2.2.0 : Thu Jul 31 2008 - 20:00:01 CEST