Skip to content

Conversation

@lubaihua33
Copy link

Execute $XFS_IO_PROG -f -c "utimes" 0 0 0 0 $testfile 2>&1 will produce an empty file named "0" under the current directory, and this file will be always remained. The right code should be $XFS_IO_PROG -f -c "utimes 0 0 0 0" $testfile 2>&1.

@lubaihua33 lubaihua33 closed this Oct 24, 2019
chandanr pushed a commit to chandanr/xfstests that referenced this pull request Mar 19, 2020
[BUG]
When using --help parameter (unrecognized) after valid --log/--replay,
log-writes just crashes:
  Starting program: replay-log --log /dev/test/test  --replay /dev/test/scratch1 --help
  /home/adam/xfstests-dev/src/log-writes/replay-log: unrecognized option '--help'

  Program received signal SIGSEGV, Segmentation fault.
  0x00007ffff7f5cc55 in __strlen_avx2 () from /usr/lib/libc.so.6
  (gdb) bt
  #0  0x00007ffff7f5cc55 in __strlen_avx2 () from /usr/lib/libc.so.6
  kdave#1  0x00007ffff7e89363 in strdup () from /usr/lib/libc.so.6
  kdave#2  0x00005555555554ac in main (argc=6, argv=0x7fffffffea78)
      at replay-log.c:219

[CAUSE]
We didn't check return value from getopt_long() for unrecognized
parameter, thus we reuse the old opt_index, and if that option needs an
parameter, we will access optarg which can be NULL and cause segfault.

[FIX]
Check return value from getopt_long() for '?' to handle unrecognized
options correctly.

Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
hbirth pushed a commit to hbirth/xfstests that referenced this pull request Oct 21, 2023
* Add missing fuse.subtype check

It is observed by running the xfstest suite that we mount
fuse along with correct subtype but during mount check we do
not check against FUSE_SUBTYP option. Script used by mount for fuse
subtype passthrough_ll i.e '/sbin/mount.fuse.passthrough_ll' or
any other Fuse subtype script should also mention '-o subtype'
option to make it work correctly.

* Make changes in xfstest for redfs run

With these changes and with 'DDNStorage#2'
passthrough_hp completed run on xfstest
without any issue in kernel.
(Testing included redfs module, red-libfuse on linux-5.19)
kdave pushed a commit that referenced this pull request Feb 24, 2025
My system (Debian 12) has fio 3.33.  Once in a while, fio crashes while
shutting down after it receives a SIGBUS on account of the filesystem
going down.  This causes the test to fail with:

generic/019       - output mismatch (see /var/tmp/fstests/generic/019.out.bad)
    --- tests/generic/019.out   2024-02-28 16:20:24.130889521 -0800
    +++ /var/tmp/fstests/generic/019.out.bad    2025-01-03 15:00:35.903564431 -0800
    @@ -5,5 +5,6 @@

     Start fio..
     Force SCRATCH_DEV device failure
    +/tmp/fstests/tests/generic/019: line 112: 90841 Segmentation fault      $FIO_PROG $fio_config >> $seqres.full 2>&1
     Make SCRATCH_DEV device operable again
     Disallow global fail_make_request feature
    ...
    (Run 'diff -u /tmp/fstests/tests/generic/019.out /var/tmp/fstests/generic/019.out.bad'  to see the entire diff)

because the wait command will dutifully report fatal signals that kill
the fio process.  Unfortunately, a core dump shows that we blew up in
some library's exit handler somewhere:

(gdb) where
#0  unlink_chunk (p=p@entry=0x55b31cb9a430, av=0x7f8b4475ec60 <main_arena>) at ./malloc/malloc.c:1628
#1  0x00007f8b446222ff in _int_free (av=0x7f8b4475ec60 <main_arena>, p=0x55b31cb9a430, have_lock=<optimized out>, have_lock@entry=0) at ./malloc/malloc.c:4603
#2  0x00007f8b44624f1f in __GI___libc_free (mem=<optimized out>) at ./malloc/malloc.c:3385
#3  0x00007f8b3a71cf0e in ?? () from /lib/x86_64-linux-gnu/libtasn1.so.6
#4  0x00007f8b4426447c in ?? () from /lib/x86_64-linux-gnu/libgnutls.so.30
#5  0x00007f8b4542212a in _dl_call_fini (closure_map=closure_map@entry=0x7f8b44465620) at ./elf/dl-call_fini.c:43
#6  0x00007f8b4542581e in _dl_fini () at ./elf/dl-fini.c:114
#7  0x00007f8b445ca55d in __run_exit_handlers (status=0, listp=0x7f8b4475e820 <__exit_funcs>, run_list_atexit=run_list_atexit@entry=true, run_dtors=run_dtors@entry=true)
    at ./stdlib/exit.c:116
#8  0x00007f8b445ca69a in __GI_exit (status=<optimized out>) at ./stdlib/exit.c:146
#9  0x00007f8b445b3251 in __libc_start_call_main (main=main@entry=0x55b319278e10 <main>, argc=argc@entry=2, argv=argv@entry=0x7ffec6f8b468) at ../sysdeps/nptl/libc_start_call_main.h:74
#10 0x00007f8b445b3305 in __libc_start_main_impl (main=0x55b319278e10 <main>, argc=2, argv=0x7ffec6f8b468, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>,
    stack_end=0x7ffec6f8b458) at ../csu/libc-start.c:360
#11 0x000055b319278ed1 in _start ()

This isn't a filesystem failure, so mask this by shovelling the output
to seqres.full.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
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

Successfully merging this pull request may close these issues.

1 participant