Bug #34085 create table on falcon hangs when it cannot allocate memory for the page cache
Submitted: 27 Jan 4:39 Modified: 22 Aug 19:16
Reporter: Mark Callaghan
Status: Documenting
Category:Server: Falcon Severity:S3 (Non-critical)
Version:6.0.3-alpha OS:Any
Assigned to: Vladislav Vaintroub Target Version:6.0.5
Tags: falcon, hang, create, table
Triage: D4 (Minor) / R3 (Medium) / E3 (Medium)

[27 Jan 4:39] Mark Callaghan
Description:
I used a 32-bit server and over-subscribed memory with a 2G InnoDB buffer cache and 2G for
Falcon. When I did 'create table f(d double primary key) engine=falcon', the statement
hung.

I prefer that Falcon try to get any resources it needs at server startup. That would make
config problems more obvious and less of a risk.

The settings were:

innodb_buffer_pool_size=2G
falcon_record_memory_max=200M
falcon_page_cache_size=1800M

Everything was fine after changing the settings to:
innodb_buffer_pool_size=1G
falcon_record_memory_max=200M
falcon_page_cache_size=800M

How to repeat:
described above

Suggested fix:
Allocate memory at engine init time and raise an error then rather than making a user
session run into the problem.
[28 Jan 10:40] Sveta Smirnova
Thank you for the report.

Verified as described.
[28 Jan 10:51] Sveta Smirnova
Additionally if I kill server, then change settings, restart server again and issue 'use
db_where_I_tried_to_create-such_table' server hangs
[24 Feb 16:49] 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/42919

ChangeSet@1.2822, 2008-02-24 16:48:01+01:00, vvaintroub@wva. +2 -0
  Bug#34085 - create table on falcon hangs if it cannot allocate pagecache
  In this case, pagecache size was too big, initialization failed and user 
  was confronted with incomprehensible error message from CREATE TABLE.
  
  Solution : now Falcon will be initialized at database startup. Plugin 
  will not be loaded on failed allocation and this will make configuration
  issues more obvious to DBA.
[25 Feb 16:26] Kevin Lewis
Q.  Why did you take out  "if (storageHandler)" 3 places in ha_falcon.cpp?
A.  Cleanup.  If plugin is not loaded, no other function except falcon_init() is called
and falcon variables are not visible.

Patch Approved.
[13 Mar 0:02] Bugs System
Pushed into 6.0.4-alpha
[13 Mar 16:55] Hakan Kuecuekyilmaz
Fix is in 6.0.5-alpha.