MPS issue job003412

TitleAssertion failure in TraceScanAreaMasked on Linux
Statusclosed
Prioritycritical
Assigned userRichard Brooksby
OrganizationRavenbrook
DescriptionBruce Mitchener [1] reports: "We've been doing some improvements to our HTTP server and someone has run into an MPS crash. He's on 32 bit Linux using the HARP backend. This seems to happen after responding to about 200 requests and then it dies. It appears to be independent of the concurrency level."

He's building and running the http-server (see notes below) and then running ab:

    ab -c 1 -n 1000 http://127.0.0.1:8000/

This needs to be using the OpenDylan 2012.1 release (which includes the new release of MPS).

    2013-01-16T03:32:05.000+0000 info [Koala request executor worker 3] 127.0.0.1 - - [16/Jan/2013:03:32:05 +0000] "GET / HTTP/1.0" 200 51 "-" "ApacheBench/2.3"

    MPS ASSERTION FAILURE: base != NULL
    /home/bruce/Development/dylan/mps-kit-1.110.0/code/trace.c
    1527
AnalysisSee e-mail thread [2] [3] [4] [5] [6] [7] [8].

GDR 2013-03-07: I got the amcssth test case running on platforms lii3gc and lii6gc (see job003414) and it immediately failed with the same assertion as the OpenDylan release:

    MPS ASSERTION FAILURE: base != NULL
    trace.c
    1532

RB's analysis in [8] is that MutatorFaultContextSP is returning the wrong stack pointer: instead of returning

    mfc->ucontext->uc_stack.ss_sp

it should return

    mfc->ucontext->uc_mcontext.gregs[REG_ESP]

on platforms lii3* and

    mfc->ucontext->uc_mcontext.gregs[REG_RSP]

on platforms lii6*. I made this change in change 181078 and this allows the amcssth test case to complete successfully. I verified in GDB that the value in mfc->ucontext->uc_mcontext.gregs[REG_RSP] looks like a stack pointer. However, I have not marked this job as "closed", as we might want to wait for confirmation from OpenDylan that this fixed their problem.
How foundcustomer
Evidence[1] <https://info.ravenbrook.com/mail/2013/01/16/03-51-58/0/>
[2] <https://info.ravenbrook.com/mail/2013/01/22/11-53-30/0/>
[3] <https://info.ravenbrook.com/mail/2013/01/23/11-04-34/0/>
[4] <https://info.ravenbrook.com/mail/2013/01/24/17-13-38/0/>
[5] <https://info.ravenbrook.com/mail/2013/02/01/15-07-08/0/>
[6] <https://info.ravenbrook.com/mail/2013/02/05/12-19-28/0/>
[7] <https://info.ravenbrook.com/mail/2013/02/05/12-27-48/0/>
[8] <https://info.ravenbrook.com/mail/2013/02/05/13-04-46/0/>
Observed in1.110.0
Created byGareth Rees
Created on2013-02-08 16:02:47
Last modified byRichard Brooksby
Last modified on2013-03-15 12:23:11
History2013-02-08 GDR Created.
2013-03-07 GDR Added analysis.

Fixes

Change Effect Date User Description
181078 closed 2013-03-07 15:31:40 Gareth Rees Fix MutatorFaultContextSP on lii3* and lii6*.