[MDEV-3177] LP:956463 - Server crashes if SQL_ERROR_LOG fails to initialize Created: 2012-03-15  Updated: 2014-06-20  Resolved: 2012-10-04

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Alexey Botchkov
Resolution: Fixed Votes: 0
Labels: Launchpad

Attachments: XML File LPexportBug956463.xml    

 Description   

If SQL_ERROR_LOG plugin returns an error upon initialization, e.g. if it cannot create the log file, server crashes:

Could not create file 'sql.err'
120316 1:22:18 [ERROR] Plugin 'SQL_ERROR_LOG' init function returned error.
120316 1:22:18 [ERROR] Plugin 'SQL_ERROR_LOG' registration as a AUDIT failed.
2d2d2d d:2d:2d [ERROR] mysqld got signal 11 ;

#4 <signal handler called>
#5 0x0836cc08 in logger_close (log=0x0) at /home/elenst/maria-5.5/sql/sql_logger.cc:87
#6 0xb779d8dd in sql_error_log_deinit (p=0x0) at /home/elenst/maria-5.5/plugin/sql_errlog/sql_errlog.c:120
#7 0x0831ca01 in finalize_audit_plugin (plugin=0x95cf690) at /home/elenst/maria-5.5/sql/sql_audit.cc:401
#8 0x08249856 in plugin_deinitialize (plugin=0x95cf690, ref_check=true)
at /home/elenst/maria-5.5/sql/sql_plugin.cc:1165
#9 0x08249c1d in reap_plugins () at /home/elenst/maria-5.5/sql/sql_plugin.cc:1240
#10 0x0824c101 in mysql_install_plugin (thd=0xa057580, name=0xa059208, dl_arg=0xa059210)
at /home/elenst/maria-5.5/sql/sql_plugin.cc:2133
#11 0x0823e95e in mysql_execute_command (thd=0xa057580) at /home/elenst/maria-5.5/sql/sql_parse.cc:4362
#12 0x08241cc3 in mysql_parse (thd=0xa057580, rawbuf=0xa1043e0 "install soname 'sql_errlog.so'", length=30,
parser_state=0x98974df8) at /home/elenst/maria-5.5/sql/sql_parse.cc:5732
#13 0x08236133 in dispatch_command (command=COM_QUERY, thd=0xa057580,
packet=0xa0fef79 "install soname 'sql_errlog.so'", packet_length=30)
at /home/elenst/maria-5.5/sql/sql_parse.cc:1056
#14 0x082355f8 in do_command (thd=0xa057580) at /home/elenst/maria-5.5/sql/sql_parse.cc:795
#15 0x0831fbe9 in do_handle_one_connection (thd_arg=0xa057580)
at /home/elenst/maria-5.5/sql/sql_connect.cc:1253
#16 0x0831f734 in handle_one_connection (arg=0xa057580) at /home/elenst/maria-5.5/sql/sql_connect.cc:1168
#17 0xb7772b25 in start_thread () from /lib/libpthread.so.0

bzr version-info
revision-id: <email address hidden>
date: 2012-03-15 00:37:37 +0100
build-date: 2012-03-16 01:22:47 +0400
revno: 3331

To reproduce, try to start server as

mysqld <other parameters> --plugin-load=sql_errlog.so --sql_error_log_filename=''

see the crash.

(An empty file name is just the simplest way to get the error, but it's not required to reproduce the problem, it can be insufficient access rights, or whatever else).



 Comments   
Comment by Elena Stepanova [ 2012-03-15 ]

Re: Server crashes if SQL_ERROR_LOG fails to initialize
Also filed in JIRA as MDEV-184

Comment by Alexey Botchkov [ 2012-03-16 ]

Re: Server crashes if SQL_ERROR_LOG fails to initialize
the fix pushed to the 5.5-hf tree.

Comment by Rasmus Johansson (Inactive) [ 2012-03-16 ]

Launchpad bug id: 956463

Generated at Thu Feb 08 06:46:50 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.