Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fio segfault with trim + verify #1840

Closed
1 task done
EnergyFaith opened this issue Nov 26, 2024 · 3 comments
Closed
1 task done

fio segfault with trim + verify #1840

EnergyFaith opened this issue Nov 26, 2024 · 3 comments

Comments

@EnergyFaith
Copy link

EnergyFaith commented Nov 26, 2024

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
Copy link
Author

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

@vincentkfu
Copy link
Collaborator

The supported use case for verify is to read the data back after a write workload. Fio should of course exit gracefully upon encountering a trim+verify workload.

Fio does have a set of options (trim_percentage, trim_verify_zero, trim_backlog, trim_backlog_batch) that may support your use case, but based on brief testing, this feature does not seem to work.

For your use case you could just trim the entire device and then do run a verify=pattern verify_pattern=0 job, assuming that discarded blocks return all zeroes.

@vincentkfu
Copy link
Collaborator

Closing due to lack of response.

@vincentkfu vincentkfu closed this as not planned Won't fix, can't repro, duplicate, stale Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants