KFS 0.5/Debian squeeze/mipsel/2.6.32-5-4kc-malta/PAGESIZE=4096
metaserver and kfsping exited with the error message as follows:
TryToStart Invalid argument 22Aborted
In src/cc/qcdio/qcthread.cpp:106
if (inStackSize > 0 && (theErr = pthread_attr_setstacksize(
&theStackSizeAttr, inStackSize)) != 0)
pthread_attr_setstacksize failed when inStackSize is 32KB. I wrote a small test
program:
pthread_attr_getstacksize(&a, &n);
printf("%d\n", n);
for (n = 16384; n <= 256 * 1024; n *= 2)
printf("%d\t%d\n", n, pthread_attr_setstacksize(&a, n));
On x86:
8388608
16384 0
32768 0
65536 0
131072 0
262144 0
On the machine:
8388608
16384 22
32768 22
65536 22
131072 0
262144 0
I knew that's not KFS' fault, but 128KB seems to be more adaptable.
`man pthread_attr_setstacksize`:
pthread_attr_setstacksize() can fail with the following error:
EINVAL The stack size is less than PTHREAD_STACK_MIN (16384) bytes.
On some systems, pthread_attr_setstacksize() can fail with the error EINVAL if
stacksize is not a multiple of the system page size.
Original issue reported on code.google.com by lgh.h...@gmail.com on 25 Jul 2012 at 10:45
Original issue reported on code.google.com by
lgh.h...@gmail.com
on 25 Jul 2012 at 10:45