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 <kuj...@9livesdata.com
<mailto:kuj...@9livesdata.com>>:
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.
#include <unistd.h>
#include <sys/syscall.h> /* SYS_readlink, */
int main(int argc, char* argv[]){
char path[100];
syscall(SYS_readlink, "/proc/self/exe", path, 100);
return 0;
}
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users