Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Race condition #15

Open
Dexus opened this issue Dec 13, 2017 · 2 comments
Open

Race condition #15

Dexus opened this issue Dec 13, 2017 · 2 comments

Comments

@Dexus
Copy link

Dexus commented Dec 13, 2017

Can you give some tips to prevent this or fix it?

==================
WARNING: DATA RACE
Write at 0x00c4203ef8f0 by goroutine 62:
  runtime.mapassign_fast64()
      /usr/local/go/src/runtime/hashmap_fast.go:510 +0x0
  validator/vendor/github.com/gofly/go-xmlsec.startProcessingXML()
      /go/src/validator/vendor/github.com/gofly/go-xmlsec/error.go:65 +0x77
  validator/vendor/github.com/gofly/go-xmlsec.Verify()
      /go/src/validator/vendor/github.com/gofly/go-xmlsec/xmldsig.go:96 +0x51
  validator/modules/iap/windows.Verify()
      /go/src/validator/modules/iap/windows/verify.go:77 +0xd51
  validator/cmd/iap-api/routes.(*ApiController).PostVerifyByByBy()
      /go/src/validator/cmd/iap-api/routes/ApiController.go:176 +0x264a
  runtime.call64()
      /usr/local/go/src/runtime/asm_amd64.s:510 +0x3a
  reflect.Value.Call()
      /usr/local/go/src/reflect/value.go:302 +0xc0
  validator/vendor/github.com/kataras/iris/mvc/activator/methodfunc.buildMethodCall.func1()
      /go/src/validator/vendor/github.com/kataras/iris/mvc/activator/methodfunc/func_caller.go:17 +0x7e
  validator/vendor/github.com/kataras/iris/mvc/activator.TController.HandlerOf.func1()
      /go/src/validator/vendor/github.com/kataras/iris/mvc/activator/activator.go:154 +0x285
  validator/vendor/github.com/kataras/iris/context.Next()
      /go/src/validator/vendor/github.com/kataras/iris/context/context.go:819 +0x133
  validator/vendor/github.com/kataras/iris/context.(*context).Next()
      /go/src/validator/vendor/github.com/kataras/iris/context/context.go:1089 +0x44
  validator/vendor/github.com/kataras/iris/middleware/logger.(*requestLoggerMiddleware).ServeHTTP()
      /go/src/validator/vendor/github.com/kataras/iris/middleware/logger/logger.go:50 +0xbf
  validator/vendor/github.com/kataras/iris/middleware/logger.(*requestLoggerMiddleware).ServeHTTP-fm()
      /go/src/validator/vendor/github.com/kataras/iris/middleware/logger/logger.go:31 +0x55
  validator/vendor/github.com/kataras/iris/context.Next()
      /go/src/validator/vendor/github.com/kataras/iris/context/context.go:819 +0x133
  validator/vendor/github.com/kataras/iris/context.(*context).Next()
      /go/src/validator/vendor/github.com/kataras/iris/context/context.go:1089 +0x44
  validator/vendor/github.com/kataras/iris/middleware/recover.New.func1()
      /go/src/validator/vendor/github.com/kataras/iris/middleware/recover/recover.go:56 +0x75
  validator/vendor/github.com/kataras/iris/context.Do()
      /go/src/validator/vendor/github.com/kataras/iris/context/context.go:832 +0xa8
  validator/vendor/github.com/kataras/iris/context.(*context).Do()
      /go/src/validator/vendor/github.com/kataras/iris/context/context.go:985 +0x62
  validator/vendor/github.com/kataras/iris/core/router.(*routerHandler).HandleRequest()
      /go/src/validator/vendor/github.com/kataras/iris/core/router/handler.go:219 +0x6e8
  validator/vendor/github.com/kataras/iris/core/router.(*Router).BuildRouter.func1()
      /go/src/validator/vendor/github.com/kataras/iris/core/router/router.go:70 +0xc2
  validator/vendor/github.com/kataras/iris/core/router.(*Router).ServeHTTP()
      /go/src/validator/vendor/github.com/kataras/iris/core/router/router.go:147 +0x67
  net/http.serverHandler.ServeHTTP()
      /usr/local/go/src/net/http/server.go:2619 +0xbc
  net/http.(*conn).serve()
      /usr/local/go/src/net/http/server.go:1801 +0x83b

