Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Singificant increase in test failures on amd64



joerg%britannica.bec.de@localhost said:
> lib/librumpuser/rumpuser_sp.c sets a 32KB stack for threads, which was
> ignored before.

Ok... but this doesn't explain serious failures.
The stack data should be page aligned before they are used
for mmap/mprotect in pthread_newstack, but this is not the
problem here. And there is a glitch in allocation which
makes that a page is wasted (see attachment) but this
should only matter if the stack is really tight.

best regards
Matthias


-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------

Kennen Sie schon unsere app? http://www.fz-juelich.de/app
diff -r 6492328a64d6 lib/libpthread/pthread.c
--- a/lib/libpthread/pthread.c  Thu Mar 08 19:39:58 2012 +0100
+++ b/lib/libpthread/pthread.c  Fri Mar 09 20:09:42 2012 +0100
@@ -340,10 +340,11 @@
                mapped_stack = true;
        }
        newthread->pt_stack.ss_size = pthread__stacksize - pthread__pagesize;
-       newthread->pt_stack.ss_sp = stackbase;
 #ifdef __MACHINE_STACK_GROWS_UP
+       newthread->pt_stack.ss_sp = stackbase;
        redzone = (char *)stackbase + newthread->pt_stack.ss_size;
 #else
+       newthread->pt_stack.ss_sp = (char *)stackbase + pthread__pagesize;
        redzone = (char *)stackbase;
 #endif
        if (mprotect(redzone, pthread__pagesize, PROT_NONE) == -1) {


Home | Main Index | Thread Index | Old Index