help-gnutls
[Top][All Lists]
Advanced

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

[Help-gnutls] Re: Strange error in multi-threads


From: Simon Josefsson
Subject: [Help-gnutls] Re: Strange error in multi-threads
Date: Tue, 10 Oct 2006 16:34:57 +0200
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux)

Please use the list for discussion, so others can learn from it.

Unknown <address@hidden> writes:

> El mar, 10-10-2006 a las 14:53 +0200, Simon Josefsson escribió:
>
>> pthread_mutex_lock (&sessionlock);
>> gnutls_record_send (&session, buf, buflen);
>> pthread_mutex_unlock (&sessionlock);
>> 
>> You'll need to keep one mutex variable per session variable.  And
>> check error codes etc...
>> 
>> Hm.  Perhaps there should be an API to tell GnuTLS to call a
>> particular callback function before/after each use of a function that
>> modify the gnutls_session state.
>> 
>> /Simon
>> 
>
> I only use functions that manage certificates. I do not use:
>> gnutls_record
> the strange of this, is that in single program that call my function
> works without any problem, and in apache in single thread works. But in
> apache with normal mode(n threads) as module, segfault when DSO module
> run. At this time I can not debug the problem.

Oh, that's interesting.  Can you provide a gdb backtrace?

Is your code threaded?  If yes, does it also crash when you limit the
number of threads to one?  (If this is possible..)

If your code isn't threaded, perhaps this is some general problem with
apache threading.

I'm assuming that you don't have any other global variables (like
credential variables) in your code that you use from multiple threads.

/Simon




reply via email to

[Prev in Thread] Current Thread [Next in Thread]