Previous write at 0x00c4203ef8f0 by goroutine 113:
  runtime.mapdelete_fast64()
      /usr/local/go/src/runtime/hashmap_fast.go:746 +0x0
  validator/vendor/github.com/gofly/go-xmlsec.stopProcessingXML()
      /go/src/validator/vendor/github.com/gofly/go-xmlsec/error.go:72 +0x6e
  validator/vendor/github.com/gofly/go-xmlsec.Verify()
      /go/src/validator/vendor/github.com/gofly/go-xmlsec/xmldsig.go:156 +0x36a
  validator/modules/iap/windows.Verify()
      /go/src/validator/modules/iap/windows/verify.go:77 +0xd51
  validator/cmd/iap-api/routes.(*ApiController).PostVerifyByByBy()
      /go/src/validator/cmd/iap-api/routes/ApiController.go:176 +0x264a
  runtime.call64()
      /usr/local/go/src/runtime/asm_amd64.s:510 +0x3a
  reflect.Value.Call()
      /usr/local/go/src/reflect/value.go:302 +0xc0
  validator/vendor/github.com/kataras/iris/mvc/activator/methodfunc.buildMethodCall.func1()
      /go/src/validator/vendor/github.com/kataras/iris/mvc/activator/methodfunc/func_caller.go:17 +0x7e
  validator/vendor/github.com/kataras/iris/mvc/activator.TController.HandlerOf.func1()
      /go/src/validator/vendor/github.com/kataras/iris/mvc/activator/activator.go:154 +0x285
  validator/vendor/github.com/kataras/iris/context.Next()
      /go/src/validator/vendor/github.com/kataras/iris/context/context.go:819 +0x133
  validator/vendor/github.com/kataras/iris/context.(*context).Next()
      /go/src/validator/vendor/github.com/kataras/iris/context/context.go:1089 +0x44
  validator/vendor/github.com/kataras/iris/middleware/logger.(*requestLoggerMiddleware).ServeHTTP()
      /go/src/validator/vendor/github.com/kataras/iris/middleware/logger/logger.go:50 +0xbf
  validator/vendor/github.com/kataras/iris/middleware/logger.(*requestLoggerMiddleware).ServeHTTP-fm()
      /go/src/validator/vendor/github.com/kataras/iris/middleware/logger/logger.go:31 +0x55
  validator/vendor/github.com/kataras/iris/context.Next()
      /go/src/validator/vendor/github.com/kataras/iris/context/context.go:819 +0x133
  validator/vendor/github.com/kataras/iris/context.(*context).Next()
      /go/src/validator/vendor/github.com/kataras/iris/context/context.go:1089 +0x44
  validator/vendor/github.com/kataras/iris/middleware/recover.New.func1()
      /go/src/validator/vendor/github.com/kataras/iris/middleware/recover/recover.go:56 +0x75
  validator/vendor/github.com/kataras/iris/context.Do()
      /go/src/validator/vendor/github.com/kataras/iris/context/context.go:832 +0xa8
  validator/vendor/github.com/kataras/iris/context.(*context).Do()
      /go/src/validator/vendor/github.com/kataras/iris/context/context.go:985 +0x62
  validator/vendor/github.com/kataras/iris/core/router.(*routerHandler).HandleRequest()
      /go/src/validator/vendor/github.com/kataras/iris/core/router/handler.go:219 +0x6e8
  validator/vendor/github.com/kataras/iris/core/router.(*Router).BuildRouter.func1()
      /go/src/validator/vendor/github.com/kataras/iris/core/router/router.go:70 +0xc2
  validator/vendor/github.com/kataras/iris/core/router.(*Router).ServeHTTP()
      /go/src/validator/vendor/github.com/kataras/iris/core/router/router.go:147 +0x67
  net/http.serverHandler.ServeHTTP()
      /usr/local/go/src/net/http/server.go:2619 +0xbc
  net/http.(*conn).serve()
      /usr/local/go/src/net/http/server.go:1801 +0x83b

