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

fatal error: concurrent map writes #154

Open
kotakanbe opened this issue Sep 14, 2021 · 1 comment
Open

fatal error: concurrent map writes #154

kotakanbe opened this issue Sep 14, 2021 · 1 comment
Labels

Comments

@kotakanbe
Copy link
Collaborator

What did you do? (required. The issue will be closed when not provided.)

$ goval-dictionary v0.4.0 047e4db
$ make diff-server-rdb

INFO[09-14|09:13:14] start server mode test(mode: cveid, os: amazon, arch: , release: ['1', '2'])
INFO[09-14|09:13:14] check the communication with the server
INFO[09-14|09:13:14] communication with the server has been confirmed
fatal error: concurrent map writes

goroutine 4457 [running]:
runtime.throw({0xd8337a, 0x10})
        /usr/local/go/src/runtime/panic.go:1198 +0x71 fp=0xc0000bd1d0 sp=0xc0000bd1a0 pc=0x442651
runtime.mapassign_faststr(0xcaf300, 0xc0002351a0, {0xd79879, 0x6})
        /usr/local/go/src/runtime/map_faststr.go:294 +0x38b fp=0xc0000bd238 sp=0xc0000bd1d0 pc=0x421aab
github.com/kotakanbe/goval-dictionary/db/rdb.(*Driver).NewOvalDB(0xc00071baf0, {0xc00003e72a, 0x786e42})
        /home/ubuntu/go/src/github.com/kotakanbe/goval-dictionary/db/rdb/rdb.go:103 +0x274 fp=0xc0000bd300 sp=0xc0000bd238 pc=0x9e1a14
github.com/kotakanbe/goval-dictionary/db/rdb.NewRDB({0xc00003e72a, 0x6}, {0xd7a782, 0x7}, {0x7ffd5bd89db2, 0x56}, 0xa0)
        /home/ubuntu/go/src/github.com/kotakanbe/goval-dictionary/db/rdb/rdb.go:55 +0xd9 fp=0xc0000bd3a0 sp=0xc0000bd300 pc=0x9e1539
github.com/kotakanbe/goval-dictionary/db.NewDB({0xc00003e72a, 0xd7b950}, {0xd7a782, 0x4}, {0x7ffd5bd89db2, 0x8}, 0x8)
        /home/ubuntu/go/src/github.com/kotakanbe/goval-dictionary/db/db.go:32 +0xa5 fp=0xc0000bd3f8 sp=0xc0000bd3a0 pc=0xae6785
github.com/kotakanbe/goval-dictionary/server.getByCveID.func1({0xea3e70, 0xc0001c8fa0})
        /home/ubuntu/go/src/github.com/kotakanbe/goval-dictionary/server/server.go:120 +0x334 fp=0xc0000bd6b0 sp=0xc0000bd3f8 pc=0xb6c834
github.com/labstack/echo/v4.(*Echo).add.func1({0xea3e70, 0xc0001c8fa0})
        /home/ubuntu/go/pkg/mod/github.com/labstack/echo/v4@v4.1.17/echo.go:522 +0x51 fp=0xc0000bd6e0 sp=0xc0000bd6b0 pc=0xb5cbf1
github.com/labstack/echo/v4/middleware.LoggerWithConfig.func2.1({0xea3e70, 0xc0001c8fa0})
        /home/ubuntu/go/pkg/mod/github.com/labstack/echo/v4@v4.1.17/middleware/logger.go:117 +0xe2 fp=0xc0000bd860 sp=0xc0000bd6e0 pc=0xb690a2
github.com/labstack/echo/v4/middleware.RecoverWithConfig.func1.1({0xea3e70, 0xc0001c8fa0})
        /home/ubuntu/go/pkg/mod/github.com/labstack/echo/v4@v4.1.17/middleware/recover.go:98 +0xfc fp=0xc0000bd8e0 sp=0xc0000bd860 pc=0xb6a6fc
github.com/labstack/echo/v4/middleware.LoggerWithConfig.func2.1({0xea3e70, 0xc0001c8fa0})
        /home/ubuntu/go/pkg/mod/github.com/labstack/echo/v4@v4.1.17/middleware/logger.go:117 +0xe2 fp=0xc0000bda60 sp=0xc0000bd8e0 pc=0xb690a2
github.com/labstack/echo/v4.(*Echo).ServeHTTP(0xc000294000, {0xe83f80, 0xc00037a0e0}, 0xc000a90500)
        /home/ubuntu/go/pkg/mod/github.com/labstack/echo/v4@v4.1.17/echo.go:633 +0x3bc fp=0xc0000bdac0 sp=0xc0000bda60 pc=0xb5d9fc
net/http.serverHandler.ServeHTTP({0xc0003d6300}, {0xe83f80, 0xc00037a0e0}, 0xc000a90500)
        /usr/local/go/src/net/http/server.go:2878 +0x43b fp=0xc0000bdb80 sp=0xc0000bdac0 pc=0x71db5b
net/http.(*conn).serve(0xc0001f5180, {0xe88e20, 0xc00027d290})
        /usr/local/go/src/net/http/server.go:1929 +0xb08 fp=0xc0000bdfb8 sp=0xc0000bdb80 pc=0x7196c8
net/http.(*Server).Serve·dwrap·82()
        /usr/local/go/src/net/http/server.go:3033 +0x2e fp=0xc0000bdfe0 sp=0xc0000bdfb8 pc=0x71e4ae
runtime.goexit()
        /usr/local/go/src/runtime/asm_amd64.s:1581 +0x1 fp=0xc0000bdfe8 sp=0xc0000bdfe0 pc=0x4720c1
created by net/http.(*Server).Serve
        /usr/local/go/src/net/http/server.go:3033 +0x4e8
@kotakanbe kotakanbe added the bug label Sep 14, 2021
@tramora
Copy link
Contributor

tramora commented Mar 16, 2022

@kotakanbe : I used to face the same kind of problem and submitted a PR that you have merged : #135

By now the offending method "NewOvalDB" does not exist any longer in the current base code. I suppose concurrent writes on the ovalMap data structure occurred. As nor the method nor the data structure exist I guess you can close this issue.

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

No branches or pull requests

2 participants