Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

access violation when message send to wrong partition #216

Open
yakovale-flutterint opened this issue Aug 2, 2023 · 2 comments
Open

access violation when message send to wrong partition #216

yakovale-flutterint opened this issue Aug 2, 2023 · 2 comments

Comments

@yakovale-flutterint
Copy link

Hi
I faced an issue when 3 things are happening:

  1. i'm supplying headers for each message
  2. i'm sending to non existing partition
  3. before sending second message i'm waiting for CB to be triggered for first message

Please find a code sample that reproduce error below, it's a 'example_KafkaProducer_EnableManualEventsPoll.cc' from examples with small additions.

failing_example.txt

The result is when second send method is called, it fails in KafkaProducer.h #393 with error:
Exception thrown: read access violation
it was 0XFFFFFFFFFFFFFF

My environment is Windows 10 x64, VS 2019

Thanks in advance

@kenneth-jia
Copy link
Contributor

Please be aware of the memory lifetime management, -- if you're not quite sure about it, just use SendOption::ToCopyRecordValue as the option for send(...)

@yakovale-flutterint
Copy link
Author

i tried copy option too. Actually i just took example from this library and provided headers, no changes of example logics was done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants