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

Program with Multiple Syscalls Hangs When Executed on GlusterFS #4411

Open
l392zhan opened this issue Sep 11, 2024 · 0 comments
Open

Program with Multiple Syscalls Hangs When Executed on GlusterFS #4411

l392zhan opened this issue Sep 11, 2024 · 0 comments

Comments

@l392zhan
Copy link

Description of problem:
When executing a test case consisting of several syscalls, the program hangs. The program runs without any issues on the local file system.

The exact command to reproduce the issue:

// autogenerated by syzkaller (https://github.com/google/syzkaller)

#define _GNU_SOURCE

#include <endian.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/syscall.h>
#include <sys/types.h>
#include <unistd.h>

int main(void)
{
  syscall(__NR_mmap, /*addr=*/0x1ffff000ul, /*len=*/0x1000ul, /*prot=*/0ul,
          /*flags=*/0x32ul, /*fd=*/-1, /*offset=*/0ul);
  syscall(__NR_mmap, /*addr=*/0x20000000ul, /*len=*/0x1000000ul, /*prot=*/7ul,
          /*flags=*/0x32ul, /*fd=*/-1, /*offset=*/0ul);
  syscall(__NR_mmap, /*addr=*/0x21000000ul, /*len=*/0x1000ul, /*prot=*/0ul,
          /*flags=*/0x32ul, /*fd=*/-1, /*offset=*/0ul);

  memcpy((void*)0x20000000, "./file0\000", 8);
  *(uint64_t*)0x20000200 = 0;
  *(uint64_t*)0x20000208 = 0;
  *(uint64_t*)0x20000210 = 0;
  *(uint64_t*)0x20000218 = 0xea60;
  syscall(__NR_utimensat, /*dir=*/-1, /*pathname=*/0x20000000ul,
          /*times=*/0x20000200ul, /*flags=*/0ul);
  memcpy((void*)0x20000040, "./file0\000", 8);
  syscall(__NR_truncate, /*file=*/0x20000040ul, /*len=*/0xfffffffffffff801ul);
  memcpy((void*)0x20000080, "./file0\000", 8);
  syscall(__NR_mknodat, /*dirfd=*/0xffffff9c, /*file=*/0x20000080ul,
          /*mode=*/0x1000ul, /*dev=*/0x103);
  memcpy((void*)0x200000c0, "./file0\000", 8);
  syscall(__NR_creat, /*file=*/0x200000c0ul, /*mode=*/0x80ul);
  memcpy((void*)0x20000100, "./file0\000", 8);
  *(uint64_t*)0x20000140 = 0x8001;
  *(uint64_t*)0x20000148 = 3;
  syscall(__NR_utime, /*filename=*/0x20000100ul, /*times=*/0x20000140ul);
  return 0;
}

Compile the code with GCC and run it in the client mount point.

The full output of the command that failed:

Expected results:
It should return 0 instead of hanging.

Mandatory info:
- The output of the gluster volume info command:

- The output of the gluster volume status command:

- The output of the gluster volume heal command:

**- Provide logs present on following locations of client and server nodes -
/var/log/glusterfs/

**- Is there any crash ? Provide the backtrace and coredump

Additional info:

- The operating system / glusterfs version:
Linux kernel version: 6.2.0
OS version: Debian 11.8
GlusterFS version: 11.1

Note: Please hide any confidential data which you don't want to share in public like IP address, file name, hostname or any other configuration

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

1 participant