You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/01/13 07:42:23 UTC

[GitHub] [pulsar-client-go] GPrabhudas opened a new issue #707: Race condition detected for producer/consumer when encryption is enabled

GPrabhudas opened a new issue #707:
URL: https://github.com/apache/pulsar-client-go/issues/707


   #### Expected behaviour
   
   Creation of producer/consumer on partitioned topic should not run into race condition.
   
   #### Actual behaviour
   For partitioned topic, creation of producer and consumer run into race condition when trying to set DefaultMessageCrypto if it is not provided in the options.
   
   #### Steps to reproduce
   add a test case https://github.com/GPrabhudas/pulsar-client-go/commit/039bbd0e6fec7452ecb90fd28a4165781631d68c
   
   Test case fails with below warnings
   ```
   ....pulsar-client-go/pulsar/testing.go:1093: race detected during execution of test
   --- FAIL: TestPartitionTopicsConsumerPubSubEncryption (1.06s)
   === CONT
       ....pulsar-client-go/pulsar/testing.go:1093: race detected during execution of test
   FAIL
   FAIL    github.com/apache/pulsar-client-go/pulsar       1.699s
   
   WARNING: DATA RACE
   Read at 0x00c0004ec130 by goroutine 294:
     github.com/apache/pulsar-client-go/pulsar.newPartitionConsumer()
         ....pulsar-client-go/pulsar/consumer_partition.go:189 +0x1490
     github.com/apache/pulsar-client-go/pulsar.(*consumer).internalTopicSubscribeToPartitions.func1()
         ....pulsar-client-go/pulsar/consumer_impl.go:348 +0x899
   
   Previous write at 0x00c0004ec130 by goroutine 50:
     github.com/apache/pulsar-client-go/pulsar.newPartitionConsumer()
         ....pulsar-client-go/pulsar/consumer_partition.go:194 +0x172d
     github.com/apache/pulsar-client-go/pulsar.(*consumer).internalTopicSubscribeToPartitions.func1()
         ....pulsar-client-go/pulsar/consumer_impl.go:348 +0x899
   
   Goroutine 294 (running) created at:
     github.com/apache/pulsar-client-go/pulsar.(*consumer).internalTopicSubscribeToPartitions()
         ....pulsar-client-go/pulsar/consumer_impl.go:317 +0x6b4
     github.com/apache/pulsar-client-go/pulsar.newInternalConsumer()
         ....pulsar-client-go/pulsar/consumer_impl.go:208 +0x548
     github.com/apache/pulsar-client-go/pulsar.newConsumer()
         ....pulsar-client-go/pulsar/consumer_impl.go:159 +0x764
     github.com/apache/pulsar-client-go/pulsar.(*client).Subscribe()
         ....pulsar-client-go/pulsar/client_impl.go:162 +0xb7
     github.com/apache/pulsar-client-go/pulsar.TestPartitionTopicsConsumerPubSubEncryption()
         ....pulsar-client-go/pulsar/consumer_test.go:416 +0xb16
     testing.tRunner()
         /usr/local/go/src/testing/testing.go:1194 +0x202
   
   Goroutine 50 (running) created at:
     github.com/apache/pulsar-client-go/pulsar.(*consumer).internalTopicSubscribeToPartitions()
         ....pulsar-client-go/pulsar/consumer_impl.go:317 +0x6b4
     github.com/apache/pulsar-client-go/pulsar.newInternalConsumer()
         ....pulsar-client-go/pulsar/consumer_impl.go:208 +0x548
     github.com/apache/pulsar-client-go/pulsar.newConsumer()
         ....pulsar-client-go/pulsar/consumer_impl.go:159 +0x764
     github.com/apache/pulsar-client-go/pulsar.(*client).Subscribe()
         ....pulsar-client-go/pulsar/client_impl.go:162 +0xb7
     github.com/apache/pulsar-client-go/pulsar.TestPartitionTopicsConsumerPubSubEncryption()
         ....pulsar-client-go/pulsar/consumer_test.go:416 +0xb16
     testing.tRunner()
         /usr/local/go/src/testing/testing.go:1194 +0x202
   ==================
   
   ```
   


-- 
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@pulsar.apache.org

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



[GitHub] [pulsar-client-go] wolfstudy commented on issue #707: Race condition detected for producer/consumer when encryption is enabled

Posted by GitBox <gi...@apache.org>.
wolfstudy commented on issue #707:
URL: https://github.com/apache/pulsar-client-go/issues/707#issuecomment-1014206845


   Close this issue


-- 
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@pulsar.apache.org

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



[GitHub] [pulsar-client-go] wolfstudy closed issue #707: Race condition detected for producer/consumer when encryption is enabled

Posted by GitBox <gi...@apache.org>.
wolfstudy closed issue #707:
URL: https://github.com/apache/pulsar-client-go/issues/707


   


-- 
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@pulsar.apache.org

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