Assertion `combo->host.str != __null && combo->host.str[0] != '\0'' failed.

Bug #1736905 reported by Roel Van de Paar
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
Status tracked in 5.7
5.5
Invalid
Undecided
Zsolt Parragi
5.6
Fix Committed
Critical
Zsolt Parragi
5.7
Invalid
Undecided
Zsolt Parragi

Bug Description

5.6.38>CREATE USER roel@'';
ERROR 2013 (HY000): Lost connection to MySQL server during query

5.6.38>GRANT PROXY ON roel TO''@'';
ERROR 2013 (HY000): Lost connection to MySQL server during query

vs bit earlier release;

5.6.36>CREATE USER roel@'';
Query OK, 0 rows affected (0.00 sec)

5.6.36>GRANT PROXY ON roel TO''@'';
Query OK, 0 rows affected (0.00 sec)

MS also does not fail (i.e. "Query OK"). Assert speaks for itself;

2017-12-07 19:21:41 17178 [Note] /sda/PS021217-percona-server-5.6.38-82.3-linux-x86_64-debug/bin/mysqld: ready for connections.
Version: '5.6.38-82.3-debug' socket: '/sda/PS021217-percona-server-5.6.38-82.3-linux-x86_64-debug/socket.sock' port: 11531 MySQL Community Server (GPL)
mysqld: /git/PS-5.6-trunk_dbg/sql/sql_acl.cc:3576: int replace_user_table(THD*, TABLE*, LEX_USER*, ulong, bool, bool, bool): Assertion `combo->host.str != __null && combo->host.str[0] != '\0'' failed.
08:22:33 UTC - mysqld got signal 6 ;

Perhaps there was a specific reason for adding this assert in PS only?

