Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fatal error: concurrent map read and map write - in internal/output.(*prefixWriter).writeLine #1922

Open
tinmrn opened this issue Nov 18, 2024 · 0 comments · May be fixed by #1923
Open

fatal error: concurrent map read and map write - in internal/output.(*prefixWriter).writeLine #1922

tinmrn opened this issue Nov 18, 2024 · 0 comments · May be fixed by #1923
Labels
state: needs triage Waiting to be triaged by a maintainer.

Comments

@tinmrn
Copy link

tinmrn commented Nov 18, 2024

  • Task version: v3.40.0 (h1:1gKx+2UDz06Jtm0MBiN+EqVN87wWEyspuEze4LRGusk=)
  • Operating system: Linux 5.10.0-33-amd64 SMP Debian 5.10.226-1 (2024-10-03) x86_64 GNU/Linux
  • Experiments enabled: don't think so
fatal error: concurrent map read and map write

goroutine 67 [running]:
github.com/go-task/task/v3/internal/output.(*prefixWriter).writeLine(0xc0004ca1e0, {0xc0006054c8, 0x2})
	github.com/go-task/task/[email protected]/internal/output/prefixed.go:88 +0xc5
github.com/go-task/task/v3/internal/output.(*prefixWriter).writeOutputLines(0xc0004ca1e0, 0x0)
	github.com/go-task/task/[email protected]/internal/output/prefixed.go:58 +0x6b
github.com/go-task/task/v3/internal/output.(*prefixWriter).Write(0xc0004ca1e0, {0xc0006d8000?, 0x418b9f?, 0xc0002ee010?})
	github.com/go-task/task/[email protected]/internal/output/prefixed.go:47 +0x45
io.copyBuffer({0xef22a0, 0xc0004ca1e0}, {0xef1840, 0xc0002ee010}, {0x0, 0x0, 0x0})
	io/io.go:431 +0x1de

this taskfile reproduces it pretty consistently:

version: '3'

output: prefixed

tasks:

  do-all:
    deps:
      - task-1
      - task-2
      - task-3
      - task-4
      - task-5
      - task-6
      - task-7
      - task-8
      - task-9
      - task-10
      - task-11
      - task-12
      - task-13
      - task-14
      - task-15
      - task-16
      - task-17
      - task-18
      - task-19
      - task-20

  task-1:
    cmds:
      - yes

  task-2:
    cmds:
      - yes

  task-3:
    cmds:
      - yes

  task-4:
    cmds:
      - yes

  task-5:
    cmds:
      - yes

  task-6:
    cmds:
      - yes

  task-7:
    cmds:
      - yes

  task-8:
    cmds:
      - yes

  task-9:
    cmds:
      - yes

  task-10:
    cmds:
      - yes

  task-11:
    cmds:
      - yes

  task-12:
    cmds:
      - yes

  task-13:
    cmds:
      - yes

  task-14:
    cmds:
      - yes

  task-15:
    cmds:
      - yes

  task-16:
    cmds:
      - yes

  task-17:
    cmds:
      - yes

  task-18:
    cmds:
      - yes

  task-19:
    cmds:
      - yes

  task-20:
    cmds:
      - yes

when run like so:

task do-all > /dev/null

^ The dev/null redirect gives a higher chance of triggering the concurrency conflict, i think because it allows for higher throughput than outputting to a terminal. But this bug occurs in our CI every now and then, too.

i also attach a bunch of error outputs just in case:

err-1.txt
err-2.txt
err-3.txt
err-4.txt
err-5.txt
err-6.txt
err-7.txt
err-8.txt
err-9.txt

@task-bot task-bot added the state: needs triage Waiting to be triaged by a maintainer. label Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state: needs triage Waiting to be triaged by a maintainer.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants