MPS issue job003697

TitleIncorrect result code sometimes returned when commit limit is hit
Assigned userRichard Brooksby
DescriptionTesting branch/2014-01-17/cbs-tract-alloc/...@184773 on FreeBSD, running
        fri3gc/cool/mpsicv 860509199
produces a test case failure
        Collection 164, 198169 objects.
        Commit limit allocation: RESOURCE: "unable to obtain resources"
AnalysisThe test is expecting a return code MPS_RES_COMMIT_LIMIT, having deliberately limited the arena growth, but is getting MPS_RES_RESOURCE instead. I was unable to reproduce this on Mac OS X. The number of collections and number of objects reported varied, presumably because the FreeBSD stack layout is different.

A session with the mighty GDB found the problem at arenavm.c line 707 in the horrid VMArenaGrow. This code ignores the actual result code of VMChunkCreate and always returns ResRESOURCE for some reason. What's happening is that VMChunkCreate is failing to map its chunk descriptor and page tables, hitting the commit limit just at that moment instead of during a segment allocation, and so the real reason for failure is being discarded.

In the short term it may be sufficient to propagate the correct result code. In the long term VMArenaGrow needs refactoring, but its behaviour may be critical to Configura. We must test the relevant cases. See <>.
How foundmanual_test
fri3gc/cool/mpsicv 860509199
Test procedurefri3gc/cool/mpsicv 860509199
Created byRichard Brooksby
Created on2014-03-13 13:40:48
Last modified byRichard Brooksby
Last modified on2014-03-13 13:48:43
History2014-03-13 RB Created.


Change Effect Date User Description
184777 closed 2014-03-13 13:48:43 Richard Brooksby Return the correct reason that arena extension failed.