Core was generated by `/sda/PS021217-percona-server-5.6.38-82.3-linux-x86_64-debug/bin/mysqld --no-def'.
Program terminated with signal 6, Aborted.
#0 0x00007f963c9e99b1 in __pthread_kill (threadid=<optimized out>, signo=6) at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:61
61 val = INTERNAL_SYSCALL (tgkill, err, 3, THREAD_GETMEM (THREAD_SELF, pid),
(gdb) bt
#0 0x00007f963c9e99b1 in __pthread_kill (threadid=<optimized out>, signo=6) at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:61
#1 0x0000000000aca231 in my_write_core (sig=6) at /git/PS-5.6-trunk_dbg/mysys/stacktrace.c:424
#2 0x000000000073a92d in handle_fatal_signal (sig=6) at /git/PS-5.6-trunk_dbg/sql/signal_handler.cc:236
#3 <signal handler called>
#4 0x00007f963ad011f7 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#5 0x00007f963ad028e8 in __GI_abort () at abort.c:90
#6 0x00007f963acfa266 in __assert_fail_base (fmt=0x7f963ae4ce68 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n",
    assertion=assertion@entry=0xecbcb0 "combo->host.str != __null && combo->host.str[0] != '\\0'",
    file=file@entry=0xecafa8 "/git/PS-5.6-trunk_dbg/sql/sql_acl.cc", line=line@entry=3576,
    function=function@entry=0xece020 <replace_user_table(THD*, TABLE*, st_lex_user*, unsigned long, bool, bool, bool)::__PRETTY_FUNCTION__> "int replace_user_table(THD*, TABLE*, LEX_USER*, ulong, bool, bool, bool)") at assert.c:92
#7 0x00007f963acfa312 in __GI___assert_fail (assertion=0xecbcb0 "combo->host.str != __null && combo->host.str[0] != '\\0'",
    file=0xecafa8 "/git/PS-5.6-trunk_dbg/sql/sql_acl.cc", line=3576,
    function=0xece020 <replace_user_table(THD*, TABLE*, st_lex_user*, unsigned long, bool, bool, bool)::__PRETTY_FUNCTION__> "int replace_user_table(THD*, TABLE*, LEX_USER*, ulong, bool, bool, bool)") at assert.c:101
#8 0x0000000000759716 in replace_user_table (thd=0x7f9611bc3000, table=0x7f9627fec200, combo=0x7f95c401f130, rights=0,
    revoke_grant=false, can_create_user=true, no_auto_create=false) at /git/PS-5.6-trunk_dbg/sql/sql_acl.cc:3576
#9 0x0000000000761569 in mysql_grant (thd=0x7f9611bc3000, db=0x0, list=..., rights=0, revoke_grant=false, is_proxy=true)
    at /git/PS-5.6-trunk_dbg/sql/sql_acl.cc:5896
#10 0x00000000007f4999 in mysql_execute_command (thd=0x7f9611bc3000) at /git/PS-5.6-trunk_dbg/sql/sql_parse.cc:4736
#11 0x00000000007fa666 in mysql_parse (thd=0x7f9611bc3000, rawbuf=0x7f95c401f010 "GRANT PROXY ON roel TO''@''", length=27,
    parser_state=0x7f963cfd74c0) at /git/PS-5.6-trunk_dbg/sql/sql_parse.cc:7066
#12 0x00000000007ec168 in dispatch_command (command=COM_QUERY, thd=0x7f9611bc3000,
    packet=0x7f96043f1001 "GRANT PROXY ON roel TO''@''", packet_length=27) at /git/PS-5.6-trunk_dbg/sql/sql_parse.cc:1489
#13 0x00000000007eaf34 in do_command (thd=0x7f9611bc3000) at /git/PS-5.6-trunk_dbg/sql/sql_parse.cc:1062
#14 0x00000000007b23b6 in do_handle_one_connection (thd_arg=0x7f9611b5e000) at /git/PS-5.6-trunk_dbg/sql/sql_connect.cc:1590
#15 0x00000000007b20bd in handle_one_connection (arg=0x7f9611b5e000) at /git/PS-5.6-trunk_dbg/sql/sql_connect.cc:1494
#16 0x0000000000b18fa5 in pfs_spawn_thread (arg=0x7f961fbfba60) at /git/PS-5.6-trunk_dbg/storage/perfschema/pfs.cc:1861
#17 0x00007f963c9e4e25 in start_thread (arg=0x7f963cfd8700) at pthread_create.c:308
#18 0x00007f963adc434d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Tags: qa
Revision history for this message
Roel Van de Paar (roel11) wrote :

If assert/code was planned, feel free to adjust triage lower. Otherwise, this would look like a regression/blocker?

tags: added: qa
Revision history for this message
Roel Van de Paar (roel11) wrote :

This is seen a lot in the runs.

Revision history for this message
Roel Van de Paar (roel11) wrote :

PS 5.7.20>CREATE USER roel@'';
Query OK, 0 rows affected (0.01 sec)

PS 5.7.20>GRANT PROXY ON roel TO''@'';
ERROR 1133 (42000): Can't find any matching row in the user table << inconsistent also

PS 5.5.58>CREATE USER roel@'';
Query OK, 0 rows affected (0.00 sec)

PS 5.5.58>GRANT PROXY ON roel TO''@'';
Query OK, 0 rows affected (0.00 sec)

Revision history for this message
Roel Van de Paar (roel11) wrote :

5.6.38 optimized>CREATE USER roel@'';
Query OK, 0 rows affected (0.00 sec)

5.6.38 optimized>GRANT PROXY ON roel TO''@'';
Query OK, 0 rows affected (0.00 sec)

Revision history for this message
Roel Van de Paar (roel11) wrote :

Is this normal? (5.6.38 optimized)

5.6.38>show grants for ''@'';
ERROR 1141 (42000): There is no such grant defined for user '' on host ''

5.6.38>GRANT PROXY ON roel TO''@'';
Query OK, 0 rows affected (0.00 sec)

5.6.38>show grants for ''@'';
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Grants for @ |
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO ''@'' |
| GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, EVENT, TRIGGER ON `test`.* TO ''@'%' |
| GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, EVENT, TRIGGER ON `test\_%`.* TO ''@'%' |
| GRANT PROXY ON 'roel'@'%' TO ''@'' |
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
4 rows in set (0.00 sec)

Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-3766

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.