Server crashes if SQL_ERROR_LOG fails to initialize

Bug #956463 reported by Elena Stepanova
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MariaDB
Fix Committed
High
Alexey Botchkov

Bug 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).

Revision history for this message
Elena Stepanova (elenst) wrote :

Also filed in JIRA as MDEV-184

Revision history for this message
Alexey Botchkov (holyfoot) wrote :

the fix pushed to the 5.5-hf tree.

Changed in maria:
status: New → Fix Committed
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.