influxdata / influxdata/influxdb

`make go-test-race` fails due to OOM (on Linux)

Open
#23,208 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
31.7k
Forks
3.7k
Avg merge
13h 37m
Merged PRs (30d)
8

Description

On Ubuntu 20.04, amd64 on a system with 16G of ram, make go-test-race fails due to OOM killer:

[267696.351547] oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=/,mems_allowed=0,global_oom,task_memcg=/user.slice/user-1000.slice/user@1000.service,task=tsdb.test,pid=431745,uid=1000
[267696.351578] Out of memory: Killed process 431745 (tsdb.test) total-vm:12884760kB, anon-rss:9848884kB, file-rss:0kB, shmem-rss:0kB, UID:1000 pgtables:22928kB oom_score_adj:0
[267697.247907] oom_reaper: reaped process 431745 (tsdb.test), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB

@lesam and I discussed a bit on slack and I also tried the following, which also failed:

$ go test -race -count=1 -tags=osusergo,netgo,sqlite_foreign_keys,sqlite_json ./...
$ go test -race -parallel 2 -count=1 -tags=osusergo,netgo,sqlite_foreign_keys,sqlite_json ./...

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing make go-test-race on the reported Ubuntu 20.04 amd64 setup and compare it with the listed go test -race commands, including -parallel 2. Investigate the race-test process's memory use and determine a change that lets the target complete without the Linux OOM killer.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
build-system, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.