|
From: Julian S. <js...@ac...> - 2011-01-11 00:48:30
|
Yes, you made the change correctly.
Maybe some other thread is blocking? Can you figure out the
state of all threads? --trace-syscalls=yes gives you an
strace like output for your program, which might be useful.
J
On Tuesday, January 11, 2011, Nikolaus Rath wrote:
> Julian Seward <js...@ac...> writes:
> >> My guess would be that stat64 is not marked as a system call that can
> >> block and that it needs the MayBlock flag adding.
> >
> > Yes, that could be it. I guess, normally, a stat64 (etc) call is
> > completed eventually by the kernel, without the need for any other
> > thread to run. But in this case a stat64 call might somehow require
> > some other thread to progress.
> >
> > Nikolaus, try adding
> >
> > *flags |= SfMayBlock;
> >
> > to PRE(sys_stat64) in syswrap-x86-linux.c (I assume this is
> > 32-bit x86). Does that help?
>
> No, I'm afraid it's still blocking in the same call.
>
> Did I make the change correctly? The file
> coregrind/m_syswrap/syswrap-x86-linux.c now looks like this:
>
> PRE(sys_stat64)
> {
> *flags |= SfMayBlock;
> PRINT("sys_stat64 ( %#lx(%s), %#lx )",ARG1,(char*)ARG1,ARG2);
> PRE_REG_READ2(long, "stat64", char *, file_name, struct stat64 *, buf);
> PRE_MEM_RASCIIZ( "stat64(file_name)", ARG1 );
> PRE_MEM_WRITE( "stat64(buf)", ARG2, sizeof(struct vki_stat64) );
> }
>
>
>
> Best,
>
>
> -Nikolaus
|