搜索卡住的請(qǐng)求方法名,果真搜到一些,goroutine 17002 [semacquire, 5 minutes]:表示17002這個(gè)goroutine正在等待獲取鎖,等了5分鐘了。
閱讀SetDataNodeCarry附近的代碼,有一個(gè)for availCarryCount needSelectedNum {},之前沒仔細(xì)看,這里竟然可能是一個(gè)死循環(huán),分析了一下環(huán)境的變化,果然是因?yàn)榄h(huán)境不同了,導(dǎo)致這里的循環(huán)無法跳出。
goroutine 13994 [runnable]:
sync.(*Mutex).Lock(0xc002300468)
/usr/local/go/src/sync/mutex.go:72 +0x2c9
sync.(*RWMutex).Lock(0xc002300468)
/usr/local/go/src/sync/rwmutex.go:93 +0x2d
[go文件路徑]m.(*Pod).SetDataNodeCarry(0xc0023003f0, 0x4024000000000000)
/go/src/[go文件路徑]m/t.go:774 +0x36
[go文件路徑]m.pts.ptsn(0xc003b17810, 0x2, 0x2, 0x0, 0x3)
/go/src/[go文件路徑]m/t.go:1059 +0x60
[go文件路徑]m.(*t).ctcpd(0xc0000ef090, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x6, 0xc002275958, ...)
/go/src/[go文件路徑]m/t.go:453 +0x83e
[go文件路徑]m.(*c).cDP(0xc00223c000, 0xc00286e673, 0xe, 0xc00286e65f, 0x6, 0x0, 0x0, 0x0)
/go/src/[go文件路徑]m/c.go:558 +0x1e8
[go文件路徑]m.(*m).cDP(0xc0009aca90, 0xabfd80, 0xc0031a1260, 0xc00296be00)
/go/src/[go文件路徑]m/handle_admin.go:353 +0x376
[go文件路徑]m.(*m).ServeHTTP(0xc0009aca90, 0xabfd80, 0xc0031a1260, 0xc00296be00)
/go/src/[go文件路徑]m/http_server.go:188 +0x165a
[go文件路徑]m.(*m).handlerWithInterceptor.func1(0xabfd80, 0xc0031a1260, 0xc00296be00)
/go/src/[go文件路徑]m/http_server.go:160 +0x82
net/http.HandlerFunc.ServeHTTP(0xc000990300, 0xabfd80, 0xc0031a1260, 0xc00296be00)
/usr/local/go/src/net/http/server.go:1995 +0x44
net/http.(*ServeMux).ServeHTTP(0x10a3520, 0xabfd80, 0xc0031a1260, 0xc00296be00)
/usr/local/go/src/net/http/server.go:2375 +0x1d6
net/http.serverHandler.ServeHTTP(0xc0000dad00, 0xabfd80, 0xc0031a1260, 0xc00296be00)
/usr/local/go/src/net/http/server.go:2774 +0xa8
net/http.(*conn).serve(0xc003b19860, 0xac1d80, 0xc0009a9e40)
/usr/local/go/src/net/http/server.go:1878 +0x851
created by net/http.(*Server).Serve
/usr/local/go/src/net/http/server.go:2884 +0x2f4
goroutine 17002 [semacquire, 5 minutes]:
sync.runtime_SemacquireMutex(0xc0026fc460, 0x419400)
/usr/local/go/src/runtime/sema.go:71 +0x3d
sync.(*Mutex).Lock(0xc0026fc45c)
/usr/local/go/src/sync/mutex.go:134 +0x109
[go文件路徑]m.(*c).cDP(0xc00223c000, 0xc00002a083, 0xe, 0xc00002a06f, 0x6, 0x0, 0x0, 0x0)
/go/src/[go文件路徑]m/c.go:554 +0x13d
[go文件路徑]m.(*m).cDP(0xc0009aca90, 0xabfd80, 0xc0031a0620, 0xc002988900)
/go/src/[go文件路徑]m/handle_admin.go:353 +0x376
[go文件路徑]m.(*m).ServeHTTP(0xc0009aca90, 0xabfd80, 0xc0031a0620, 0xc002988900)
/go/src/[go文件路徑]m/http_server.go:188 +0x165a
[go文件路徑]m.(*m).handlerWithInterceptor.func1(0xabfd80, 0xc0031a0620, 0xc002988900)
/go/src/[go文件路徑]m/http_server.go:160 +0x82
net/http.HandlerFunc.ServeHTTP(0xc000990300, 0xabfd80, 0xc0031a0620, 0xc002988900)
/usr/local/go/src/net/http/server.go:1995 +0x44
net/http.(*ServeMux).ServeHTTP(0x10a3520, 0xabfd80, 0xc0031a0620, 0xc002988900)
/usr/local/go/src/net/http/server.go:2375 +0x1d6
net/http.serverHandler.ServeHTTP(0xc0000dad00, 0xabfd80, 0xc0031a0620, 0xc002988900)
/usr/local/go/src/net/http/server.go:2774 +0xa8
net/http.(*conn).serve(0xc003b18640, 0xac1d80, 0xc00298e940)
/usr/local/go/src/net/http/server.go:1878 +0x851
created by net/http.(*Server).Serve
/usr/local/go/src/net/http/server.go:2884 +0x2f4
goroutine 14532 [semacquire, 11 minutes]:
sync.runtime_SemacquireMutex(0xc0026fc460, 0x419400)
/usr/local/go/src/runtime/sema.go:71 +0x3d
sync.(*Mutex).Lock(0xc0026fc45c)
/usr/local/go/src/sync/mutex.go:134 +0x109
[go文件路徑]m.(*c).cDP(0xc00223c000, 0xc003f74303, 0xe, 0xc003f742ef, 0x6, 0x0, 0x0, 0x0)
/go/src/[go文件路徑]m/c.go:554 +0x13d
[go文件路徑]m.(*m).cDP(0xc0009aca90, 0xabfd80, 0xc00454a620, 0xc004544800)
/go/src/[go文件路徑]m/handle_admin.go:353 +0x376
[go文件路徑]m.(*m).ServeHTTP(0xc0009aca90, 0xabfd80, 0xc00454a620, 0xc004544800)
/go/src/[go文件路徑]m/http_server.go:188 +0x165a
[go文件路徑]m.(*m).handlerWithInterceptor.func1(0xabfd80, 0xc00454a620, 0xc004544800)
/go/src/[go文件路徑]m/http_server.go:160 +0x82
net/http.HandlerFunc.ServeHTTP(0xc000990300, 0xabfd80, 0xc00454a620, 0xc004544800)
/usr/local/go/src/net/http/server.go:1995 +0x44
net/http.(*ServeMux).ServeHTTP(0x10a3520, 0xabfd80, 0xc00454a620, 0xc004544800)
/usr/local/go/src/net/http/server.go:2375 +0x1d6
net/http.serverHandler.ServeHTTP(0xc0000dad00, 0xabfd80, 0xc00454a620, 0xc004544800)
/usr/local/go/src/net/http/server.go:2774 +0xa8
net/http.(*conn).serve(0xc002e17540, 0xac1d80, 0xc002a74780)
/usr/local/go/src/net/http/server.go:1878 +0x851
created by net/http.(*Server).Serve
/usr/local/go/src/net/http/server.go:2884 +0x2f4
到此這篇關(guān)于goland等待鎖問題的文章就介紹到這了,更多相關(guān)goland等待鎖內(nèi)容請(qǐng)搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!