You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2021/05/06 09:58:05 UTC

[GitHub] [rocketmq-client-go] czah opened a new issue #651: [Master] Bug: concurrent map r/w in `roundRobinSelector` causes panic

czah opened a new issue #651:
URL: https://github.com/apache/rocketmq-client-go/issues/651


   1. Please describe the issue you observed:
   
       - What did you do (The steps to reproduce)?
       Run a producer and start producing messages.
   
       - What did you expect to see?
       Everything is working well.
   
       - What did you see instead?
       It panicked with a error message (as shown below):
   ```
   fatal error: concurrent map read and map write
   
   goroutine 4877278 [running]:
   runtime.throw(0xe50ffa, 0x21)
   	/usr/local/go/src/runtime/panic.go:774 +0x72 fp=0xc000be4b20 sp=0xc000be4af0 pc=0x431182
   runtime.mapaccess2_faststr(0xd0cea0, 0xc00031c810, 0xc0004b2f14, 0x5, 0x100000000000000, 0xd6cf00)
   	/usr/local/go/src/runtime/map_faststr.go:116 +0x48f fp=0xc000be4b90 sp=0xc000be4b20 pc=0x414c5f
   github.com/apache/rocketmq-client-go/v2/producer.(*roundRobinQueueSelector).Select(0xc0002b5700, 0xc0002663f0, 0xc001204400, 0x6, 0x8, 0x101)
   	/go/pkg/mod/github.com/apache/rocketmq-client-go/v2@v2.1.0-rc6/producer/selector.go:77 +0x5f fp=0xc000be4be8 sp=0xc000be4b90 pc=0xc2ae5f
   github.com/apache/rocketmq-client-go/v2/producer.(*defaultProducer).selectMessageQueue(0xc000234ea0, 0xc0002663f0, 0xc00146c1e0)
   	/go/pkg/mod/github.com/apache/rocketmq-client-go/v2@v2.1.0-rc6/producer/producer.go:396 +0x182 fp=0xc000be4c90 sp=0xc000be4be8 pc=0xc2a952
   ...
   ```
   
   It was caused by an unprotected read op on the map named `indexer` in `roundRobinSelector`.
   
   2. Please tell us about your environment:
   
       -  What is your OS?
       A Docker container based on CentOS 7.3 (host kernel version 4.9.2-3.0.0.std7b.el7.5.x86_64)
   
        - What is your client version?
        `v2.1.0-rc6`
   
        - What is your RocketMQ version?
       `v4.8`
   
   3. Other information (e.g. detailed explanation, logs, related issues, suggestions on how to fix, etc):
   


-- 
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.

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



[GitHub] [rocketmq-client-go] wenfengwang closed issue #651: [Master][Bug] concurrent map r/w in `roundRobinQueueSelector` causes panic

Posted by GitBox <gi...@apache.org>.
wenfengwang closed issue #651:
URL: https://github.com/apache/rocketmq-client-go/issues/651


   


-- 
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.

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