Upon tracing valgrind upon suggestions above I found two offending system
calls in my code: sys_newstat and sys_statfs. I also verified deadlock
lines by running valgrind with "vgdb" set and stepping through the code.
Following patch is the changed I did in valgrind to get these system calls
supported. Let me know if there is interest in applying the patch in trunk,
and if so I should submit this patch elsewhere.

--- coregrind/m_syswrap/syswrap-generic.c       2014-11-25
14:41:20.000000000 -0500
+++
/home/atalay/source/valgrind-3.10.1/coregrind/m_syswrap/syswrap-generic.c
2015-04-15 15:50:38.465388486 -0400
@@ -4101,6 +4101,8 @@
    PRE_REG_READ2(long, "setreuid", vki_uid_t, ruid, vki_uid_t, euid);
 }

+
+
 PRE(sys_setrlimit)
 {
    UWord arg1 = ARG1;
@@ -4160,6 +4162,7 @@

 PRE(sys_newstat)
 {
+   *flags |= SfMayBlock;
    PRINT("sys_newstat ( %#lx(%s), %#lx )", ARG1,(char*)ARG1,ARG2);
    PRE_REG_READ2(long, "stat", char *, file_name, struct stat *, buf);
    PRE_MEM_RASCIIZ( "stat(file_name)", ARG1 );
@@ -4173,6 +4176,7 @@

 PRE(sys_statfs)
 {
+   *flags |= SfMayBlock;
    PRINT("sys_statfs ( %#lx(%s), %#lx )",ARG1,(char*)ARG1,ARG2);
    PRE_REG_READ2(long, "statfs", const char *, path, struct statfs *, buf);
    PRE_MEM_RASCIIZ( "statfs(path)", ARG1 );

Thanks the responses.

Atalay

On Thu, Apr 9, 2015 at 2:08 PM, Atalay Ozgovde <aozgo...@ralota.com> wrote:

> This is essentially the same bug as:
> https://bugs.kde.org/show_bug.cgi?id=278057
> A patch was applied for this bug in version 3.7 and it is considered
> fixed.
> I am using version 3.10, I confirmed in the source code that the patch is
> applied. Valgrind still dread-locks when used to test an application that
> uses fuse in our environment. We are using 64bit Ubuntu 12.04LTS.
> Anybody knows if there is an easy fix?
>
> Thanks,
>
> Atalay
>
>
------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to