Bug #42861 | Assigning invalid directories to --slave-load-tmpdir crashes the slave | ||
---|---|---|---|
Submitted: | 14 Feb 2009 19:30 | Modified: | 15 Apr 2009 10:29 |
Reporter: | Alfranio Tavares Correia Junior | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Replication | Severity: | S3 (Non-critical) |
Version: | 5.1 | OS: | Any |
Assigned to: | Alfranio Tavares Correia Junior | CPU Architecture: | Any |
[14 Feb 2009 19:30]
Alfranio Tavares Correia Junior
[14 Feb 2009 21:26]
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/66358 2798 Alfranio Correia 2009-02-14 BUG#42861 Assigning invalid directories to --slave-load-tmpdir crashes the slave Compiling with debug and assinging an invalid directory to --slave-load-tmpdir was crashing the slave due to the following assertion DBUG_ASSERT(! is_set() || can_overwrite_status). This assertion assumes that a thread can throw one error before stoping its execution unless the overwrite flag (i.e. can_overwrite_status) is true. The cleanup function however was failing and an error was being thrown by my_dir and the replication thread was not aborting the execution. To fix the problem we propagate the error from the cleanup function until it reaches a point in which the replication code can report the error and stop the execution.
[13 Mar 2009 11:03]
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/69130 2832 Alfranio Correia 2009-03-13 BUG#42861 Assigning invalid directories to --slave-load-tmpdir crashes the slave Compiling with debug and assigning an invalid directory to --slave-load-tmpdir was crashing the slave due to the following assertion DBUG_ASSERT(! is_set() || can_overwrite_status). This assertion assumes that a thread can changing its state once (i.e. ok, error, etc) before aborting, cleaning/resuming or completing its execution unless the overwrite flag (i.e. can_overwrite_status) is true. The cleanup function however was being failing and an error thrown by my_dir and the replication SQL thread was not aborting its execution. To fix the problem we check the directory before starting the replication.
[16 Mar 2009 16:56]
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/69323 2832 Alfranio Correia 2009-03-16 BUG#42861 Assigning invalid directories to --slave-load-tmpdir crashes the slave Compiling with debug and assigning an invalid directory to --slave-load-tmpdir was crashing the slave due to the following assertion DBUG_ASSERT(! is_set() || can_overwrite_status). This assertion assumes that a thread can changing its state once (i.e. ok, error, etc) before aborting, cleaning/resuming or completing its execution unless the overwrite flag (i.e. can_overwrite_status) is true. The cleanup function however was being failing and an error thrown by my_dir and the replication SQL thread was not aborting its execution. Furthermore, the Append_block_log_event::do_apply_event was not reseting internal states before starting processing. To fix the problem we check the directory before starting the replication and reset internal states before starting processing.
[18 Mar 2009 10:32]
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/69565 2832 Alfranio Correia 2009-03-18 Bug #42861 Assigning invalid directories to --slave-load-tmpdir crashes the slave Compiling with debug and assigning an invalid directory to --slave-load-tmpdir was crashing the slave due to the following assertion DBUG_ASSERT(! is_set() || can_overwrite_status). This assertion assumes that a thread can change its state once (i.e. ok,error, etc) before aborting, cleaning/resuming or completing its execution unless the overwrite flag (i.e. can_overwrite_status) is true. The Append_block_log_event::do_apply_event which is responsible for creating temporary file(s) was not cleaning the thread state. Thus a failure while trying to create a file in an invalid temporary directory was causing the crash. To fix the problem we check if the temporary directory is valid before starting the SQL Thread and reset the thread state before creating a file in Append_block_log_event::do_apply_event.
[23 Mar 2009 1:07]
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/69995 2825 Alfranio Correia 2009-03-23 Post-fix BUG#42861.
[23 Mar 2009 16:22]
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/70087 3154 Alfranio Correia 2009-03-23 Post-fix BUG#42861.
[27 Mar 2009 14:57]
Bugs System
Pushed into 5.1.34 (revid:joro@sun.com-20090327143448-wuuuycetc562ty6o) (version source revid:azundris@mysql.com-20090323042102-hcciofk3ixld76r8) (merge vers: 5.1.34) (pib:6)
[30 Mar 2009 12:17]
Jon Stephens
Documented bugfix in the 5.1.34 changelog as follows: Assigning an invalid directory as --slave-load-tmpdir caused the replication slave to crash. Set NDI status pending merge to 6.0 tree.
[13 Apr 2009 9:22]
Bugs System
Pushed into 6.0.11-alpha (revid:alik@sun.com-20090413084402-snnrocwzktcl88ny) (version source revid:alfranio.correia@sun.com-20090323162203-4a9zgk1gdgz8yibg) (merge vers: 6.0.11-alpha) (pib:6)
[15 Apr 2009 10:23]
Jon Stephens
Fix also documented in 6.0.11 changelog; closed.
[15 Apr 2009 10:29]
Jon Stephens
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release. If necessary, you can access the source repository and build the latest available version, including the bug fix. More information about accessing the source trees is available at http://dev.mysql.com/doc/en/installing-source.html
[9 May 2009 16:47]
Bugs System
Pushed into 5.1.34-ndb-6.2.18 (revid:jonas@mysql.com-20090508185236-p9b3as7qyauybefl) (version source revid:jonas@mysql.com-20090508185236-p9b3as7qyauybefl) (merge vers: 5.1.34-ndb-6.2.18) (pib:6)
[9 May 2009 17:43]
Bugs System
Pushed into 5.1.34-ndb-6.3.25 (revid:jonas@mysql.com-20090509063138-1u3q3v09wnn2txyt) (version source revid:jonas@mysql.com-20090509063138-1u3q3v09wnn2txyt) (merge vers: 5.1.34-ndb-6.3.25) (pib:6)
[9 May 2009 18:41]
Bugs System
Pushed into 5.1.34-ndb-7.0.6 (revid:jonas@mysql.com-20090509154927-im9a7g846c6u1hzc) (version source revid:jonas@mysql.com-20090509154927-im9a7g846c6u1hzc) (merge vers: 5.1.34-ndb-7.0.6) (pib:6)