blocking profile

69 views
Skip to first unread message

so...@ackl.io

unread,
Nov 15, 2018, 12:09:15 PM11/15/18
to golang-nuts
Hello,

I'm using four channles, and some TCP connections.
It works and one point my server does not get the data over tcp connections.rr
Still No fatal error or panic error

I tried here and there. Finally I did blocking profile. I show some data.

I run
$go tool pprof -svg main blockprofile.prof > out.svg

It shows 99.4% it is waiting for runtime.chanrecv1.

I dont know how to interpret those result?  What I have to do for detecting the casue for above problem?

Best regards
Sothy



Vladimir Varankin

unread,
Nov 16, 2018, 9:31:13 AM11/16/18
to golang-nuts
I believe, "runtime.chanrecv1" is the receiving part of a channel. From what you've described, it sounds like you have a dead-lock somewhere.

In your "out.svg" diagram check what functions are dominating around channel read and check if dead-lock is there.

sivasothy shanmugalingam

unread,
Nov 16, 2018, 9:33:55 AM11/16/18
to vlad...@varank.in, golan...@googlegroups.com
Thanks, I used one channel that is blocking. I found error and correct it

--
You received this message because you are subscribed to a topic in the Google Groups "golang-nuts" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/golang-nuts/WqGOTAH-7QA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to golang-nuts...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Robert Engels

unread,
Nov 16, 2018, 9:36:54 AM11/16/18
to sivasothy shanmugalingam, vlad...@varank.in, golan...@googlegroups.com
Just remember that changing from unbuffered to buffered to make something work may just be hiding the problem and it will surface again in other situations. 
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages