Bug #53462 mysqld segfault when enabling --ssl-cert option
Submitted: 6 May 2010 10:29 Modified: 26 Jun 2010 18:15
Reporter: Francesco Fiore Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: General Severity:S1 (Critical)
Version:7.1.3 OS:Linux (RedHat x86-64)
Assigned to: CPU Architecture:Any
Tags: segfault, SSL

[6 May 2010 10:29] Francesco Fiore
Description:
When I enable ssl-cert option, I've a segfault of mysqld on startup.

# rpm -qi MySQL-Cluster-gpl-server-7.1.3-1.rhel5.x86_64
Name        : MySQL-Cluster-gpl-server     Relocations: (not relocatable)
Version     : 7.1.3                             Vendor: Oracle and/or its affiliates
Release     : 1.rhel5                       Build Date: Tue 06 Apr 2010 02:33:17 PM CEST

The my.cnf configuration file contains:

[mysqld]
general-log=1
general-log-file=/var/log/mysqld.log
user=mysql
ndbcluster
ndb-connectstring=mmt-l-al18-prv.mymessagingtop.it,mmt-l-al19-prv.mymessagingtop.it
ndb-wait-setup=60
server_id=5
log-bin=mysql-bin
binlog-ignore-db="mysql"
ssl=1
ssl-ca=/path/to/cacert.pem
ssl-cert=/path/to/cert.pem
ssl-key=/path/to/key.pem

On startup I've this output:

# mysqld
100506 12:21:45 [Note] Plugin 'FEDERATED' is disabled.
100506 12:21:45  InnoDB: Started; log sequence number 0 44233
100506 12:21:46 [Note] NDB: NodeID is 5, management server 'mmt-l-al18-prv.mymessagingtop.it:1186'
100506 12:21:47 [Note] NDB[0]: NodeID: 5, no storage nodes connected (timed out)
100506 12:21:47 [Note] Starting Cluster Binlog Thread
100506 12:21:47 [Note] Recovering after a crash using mysql-bin
100506 12:21:47 [Note] Starting crash recovery...
100506 12:21:47 [Note] Crash recovery finished.
mysqld: ./../include/block.hpp:146: T& TaoCrypt::Block<T, A>::operator[](TaoCrypt::word32) [with T = unsigned char, A = TaoCrypt::AllocatorWithCleanup<unsigned char>]: Assertion `i < sz_' failed.
100506 12:21:47 - mysqld got signal 6 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help diagnose
the problem, but since we have already crashed, something is definitely wrong
and this may fail.

key_buffer_size=8384512
read_buffer_size=131072
max_used_connections=0
max_threads=151
threads_connected=0
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 338308 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

thd: 0x0
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = (nil) thread_stack 0x40000
mysqld(my_print_stacktrace+0x33)[0x9231c3]
mysqld(handle_segfault+0x320)[0x621ed0]
/lib64/libpthread.so.0[0x319660e7c0]
/lib64/libc.so.6(gsignal+0x35)[0x3195a30265]
/lib64/libc.so.6(abort+0x110)[0x3195a31d10]
/lib64/libc.so.6(__assert_fail+0xf6)[0x3195a296e6]
mysqld(_ZN8TaoCrypt13Base64Decoder6DecodeEv+0x2a4)[0x9bdc04]
mysqld(_ZN5yaSSL8PemToDerEP8_IO_FILENS_8CertTypeEPNS_13EncryptedInfoE+0x56b)[0x9b245b]
mysqld(_ZN5yaSSL9read_fileEPNS_7SSL_CTXEPKciNS_8CertTypeE+0x118)[0x99de68]
mysqld[0x995dd1]
mysqld(new_VioSSLAcceptorFd+0x54)[0x996054]
mysqld(main+0x95c)[0x6240ac]
/lib64/libc.so.6(__libc_start_main+0xf4)[0x3195a1d994]
mysqld[0x56bc49]
The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.

If I disable the ssl-cert option, mysqld execute the startup successfully.

How to repeat:
Enable ssl-cert option.

If I disable the ssl-cert option, mysqld execute the startup successfully.
[26 May 2010 18:15] Sveta Smirnova
Thank you fro the report.

Could you please send us example cert file problem is repeatable with: I can not repeat crash with our test certificates located in MYSQL_INSTALL_DIR/mysql-test/std_data
[26 Jun 2010 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".