domino14 / macondo

A crossword board game AI, written in Go
https://domino14.github.io/macondo
GNU General Public License v3.0
48 stars 10 forks source link

bestbot ran out of memory #294

Closed domino14 closed 10 months ago

domino14 commented 10 months ago
REPORT RequestId: 1b690add-f44a-46d5-88e0-352bb2248e74  Duration: 6082.95 ms    Billed Duration: 6083 ms    Memory Size: 6000 MB    Max Memory Used: 6000 MB    

cgp:

14A/14L/7QI5i/7INVEIGLE/14N/2M2POOP4KA/1COXAE6COT/2V2WHY1InJURE/1RE3MAIR2ZA1/1E6DEFT1IF/1T8AA2A/BI8GURRY/ON3TELEOST2I/NO1HUED7N/EL12G DDEIORU/ 446/300 0 lex NWL20; ld english; tmr 1462037/1000;

{
    "level": "info",
    "num-elems": 268435456,
    "desired-num-elems": 350834944,
    "estimated-total-memory-bytes": 4294967296,
    "reset": false,
    "time": "2023-10-22T08:50:14Z",
    "message": "transposition-table-size"
}

It should use < 4 GB for the TT. The Lambda's max memory is 6 GB. I think this is some issue with the GC/etc. It didn't let go of memory yet from the last run.

Lambda restarted it three times. The last time it didn't even allocate new TT entries, it just reset what it had, and it still fails!

{
    "level": "info",
    "num-elems": 268435456,
    "desired-num-elems": 350834944,
    "estimated-total-memory-bytes": 4294967296,
    "reset": true,
    "time": "2023-10-22T08:56:01Z",
    "message": "transposition-table-size"
}
domino14 commented 10 months ago

the endgame and pre-endgame allocate insane amounts of memory. If the GC can't keep up briefly we can hit the limit and die. For now we should decrease the TT memory fraction.

andy-k commented 10 months ago

Go 1.19's GOMEMLIMIT?