Bug #52536 Trying to allocate a lot of DataMemory on 32bit systems causes a segfault
Submitted: 1 Apr 2010 18:00 Modified: 4 May 2010 13:35
Reporter: Andrew Hutchings Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:mysql-5.1-telco-6.3 OS:Any
Assigned to: Jonas Oreland CPU Architecture:Any

[1 Apr 2010 18:00] Andrew Hutchings
Description:
When setting DataMemory to something too high (say 16GB) NDB logs that it is allocating a smaller amount (around 1GB) and then segfaults whilst allocating.

Reproduced with 32bit binaries on 64bit system as well as 32bit on 32bit.

How to repeat:
1. Set DataMemory high
2. Start ndbd

Suggested fix:
Fail with this instead:

2010-02-04 10:02:48 [ndbd] ALERT    -- Node 5: Forced node shutdown completed. Occured
during startphase 0. Caused by error 2327: 'Memory allocation failure, please decrease
some configuration parameters(Configuration error). Permanent error, external action
needed'.
[3 May 2010 11: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/107183

3096 Jonas Oreland	2010-05-03
      ndb - bug#52536 - check alloc >= 4Gb on 32-bit system instead of segfault
[3 May 2010 11:55] Jonas Oreland
pushed to 6.2.19, 6.3.34, 7.0.15 and 7.1.4
[4 May 2010 13:35] Jon Stephens
Documented bugfix in the NDB-6.2.19, 6.3.34, 7.0.15, and 7.1.4 changelogs, as follows:

        On 32-bit platforms, setting DataMemory higher than 4G caused 
        ndbd to crash instead of failing gracefully with an error.

Closed.