Skip to content

Please add a note somewhere about the max number of threads for a test. #60

@bryder

Description

@bryder

Problem

When running cargo test in threaded mode random tests fail with: libc::EDQUOT ie Some("Disk quota exceeded")

It would be good to put a note about this somewhere (or maybe read maxkeys and warn on it?)

Verison

Tested on this revision on master: e4b35b6

Environment

Ubuntu 20.04 under WSL2 on Windows 11.

The machine reports 12 procs.

$ nproc
12

Cause and 'fix'

The cause is the default user quota is too small. This is the default

$ cat /proc/sys/kernel/keys/maxkeys
200

One way to fix it is

echo 1000 | sudo tee /proc/sys/kernel/keys/maxkeys

The other way is to limit the threads cargo runs - but I had to set it to 1 to work. Even with 2 random tests failed.

cargo test --test-threads=1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions