https://bugs.kde.org/show_bug.cgi?id=407313

            Bug ID: 407313
           Summary: Deadlock when syscall is handled in other thread
           Product: valgrind
           Version: 3.13.0
          Platform: unspecified
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: memcheck
          Assignee: jsew...@acm.org
          Reporter: falk.wer...@gmx.net
  Target Milestone: ---

Created attachment 119899
  --> https://bugs.kde.org/attachment.cgi?id=119899&action=edit
strace and stacks of test application

SUMMARY

I use libfuse to write a simple filesystem. In order to test it, I created a
simple application with two threads:
- one is driving the fuse filesystem (e.g. responding to syscalls like read)
- the other uses normal filesystem operations, such as stat, to test the
filesystem

When executing this with Valgrind/Memcheck a deadlock occurs as soon as stat is
called.

STEPS TO REPRODUCE
1. minimal example code can be optained here:
https://github.com/falk-werner/libfuse-valgrind-deadlock
2. use `make run` to create and execute a docker container
3 valgrind ./libfuse-test

OBSERVED RESULT
The application will deadlock (see attached files for stack traces).

EXPECTED RESULT
No deadlock should appear.

SOFTWARE/OS VERSIONS
Linux: Ubuntu 18.04

ADDITIONAL INFORMATION
When the deadlock appears, fuse is trying to send the filesystem request, but
the other thread is blocked in a read(1028, "A", 1) operation originated from
Valgrind.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to