Skip to content
Snippets Groups Projects
  • Anis Elleuch's avatar
    48322ca2
    console: Protect access to theme map (#8) · 48322ca2
    Anis Elleuch authored
    To fix the following crash:
    
    ```
    fatal error: concurrent map read and map write
    
    goroutine 98 [running]:
    runtime.throw({0x4b8b456, 0x1e})
    	runtime/panic.go:1198 +0x71 fp=0xc000113db0 sp=0xc000113d80
    pc=0x4039871
    runtime.mapaccess2_faststr(0x10, 0xc00006db00, {0x4b66bed, 0x5})
    	runtime/map_faststr.go:116 +0x3d4 fp=0xc000113e18
    sp=0xc000113db0 pc=0x4016d54
    github.com/minio/pkg/console.glob..func17({0x4b66bed, 0x5}, {0x49f7dc0,
    0xc00052a2c0})
    	github.com/minio/pkg@v1.0.10/console/console.go:129 +0xad
    fp=0xc000113e78 sp=0xc000113e18 pc=0x412566d
    github.com/minio/mc/cmd.greenText({0xc0002091b8, 0x11})
    	github.com/minio/mc/cmd/admin-subnet-health.go:162 +0x8b
    fp=0xc000113eb0 sp=0xc000113e78 pc=0x489818b
    github.com/minio/mc/cmd.fetchServerHealthInfo.func1.1({0x4b6fe33, 0xd},
    {0x4cc7fe8, 0x1}, 0x0)
    	github.com/minio/mc/cmd/admin-subnet-health.go:380 +0xb9
    fp=0xc000113f70 sp=0xc000113eb0 pc=0x4950059
    github.com/minio/mc/cmd.fetchServerHealthInfo.func1.3()
    	github.com/minio/mc/cmd/admin-subnet-health.go:403 +0xb8
    fp=0xc000113fe0 sp=0xc000113f70 pc=0x489b398
    runtime.goexit()
    	runtime/asm_amd64.s:1581 +0x1 fp=0xc000113fe8 sp=0xc000113fe0
    pc=0x406d261
    created by github.com/minio/mc/cmd.fetchServerHealthInfo.func1
    	github.com/minio/mc/cmd/admin-subnet-health.go:394 +0x1bd
    
    ```
    48322ca2
    History
    console: Protect access to theme map (#8)
    Anis Elleuch authored
    To fix the following crash:
    
    ```
    fatal error: concurrent map read and map write
    
    goroutine 98 [running]:
    runtime.throw({0x4b8b456, 0x1e})
    	runtime/panic.go:1198 +0x71 fp=0xc000113db0 sp=0xc000113d80
    pc=0x4039871
    runtime.mapaccess2_faststr(0x10, 0xc00006db00, {0x4b66bed, 0x5})
    	runtime/map_faststr.go:116 +0x3d4 fp=0xc000113e18
    sp=0xc000113db0 pc=0x4016d54
    github.com/minio/pkg/console.glob..func17({0x4b66bed, 0x5}, {0x49f7dc0,
    0xc00052a2c0})
    	github.com/minio/pkg@v1.0.10/console/console.go:129 +0xad
    fp=0xc000113e78 sp=0xc000113e18 pc=0x412566d
    github.com/minio/mc/cmd.greenText({0xc0002091b8, 0x11})
    	github.com/minio/mc/cmd/admin-subnet-health.go:162 +0x8b
    fp=0xc000113eb0 sp=0xc000113e78 pc=0x489818b
    github.com/minio/mc/cmd.fetchServerHealthInfo.func1.1({0x4b6fe33, 0xd},
    {0x4cc7fe8, 0x1}, 0x0)
    	github.com/minio/mc/cmd/admin-subnet-health.go:380 +0xb9
    fp=0xc000113f70 sp=0xc000113eb0 pc=0x4950059
    github.com/minio/mc/cmd.fetchServerHealthInfo.func1.3()
    	github.com/minio/mc/cmd/admin-subnet-health.go:403 +0xb8
    fp=0xc000113fe0 sp=0xc000113f70 pc=0x489b398
    runtime.goexit()
    	runtime/asm_amd64.s:1581 +0x1 fp=0xc000113fe8 sp=0xc000113fe0
    pc=0x406d261
    created by github.com/minio/mc/cmd.fetchServerHealthInfo.func1
    	github.com/minio/mc/cmd/admin-subnet-health.go:394 +0x1bd
    
    ```