Skip to content

Revert "tests: try killing subprocesses harder if they misbehave" - #8196

Merged
sipsma merged 1 commit into
dagger:mainfrom
sipsma:revert-8191
Aug 21, 2024
Merged

sipsma merged 1 commit into
dagger:mainfrom
sipsma:revert-8191

Conversation

@sipsma

@sipsma sipsma commented Aug 21, 2024

Copy link
Copy Markdown
Contributor

#8191 may be causing a lot of failures on main and PRs based off main. Not 100% sure yet but they seem to have started with that PR being merged. Confirming by trying a revert here. Example failures:

  1. https://dagger.cloud/dagger/traces/3c464d3dda1f22988df596b9595e9952
  2. https://dagger.cloud/dagger/traces/05d1adca2d582b9fc1683daeefbf2f48

@sipsma
sipsma requested a review from jedevc August 21, 2024 00:29
@sipsma

sipsma commented Aug 21, 2024

Copy link
Copy Markdown
Contributor Author

@jedevc

jedevc commented Aug 21, 2024 •

Copy link
Copy Markdown
Contributor

Hm, okay, so those tests are all failing because of race detected during execution of test.

Now, what's weird is that the data races we're detecting are pretty incomprehensible:

https://dagger.cloud/dagger/traces/3c464d3dda1f22988df596b9595e9952?span=6d86f0abde6a299a&logs#6d86f0abde6a299a:L1718:

WARNING: DATA RACE
Read at 0x00c002eef703 by goroutine 57880:
  testing.(*common).logDepth()
      /usr/lib/go/src/testing/testing.go:1023 +0x504
  testing.(*common).log()
      /usr/lib/go/src/testing/testing.go:1010 +0xa4
  testing.(*common).Logf()
      /usr/lib/go/src/testing/testing.go:1061 +0x6a
  github.com/dagger/dagger/testctx.(*T).Logf()
      /app/testctx/testctx.go:182 +0x90
  github.com/dagger/dagger/core/integration.setupPrivateRepoSSHAgent.func1()
      /app/core/integration/ssh_helper.go:55 +0xe4
  github.com/dagger/dagger/core/integration.setupPrivateRepoSSHAgent.func2()
      /app/core/integration/ssh_helper.go:62 +0x202

Previous write at 0x00c002eef703 by goroutine 40731:
  testing.tRunner.func1()
      /usr/lib/go/src/testing/testing.go:1676 +0x8fa
  runtime.deferreturn()
      /usr/lib/go/src/runtime/panic.go:602 +0x5d
  testing.(*T).Run.gowrap1()
      /usr/lib/go/src/testing/testing.go:1742 +0x44

Goroutine 57880 (running) created at:
  github.com/dagger/dagger/core/integration.setupPrivateRepoSSHAgent()
      /app/core/integration/ssh_helper.go:58 +0x684
  github.com/dagger/dagger/core/integration.mountedPrivateRepoSocket()
      /app/core/integration/module_test.go:6927 +0x2f
  github.com/dagger/dagger/core/integration.ModuleSuite.TestConfigs.func2.2.3.1()
      /app/core/integration/module_config_test.go:220 +0x79
  github.com/dagger/dagger/core/integration.ModuleSuite.TestConfigs.func2.2.3.(*T).Run.2()
      /app/testctx/testctx.go:163 +0xfe
  testing.tRunner()
      /usr/lib/go/src/testing/testing.go:1689 +0x21e
  testing.(*T).Run.gowrap1()
      /usr/lib/go/src/testing/testing.go:1742 +0x44