Goroutine 62 (running) created at:
  net/http.(*Server).Serve()
      /usr/local/go/src/net/http/server.go:2720 +0x37c
  validator/vendor/github.com/kataras/iris/core/host.(*Supervisor).Serve.func1()
      /go/src/validator/vendor/github.com/kataras/iris/core/host/supervisor.go:221 +0x84
  validator/vendor/github.com/kataras/iris/core/host.(*Supervisor).supervise()
      /go/src/validator/vendor/github.com/kataras/iris/core/host/supervisor.go:193 +0x4b
  validator/vendor/github.com/kataras/iris/core/host.(*Supervisor).Serve()
      /go/src/validator/vendor/github.com/kataras/iris/core/host/supervisor.go:221 +0xbe
  validator/vendor/github.com/kataras/iris.Listener.func1()
      /go/src/validator/vendor/github.com/kataras/iris/iris.go:482 +0x230
  validator/vendor/github.com/kataras/iris.(*Application).Run()
      /go/src/validator/vendor/github.com/kataras/iris/iris.go:687 +0x1f2
  validator/cmd/iap-api/routes.StartApplication()
      /go/src/validator/cmd/iap-api/routes/routes.go:84 +0x62e
  main.main()
      /go/src/validator/cmd/iap-api/main.go:8 +0x2f

Goroutine 113 (finished) created at:
  net/http.(*Server).Serve()
      /usr/local/go/src/net/http/server.go:2720 +0x37c
  validator/vendor/github.com/kataras/iris/core/host.(*Supervisor).Serve.func1()
      /go/src/validator/vendor/github.com/kataras/iris/core/host/supervisor.go:221 +0x84
  validator/vendor/github.com/kataras/iris/core/host.(*Supervisor).supervise()
      /go/src/validator/vendor/github.com/kataras/iris/core/host/supervisor.go:193 +0x4b
  validator/vendor/github.com/kataras/iris/core/host.(*Supervisor).Serve()
      /go/src/validator/vendor/github.com/kataras/iris/core/host/supervisor.go:221 +0xbe
  validator/vendor/github.com/kataras/iris.Listener.func1()
      /go/src/validator/vendor/github.com/kataras/iris/iris.go:482 +0x230
  validator/vendor/github.com/kataras/iris.(*Application).Run()
      /go/src/validator/vendor/github.com/kataras/iris/iris.go:687 +0x1f2
  validator/cmd/iap-api/routes.StartApplication()
      /go/src/validator/cmd/iap-api/routes/routes.go:84 +0x62e
  main.main()
      /go/src/validator/cmd/iap-api/main.go:8 +0x2f
==================
==================
WARNING: DATA RACE
Write at 0x00c423bd2048 by goroutine 62:
  validator/vendor/github.com/gofly/go-xmlsec.startProcessingXML()
      /go/src/validator/vendor/github.com/gofly/go-xmlsec/error.go:65 +0xac
  validator/vendor/github.com/gofly/go-xmlsec.Verify()
      /go/src/validator/vendor/github.com/gofly/go-xmlsec/xmldsig.go:96 +0x51
  validator/modules/iap/windows.Verify()
      /go/src/validator/modules/iap/windows/verify.go:77 +0xd51
  validator/cmd/iap-api/routes.(*ApiController).PostVerifyByByBy()
      /go/src/validator/cmd/iap-api/routes/ApiController.go:176 +0x264a
  runtime.call64()
      /usr/local/go/src/runtime/asm_amd64.s:510 +0x3a
  reflect.Value.Call()
      /usr/local/go/src/reflect/value.go:302 +0xc0
  validator/vendor/github.com/kataras/iris/mvc/activator/methodfunc.buildMethodCall.func1()
      /go/src/validator/vendor/github.com/kataras/iris/mvc/activator/methodfunc/func_caller.go:17 +0x7e
  validator/vendor/github.com/kataras/iris/mvc/activator.TController.HandlerOf.func1()
      /go/src/validator/vendor/github.com/kataras/iris/mvc/activator/activator.go:154 +0x285
  validator/vendor/github.com/kataras/iris/context.Next()
      /go/src/validator/vendor/github.com/kataras/iris/context/context.go:819 +0x133
  validator/vendor/github.com/kataras/iris/context.(*context).Next()
      /go/src/validator/vendor/github.com/kataras/iris/context/context.go:1089 +0x44
  validator/vendor/github.com/kataras/iris/middleware/logger.(*requestLoggerMiddleware).ServeHTTP()
      /go/src/validator/vendor/github.com/kataras/iris/middleware/logger/logger.go:50 +0xbf
  validator/vendor/github.com/kataras/iris/middleware/logger.(*requestLoggerMiddleware).ServeHTTP-fm()
      /go/src/validator/vendor/github.com/kataras/iris/middleware/logger/logger.go:31 +0x55
  validator/vendor/github.com/kataras/iris/context.Next()
      /go/src/validator/vendor/github.com/kataras/iris/context/context.go:819 +0x133
  validator/vendor/github.com/kataras/iris/context.(*context).Next()
      /go/src/validator/vendor/github.com/kataras/iris/context/context.go:1089 +0x44
  validator/vendor/github.com/kataras/iris/middleware/recover.New.func1()
      /go/src/validator/vendor/github.com/kataras/iris/middleware/recover/recover.go:56 +0x75
  validator/vendor/github.com/kataras/iris/context.Do()
      /go/src/validator/vendor/github.com/kataras/iris/context/context.go:832 +0xa8
  validator/vendor/github.com/kataras/iris/context.(*context).Do()
      /go/src/validator/vendor/github.com/kataras/iris/context/context.go:985 +0x62
  validator/vendor/github.com/kataras/iris/core/router.(*routerHandler).HandleRequest()
      /go/src/validator/vendor/github.com/kataras/iris/core/router/handler.go:219 +0x6e8
  validator/vendor/github.com/kataras/iris/core/router.(*Router).BuildRouter.func1()
      /go/src/validator/vendor/github.com/kataras/iris/core/router/router.go:70 +0xc2
  validator/vendor/github.com/kataras/iris/core/router.(*Router).ServeHTTP()
      /go/src/validator/vendor/github.com/kataras/iris/core/router/router.go:147 +0x67
  net/http.serverHandler.ServeHTTP()
      /usr/local/go/src/net/http/server.go:2619 +0xbc
  net/http.(*conn).serve()
      /usr/local/go/src/net/http/server.go:1801 +0x83b

