From: Jiří P. <jpa...@we...> - 2008-10-24 13:16:38
|
Hello, On Fri, 24 Oct 2008 14:16:29 +0200, Daniel Gollub <dg...@su...> wrote: > I'm looking right now also into the mallocstress testcase. > With more recent kernel I experience (e.g. 2.6.27) failing mallocstress > on > x86_64. (Didn't tested different architectures yet). > > On which kernel did you test mallocstress? > 2.6.27? Or something different? 2.6.27-rc8, i386. However, I didn't notice until you asked, that when I tested the patch, the test actually succeeded, which is very weird. Before, I got a message "malloc: Cannot allocate memory". I have a theory, that it is caused by swapping of the semop() and malloc() calls (see the patch). That means before, a thread first waited on the semaphore, and when it got released, other threads might have been already stressing the memory, so there wasn't any free and malloc() of the return variable would fail. If that is really the case, the patch doesn't fix it, only lowers the probablity of such behaviour. However, making a proper patch should be easy in that case. Regards Jiri Palecek |