You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "guyinyou (via GitHub)" <gi...@apache.org> on 2023/03/31 07:56:30 UTC

[GitHub] [rocketmq] guyinyou opened a new issue, #6518: multi-threaded bug using bytebuffer

guyinyou opened a new issue, #6518:
URL: https://github.com/apache/rocketmq/issues/6518

   The issue tracker is used for bug reporting purposes **ONLY** whereas feature request needs to follow the [RIP process](https://github.com/apache/rocketmq/wiki/RocketMQ-Improvement-Proposal). To avoid unnecessary duplication, please check whether there is a previous issue before filing a new one.
   
   It is recommended to start a discussion thread in the [mailing lists](http://rocketmq.apache.org/about/contact/) or [github discussions](https://github.com/apache/rocketmq/discussions) in cases of discussing your deployment plan, API clarification, and other non-bug-reporting issues.
   We welcome any friendly suggestions, bug fixes, collaboration, and other improvements.
   
   Please ensure that your bug report is clear and self-contained. Otherwise, it would take additional rounds of communication, thus more time, to understand the problem itself.
   
   Generally, fixing an issue goes through the following steps:
   1. Understand the issue reported;
   1. Reproduce the unexpected behavior locally;
   1. Perform root cause analysis to identify the underlying problem;
   1. Create test cases to cover the identified problem;
   1. Work out a solution to rectify the behavior and make the newly created test cases pass;
   1. Make a pull request and go through peer review;
   
   As a result, it would be very helpful yet challenging if you could provide an isolated project reproducing your reported issue. Anyway, please ensure your issue report is informative enough for the community to pick up. At a minimum, include the following hints:
   
   **BUG REPORT**
   
   1. Please describe the issue you observed:
   
   - What did you do (The steps to reproduce)?
   
   - What is expected to see?
   
   - What did you see instead?
   
   2. Please tell us about your environment:
   
   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.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org.apache.org

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


[GitHub] [rocketmq] RongtongJin closed issue #6518: multi-threaded bug using bytebuffer

Posted by "RongtongJin (via GitHub)" <gi...@apache.org>.
RongtongJin closed issue #6518: multi-threaded bug using bytebuffer
URL: https://github.com/apache/rocketmq/issues/6518


-- 
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: commits-unsubscribe@rocketmq.apache.org

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


[GitHub] [rocketmq] guyinyou commented on issue #6518: multi-threaded bug using bytebuffer

Posted by "guyinyou (via GitHub)" <gi...@apache.org>.
guyinyou commented on issue #6518:
URL: https://github.com/apache/rocketmq/issues/6518#issuecomment-1491500452

   It can be easily reproduced by the following demo
   ```
   ByteBuffer buffer = ByteBuffer.allocateDirect(1000000);
           buffer.position(1000000);
           buffer.flip();
   
           new Thread(()->{
               while (buffer.hasRemaining()){
                   int pos = buffer.position();
                   buffer.mark();
                   buffer.get();
                   buffer.reset();
   
                   buffer.position(pos + 4);
               }
               System.out.println("over");
               System.exit(0);
           }).start();
   
           new Thread(()->{
               while (true){
                   ByteBuffer tmp = buffer.duplicate();
                   if(tmp.position() == 0){
                       System.out.println(tmp);
                   }
               }
           }).start();
       }
   ```


-- 
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: commits-unsubscribe@rocketmq.apache.org

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


[GitHub] [rocketmq] guyinyou commented on issue #6518: multi-threaded bug using bytebuffer

Posted by "guyinyou (via GitHub)" <gi...@apache.org>.
guyinyou commented on issue #6518:
URL: https://github.com/apache/rocketmq/issues/6518#issuecomment-1491477735

   When testing after enabling the enableBuildConsumeQueueConcurrently switch, a java.lang.IllegalArgumentException: mark > position is occasionally triggered:
   
   The exception is thrown from the position shown in the figure below
   
   ![image](https://user-images.githubusercontent.com/36399867/229060286-5887920f-1618-4a3a-a96f-0d00d7945e24.png)
   


-- 
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: commits-unsubscribe@rocketmq.apache.org

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