On Fri, Mar 20, 2009 at 10:49 PM, <ksreedha...@gmail.com> wrote: > On Mar 20, 9:59 pm, ksreedha...@gmail.com wrote: >> Hello, >> >> I am using JSS 4.2.5, NSS 3.11.4 and NSPR 4.6.4 >> >> Many times, my Java Server crashes with the following error. >> >> Assertion failure: 0 == rv, at ../../../../../nsprpub/pr/src/pthreads/ >> ptsynch.c:207 >> >> Is there any solution to this. >> >> Thanks, >> Sreedhar > > One more observation is, this is happening whenever there is a problem > with the SSL connection. If server refuses the connection, may be > because of wrong protocol or some other problem, instead of just > throwing error and continuing, it is completely killing the process. > Is there any configuration or work around I need to do for it.
That assertion is in PR_Lock: http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/nsprpub/pr/src/pthreads/ptsynch.c&rev=3.28&mark=206-207#202 If that assertion fails, it indicates a programming error of the code that calls PR_Lock. For example, if a thread calls PR_Lock on a lock it already owns, pthread_mutex_lock may return EDEADLK. This programming error can happen if we forget to release a lock before trying to acquire the lock again. It is best to get the value of 'rv' when the assertion fails, as Julien suggested. The value of 'rv' is the error code. If you are not familiar with debugging with gdb, you can use a printf statement to print the value of rv: rv = pthread_mutex_lock(&lock->mutex); if (rv != 0) { /* ADD THIS */ printf("pthread_mutex_lock fails with %d\n", rv); } PR_ASSERT(0 == rv); Wan-Teh -- dev-tech-crypto mailing list dev-tech-crypto@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-tech-crypto