Bug #71165 Assertion error in network_mysqld_proto_password_check
Submitted: 17 Dec 2013 17:10 Modified: 22 Aug 2014 15:11
Reporter: Nicolas De Rico Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Proxy: Scripts Severity:S1 (Critical)
Version:0.8.3, 0.8.4 OS:Any (Mac OS X10.9, Linux)
Assigned to: CPU Architecture:Any
Tags: assertion, proxy

[17 Dec 2013 17:10] Nicolas De Rico
Description:
I am trying to write a script for the read_auth() function.  I use the example script, tutorial-scramble.lua, as a guide.  However, it fails with the line:

(critical) network_mysqld_proto_password_check: assertion `20 == challenge_len' failed

How to repeat:
1- Start MySQL-proxy with the script.
2- Attempt to connect with "replace" user and "me" password.
3- Watch the error
[2 Jun 2014 19:16] Sveta Smirnova
Thank you for the report.

I cannot repeat described behavior with version 0.8.4 Please try with it and if problem still exists provide us full command you use to start proxy, output of mysql-proxy and full error message you get when trying to connect.
[2 Jun 2014 19:19] Sveta Smirnova
Please ignore my last comment: I could connect, but did not check proxy logs myself. Issue is repeatable.

[sveta@delly mysql-proxy-0.8.4-linux-glibc2.3-x86-64bit]$ ./bin/mysql-proxy --proxy-backend-addresses=127.0.0.1:13000  --proxy-lua-script=./share/doc/mysql-proxy/tutorial-scramble.lua 
2014-06-02 22:15:17: (critical) plugin proxy 0.8.4 started
for challenge "-hCXm>-f:-omT;k,7oLl\000" the client sent "�O&��S�HN�Pu>쨪� ^�"
2014-06-02 22:15:21: (critical) network_mysqld_proto_password_check: assertion `20 == challenge_len' failed

User can connect, however:

$ mysqlmtr -P4040 -ureplace -pme
Reading default file: /home/sveta/.my.cnf
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 7
Server version: 5.7.5-m15-debug-log Source distribution

Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> select user(), current_user();
+-------------------+----------------+
| user()            | current_user() |
+-------------------+----------------+
| replace@localhost | replace@%      |
+-------------------+----------------+
1 row in set (0.00 sec)
[22 Aug 2014 8:44] Yuriy Gorlichenko
Hello. Catch this error on 0.9 version. How to resolve this issue?
[22 Aug 2014 15:11] Paul DuBois
Noted in 0.8.5 changelog.

The network_mysqld_proto_password_check() function raised an
assertion.