Bug #16414 Events: Crash or hang if event drops itself
Submitted: 12 Jan 2006 4:03 Modified: 10 Feb 2006 20:31
Reporter: Peter Gulutzan Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Stored Routines Severity:S3 (Non-critical)
Version:5.1.6-alpha-debug OS:Linux (SUSE 10.0)
Assigned to: Andrey Hristov CPU Architecture:Any

[12 Jan 2006 4:03] Peter Gulutzan
Description:
I can create an event which drops itself repeatedly.
When I execute the CREATE EVENT statement the first
time, or after I've executed it a few times, I see
either a hang on the client or a crash on the server.

How to repeat:

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

mysql> create event e_20 on schedule every 1 second do drop event e_20;
Query OK, 1 row affected (0.00 sec)

mysql> create event e_20 on schedule every 1 second do drop event e_20;
Query OK, 1 row affected (0.00 sec)

mysql> create event e_20 on schedule every 1 second do drop event e_20;
Query OK, 1 row affected (0.00 sec)

This may work a few times, as above. But repeat,
saying the same CREATE EVENT statment, and at
some time you will not get a return (in this
case, it may be necessary to stop the server
with "kill"). Or, there will be a server crash.
Only a few repetitions are necessary.
[30 Jan 2006 22:53] Andrey Hristov
Currently locks, found the reason and fixed it. This was the problem that was locking also in disabled t/events . When doing shutdown server cores (asserts because a share was not freed).
[31 Jan 2006 11:08] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/1930
[7 Feb 2006 18:30] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/2266
[9 Feb 2006 21:46] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/2407
[9 Feb 2006 21:50] Andrey Hristov
Fixed in 5.1.7 - increased stability of the scheduler. Race conditions fixed.
[10 Feb 2006 20:31] Paul DuBois
Bug appears only in unreleased code. No changelog
entry needed.