Previous write at 0x00c423bd2048 by goroutine 113:
  validator/vendor/github.com/gofly/go-xmlsec.startProcessingXML()
      /go/src/validator/vendor/github.com/gofly/go-xmlsec/error.go:65 +0xac
  validator/vendor/github.com/gofly/go-xmlsec.Verify()
      /go/src/validator/vendor/github.com/gofly/go-xmlsec/xmldsig.go:96 +0x51
  validator/modules/iap/windows.Verify()
      /go/src/validator/modules/iap/windows/verify.go:77 +0xd51
  validator/cmd/iap-api/routes.(*ApiController).PostVerifyByByBy()
      /go/src/validator/cmd/iap-api/routes/ApiController.go:176 +0x264a
  runtime.call64()
      /usr/local/go/src/runtime/asm_amd64.s:510 +0x3a
  reflect.Value.Call()
      /usr/local/go/src/reflect/value.go:302 +0xc0
  validator/vendor/github.com/kataras/iris/mvc/activator/methodfunc.buildMethodCall.func1()
      /go/src/validator/vendor/github.com/kataras/iris/mvc/activator/methodfunc/func_caller.go:17 +0x7e
  validator/vendor/github.com/kataras/iris/mvc/activator.TController.HandlerOf.func1()
      /go/src/validator/vendor/github.com/kataras/iris/mvc/activator/activator.go:154 +0x285
  validator/vendor/github.com/kataras/iris/context.Next()
      /go/src/validator/vendor/github.com/kataras/iris/context/context.go:819 +0x133
  validator/vendor/github.com/kataras/iris/context.(*context).Next()
      /go/src/validator/vendor/github.com/kataras/iris/context/context.go:1089 +0x44
  validator/vendor/github.com/kataras/iris/middleware/logger.(*requestLoggerMiddleware).ServeHTTP()
      /go/src/validator/vendor/github.com/kataras/iris/middleware/logger/logger.go:50 +0xbf
  validator/vendor/github.com/kataras/iris/middleware/logger.(*requestLoggerMiddleware).ServeHTTP-fm()
      /go/src/validator/vendor/github.com/kataras/iris/middleware/logger/logger.go:31 +0x55
  validator/vendor/github.com/kataras/iris/context.Next()
      /go/src/validator/vendor/github.com/kataras/iris/context/context.go:819 +0x133
  validator/vendor/github.com/kataras/iris/context.(*context).Next()
      /go/src/validator/vendor/github.com/kataras/iris/context/context.go:1089 +0x44
  validator/vendor/github.com/kataras/iris/middleware/recover.New.func1()
      /go/src/validator/vendor/github.com/kataras/iris/middleware/recover/recover.go:56 +0x75
  validator/vendor/github.com/kataras/iris/context.Do()
      /go/src/validator/vendor/github.com/kataras/iris/context/context.go:832 +0xa8
  validator/vendor/github.com/kataras/iris/context.(*context).Do()
      /go/src/validator/vendor/github.com/kataras/iris/context/context.go:985 +0x62
  validator/vendor/github.com/kataras/iris/core/router.(*routerHandler).HandleRequest()
      /go/src/validator/vendor/github.com/kataras/iris/core/router/handler.go:219 +0x6e8
  validator/vendor/github.com/kataras/iris/core/router.(*Router).BuildRouter.func1()
      /go/src/validator/vendor/github.com/kataras/iris/core/router/router.go:70 +0xc2
  validator/vendor/github.com/kataras/iris/core/router.(*Router).ServeHTTP()
      /go/src/validator/vendor/github.com/kataras/iris/core/router/router.go:147 +0x67
  net/http.serverHandler.ServeHTTP()
      /usr/local/go/src/net/http/server.go:2619 +0xbc
  net/http.(*conn).serve()
      /usr/local/go/src/net/http/server.go:1801 +0x83b

