sync_client general protection fault

Bron Gondwana brong at fastmail.fm
Sat Jan 21 07:31:28 EST 2012



On Sat, Jan 21, 2012, at 01:09 PM, Darius Spitznagel wrote:
> Hello,
> 
> i have a test-system with 2 cyrus mail servers (squeeze and 
> squeeze-slave) running cyrus-imapd 2.4.13.
> When plaintext logins are not allowed (allowplaintext: no) sync_client 
> crashes after some time.

Are you capturing core files?  A stack trace would help a lot.  To
capture core files you usually need to set a ulimit and chdir to
somewhere that Cyrus can write to.  We do (on Debian, in the init
script which is Perl):

    # Setup core dumping
    chdir "$CONFDIR/cores";
    if (-f "/proc/sys/kernel/core_uses_pid") {
      system("echo 1 >/proc/sys/kernel/core_uses_pid");
    }
    # Start master process, and save pid
    # (limit core dumps to 400M, avoid possible IO flood on core dump)
    system("ulimit -c 409600 && ulimit -n 8192 && $DAEMON -l 255 -p $PIDFILE -d $SLOT_CONFIG");

> Here is what the kernel log shows after crash...
> 
> 
> 
> Jan 18 18:36:08 squeeze cyrus/sync_client[19784]: sync_client RESTART 
> succeeded
> Jan 18 18:36:08 squeeze kernel: [20819.197061] sync_client[19784] 
> general protection ip:7f1fcef7d1f9 sp:7fffaa8f4e10 error:0 in 
> libcrypto.so.0.9.8[7f1fcee6c000+175000]
> 
> Jan 21 12:10:04 squeeze-slave cyrus/sync_client[18798]: sync_client 
> RESTART succeeded
> Jan 21 12:10:04 squeeze-slave kernel: [125161.364980] sync_client[18798] 
> general protection ip:7f9db3cbe1f9 sp:7fff8b8ba9c0 error:0 in 
> libcrypto.so.0.9.8[7f9db3bad000+175000]

So it looks like we're not re-initializing the crypto library properly
in a "RESTART".  That's definitely possible.

> Both servers are configured as sync_client and sync_server, so they 
> replicate each other.
> I KNOW this is not recommended (on our productive-system we have this 
> running over 2 years now without any problems but with "plaintext logins 
> allowed" because of one stupid app which can't handle encrypted 
> connections).
> To prevent any problems only one server has the "magic" 
> failover-ip-address which allows access.

We ran something like this for quite a while ... it's really not too bad
unless you have things happening on the replica (reconstructs in particular
can get messy)

At some point, this will become the recommended configuration, once we
iron out the remaining risk points.

> Both servers are runnung debian squeeze and using ldap authentication 
> via saslauthd.
> cyrus-imapd is compiled with openssl and openldap with gnutls (installed 
> from apt-repo).

Can you give me your configure flags as well, just to help with debugging.
I won't get to this today, but I am very interested in making it work!

Thanks,

Bron.
-- 
  Bron Gondwana
  brong at fastmail.fm



More information about the Cyrus-devel mailing list