Bug #25835 | Falcon: assertion on startup | ||
---|---|---|---|
Submitted: | 24 Jan 2007 17:14 | Modified: | 5 Feb 2007 15:52 |
Reporter: | Peter Gulutzan | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Falcon storage engine | Severity: | S1 (Critical) |
Version: | 5.2.1-falcon-alpha-debug | OS: | Linux (SUSE 10.0 / 64-bit) |
Assigned to: | Guilhem Bichot | CPU Architecture: | Any |
[24 Jan 2007 17:14]
Peter Gulutzan
[24 Jan 2007 17:50]
MySQL Verification Team
Thank you for the bug report. Verified on Ubuntu 6.10 32-bit. InnoDB: Creating foreign key constraint system tables InnoDB: Foreign key constraint system tables created 070124 14:46:40 InnoDB: Started; log sequence number 0 0 mysqld: log.cc:4457: virtual int TC_LOG_MMAP::open(const char*): Assertion `opt_name && opt_name[0]' failed. mysqld got signal 6; This could be because you hit a bug. It is also possible that this binary
[26 Jan 2007 19:28]
Peter Gulutzan
Crash also occurs with Ubuntu 32-bit. Crash also occurs with BUILD/compile-pentium-max, i.e. non-debug version.
[28 Jan 2007 2:23]
Peter Gulutzan
Since the crash is due to calling open(opt_bin_logname) with opt_bin_log_name=0 from mysqld.cc, the workaround is simple: always start mysqld with --log-bin=something.
[3 Feb 2007 20:34]
Guilhem Bichot
Hi. I suggest this patch. Please consider it. Contact me if want to discuss it. [gbichot@production mysql-5.1-falcon]$ bk diffs -c sql ===== sql/log.cc 1.253 vs edited ===== *** /tmp/bk_log.cc-1.253_0xIoqm 2007-02-03 21:29:26 +01:00 --- edited/sql/log.cc 2007-02-03 21:24:02 +01:00 *************** *** 4537,4543 **** goto err; if (using_heuristic_recover()) return 1; ! if ((fd= my_create(logname, O_RDWR, 0, MYF(MY_WME))) < 0) goto err; inited=1; file_length= opt_tc_log_size; --- 4537,4543 ---- goto err; if (using_heuristic_recover()) return 1; ! if ((fd= my_create(logname, CREATE_MODE, O_RDWR, MYF(MY_WME))) < 0) goto err; inited=1; file_length= opt_tc_log_size; ===== sql/mysqld.cc 1.589 vs edited ===== *** /tmp/bk_mysqld.cc-1.589_ODQwsm 2007-02-03 21:29:26 +01:00 --- edited/sql/mysqld.cc 2007-02-03 21:21:45 +01:00 *************** *** 3317,3323 **** (TC_LOG *) &tc_log_mmap) : (TC_LOG *) &tc_log_dummy); ! if (tc_log->open(opt_bin_logname)) { sql_print_error("Can't init tc log"); unireg_abort(1); --- 3317,3323 ---- (TC_LOG *) &tc_log_mmap) : (TC_LOG *) &tc_log_dummy); ! if (tc_log->open(opt_bin_log ? opt_bin_logname : opt_tc_log_file)) { sql_print_error("Can't init tc log"); unireg_abort(1); Notes: 1) even though not specified in the bug report, crash happens only if --log-bin (with or without argument) is not used; in this case, mysqld decides to use a mmap-based log instead of the binary log, to keep track of prepared transactions 2) but the problem was that this mmap-based log was created with the argument of --log-bin as filename, which is wrong; it should use the --opt-tc-log-file option, which has a non-null default ("tc.log"), and which is meant for that 3) after fixing this, the mmap-based log was created, but unfortunately with wrong umask (due to some wrong argument in my_create()), thus when later mysqld wanted to modify/remove tc.log, it failed to do so. Patch fixes those two issues. I get several successful start/shutdown of mysqld with it.
[4 Feb 2007 9:31]
Calvin Sun
Hi Guilhem, Thanks for looking at the issue and providing the patch! I will ask Sergei to conduct the review and PeterG/Matthias to write some XA test cases with both Falcon and InnoDB XA-enabled. For the upcoming alpha release, the XA code for Falcon has been ifdefed out. We need to do more testing in this area (with your patch) and then make Falcon XA-enabled in a later alpha. Thanks, Calvin
[5 Feb 2007 4:00]
Calvin Sun
Assign it to Guilhem, who agreed to push the patch into the Falcon tree on Monday. Thanks!
[5 Feb 2007 15:52]
Guilhem Bichot
pushed in mysql-5.1-falcon. https://intranet.mysql.com/secure/mailarchive/mail.php?folder=213&mail=3923 Crash was not possible with first alpha, so nothing to document