strange behavior ejabberd with tls

Hi.
Prevously I was used plain password authentication via odbc and now try to migrate to scram auth with odbc.
I apply mysql patch (three ALTER TABLE) on a USERS table and then add new user 'sc4' via ejabberctl.

Now my USERS table looks like this:

MariaDB [ejabberd]> select * from users where username like 'sc%';
+----------+------------------------------+---------------------+------------------------------+--------------------------+----------------+
| username | password                     | created_at          | serverkey                    | salt                     | iterationcount |
+----------+------------------------------+---------------------+------------------------------+--------------------------+----------------+
| sc2      | 12345                        | 2015-05-06 14:52:08 |                              |                          |              0 |
| sc4      | fGoqG2Ud3XiIUfvk/7cs11Qzn5k= | 2015-05-06 14:53:26 | 8htGXUo5H0j9n48+ePK08eHYpIQ= | +BkQR9sZARgLpD2JXzbPeQ== |           4096 |
+----------+------------------------------+---------------------+------------------------------+--------------------------+----------------+

I start ejabberd _without_tls_.
User sc4 connected and works, user sc2 can't conntect with error "Error SASL: SASL(-5): bad protocol / cancel: The salt can't be empty" - now all good and works correctly.

Now in ejabberd.yml I enable ssl with next strings:

    certfile: "/etc/ejabberd/chain.pem"
    starttls: true

After restart ejabberd user sc4 can connect and still works good, but sc2 user did not show error message about incorrect SASL and througs 30-40 seconds ejabberd daemon crashed.

I check this error on ejabberd 15.03 and 15.04. Both have same behavior.

In erl_crash-file I see error:

=erl_crash_dump:0.3
Thu May  7 12:56:31 2015
Slogan: eheap_alloc: Cannot allocate 4723591984 bytes of memory (of type "heap", thread 1).
System version: Erlang/OTP 17 [erts-6.4] [source] [64-bit] [smp:2:2] [async-threads:10] [hipe] [kernel-poll:true]
Compiled: Wed Apr  8 15:51:19 2015
Taints: stringprep,xml,p1_sha,p1_yaml,crypto

Server have 6Gb RAM. System: Arch Linux 64.
User sc4 uses client 'psi'
User sc2 uses client 'pidgin'.

Syndicate content