Title | Incorrect result code sometimes returned when commit limit is hit |
Status | closed |
Priority | essential |
Assigned user | Richard Brooksby |
Organization | Ravenbrook |
Description | Testing 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" |
Analysis | The 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 < https://info.ravenbrook.com/mail/2014/03/13/13-35-35/0/ >. |
How found | manual_test |
Evidence | branch/2014-01-17/cbs-tract-alloc/...@184773 fri3gc/cool/mpsicv 860509199 |
Test procedure | fri3gc/cool/mpsicv 860509199 |
Created by | Richard Brooksby |
Created on | 2014-03-13 13:40:48 |
Last modified by | Richard Brooksby |
Last modified on | 2014-03-13 13:48:43 |
History | 2014-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. |