From d5ce5789292486aa06a353a04aeaefc3804b928e Mon Sep 17 00:00:00 2001 From: Christian Schwarz Date: Sun, 23 Aug 2020 19:54:48 +0200 Subject: [PATCH] [#358] platformtest: ReceiveForceIntoEncryptedErr: fix `trace` panic caused by dangling open zfs send process ``` panic: end task: 1 active child tasks: end task: task still has active child tasks goroutine 1 [running]: github.com/zrepl/zrepl/daemon/logging/trace.WithTask.func1.1(0xc000020680, 0xc000080f00) /home/cs/zrepl/zrepl/daemon/logging/trace/trace.go:221 +0x2f7 github.com/zrepl/zrepl/daemon/logging/trace.WithTask.func1() /home/cs/zrepl/zrepl/daemon/logging/trace/trace.go:237 +0x38 main.HarnessRun(0x7ffe0b49ad3a, 0x11, 0x7ffe0b49acf2, 0x1a, 0xc800000, 0x7ffe0b49ad19, 0x16, 0x1, 0x0, 0x0, ...) /home/cs/zrepl/zrepl/platformtest/harness/harness.go:168 +0xe54 main.main() /home/cs/zrepl/zrepl/platformtest/harness/harness.go:41 +0x2ef ``` fixes #358 --- platformtest/tests/recvForceIntoEncryptedErr.go | 1 + 1 file changed, 1 insertion(+) diff --git a/platformtest/tests/recvForceIntoEncryptedErr.go b/platformtest/tests/recvForceIntoEncryptedErr.go index b4ab7fb..f9d6fe0 100644 --- a/platformtest/tests/recvForceIntoEncryptedErr.go +++ b/platformtest/tests/recvForceIntoEncryptedErr.go @@ -32,6 +32,7 @@ func ReceiveForceIntoEncryptedErr(ctx *platformtest.Context) { sendStream, err := zfs.ZFSSend(ctx, sendArgs) require.NoError(ctx, err) + defer sendStream.Close() recvOpts := zfs.RecvOptions{ RollbackAndForceRecv: true,