Bug #32201 Creating a table on a fresh Falcon installation leads to crash
Submitted: 8 Nov 2007 22:29 Modified: 5 May 2008 16:55
Reporter: Hakan Küçükyılmaz Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Falcon storage engine Severity:S1 (Critical)
Version:6.0.4-alpha OS:MacOS (Intel)
Assigned to: Hakan Küçükyılmaz CPU Architecture:Any

[8 Nov 2007 22:29] Hakan Küçükyılmaz
Description:
Creating a table on a fresh Falcon installation leads to crash.

How to repeat:
Use latest mysql-6.0-falcon-team tree on Mac OS X/Intel. And create a simple table like

6.0.4-alpha-debug
[23:26] root@test>create table t1 (a int) engine falcon;

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00000000
[Switching to process 7575 thread 0x2303]
0x002d097d in StorageTableShare::lookupPathName (this=0x680f8d4) at StorageTableShare.cpp:488
488                     "select pathname from falcon.tables where effective_schema_name=? and effective_table_name=?");

In frame #0 we see

(gdb) p connection
$1 = (Connection *) 0x0

(gdb) bt
#0  0x002d097d in StorageTableShare::lookupPathName (this=0x680f8d4) at StorageTableShare.cpp:488
#1  0x002d0aef in StorageTableShare::tableExists (this=0x680f8d4) at StorageTableShare.cpp:477
#2  0x002cd9e0 in StorageHandler::createTable (this=0x5c05020, pathname=0xb00606c8 "./test/t1", tableSpaceName=0x0, tempTable=false) at StorageHandler.cpp:541
#3  0x002b5c33 in StorageInterface::create (this=0x6064228, mySqlName=0xb00606c8 "./test/t1", form=0xb005fdb8, info=0xb00613b4) at ha_falcon.cpp:649
#4  0x001df243 in ha_create_table (thd=0x601ee18, path=0xb0060bb0 "./test/t1", db=0x60622d0 "test", table_name=0x60620c0 "t1", create_info=0xb00613b4, update_create_info=false) at handler.cc:2636
#5  0x0019a7d1 in rea_create_table (thd=0x601ee18, path=0xb0060bb0 "./test/t1", db=0x60622d0 "test", table_name=0x60620c0 "t1", create_info=0xb00613b4, create_fields=@0xb00615c0, keys=0, key_info=0x6062578, file=0x60623c8) at unireg.cc:437
#6  0x001fbb04 in mysql_create_table_no_lock (thd=0x601ee18, db=0x60622d0 "test", table_name=0x60620c0 "t1", create_info=0xb00613b4, alter_info=0xb006159c, internal_tmp_table=false, select_field_count=0) at sql_table.cc:3452
#7  0x001fbf82 in mysql_create_table (thd=0x601ee18, db=0x60622d0 "test", table_name=0x60620c0 "t1", create_info=0xb00613b4, alter_info=0xb006159c, internal_tmp_table=false, select_field_count=0) at sql_table.cc:3559
#8  0x000d1b1b in mysql_execute_command (thd=0x601ee18) at sql_parse.cc:2181
#9  0x000d9e51 in mysql_parse (thd=0x601ee18, inBuf=0x6062028 "create table t1 (a int) engine falcon", length=37, found_semicolon=0xb0061dc8) at sql_parse.cc:5371
#10 0x000da9a8 in dispatch_command (command=COM_QUERY, thd=0x601ee18, packet=0x4f54019 "create table t1 (a int) engine falcon", packet_length=37) at sql_parse.cc:890
#11 0x000dbca7 in do_command (thd=0x601ee18) at sql_parse.cc:657
#12 0x000c8d86 in handle_one_connection (arg=0x601ee18) at sql_connect.cc:1119
#13 0x90024227 in _pthread_body ()

Suggested fix:
Don't crash
[13 Nov 2007 20:42] Sveta Smirnova
Thank you for the report.

Verified as described.
[20 Nov 2007 3:52] Kevin Lewis
Hakan, You have been trying to isolate this problem.  Contact me or Jim if you have any question or can provide some 'hints'.
[27 Nov 2007 18:28] 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/38647

ChangeSet@1.2689, 2007-11-27 19:28:12+01:00, hakank@au0012. +2 -0
  Fix for Bug#32201 Creating a table on a fresh Falcon installation leads to crash.
  
  Problem was that
      Configuration::getPhysicalMemory()
  
  was always returning 0 as physical memory size
  and thus letting
      MemControll::getPhysicalMemory()
  
  always returning false which caused an
  "record memory is exhausted" error.
[30 Nov 2007 20:43] Bugs System
Pushed into 6.0.4-alpha
[11 Feb 2008 19:50] Kevin Lewis
Patch is in mysql-6.0-falcon and mysql-6.0-release version 6.0.4
[5 May 2008 16:55] Paul DuBois
Noted in 6.0.4 changelog.

On Mac OS X, creating a Falcon table using a new Falcon installation
caused a crash.