You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "daluntw (via GitHub)" <gi...@apache.org> on 2023/09/25 20:05:06 UTC
[GitHub] [pulsar-client-go] daluntw opened a new issue, #1098: [BUG] Panic when using 'DisableBatching: true' as producer option
daluntw opened a new issue, #1098:
URL: https://github.com/apache/pulsar-client-go/issues/1098
#### Expected behavior
no panic when using `DisableBatching: true` as producer option.
#### Actual behavior
```
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x40 pc=0x8a8eaa]
goroutine 1 [running]:
github.com/apache/pulsar-client-go/pulsar.(*partitionProducer).internalFlushCurrentBatch(0xc00c6ccc60)
/go/pkg/mod/github.com/apache/pulsar-client-go@v0.11.0/pulsar/producer_partition.go:869 +0x2a
github.com/apache/pulsar-client-go/pulsar.(*partitionProducer).runEventsLoop(0xc00c6ccc60)
/go/pkg/mod/github.com/apache/pulsar-client-go@v0.11.0/pulsar/producer_partition.go:457 +0x1d7
created by github.com/apache/pulsar-client-go/pulsar.newPartitionProducer in goroutine 5713
/go/pkg/mod/github.com/apache/pulsar-client-go@v0.11.0/pulsar/producer_partition.go:203 +0x9bb
```
when the producer option set to `DisableBatching: true`, the `time.ticker` wil be created and close after a while, when `ticker.Stop()` over 10ms (default value) since created it will cause the ticker still tick, and cause nil pointer dereference eventually.
https://github.com/apache/pulsar-client-go/blob/64c47537311d59a60f8d6463b2ba91a68065354e/pulsar/producer_partition.go#L156-L169
https://github.com/apache/pulsar-client-go/blob/64c47537311d59a60f8d6463b2ba91a68065354e/pulsar/producer_partition.go#L456-L458
#### Steps to reproduce
make application high load, it will randomly show up
#### System configuration
**Pulsar version**: 3.1.0
**pulsar-client-go version**: 0.11.0
--
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.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar-client-go] daluntw commented on issue #1098: [BUG] Panic when using 'DisableBatching: true' as producer option
Posted by "daluntw (via GitHub)" <gi...@apache.org>.
daluntw commented on issue #1098:
URL: https://github.com/apache/pulsar-client-go/issues/1098#issuecomment-1734457698
as workaround, I set the producer option `BatchingMaxPublishDelay: time.Hour`
thus, the timer should not be tick before `ticker.Stop()`
--
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
Re: [I] [BUG] Panic when using 'DisableBatching: true' as producer option [pulsar-client-go]
Posted by "nicoloboschi (via GitHub)" <gi...@apache.org>.
nicoloboschi closed issue #1098: [BUG] Panic when using 'DisableBatching: true' as producer option
URL: https://github.com/apache/pulsar-client-go/issues/1098
--
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