[MDEV-23468] inline_mysql_socket_send: Assertion `mysql_socket.fd != -1' failed on shutdown Created: 2020-08-13  Updated: 2020-12-22  Resolved: 2020-12-22

Status: Closed
Project: MariaDB Server
Component/s: Galera
Affects Version/s: 10.4
Fix Version/s: 10.4.18, 10.5.9, 10.6.0

Type: Bug Priority: Major
Reporter: Roel Van de Paar Assignee: Jan Lindström (Inactive)
Resolution: Fixed Votes: 0
Labels: affects-tests

Attachments: File galera_sr_cc_master.log     File mysqld.1.err     File mysqld.2.err    
Issue Links:
Relates
relates to MDEV-23609 galera_sr.galera_sr_cc_master MTR fai... Closed

 Description   

Seen with some regularity in [recent or 10.4] test runs;

10.4.15 eae968f62d285de97ed607c87bc131cd863d5d03 (Debug)

... innodb monitor output ...
2020-08-11 21:48:20 0 [Note] /test/MD110820-mariadb-10.4.15-linux-x86_64-dbg/bin/mysqld (initiated by: root[root] @ localhost []): Normal shutdown
2020-08-11 21:48:20 0 [Note] WSREP: Shutdown replication
2020-08-11 21:48:20 0 [Note] WSREP: killing local connection: 12
mysqld: /test/10.4_dbg/include/mysql/psi/mysql_socket.h:744: inline_mysql_socket_send: Assertion `mysql_socket.fd != -1' failed.
200811 21:48:20 [ERROR] mysqld got signal 6 ;  

jplindst any idea what happens here?

Very hard to reproduce. Seems WSREP kills a connection and server does subsequently assert. I am attaching full details (full trial, core dump, data dir, logs). Core can be debugged as follows:

mv mysqld ..   # mysqld bin copy + libs directory
./gdb 

Or

gdb ./mysqld/mysqld ./data/core

Error log in log/master.err, used sql in default.node.tld_thread-0.sql (55k lines, not reducible as bug will not reproduce likely due to some 'required state' or 'timing' or 'os slicing' issue.



 Comments   
Comment by Stepan Patryshev (Inactive) [ 2020-08-27 ]

It fails sporadically on galera_sr.galera_sr_cc_master MTR, see MDEV-23609.

Comment by Jan Lindström (Inactive) [ 2020-09-23 ]
  • How to repeat: ./mtr galera_sr.galera_sr_cc_master --repeat=2000
  • Query: SET GLOBAL wsrep_cluster_address = '''
  • thd->killed : KILL_CONNECTION
Comment by Roel Van de Paar [ 2020-09-23 ]

jplindst thank you for the core analysis and testcase.

mkaruza It will be super great to see this mysql_socket.fd Unable to render embedded object: File (= -1 issue resolved as I see many tests fail with similar assertion message, and I suspect they are various issues (potentially not related to wsrep at all?). Thank you) not found.

Question; do you think this issue is present in 10.5 as well?

Comment by Michael Widenius [ 2020-12-03 ]

I have updated the pull request with a suggestion for a better fix.

https://github.com/MariaDB/server/pull/1709

Generated at Thu Feb 08 09:22:38 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.