ChiliProject is not maintained anymore. Please be advised that there will be no more updates.
We do not recommend that you setup new ChiliProject instances and we urge all existing users to migrate their data to a maintained system, e.g. Redmine. We will provide a migration script later. In the meantime, you can use the instructions by Christian Daehn.
Intermittent SSL handshake fails
Since some weeks I have started to get intermittent SSL handshake fails when connecting to the SVN repositories. For example when I browse the SVN repository of a project from a client I can get some directories without problems, others just report "Secure connection truncated".
I have tried to analyse the logs on the server and from the looks of it seems to be an issue with Ruby and MySQL. Every time I get a handshake failure the following gets written in the log from Apache2:
[Thu Aug 16 16:05:16 2012] [error] [client 188.8.131.52] Usage: DynaLoader::dl_load_file(filename, flags=0) at /usr/lib/perl5/DBD/mysql.pm line 142.\n [Thu Aug 16 16:05:20 2012] [error] [client 184.108.40.206] DBD::mysql::db STORE failed: handle 2 is owned by thread b99e2328 not current thread b97d0868 (handles can't be shared between threads and your driver may need a CLONE method added) at /usr/lib/perl5/DBD/mysql.pm line 142.\n [Thu Aug 16 16:05:24 2012] [error] [client 220.127.116.11] Usage: DynaLoader::dl_load_file(filename, flags=0) at /usr/lib/perl5/DBD/mysql.pm line 142.\n [Thu Aug 16 16:05:29 2012] [error] [client 18.104.22.168] DBD::mysql::db STORE failed: handle 2 is owned by thread b97d0868 not current thread b99e2328 (handles can't be shared between threads and your driver may need a CLONE method added) at /usr/lib/perl5/DBD/mysql.pm line 142.\n [Thu Aug 16 16:05:32 2012] [error] [client 22.214.171.124] Usage: DBD::mysql::db::_login(dbh, dbname, username, password, attribs=Nullsv) at /usr/lib/perl5/Apache/Redmine.pm line 510.\n
Which seems to be some form of threading issue. Have someone else got these issues? How did you resolve it?
My server is running:
Further investigations have shown that it is only SVN access from TortoiseSVN which seems to cause the errors. (I have tried updating to the latest TortoiseSVN 1.7.8, Build 23174, but this did not help).
Then I found the following thread on the Redmine boards:
I tried this and switching from switching from apache2-mpm-worker to apache2-mpm-prefork seems to be a valid workaround for the problem.
You are right, the correct mitigation is to use the mpm-prefork. The cause of the problem is that the Perl DBD modules which are used to access the ChiliProject database for authentication and authorization in Redmine.pm are not thread-safe. This is a restriction of these Perl modules.
What you observe when using these modules in a threaded context is random SEGFAULTs or mixed up data structures. The only solution right now is to get rid of threads inside of Apache, hence the usage of the mpm-prefork. I'm currently working on a replacement for the current Redmine.pm module (creatively called ChiliProject.pm) which will query the ChiliProject instance by HTTP instead of reading the database directly, thus heavily simplifying the module. This new module will be part of ChiliProject 3.4 or 3.5.
Do there exist a corresponding issue for this that I could "watch"?
That would be #177
The current work-in-progress (and still not usable) code is in https://github.com/meineerde/chiliproject/tree/issues/master/106-redmine.pm