Goroutine 62 (running) created at:
  net/http.(*Server).Serve()
      /usr/local/go/src/net/http/server.go:2720 +0x37c
  validator/vendor/github.com/kataras/iris/core/host.(*Supervisor).Serve.func1()
      /go/src/validator/vendor/github.com/kataras/iris/core/host/supervisor.go:221 +0x84
  validator/vendor/github.com/kataras/iris/core/host.(*Supervisor).supervise()
      /go/src/validator/vendor/github.com/kataras/iris/core/host/supervisor.go:193 +0x4b
  validator/vendor/github.com/kataras/iris/core/host.(*Supervisor).Serve()
      /go/src/validator/vendor/github.com/kataras/iris/core/host/supervisor.go:221 +0xbe
  validator/vendor/github.com/kataras/iris.Listener.func1()
      /go/src/validator/vendor/github.com/kataras/iris/iris.go:482 +0x230
  validator/vendor/github.com/kataras/iris.(*Application).Run()
      /go/src/validator/vendor/github.com/kataras/iris/iris.go:687 +0x1f2
  validator/cmd/iap-api/routes.StartApplication()
      /go/src/validator/cmd/iap-api/routes/routes.go:84 +0x62e
  main.main()
      /go/src/validator/cmd/iap-api/main.go:8 +0x2f

Goroutine 113 (finished) created at:
  net/http.(*Server).Serve()
      /usr/local/go/src/net/http/server.go:2720 +0x37c
  validator/vendor/github.com/kataras/iris/core/host.(*Supervisor).Serve.func1()
      /go/src/validator/vendor/github.com/kataras/iris/core/host/supervisor.go:221 +0x84
  validator/vendor/github.com/kataras/iris/core/host.(*Supervisor).supervise()
      /go/src/validator/vendor/github.com/kataras/iris/core/host/supervisor.go:193 +0x4b
  validator/vendor/github.com/kataras/iris/core/host.(*Supervisor).Serve()
      /go/src/validator/vendor/github.com/kataras/iris/core/host/supervisor.go:221 +0xbe
  validator/vendor/github.com/kataras/iris.Listener.func1()
      /go/src/validator/vendor/github.com/kataras/iris/iris.go:482 +0x230
  validator/vendor/github.com/kataras/iris.(*Application).Run()
      /go/src/validator/vendor/github.com/kataras/iris/iris.go:687 +0x1f2
  validator/cmd/iap-api/routes.StartApplication()
      /go/src/validator/cmd/iap-api/routes/routes.go:84 +0x62e
  main.main()
      /go/src/validator/cmd/iap-api/main.go:8 +0x2f
==================
@Dexus
Copy link
Author

Dexus commented Dec 13, 2017

Ok looks like it match #7 :(

@savp-RP
Copy link

savp-RP commented Feb 20, 2020

Do we have any fix for this?

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

No branches or pull requests

2 participants