Repository navigation
Closed
Description
I created a PR to upgrade the C++ client to 3.4.0, but the CI failed:
+ python3 pulsar_test.py
2023-11-15 00:23:08.410 INFO [140130423730624] ClientConnection:188 | [<none> -> pulsar://localhost:6650] Create ClientConnection, timeout=10000
2023-11-15 00:23:08.410 INFO [140130423730624] ConnectionPool:109 | Created connection for pulsar://localhost:6650
2023-11-15 00:23:08.412 INFO [140130379408960] ClientConnection:398 | [[::1]:49850 -> [::1]:6650] Connected to broker
2023-11-15 00:23:08.416 INFO [140130379408960] HandlerBase:83 | [persistent://public/default/test_acknowledge_failed, ] Getting connection from pool
2023-11-15 00:23:08.447 INFO [140130379408960] ProducerImpl:216 | [persistent://public/default/test_acknowledge_failed, ] Created producer on broker [[::1]:49850 -> [::1]:6650]
2023-11-15 00:23:08.447 INFO [140130423730624] Client:86 | Subscribing on Topic :test_acknowledge_failed
2023-11-15 00:23:08.449 INFO [140130379408960] HandlerBase:83 | [persistent://public/default/test_acknowledge_failed, sub1, 0] Getting connection from pool
2023-11-15 00:23:08.468 INFO [140130379408960] ConsumerImpl:297 | [persistent://public/default/test_acknowledge_failed, sub1, 0] Created consumer on broker [[::1]:49850 -> [::1]:6650]
2023-11-15 00:23:08.469 INFO [140130423730624] Client:86 | Subscribing on Topic :test_acknowledge_failed
2023-11-15 00:23:08.472 INFO [140130379408960] HandlerBase:83 | [persistent://public/default/test_acknowledge_failed, sub2, 1] Getting connection from pool
2023-11-15 00:23:08.4[80](https://github.com/apache/pulsar-client-python/actions/runs/6848544221/job/18687459291?pr=161#step:9:81) INFO [140130379408960] ConsumerImpl:297 | [persistent://public/default/test_acknowledge_failed, sub2, 1] Created consumer on broker [[::1]:49850 -> [::1]:6650]
2023-11-15 00:23:08.510 INFO [140130379408960] HandlerBase:[83](https://github.com/apache/pulsar-client-python/actions/runs/6848544221/job/18687459291?pr=161#step:9:84) | [persistent://public/default/test_acknowledge_failed, sub, 2] Getting connection from pool
2023-11-15 00:23:08.510 INFO [140130379408960] HandlerBase:83 | [persistent://public/default/test_acknowledge_failed-another, sub, 3] Getting connection from pool
2023-11-15 00:23:08.516 INFO [140130379408960] ConsumerImpl:297 | [persistent://public/default/test_acknowledge_failed, sub, 2] Created consumer on broker [[::1]:49[85](https://github.com/apache/pulsar-client-python/actions/runs/6848544221/job/18687459291?pr=161#step:9:86)0 -> [::1]:6650]
2023-11-15 00:23:08.516 INFO [140130379408960] MultiTopicsConsumerImpl:304 | Successfully Subscribed to a single partition of topic in TopicsConsumer. Partitions need to create : 0
2023-11-15 00:23:08.527 INFO [140130379408960] ConsumerImpl:297 | [persistent://public/default/test_acknowledge_failed-another, sub, 3] Created consumer on broker [[::1]:49850 -> [::1]:6650]
2023-11-15 00:23:08.527 INFO [140130379408960] MultiTopicsConsumerImpl:304 | Successfully Subscribed to a single partition of topic in TopicsConsumer. Partitions need to create : 0
2023-11-15 00:23:08.527 INFO [140130379408960] MultiTopicsConsumerImpl:146 | Successfully Subscribed to Topics
2023-11-15 00:23:08.527 ERROR [140130423730624] MultiTopicsConsumerImpl:663 | MessageId without a topic name cannot be acknowledged for a multi-topics consumer
2023-11-15 00:23:08.527 INFO [140130423730624] ClientImpl:612 | Closing Pulsar client with 1 producers and 3 consumers
2023-11-15 00:23:08.527 INFO [140130423730624] ProducerImpl:791 | [persistent://public/default/test_acknowledge_failed, standalone-0-0] Closing producer for topic persistent://public/default/test_acknowledge_failed
2023-11-15 00:23:08.527 INFO [140130423730624] ConsumerImpl:1258 | [persistent://public/default/test_acknowledge_failed-another, sub, 3] Closing consumer for topic persistent://public/default/test_acknowledge_failed-another
2023-11-15 00:23:08.527 INFO [140130423730624] ConsumerImpl:1258 | [persistent://public/default/test_acknowledge_failed, sub, 2] Closing consumer for topic persistent://public/default/test_acknowledge_failed
2023-11-15 00:23:08.527 INFO [140130423730624] ConsumerImpl:1258 | [persistent://public/default/test_acknowledge_failed, sub2, 1] Closing consumer for topic persistent://public/default/test_acknowledge_failed
2023-11-15 00:23:08.527 INFO [140130423730624] ConsumerImpl:1258 | [persistent://public/default/test_acknowledge_failed, sub1, 0] Closing consumer for topic persistent://public/default/test_acknowledge_failed
2023-11-15 00:23:08.535 INFO [14013037940[89](https://github.com/apache/pulsar-client-python/actions/runs/6848544221/job/18687459291?pr=161#step:9:90)60] ProducerImpl:755 | [persistent://public/default/test_acknowledge_failed, standalone-0-0] Closed producer 0
2023-11-15 00:23:08.535 INFO [140130379408960] ConsumerImpl:1244 | [persistent://public/default/test_acknowledge_failed-another, sub, 3] Closed consumer 3
2023-11-15 00:23:08.535 INFO [140130379408960] ConsumerImpl:1244 | [persistent://public/default/test_acknowledge_failed, sub, 2] Closed consumer 2
2023-11-15 00:23:08.535 INFO [140130379408960] ConsumerImpl:1244 | [persistent://public/default/test_acknowledge_failed, sub2, 1] Closed consumer 1
2023-11-15 00:23:08.535 INFO [140130379408960] ConsumerImpl:1244 | [persistent://public/default/test_acknowledge_failed, sub1, 0] Closed consumer 0
2023-11-15 00:23:08.536 INFO [140130018915[90](https://github.com/apache/pulsar-client-python/actions/runs/6848544221/job/18687459291?pr=161#step:9:91)4] ClientConnection:1319 | [[::1]:49850 -> [::1]:6650] Connection disconnected (refCnt: 1)
2023-11-15 00:23:08.536 INFO [140130018915904] ClientConnection:268 | [[::1]:49850 -> [::1]:6650] Destroyed connection to pulsar://localhost:6650
.terminate called after throwing an instance of 'std::bad_weak_ptr'
what(): bad_weak_ptr
2023-11-15 00:23:08.536 INFO [140130423730624] ProducerImpl:748 | Producer - [persistent://public/default/test_acknowledge_failed, standalone-0-0] , [batching = off]
Test failures:
- https://github.com/apache/pulsar-client-python/actions/runs/6848544221/job/18635326092?pr=161
- https://github.com/apache/pulsar-client-python/actions/runs/6848544221/job/18687459291?pr=161
Metadata
Metadata
Assignees
Labels
No labels
Activity
RobertIndie commentedon Nov 16, 2023
The core dump stack trace:
BewareMyPower commentedon Nov 16, 2023
From your dump, the client version is still "Pulsar-CPP-v3.4.0-pre". Did you use the v3.4.0 tag? Also it's weird to see the logical address is
pulsar+ssl://localhost:6651if you rantest_acknowledge_failed.Did you test this single method
or the whole test?
BewareMyPower commentedon Nov 16, 2023
I tested the
pulsar_test.pyon macOS with the C++ library built from source. No test failed.I believe there is something wrong with the DEB package or the Ubuntu test environment in CI. I will test on Ubuntu later.
RobertIndie commentedon Nov 16, 2023
I could only reproduce it by running the whole test:
python3 ./tests/pulsar_test.pyI need to check it further. But the test could also fails in CI which uses v3.4.0 tag.
BewareMyPower commentedon Nov 16, 2023
Sorry there is something wrong with my installation. I have installed both the
libpulsarfrom HomeBrew and the C++ client locally. So the Python extension links to the systemlibpulsarwhen running.So I linked the correct path via
and reproduced the error:
The test failure should be
test_auth_junk_params, not `test_acknowledge_failed.[-]Test `test_acknowledge_failed ` failed after upgrading C++ client to 3.4.0 [/-][+]Test `test_auth_junk_params` failed after upgrading C++ client to 3.4.0 [/+]BewareMyPower commentedon Nov 16, 2023
Here are the stacks on macOS (lldb)
Fix bad_weak_ptr when close a ClientConnection during construction
Fix bad_weak_ptr when close a ClientConnection during construction
Fix bad_weak_ptr when close a ClientConnection during construction
Fix bad_weak_ptr when close a ClientConnection during construction
Fix bad_weak_ptr when close a ClientConnection during construction (#350
Fix bad_weak_ptr when close a ClientConnection during construction (#350