Goroutine 40731 (finished) created at:
  testing.(*T).Run()
      /usr/lib/go/src/testing/testing.go:1742 +0x825
  github.com/dagger/dagger/testctx.(*T).Run()
      /app/testctx/testctx.go:158 +0x8d
  github.com/dagger/dagger/core/integration.testOnMultipleVCS()
      /app/core/integration/module_config_test.go:1495 +0x153
  github.com/dagger/dagger/core/integration.ModuleSuite.TestConfigs.func2.2()
      /app/core/integration/module_config_test.go:218 +0x3c4
  github.com/dagger/dagger/core/integration.ModuleSuite.TestConfigs.func2.(*T).Run.7()
      /app/testctx/testctx.go:163 +0xfe
  testing.tRunner()
      /usr/lib/go/src/testing/testing.go:1689 +0x21e
  testing.(*T).Run.gowrap1()
      /usr/lib/go/src/testing/testing.go:1742 +0x44

https://dagger.cloud/dagger/traces/05d1adca2d582b9fc1683daeefbf2f48?span=16af6492371e7816&logs#16af6492371e7816:L1693:

WARNING: DATA RACE
Write at 0x00c002b49eb0 by goroutine 25079:
  bufio.(*Reader).ReadRune()
      /usr/lib/go/src/bufio/bufio.go:306 +0x359
  github.com/Netflix/go-expect.(*Console).Expect()
      /go/pkg/mod/github.com/!netflix/[email protected]/expect.go:89 +0x978
  github.com/Netflix/go-expect.(*Console).ExpectEOF()
      /go/pkg/mod/github.com/!netflix/[email protected]/expect.go:41 +0x72
  github.com/dagger/dagger/core/integration.ModuleSuite.TestDaggerTerminal.func7.gowrap2()
      /app/core/integration/module_terminal_test.go:543 +0x17

Previous write at 0x00c002b49eb0 by goroutine 25080:
  bufio.(*Reader).ReadRune()
      /usr/lib/go/src/bufio/bufio.go:306 +0x359
  github.com/Netflix/go-expect.(*Console).Expect()
      /go/pkg/mod/github.com/!netflix/[email protected]/expect.go:89 +0x978
  github.com/Netflix/go-expect.(*Console).ExpectEOF()
      /go/pkg/mod/github.com/!netflix/[email protected]/expect.go:41 +0x72
  github.com/dagger/dagger/core/integration.ModuleSuite.TestDaggerTerminal.func7.gowrap3()
      /app/core/integration/module_terminal_test.go:554 +0x17

Goroutine 25079 (running) created at:
  github.com/dagger/dagger/core/integration.ModuleSuite.TestDaggerTerminal.func7()
      /app/core/integration/module_terminal_test.go:543 +0x8b3
  github.com/dagger/dagger/core/integration.ModuleSuite.TestDaggerTerminal.(*T).Run.func14()
      /app/testctx/testctx.go:163 +0xfe
  testing.tRunner()
      /usr/lib/go/src/testing/testing.go:1689 +0x21e
  testing.(*T).Run.gowrap1()
      /usr/lib/go/src/testing/testing.go:1742 +0x44

Goroutine 25080 (running) created at:
  github.com/dagger/dagger/core/integration.ModuleSuite.TestDaggerTerminal.func7()
      /app/core/integration/module_terminal_test.go:554 +0xaf3
  github.com/dagger/dagger/core/integration.ModuleSuite.TestDaggerTerminal.(*T).Run.func14()
      /app/testctx/testctx.go:163 +0xfe
  testing.tRunner()
      /usr/lib/go/src/testing/testing.go:1689 +0x21e
  testing.(*T).Run.gowrap1()
      /usr/lib/go/src/testing/testing.go:1742 +0x44

These data races don't make huge amounts of sense to me (e.g. module_terminal_test.go:554 is not a line in TestDaggerTerminal), I'm also really unsure as to how this specific patch could have caused this 🤔

@jedevc jedevc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving, but I'm struggling to understand what in the world is happening.

@sipsma
sipsma merged commit 21fcbaa into dagger:main Aug 21, 2024
@gerhard gerhard mentioned this pull request Aug 22, 2024
2 of 5 tasks
gerhard pushed a commit to TomChv/dagger that referenced this pull request Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants