Bug #61790 | "Got an error writing communication packets" on not FEDERATED DBs | ||
---|---|---|---|
Submitted: | 7 Jul 2011 19:04 | Modified: | 28 Jan 2012 14:03 |
Reporter: | Dario Fiumicello | Email Updates: | |
Status: | Duplicate | Impact on me: | |
Category: | MySQL Server: Federated storage engine | Severity: | S2 (Serious) |
Version: | 5.1.41, 5.5.14 | OS: | Linux (Ubuntu 10.04) |
Assigned to: | CPU Architecture: | Any | |
Tags: | federated network error communication packets |
[7 Jul 2011 19:04]
Dario Fiumicello
[8 Jul 2011 20:04]
Sveta Smirnova
Thank you for the report. But version 5.1.41 is very old and many bugs were fixed since. Please upgrade to current version 5.1.58, try with it and inform us if problem still exists.
[20 Jul 2011 15:29]
Alexey Kopytov
We've encountered a similar problem on a customer machine. After adding some diagnostics we've traced this down to FEDERATED + table cache: - when putting a table (not necessarily a FEDERATED one) to the table cache, server may evict and close another if the table cache is full - if the victim happens to be a FEDERATED table, its client connection to remote server is closed - if the remote server has gone for whatever reasons (stopped, connection timed out, network issues), mysql_close() in ha_federated::close() fails with ER_NET_ERROR_ON_WRITE - the above error is propagated back to the client that issued the original query, even if it was against a local table Here's the diagnostic stacktrace (in this case it was a SHOW TABLE STATUS against an InnoDB table): stack_bottom = 0x4a6520e8 thread_stack 0x31000 /usr/sbin/mysqld(my_print_stacktrace+0x39)[0x89dca9] /usr/sbin/mysqld(net_real_write+0x1e7)[0x5b1987] /usr/sbin/mysqld(net_flush+0x23)[0x5b1e63] /usr/sbin/mysqld(net_write_command+0x18c)[0x5b201c] /usr/sbin/mysqld(cli_advanced_command+0xed)[0x72697d] /usr/sbin/mysqld(mysql_close+0x64)[0x726524] /usr/sbin/mysqld(_ZN12ha_federated5closeEv+0x29)[0x730179] /usr/sbin/mysqld(_Z8closefrmP8st_tableb+0x10a)[0x613a6a] /usr/sbin/mysqld[0x609611] /usr/sbin/mysqld(my_hash_delete+0x2c0)[0x892b90] /usr/sbin/mysqld(_Z19close_thread_tablesP3THD+0x18a)[0x60935a] /usr/sbin/mysqld(_Z14get_all_tablesP3THDP10TABLE_LISTP4Item+0x8ac)[0x6c966c] /usr/sbin/mysqld(_Z24get_schema_tables_resultP4JOIN23enum_schema_table_state+0x1d1)[0x6c1911] /usr/sbin/mysqld(_ZN4JOIN4execEv+0x3fe)[0x63853e] /usr/sbin/mysqld(_Z12mysql_selectP3THDPPP4ItemP10TABLE_LISTjR4ListIS1_ES2_jP8st_orderSB_S2_SB_yP13select_resultP18st_select_lex_unitP13st_select_lex+0x199)[0x63a609] /usr/sbin/mysqld(_Z13handle_selectP3THDP6st_lexP13select_resultm+0x1c5)[0x63af35] /usr/sbin/mysqld[0x5c66a1] /usr/sbin/mysqld(_Z21mysql_execute_commandP3THD+0x3c6)[0x5c9566] /usr/sbin/mysqld(_Z11mysql_parseP3THDPcjPPKc+0x51b)[0x5cf79b] /usr/sbin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcj+0x9f1)[0x5d0191] /usr/sbin/mysqld(_Z10do_commandP3THD+0x128)[0x5d0dd8] /usr/sbin/mysqld(handle_one_connection+0x7b1)[0x5c2d91] /lib64/libpthread.so.0[0x3f15206617] /lib64/libc.so.6(clone+0x6d)[0x3f14ad3c2d] Replication is obviously affected by the same problem, so bug #51196 is likely a duplicate of this one. The solution seems to be to clear errors coming from mysql_close() in ha_federated::close().
[29 Jul 2011 20:05]
Sveta Smirnova
Alexey, I can not repeat described error since 5.1.50. I used generic test case and got no error when ha_federated::close was called. Which version do you use?
[19 Dec 2011 7:02]
MySQL Verification Team
Percona's fix: https://code.launchpad.net/~akopytov/percona-server/bug843587-5.5
[28 Jan 2012 14:03]
Jon Stephens
Duplicate of BUG#51196.