Bug #39098 Falcon sometimes reports 'Invalid serial log directory path'
Submitted: 28 Aug 2008 14:50 Modified: 8 Jan 2009 10:35
Reporter: Kevin Lewis Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Falcon storage engine Severity:S3 (Non-critical)
Version:6.0.7, mysql-6.0-falcon OS:Any
Assigned to: Vladislav Vaintroub CPU Architecture:Any
Triage: Triaged: D2 (Serious)

[28 Aug 2008 14:50] Kevin Lewis
Description:
The following is an example error that occurs on some machines since the patch for Bug#38377 was introduced.  The problem does not occur on any pushbuild machines or on any machines by Lars-Erik or Vlad.  But Chris Powers, Sergey V, and Ranger have seen it.

master.err: main.AAA: 080828 16:04:37 [ERROR] Falcon: Exception 'Invalid serial log directory path "/home/svoj/devel/mysql/BUG33575/mysql-6.0-falcon-team/mysql-test/var/master-data/"' during initialization

How to repeat:
Start up mysqld...

Suggested fix:
Avoid the error.
[28 Aug 2008 19:55] Sveta Smirnova
Thank you for the report.

Verified as described using mysql-6.0-falcon tree.

To repeat:

$./mysql-test-run.pl alias
Logging: ./mysql-test-run.pl alias
MySQL Version 6.0.7
....
TEST                           RESULT         TIME (ms)
-------------------------------------------------------

main.alias                     [ pass ]             54
-------------------------------------------------------
Stopping All Servers
All 1 tests were successful.
The servers were restarted 1 times
Spent 0.054 of 4 seconds executing testcases
mysql-test-run: WARNING: Got errors/warnings while running tests, please examine "/users/ssmirnova/src/mysql-6.0-falcon/mysql-test/var/log/warnings" for details.

mysql-test-run: *** ERROR: there were failing test cases

$cat var/log/warnings 
master.err: main.alias: 080828 22:53:54 [ERROR] Falcon: Exception 'Invalid serial log directory path "/users/ssmirnova/src/mysql-6.0-falcon/mysql-test/var/master-data/"' during initialization
master.err: main.alias: 080828 22:53:54 [ERROR] Plugin 'Falcon' init function returned error.
master.err: main.alias: 080828 22:53:54 [ERROR] Plugin 'Falcon' registration as a STORAGE ENGINE failed.
[28 Aug 2008 22:32] Kevin Lewis
Chris, assigning this to you since you can reproduce it on xeno.
[29 Aug 2008 20:44] 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/52937

2807 Christopher Powers	2008-08-29 [merge]
      Bug #39098, Falcon sometimes reports 'Invalid serial log directory path'
      
      Incorporated patch provided by Lars-Erik, which works on OpenSuSE but fails on Windows
      Fixed Windows code in IO::isDirectory()
[29 Aug 2008 20:45] 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/52938

2807 Christopher Powers	2008-08-29 [merge]
      Bug #39098, Falcon sometimes reports 'Invalid serial log directory path'
      
      Incorporated patch provided by Lars-Erik, which works on OpenSuSE but fails on Windows
      Fixed Windows code in IO::isDirectory()
[29 Aug 2008 20:47] 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/52939

2807 Christopher Powers	2008-08-29 [merge]
      Bug #39098, Falcon sometimes reports 'Invalid serial log directory path'
      
      Incorporated patch provided by Lars-Erik, which works on OpenSuSE but fails on Windows
      Fixed Windows code in IO::isDirectory()
[4 Sep 2008 18:08] Sveta Smirnova
See related bug #39194 and bug #39098
[11 Sep 2008 10:52] 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/53811

2814 Vladislav Vaintroub	2008-09-11
      Bug#39098: Invalid check for serial_log_directory.
            
      Falcon throws exception telling serial log directory is invalid 
      and refuses to initialize. An attempt was already made to fix
      this error in the past, and even this attempt did not work in
      all cases (root directory on Windows  like C: would not work for example)
            
      Solution presented here is rather simple - we do not check for valid 
      directory at all. If serial log file cannot be opened or created during 
      database creation, the server does not start anyway.
            
      We should not also try to create database if serial log cannot be opened.
      (there will be no loss of data, since we do not overwrite existing files,
      but error message coming from create database is misleading).
            
      Hence, this patch also contains fix to trigger database creation only 
      if falcon_master.fts could be opened.
[11 Sep 2008 10: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/53813

2814 Vladislav Vaintroub	2008-09-11
      Bug#39098: Invalid check for serial_log_directory.
                  
      Falcon throws exception telling serial log directory is invalid 
      and refuses to initialize. An attempt was already made to fix
      this error in the past, and even this attempt did not work in
      all cases (root directory on Windows  like C: would not work for example)
                  
      Solution presented here is rather simple - we do not check for valid 
      directory at all. If serial log file cannot be opened or created during 
      database creation, the server does not start anyway.
                  
      We should not also try to create database if serial log cannot be opened.
      (there will be no loss of data, since we do not overwrite existing files,
      but error message coming from create database is misleading).
                  
      Hence, this patch also contains fix to trigger database creation only 
      if falcon_master.fts could be opened.
[8 Jan 2009 10:35] MC Brown
A note has been added to the 6.0.7 changelog: 

When specifying an alternative log directory for FALCON using serial_log_directory the operation would fail silently if the directory did not exist. MySQL will now fail to start if the serial log in the specified directory cannot be opened or created, or if the falcon_master.fts cannot be opened or created.