axboe / fio

Flexible I/O Tester
GNU General Public License v2.0
5.31k stars 1.26k forks source link

fio segfault with trim + verify #1840

Open EnergyFaith opened 6 days ago

EnergyFaith commented 6 days ago

Please acknowledge the following before creating a ticket

Description of the bug: We would like to verify trim, it runs to segfault when starting verification phase. free(): double free detected in tcache 2 The fio args are printed below.

Environment: Ubuntu 22.04.1 LTS 5.15.0-72-generic

fio version: fio-3.34

Reproduction steps

# fio.cfg
[global]
ioengine=libaio
direct=1

[trim_test]
rw=trim
bs=1M
verify=md5
do_verify=1
iodepth=128
filename=/dev/vde
verify_backlog=1
experimental_verify=1

fio fio.cfg

EnergyFaith commented 6 days ago

stack is

#0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=140737349579200) at ./nptl/pthread_kill.c:44
#1  __pthread_kill_internal (signo=6, threadid=140737349579200) at ./nptl/pthread_kill.c:78
#2  __GI___pthread_kill (threadid=140737349579200, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
#3  0x00007ffff7bea476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#4  0x00007ffff7bd07f3 in __GI_abort () at ./stdlib/abort.c:79
#5  0x00007ffff7c31676 in __libc_message (action=action@entry=do_abort, fmt=fmt@entry=0x7ffff7d83b77 "%s\n")
    at ../sysdeps/posix/libc_fatal.c:155
#6  0x00007ffff7c48cfc in malloc_printerr (str=str@entry=0x7ffff7d866f0 "free(): double free detected in tcache 2")
    at ./malloc/malloc.c:5664
#7  0x00007ffff7c4b0ab in _int_free (av=0x7ffff7dc2c80 <main_arena>, p=0x55555576b020, have_lock=0) at ./malloc/malloc.c:4473
#8  0x00007ffff7c4d453 in __GI___libc_free (mem=<optimized out>) at ./malloc/malloc.c:3391
#9  0x00005555555b5e4d in fio_options_free (td=td@entry=0x7fffef4ba000) at options.c:5787
#10 0x00005555555d177c in fio_backend (sk_out=sk_out@entry=0x0) at backend.c:2647
#11 0x000055555557077b in main (argc=2, argv=0x7fffffffe518, envp=<optimized out>) at fio.c:60