Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TryToStart Invalid argument 22Aborted #13

Open
GoogleCodeExporter opened this issue Mar 16, 2016 · 0 comments
Open

TryToStart Invalid argument 22Aborted #13

GoogleCodeExporter opened this issue Mar 16, 2016 · 0 comments

Comments

@GoogleCodeExporter
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant