In my go program, the execution is hung up because it is waiting for Lock(). Are there tools in go which I can use to find the exact line where it is getting deadlocked?
You can get a stack trace using pprof.
If you follow the example code in the package the url http://localhost:6060/debug/pprof/goroutine?debug=1 will give you a stack trace of every running goroutine.