|
From: Radoslaw K. <ku...@9l...> - 2016-12-07 12:54:20
|
Hi Ivo, here is the log that appeared when we switched on trace-syscalls: SYSCALL[28094,1](12) sys_brk ( 0x0 ) --> [pre-success] Success(0x4000000) --28094-- REDIR: 0x37458176d0 (ld-linux-x86-64.so.2:strlen) redirected to 0x380550c1 (vgPlain_amd64_linux_REDIR_FOR_strlen) SYSCALL[28094,1](63) sys_newuname ( 0xffefffb10 )[sync] --> Success(0x0) --28094-- REDIR: 0x37458174e0 (ld-linux-x86-64.so.2:index) redirected to 0x380550db (vgPlain_amd64_linux_REDIR_FOR_index) SYSCALL[28094,1](89) sys_readlink ( 0x374581b667(/proc/self/exe), 0xffeffec10, 4096 ) --> [pre-success] Success(0x52) valgrind: m_syswrap/syswrap-main.c:1938 (vgPlain_client_syscall): Assertion '0 == (sci->flags & ~(SfPollAfter | SfYieldAfter | SfNoWriteResult))' failed. We also managed to create simple file exposing the problem (see attachment). Exact command used by us to reproduce the problem: valgrind --tool=memcheck -v --trace-syscalls=yes --sim-hints=fuse-compatible ./a.out Radek W dniu 06.12.2016 o 17:23, Ivo Raisr pisze: > > > 2016-12-06 15:39 GMT+00:00 Radoslaw Kujawa <ku...@9l... > <mailto:ku...@9l...>>: > > Hi everyone, > > we're trying to run valgrind on a multi-threaded binary that uses fuse to emulate a filesystem. We've found|--sim-hints=|fuse-compatible flag, which is great (resolves some problems with deadlocks), but then valgrind fails on an assert: > > vg_assert(0 == (sci->flags & ~(SfPollAfter | SfYieldAfter | SfNoWriteResult))); (in syswrap_main.c) > > In our case (sci->flags & SfMayBlock) is true. When we added SfMayBlock to acceptable flags, and recompiled valgrind, everything worked fine. > > Do you have and idea what we can do to run our binary in a simple way (without any hacks in assertions...)? Is it some configuration issue to allow blocking operations or maybe it is a bug in valgrind itself? > > > Can you isolate this problem in a very simple program so there is a > reproducible test case? > Alternatively, please provide output of running Valgrind with > '--trace-syscalls=yes'. > I. |