Bug #10860 rpl_openssl test hangs
Submitted: 25 May 2005 14:06 Modified: 12 Aug 2005 0:29
Reporter: Kathiravan Velusamy Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:4.1.10a OS:HP/UX (HP-Unix)
Assigned to: Jim Winstead CPU Architecture:Any

[25 May 2005 14:06] Kathiravan Velusamy
Description:
I have built MySQL 4.1.10a in Hp-Unix platform with OpenSSL support. Following are my configuration options 

./configure --prefix=/opt/iexpress/mysql --localstatedir=/var/opt/iexpress/mysql \    --enable-thread-safe-client  --with-named-thread-libs=/usr/lib/libpthread.1 \
--with-zlib-dir=/usr/local --with-vio --with-openssl=/opt/openssl 

   I could successfully built and installed the product under /opt/iexpress/mysql directory. 

When i tried to run the tests inside mysql-test directory as,

./mysql-test-run

All 264 tests were successful. But "openssl_1" and "rpl_openssl" are skipped eventhough i have compiled with OpenSSL.

I have searched the mailing list and run the 2 tests alone as

./mysql-test-run --with-openssl openssl_1 rpl_openssl

But this time also it get skipped, so i have copied SSL certificates from Source SSL directory to /opt/iexpress/mysql/SSL directory ( I don't know why these files are not installed during gmake install) and again run the same command to test those two tests, now openssl_1 test passed but rpl_openssl get hanged.

I have checked the slave.err file, it seems that access denied for slave and it is looks for "sync_with_master", as it was not able to connect, it get hanged.

The slave.err log details is given below,

===========================begin========================

CURRENT_TEST: openssl_1
CURRENT_TEST: rpl_openssl
/opt/iexpress/mysql/libexec/mysqld: ready for connections.
Version: '4.1.10a-log'  socket: '/opt/iexpress/mysql/mysql-test/var/tmp/slave.sock'  port: 9308  Source distribu
tion
050525 16:57:03 [Note] Slave SQL thread initialized, starting replication in log 'FIRST' at position 0, relay lo
g '/opt/iexpress/mysql/mysql-test/var/log/slave-relay-bin.000001' position: 4
050525 16:57:04 [Note] Slave I/O thread: connected to master 'root@127.0.0.1:9306',  replication started in log
'FIRST' at position 4
050525 16:57:04 [ERROR] Slave I/O thread killed while reading event
050525 16:57:04 [ERROR] Slave I/O thread exiting, read up to log 'master-bin.000001', position 229
050525 16:57:04 [ERROR] Error reading relay log event: slave SQL thread was killed
050525 16:57:04 [Note] Slave SQL thread initialized, starting replication in log 'master-bin.000001' at position
 229, relay log '/opt/iexpress/mysql/mysql-test/var/log/slave-relay-bin.000001' position: 4
050525 16:57:04 [Note] Slave I/O thread: connected to master 'replssl@127.0.0.1:9306',  replication started in l
og 'master-bin.000001' at position 229
050525 16:57:04 [ERROR] Error on COM_REGISTER_SLAVE: 1045 'Access denied for user ''@'localhost' (using password
: NO)'
050525 16:57:04 [ERROR] Slave I/O thread exiting, read up to log 'master-bin.000001', position 229
050525 16:57:07 [ERROR] Error reading relay log event: slave SQL thread was killed
050525 16:57:07 [Note] Slave SQL thread initialized, starting replication in log 'master-bin.000001' at position
 229, relay log '/opt/iexpress/mysql/mysql-test/var/log/slave-relay-bin.000001' position: 4
050525 16:57:07 [Note] Slave I/O thread: connected to master 'replssl@127.0.0.1:9306',  replication started in l
og 'master-bin.000001' at position 229
050525 16:57:07 [ERROR] Error on COM_REGISTER_SLAVE: 1045 'Access denied for user ''@'localhost' (using password
: NO)'
050525 16:57:07 [ERROR] Slave I/O thread exiting, read up to log 'master-bin.000001', position 229
========================end=======================

I have found the same problem report in http://lists.mysql.com/internals/10438 but it's solution's didn't work.

Please suggest a patch are work around to fix this issue.

How to repeat:
Run the MySQL OpenSSL tests as,

./mysql-test-run --with-openssl rpl_openssl
[12 Jul 2005 2:35] [ name withheld ]
I'm seeing this on recent Fedora Core (4 and up) as well.  What is happening is simple enough: the replssl user is defined as replssl@'%', which the server considers less specific than the anonymous user account ''@'buildmachine%'.  So the slave's login requests are taken as being anonymous and hence fail for lack of permissions.

I am not sure why this is seen on some platforms and not others --- it probably has something to do with the local DNS configuration.  But it's definitely the test script's fault for setting up a bogus combination of users.  (Or maybe the bug is that the sorting rules for users suck.  But it's not specifically an SSL issue at all.)

By the by, I suspect that the openssl_1 test is actually failing invisibly, and that the "ssl users" are being connected as anonymous just like replssl.  It would be entertaining to see how much of the regression suite fails with anonymous logins disabled...
[10 Aug 2005 20:30] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/28131
[12 Aug 2005 0:29] Jim Winstead
Fixed in 5.0.12.
[5 Oct 2005 19:32] [ name withheld ]
The proposed patch does not work for me, because the slave tries to log in
as replssl@actual.machine.name, not replssl@localhost.  Again, this issue probably has some dependence on the local DNS configuration, but that's the behavior I see (at least in 4.1).