d4x1 opened a new issue, #7839:
URL: https://github.com/apache/incubator-devlake/issues/7839

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/incubator-devlake/issues?q=is%3Aissue) and 
found no similar issues.
   
   
   ### What happened
   
   When I run `make godev`, sometimes this error will appear:
   ```
   fatal error: concurrent map writes
   
   goroutine 725 [running]:
   
github.com/apache/incubator-devlake/helpers/pluginhelper/api.(*DsRemoteApiProxyHelper[...]).getApiClient(0x327b55bc0,
 0x140016bea80?)
           
/Users/{my_username}/Code/go/src/github.com/apache/incubator-devlake/backend/helpers/pluginhelper/api/ds_remote_api_proxy_api.go:82
 +0x1d4
   
github.com/apache/incubator-devlake/helpers/pluginhelper/api.(*DsRemoteApiProxyHelper[...]).prepare(0x327b48160,
 0x14002db13d8)
           
/Users/{my_username}/Code/go/src/github.com/apache/incubator-devlake/backend/helpers/pluginhelper/api/ds_remote_api_proxy_api.go:57
 +0x50
   
github.com/apache/incubator-devlake/helpers/pluginhelper/api.(*DsRemoteApiProxyHelper[...]).Proxy(0x105667480?,
 0x140016ca4b0?)
           
/Users/{my_username}/Code/go/src/github.com/apache/incubator-devlake/backend/helpers/pluginhelper/api/ds_remote_api_proxy_api.go:91
 +0x3c
   github.com/apache/incubator-devlake/plugins/jira/api.Proxy(0x0?)
           
/Users/{my_username}/Code/go/src/github.com/apache/incubator-devlake/backend/plugins/jira/api/remote_api.go:161
 +0x38
   
github.com/apache/incubator-devlake/server/api.registerPluginEndpoints.handlePluginCall.func1(0x140011de100)
           
/Users/{my_username}/Code/go/src/github.com/apache/incubator-devlake/backend/server/api/router.go:141
 +0x284
   github.com/gin-gonic/gin.(*Context).Next(...)
           
/Users/{my_username}/Code/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174
   
github.com/apache/incubator-devlake/server/api.OAuth2ProxyAuthentication.func1(0x140011de100)
           
/Users/{my_username}/Code/go/src/github.com/apache/incubator-devlake/backend/server/api/middlewares.go:95
 +0x134
   github.com/gin-gonic/gin.(*Context).Next(...)
           
/Users/{my_username}/Code/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174
   
github.com/apache/incubator-devlake/server/api.RestAuthentication.func1(0x140011de100)
           
/Users/{my_username}/Code/go/src/github.com/apache/incubator-devlake/backend/server/api/middlewares.go:117
 +0x26c
   github.com/gin-gonic/gin.(*Context).Next(...)
           
/Users/{my_username}/Code/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174
   github.com/gin-gonic/gin.CustomRecoveryWithWriter.func1(0x140011de100)
           
/Users/{my_username}/Code/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/recovery.go:102
 +0x84
   github.com/gin-gonic/gin.(*Context).Next(...)
           
/Users/{my_username}/Code/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174
   github.com/gin-gonic/gin.LoggerWithConfig.func1(0x140011de100)
           
/Users/{my_username}/Code/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/logger.go:240
 +0xb4
   github.com/gin-gonic/gin.(*Context).Next(...)
           
/Users/{my_username}/Code/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174
   github.com/gin-gonic/gin.(*Engine).handleHTTPRequest(0x140011481a0, 
0x140011de100)
           
/Users/{my_username}/Code/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/gin.go:620 
+0x518
   github.com/gin-gonic/gin.(*Engine).ServeHTTP(0x140011481a0, {0x1058bc7c8, 
0x14001870620}, 0x140026c19e0)
           
/Users/{my_username}/Code/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/gin.go:576 
+0x174
   net/http.serverHandler.ServeHTTP({0x140016ca360?}, {0x1058bc7c8?, 
0x14001870620?}, 0x6?)
           /opt/homebrew/opt/go/libexec/src/net/http/server.go:3142 +0xbc
   net/http.(*conn).serve(0x14000f818c0, {0x1058c2238, 0x140015744e0})
           /opt/homebrew/opt/go/libexec/src/net/http/server.go:2044 +0x508
   created by net/http.(*Server).Serve in goroutine 1
           /opt/homebrew/opt/go/libexec/src/net/http/server.go:3290 +0x3f0
   
   goroutine 1 [IO wait]:
   internal/poll.runtime_pollWait(0x12da96af8, 0x72)
           /opt/homebrew/opt/go/libexec/src/runtime/netpoll.go:345 +0xa0
   internal/poll.(*pollDesc).wait(0x14001150d80?, 0x8?, 0x0)
           /opt/homebrew/opt/go/libexec/src/internal/poll/fd_poll_runtime.go:84 
+0x28
   internal/poll.(*pollDesc).waitRead(...)
           /opt/homebrew/opt/go/libexec/src/internal/poll/fd_poll_runtime.go:89
   internal/poll.(*FD).Accept(0x14001150d80)
           /opt/homebrew/opt/go/libexec/src/internal/poll/fd_unix.go:611 +0x250
   net.(*netFD).accept(0x14001150d80)
           /opt/homebrew/opt/go/libexec/src/net/fd_unix.go:172 +0x28
   net.(*TCPListener).accept(0x14000344ea0)
           /opt/homebrew/opt/go/libexec/src/net/tcpsock_posix.go:159 +0x28
   net.(*TCPListener).Accept(0x14000344ea0)
           /opt/homebrew/opt/go/libexec/src/net/tcpsock.go:327 +0x2c
   net/http.(*Server).Serve(0x140017b6870, {0x1058bd560, 0x14000344ea0})
           /opt/homebrew/opt/go/libexec/src/net/http/server.go:3260 +0x2a8
   net/http.(*Server).ListenAndServe(0x140017b6870)
           /opt/homebrew/opt/go/libexec/src/net/http/server.go:3189 +0x84
   net/http.ListenAndServe(...)
           /opt/homebrew/opt/go/libexec/src/net/http/server.go:3443
   github.com/gin-gonic/gin.(*Engine).Run(0x140011481a0, {0x14000f45ec8, 0x1, 
0x1})
           
/Users/{my_username}/Code/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/gin.go:386 
+0x1b0
   github.com/apache/incubator-devlake/server/api.RunApiServer(0x140011481a0)
           
/Users/{my_username}/Code/go/src/github.com/apache/incubator-devlake/backend/server/api/api.go:176
 +0xbc
   github.com/apache/incubator-devlake/server/api.CreateAndRunApiServer()
           
/Users/{my_username}/Code/go/src/github.com/apache/incubator-devlake/backend/server/api/api.go:74
 +0x78
   main.main()
           
/Users/{my_username}/Code/go/src/github.com/apache/incubator-devlake/backend/server/main.go:33
 +0x38
   
   ```
   
   ### What do you expect to happen
   
   run `make godev`, start backend service successfully.
   
   ### How to reproduce
   
   I cannot repoduce it today, but it does exist.
   
   ### Anything else
   
   _No response_
   
   ### Version
   
   main
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@devlake.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to