Bug #17404 Events: crash if frequent enable/disable
Submitted: 14 Feb 2006 23:53 Modified: 23 May 2006 13:06
Reporter: Peter Gulutzan Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Stored Routines Severity:S3 (Non-critical)
Version:5.1.7-beta-debug OS:Linux (SUSE 10.0)
Assigned to: Andrey Hristov CPU Architecture:Any

[14 Feb 2006 23:53] Peter Gulutzan
Description:
I have an event which inserts into a table.
I have two other events which enable and disable the main event.
After a while mysqld crashes, saying:
safe_mutex: Trying to lock unitialized mutex at event_timed.cc, line 1073

Incidentally: change spelling in that message from unitialized to uninitialized.

There are possible similarities to bug#16428 but the error message is different.

How to repeat:
mysql>   create event e_54 on schedule every 1 second do alter event db1.e_52 enable;
Query OK, 1 row affected (0.01 sec)

mysql>   create event e_53 on schedule every 1 second do alter event db1.e_52 disable;
Query OK, 1 row affected (0.00 sec)

mysql>   create event e_52 on schedule every 1 second do insert into db1.t52 values (current_timestamp);
Query OK, 1 row affected (0.00 sec)

mysql>   create table t52 (s1 timestamp);
Query OK, 0 rows affected (0.03 sec)

mysql>   set global event_scheduler = 1;
Query OK, 0 rows affected (0.00 sec)

/* Now wait 10 minutes. Server should crash. */
[15 Feb 2006 9:04] Andrey Hristov
Once the new executor which comes with the bugfix of bug#16406 "DROP DATABASE should drop events" there kind of failures should be gone. I would be better to continue with the stress testing once the new executor is in place.
[23 May 2006 13:06] Valeriy Kravchuk
I was not able to repeat with 5.1.12-BK-debug (ChangeSet@1.2169.1.11, 2006-05-23 14:35:18+10:00), waiting for more than an hour. So, it looks like this bug is fixed by other patches.