Skip to content

os/exec: TestWaitInterrupt failures with leaked without a call to Wait #57596

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

Closed
gopherbot opened this issue Jan 4, 2023 · 3 comments
Closed
Assignees
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. release-blocker Testing An issue that has been verified to require only test changes, not just a test failure.
Milestone

Comments

@gopherbot
Copy link
Contributor

gopherbot commented Jan 4, 2023

#!watchflakes
post <- pkg == "os/exec" && test == "TestWaitInterrupt" && `leaked without a call to Wait`

Issue created automatically to collect these failures.

Example (log):

--- FAIL: TestWaitInterrupt (0.01s)
    --- FAIL: TestWaitInterrupt/Exit-hang (0.33s)
        exec_test.go:1401: /home/gopher/build/tmp/go-build1563908597/b001/exec.test hang 1ms -subsleep=10m -probe=1ms
        exec_test.go:1403: stderr:
            30889: started 69095: /home/gopher/build/tmp/go-build1563908597/b001/exec.test hang 10m0s -read=true -probe=1ms
            69095: read 2022-12-27T18:17:46.964625019+11:00
            69095: read 2022-12-27T18:17:46.966334445+11:00
            69095: read 2022-12-27T18:17:46.967849073+11:00
            69095: read 2022-12-27T18:17:46.970397898+11:00
            69095: read 2022-12-27T18:17:46.979092698+11:00
...
            panic: exec: Cmd started a Process but leaked without a call to Wait

            goroutine 18 [running]:
            panic({0x2c3aa0, 0x4000098010})
            	/home/gopher/build/go/src/runtime/panic.go:987 +0x3ac fp=0x400004bd20 sp=0x400004bc60 pc=0x45b8c
            os/exec.Command.func1(0x40000ea580?)
            	/home/gopher/build/go/src/os/exec/exec.go:413 +0xf4 fp=0x400004bd60 sp=0x400004bd20 pc=0x1063b4
            runtime.call16(0x0, 0x360360, 0x400018c000, 0x10, 0x10, 0x10, 0x400004be40)
            	/home/gopher/build/go/src/runtime/asm_arm64.s:478 +0x78 fp=0x400004bd80 sp=0x400004bd60 pc=0x77908
            runtime.runfinq()
            	/home/gopher/build/go/src/runtime/mfinal.go:255 +0x408 fp=0x400004bfd0 sp=0x400004bd80 pc=0x284a8
            runtime.goexit()
            	/home/gopher/build/go/src/runtime/asm_arm64.s:1172 +0x4 fp=0x400004bfd0 sp=0x400004bfd0 pc=0x79a84
            created by runtime.createfing
            	/home/gopher/build/go/src/runtime/mfinal.go:163 +0x80

            goroutine 51 [running]:
            	goroutine running on other thread; stack unavailable
            created by runtime.gcBgMarkStartWorkers
            	/home/gopher/build/go/src/runtime/mgc.go:1199 +0x28

watchflakes

@gopherbot gopherbot added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Jan 4, 2023
@gopherbot
Copy link
Contributor Author

Found new dashboard test flakes for:

#!watchflakes
post <- pkg == "os/exec" && test == "TestWaitInterrupt"
2022-11-17 21:15 openbsd-arm64-jsing go@1f4394a0 os/exec.TestWaitInterrupt (log)
--- FAIL: TestWaitInterrupt (0.01s)
    --- FAIL: TestWaitInterrupt/Exit-hang (0.33s)
        exec_test.go:1401: /home/gopher/build/tmp/go-build1563908597/b001/exec.test hang 1ms -subsleep=10m -probe=1ms
        exec_test.go:1403: stderr:
            30889: started 69095: /home/gopher/build/tmp/go-build1563908597/b001/exec.test hang 10m0s -read=true -probe=1ms
            69095: read 2022-12-27T18:17:46.964625019+11:00
            69095: read 2022-12-27T18:17:46.966334445+11:00
            69095: read 2022-12-27T18:17:46.967849073+11:00
            69095: read 2022-12-27T18:17:46.970397898+11:00
            69095: read 2022-12-27T18:17:46.979092698+11:00
...
            panic: exec: Cmd started a Process but leaked without a call to Wait

            goroutine 18 [running]:
            panic({0x2c3aa0, 0x4000098010})
            	/home/gopher/build/go/src/runtime/panic.go:987 +0x3ac fp=0x400004bd20 sp=0x400004bc60 pc=0x45b8c
            os/exec.Command.func1(0x40000ea580?)
            	/home/gopher/build/go/src/os/exec/exec.go:413 +0xf4 fp=0x400004bd60 sp=0x400004bd20 pc=0x1063b4
            runtime.call16(0x0, 0x360360, 0x400018c000, 0x10, 0x10, 0x10, 0x400004be40)
            	/home/gopher/build/go/src/runtime/asm_arm64.s:478 +0x78 fp=0x400004bd80 sp=0x400004bd60 pc=0x77908
            runtime.runfinq()
            	/home/gopher/build/go/src/runtime/mfinal.go:255 +0x408 fp=0x400004bfd0 sp=0x400004bd80 pc=0x284a8
            runtime.goexit()
            	/home/gopher/build/go/src/runtime/asm_arm64.s:1172 +0x4 fp=0x400004bfd0 sp=0x400004bfd0 pc=0x79a84
            created by runtime.createfing
            	/home/gopher/build/go/src/runtime/mfinal.go:163 +0x80

            goroutine 51 [running]:
            	goroutine running on other thread; stack unavailable
            created by runtime.gcBgMarkStartWorkers
            	/home/gopher/build/go/src/runtime/mgc.go:1199 +0x28

watchflakes

@bcmills bcmills self-assigned this Jan 6, 2023
@bcmills bcmills changed the title os/exec: TestWaitInterrupt failures os/exec: TestWaitInterrupt failures with leaked without a call to Wait Jan 10, 2023
@bcmills bcmills added this to the Go1.20 milestone Jan 10, 2023
@bcmills bcmills added Testing An issue that has been verified to require only test changes, not just a test failure. NeedsFix The path to resolution is known, but the work has not been done. labels Jan 10, 2023
@gopherbot gopherbot removed the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Jan 10, 2023
@gopherbot
Copy link
Contributor Author

Change https://go.dev/cl/460998 mentions this issue: os/exec: avoid leaking an exec.Cmd in TestWaitInterrupt

@bcmills
Copy link
Contributor

bcmills commented Jan 10, 2023

Marking as release-blocker because this test is new in 1.20, the failure mode was easy to diagnose, and the fix is trivial.

@golang golang locked and limited conversation to collaborators Jan 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. release-blocker Testing An issue that has been verified to require only test changes, not just a test failure.
Projects
Archived in project
Development

No branches or pull requests

2 participants