MPS issue job003433

Titlempsicv test failure
Assigned userGareth Rees
DescriptionThe mpsicv test case fails in the COOL variety. Here's it failing on Ubuntu (lii6gc):

    $ code/lii6gc/cool/mpsicv 237086722
    Collection 49, 172378 objects.

    commit_limit_set before: 1

And here's a failure on OS X (xci6ll):

    $ code/xc/Debug/mpsicv 2010345829
    Collection 49, 172094 objects.

    commit_limit_set before: 1
AnalysisResult code 1 is RES_FAIL; ArenaSetCommitLimit returns this if

    limit < arena->committed - arena->spareCommitted

Running this under GDB:

    (gdb) b arena.c:660
    Breakpoint 1 at 0x100007ab8: file arena.c, line 660.
    (gdb) run 2010345829
    Breakpoint 1, ArenaSetCommitLimit (arena=0x100178000, limit=20901888) at arena.c:660
    660 res = ResFAIL;
    (gdb) p limit
    $1 = 20901888
    (gdb) p arena->committed
    $2 = 20905984
    (gdb) p arena->spareCommitted
    $3 = 0

The test is trying to provoke an MPS_RES_COMMIT_LIMIT error from mps_alloc by setting the commit limit. But it does so in the following way:

      committed = mps_arena_committed(arena);
      reserved = mps_arena_reserved(arena);
      cdie(reserved >= committed, "reserved < committed");
      die(mps_pool_create(&pool, arena, mps_class_mv(),
          (size_t)0x1000, (size_t)1024, (size_t)16384),
          "commit pool create");
      limit = mps_arena_commit_limit(arena);
      die(mps_arena_commit_limit_set(arena, committed), "commit_limit_set before");

The test case expects the arena not to commit any more memory between the call to mps_arena_committed and the call to mps_arena_commit_limit_set -- but in between is a call to mps_pool_create which might well cause more virtual memory to be committed.

Clearly this is an error in the test case, not the MPS: the commit limit should be taken *after* creating the pool.
How foundautomated_test
Observed in1.110.0
Created byGareth Rees
Created on2013-03-07 13:09:35
Last modified byGareth Rees
Last modified on2013-03-07 16:45:48
History2013-03-07 GDR Created.


Change Effect Date User Description
181080 closed 2013-03-07 16:45:48 Gareth Rees Fix to the mpsicv test case: get the arena's committed memory after creating the pool, so that the creation of the pool can't cause the committed memory to be bumped upwards.