|
From: Nikolaus R. <Nik...@ra...> - 2011-01-11 02:07:44
|
Nikolaus Rath <Nik...@ra...> writes: > 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. The devil's in the detail. I had to write a minimal example and observe it mysteriously working before I looked closely enough, but I finally noticed that the call is *l*stat, and not stat. After adding the flag to sys_lstat64 the problem is fixed. Is there any chance of getting the flag added in valgrind by default, or would that hurt performance too much? I'm attaching my minimal example anyway, maybe it's useful for someone at some point. Best, -Nikolaus -- »Time flies like an arrow, fruit flies like a Banana.« PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6 02CF A9AD B7F8 AE4E 425C |