Bug #50928 ndbd should give more information on a malloc failure
Submitted: 4 Feb 2010 20:16 Modified: 4 May 2010 13:55
Reporter: Andrew Hutchings Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S4 (Feature request)
Version:mysql-5.1-telco-6.3 OS:Any
Assigned to: Andrew Hutchings CPU Architecture:Any

[4 Feb 2010 20:16] Andrew Hutchings
Description:
When a node fails due to initial memory allocation we get:

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'.

This will happen more often now we have the ndbd_alloc_touch_mem() function.

But no indication as to the current allocation status.  There is already debugging information if TRACE_MALLOC but it would be good if something similar was given to the user.  ie:

g_eventLogger->error("Failed allocating %ukbytes, total allocated %ukbytes", (size/1024), (g_allocated_memory/1024));

As a bonus it would be good to find out what type of memory was being allocated at the time (ie. DataMemory, DiskPageBufferMemory, etc...)

How to repeat:
.
[4 Feb 2010 21:48] Andrew Hutchings
Also show warning if this is a 32bit binary and over-allocating (possibly show whole arch info in logs).
[4 May 2010 13:55] Jon Stephens
AndrewH confirmed on IRC that the patch for BUG#52536 (qv) also fixes this bug.

Closed.