Skip to content

01-basic.t has a memory leak, hangs/crashes #1

@coke

Description

@coke

Doing the blin run for the release, this test ended up consuming enough memory on a 64G box running the raku/blin tests that the OS killed the entire test run.

Running on my local box:

➜  ~ zef look Russian
===> Searching for: Russian
===> Shelling into directory: /var/folders/8n/rypl9_990b9578zd5435pgr40000gn/T/.zef.1762954726.5487/179d24d3ecd6e89e6612bc952910b1ada06faf22.tar.gz/dist
➜  dist zef test .
===> Testing: Russian:ver<0.0.1>:auth<zef:slavenskoj>:api<1>
[Russian] # Failed test 'нуль() returns Nil'
[Russian] # at t/01-basic.t line 20
[Russian] # expected: Nil
[Russian] #      got: Nil
[Russian] # Failed test 'если (if) else branch works'
[Russian] # at t/01-basic.t line 42
[Russian] # expected: 'меньше или равно пяти'
[Russian] #      got: 'больше пяти'

At this point it hangs and memory usage is slowly rising (with some drops, it's not monotonic, but it is trending up) - I left it for several minutes on my personal laptop (mac, 24G) - on the blin machine (ubuntu, 64G), it eventually consumed enough memory to get killed by the OS.

Not surprisingly, it's this test that causes the issue:

# Test loop functions
{
    my $count = 0;
    my $result = "";
    пока(sub { $count < 3 }, sub { $result ~= $count; $count++ });
    is $result, "012", 'пока (while) loop works';
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions