Skip to content
This repository has been archived by the owner on Jul 21, 2021. It is now read-only.

Close is waiting indefinitely #211

Open
pvallem opened this issue May 20, 2019 · 1 comment
Open

Close is waiting indefinitely #211

pvallem opened this issue May 20, 2019 · 1 comment

Comments

@pvallem
Copy link

pvallem commented May 20, 2019

When Close is invoked, zk_client waits indefinitely on this line. Buffered channel(c.sendChan) is full and waiting to send a request over this channel.

(dlv) bt
0  0x000000000042ebac in runtime.gopark
   at golang/go-1.9.2/src/runtime/proc.go:288
1  0x000000000042ec9e in runtime.goparkunlock
   at golang/go-1.9.2/src/runtime/proc.go:293
2  0x000000000040568b in runtime.chansend
   at golang/go-1.9.2/src/runtime/chan.go:222
3  0x0000000000405413 in runtime.chansend1
   at golang/go-1.9.2/src/runtime/chan.go:113
4  0x000000000079dbaf in vendor/github.com/samuel/go-zookeeper/zk.(*Conn).Close
   at /<Internal Path>/vendor/github.com/samuel/go-zookeeper/zk/conn.go:945

Though this method

c.queueRequest(opClose, &closeRequest{}, &closeResponse{}, nil)

is in select call, for select to work it has to collect the channel before waiting on channel. In this case channel is never read and Close call is waiting indefinitely. Do we know why this might be happening? If it just a matter of honoring the timeout, can we please ensure, Close honors the timeout in https://github.com/samuel/go-zookeeper/blob/master/zk/conn.go#L317 ?

@deckarep
Copy link

Also seem to be affected by this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants