mirror of
https://github.com/zrepl/zrepl.git
synced 2024-11-24 17:35:01 +01:00
193abbe6b1
The goroutine that does endTask() for "list-abstractions-streamed-producer" can be preempted after it has closed the out and outErrs channel, but before it calls endTask(). If the parent ("handler") then gets scheduled and and ends itself, it will observe an active child task "list-abstractions-streamed-producer". This is easy to demo by injecting a sleep here: --- a/endpoint/endpoint_zfs_abstraction.go +++ b/endpoint/endpoint_zfs_abstraction.go @@ -575,6 +576,7 @@ func ListAbstractionsStreamed(ctx context.Context, query ListZFSHoldsAndBookmark ctx, endTask := trace.WithTask(ctx, "list-abstractions-streamed-producer") go func() { defer endTask() + defer time.Sleep(10 * time.Second) defer close(out) defer close(outErrs) fixes https://github.com/zrepl/zrepl/issues/607 |
||
---|---|---|
.. | ||
status | ||
configcheck.go | ||
jsonclient.go | ||
migrate_test.go | ||
migrate.go | ||
pprof_activity_trace.go | ||
pprof_listen.go | ||
pprof.go | ||
signal.go | ||
stdinserver.go | ||
testcmd.go | ||
version.go | ||
zfsabstractions_create_step_hold.go | ||
zfsabstractions_create.go | ||
zfsabstractions_list.go | ||
zfsabstractions_release.go | ||
zfsabstractions.go |