On Fri, May 8, 2009 at 12:58 PM,  <ksreedha...@gmail.com> wrote:
> Hi Wan-Teh,
>
> Before the crash, I get the output of "pthread_mutex_lock fails with
> 22".
>
> So, rv value is 22. Can you figure out the something out of this.

I remember you're using CentOS Linux, right?

On Linux, errno 22 is EINVAL (invalid argument).  The pthread_mutex_lock
man page lists two reasons for pthread_mutex_lock to fail with EINVAL:
http://www.opengroup.org/onlinepubs/007908775/xsh/pthread_mutex_unlock.html

The more likely reason is:
    The value specified by mutex does not refer to an initialised mutex object.

So I guess the PRLock in question is not initialized or has been destroyed.

Could you try to get a stack trace?  You can cause NSPR to crash:

    rv = pthread_mutex_lock(&lock->mutex);
    if (rv != 0) {    /* ADD THIS */
        int *p = NULL;
        printf("pthread_mutex_lock fails with %d\n", rv);
        *p = 0;  /* THIS WILL CRASH */
    }
    PR_ASSERT(0 == rv);

Make sure your Java Server dumps core when it crashes, and use gdb
on the core file to get the stack trace.  Alternatively, you can just run
your Java Server in gdb and let it crash.

Thanks,
Wan-Teh
-- 
dev-tech-crypto mailing list
dev-tech-crypto@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-tech-crypto

Reply via email to