You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "RobertIndie (via GitHub)" <gi...@apache.org> on 2023/11/16 03:20:28 UTC

[I] Test `test_acknowledge_failed ` failed after upgrading C++ client to 3.4.0 [pulsar-client-python]

RobertIndie opened a new issue, #162:
URL: https://github.com/apache/pulsar-client-python/issues/162

   I created a PR to upgrade the C++ client to 3.4.0, but the CI failed: https://github.com/apache/pulsar-client-python/pull/161
   
   ```
   + 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


-- 
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


Re: [I] Test `test_acknowledge_failed ` failed after upgrading C++ client to 3.4.0 [pulsar-client-python]

Posted by "BewareMyPower (via GitHub)" <gi...@apache.org>.
BewareMyPower commented on issue #162:
URL: https://github.com/apache/pulsar-client-python/issues/162#issuecomment-1813934930

   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:6651` if you ran `test_acknowledge_failed`.
   
   Did you test this single method
   
   ```bash
   python3 ./tests/pulsar_test.py PulsarTest.test_acknowledge_failed
   ```
   
    or the whole test?
   
   ```bash
   python3 ./tests/pulsar_test.py
   ```


-- 
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] Test `test_acknowledge_failed ` failed after upgrading C++ client to 3.4.0 [pulsar-client-python]

Posted by "RobertIndie (via GitHub)" <gi...@apache.org>.
RobertIndie commented on issue #162:
URL: https://github.com/apache/pulsar-client-python/issues/162#issuecomment-1813958594

   I could only reproduce it by running the whole test: `python3 ./tests/pulsar_test.py`
   
    >  Did you use the v3.4.0 tag?
   
   I need to check it further. But the test could also fails in CI which uses v3.4.0 tag.


-- 
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] Test `test_auth_junk_params` failed after upgrading C++ client to 3.4.0 [pulsar-client-python]

Posted by "BewareMyPower (via GitHub)" <gi...@apache.org>.
BewareMyPower commented on issue #162:
URL: https://github.com/apache/pulsar-client-python/issues/162#issuecomment-1814095201

   Here are the stacks on macOS (lldb)
   
   ```
     * frame #0: 0x000000018272ec54 libc++abi.dylib`__cxa_throw
       frame #1: 0x000000011003ca14 libpulsar.dylib`std::__1::__throw_bad_weak_ptr[abi:v15006]() at shared_ptr.h:139:5
       frame #2: 0x000000011003c9cc libpulsar.dylib`std::__1::shared_ptr<pulsar::AckGroupingTracker>::shared_ptr[abi:v15006]<pulsar::AckGroupingTracker, void>(this=0x000000016fdfb188, __r=nullptr) at shared_ptr.h:636:13
       frame #3: 0x000000011003c92c libpulsar.dylib`std::__1::shared_ptr<pulsar::AckGroupingTracker>::shared_ptr[abi:v15006]<pulsar::AckGroupingTracker, void>(this=0x000000016fdfb188, __r=nullptr) at shared_ptr.h:634:5
       frame #4: 0x00000001100a45e0 libpulsar.dylib`std::__1::enable_shared_from_this<pulsar::ClientConnection>::shared_from_this[abi:v15006](this=0x000000010102b800) at shared_ptr.h:1729:17
       frame #5: 0x00000001100a2c30 libpulsar.dylib`pulsar::ClientConnection::close(this=0x000000010102b800, result=ResultAuthenticationError, detach=false) at ClientConnection.cc:1326:17
       frame #6: 0x00000001100a1128 libpulsar.dylib`pulsar::ClientConnection::ClientConnection(this=0x000000010102b800, logicalAddress="pulsar+ssl://localhost:6651", physicalAddress="pulsar+ssl://localhost:6651", executor=std::__1::shared_ptr<pulsar::ExecutorService>::element_type @ 0x0000600003704198 strong=3 weak=2, clientConfiguration=0x0000000101029f78, authentication=nullptr, clientVersion="Pulsar-CPP-v3.4.0", pool=0x0000000101029f78) at ClientConnection.cc:219:13
       frame #7: 0x00000001100a39d4 libpulsar.dylib`pulsar::ClientConnection::ClientConnection(this=0x000000010102b800, logicalAddress="pulsar+ssl://localhost:6651", physicalAddress="pulsar+ssl://localhost:6651", executor=<unavailable>, clientConfiguration=0x0000000101029f78, authentication=nullptr, clientVersion="Pulsar-CPP-v3.4.0", pool=0x0000000101029f78) at ClientConnection.cc:187:19
       frame #8: 0x000000011020ba0c libpulsar.dylib`pulsar::ConnectionPool::getConnectionAsync(this=0x0000000101029f78, logicalAddress="pulsar+ssl://localhost:6651", physicalAddress="pulsar+ssl://localhost:6651", keySuffix=0) at ConnectionPool.cc:99:23
       frame #9: 0x000000011005d3dc libpulsar.dylib`pulsar::ConnectionPool::getConnectionAsync(this=0x0000000101029f78, logicalAddress="pulsar+ssl://localhost:6651", physicalAddress="pulsar+ssl://localhost:6651") at ConnectionPool.h:82:16
       frame #10: 0x000000011005d078 libpulsar.dylib`pulsar::BinaryProtoLookupService::getPartitionMetadataAsync(this=0x0000600003300298, topi
   ```


-- 
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] Test `test_acknowledge_failed ` failed after upgrading C++ client to 3.4.0 [pulsar-client-python]

Posted by "BewareMyPower (via GitHub)" <gi...@apache.org>.
BewareMyPower commented on issue #162:
URL: https://github.com/apache/pulsar-client-python/issues/162#issuecomment-1813958132

   I tested the `pulsar_test.py` on 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.


-- 
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] Test `test_acknowledge_failed ` failed after upgrading C++ client to 3.4.0 [pulsar-client-python]

Posted by "RobertIndie (via GitHub)" <gi...@apache.org>.
RobertIndie commented on issue #162:
URL: https://github.com/apache/pulsar-client-python/issues/162#issuecomment-1813924612

   The core dump stack trace:
   ```
   #0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=140123919167936) at ./nptl/pthread_kill.c:44
   #1  __pthread_kill_internal (signo=6, threadid=140123919167936) at ./nptl/pthread_kill.c:78
   #2  __GI___pthread_kill (threadid=140123919167936, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
   #3  0x00007f7124716476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
   #4  0x00007f71246fc7f3 in __GI_abort () at ./stdlib/abort.c:79
   #5  0x00007f7122e47b9e in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6
   #6  0x00007f7122e5320c in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6
   #7  0x00007f7122e521e9 in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6
   #8  0x00007f7122e52959 in __gxx_personality_v0 () from /lib/x86_64-linux-gnu/libstdc++.so.6
   #9  0x00007f7124001884 in ?? () from /lib/x86_64-linux-gnu/libgcc_s.so.1
   #10 0x00007f7124001f41 in _Unwind_RaiseException () from /lib/x86_64-linux-gnu/libgcc_s.so.1
   #11 0x00007f7122e534cb in __cxa_throw () from /lib/x86_64-linux-gnu/libstdc++.so.6
   #12 0x00007f71233d0c54 in std::__throw_bad_weak_ptr () at /usr/include/c++/11/bits/shared_ptr_base.h:93
   #13 0x00007f71233d8b99 in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count (this=0x7ffebcd6ee98, __r=...) at /usr/include/c++/11/bits/shared_ptr_base.h:873
   #14 0x00007f71234b95a9 in std::__shared_ptr<pulsar::ClientConnection, (__gnu_cxx::_Lock_policy)2>::__shared_ptr<pulsar::ClientConnection, void> (this=0x7ffebcd6ee90, __r=...)
       at /usr/include/c++/11/bits/shared_ptr_base.h:1178
   #15 0x00007f71234b33b5 in std::shared_ptr<pulsar::ClientConnection>::shared_ptr<pulsar::ClientConnection, void> (this=0x7ffebcd6ee90,
       __r=std::weak_ptr<pulsar::ClientConnection> (empty) = {...}) at /usr/include/c++/11/bits/shared_ptr.h:326
   #16 0x00007f71234ae357 in std::enable_shared_from_this<pulsar::ClientConnection>::shared_from_this (this=0x55e805fc0a50) at /usr/include/c++/11/bits/shared_ptr.h:808
   #17 0x00007f71234a8808 in pulsar::ClientConnection::weak_from_this (this=0x55e805fc0a50) at /code/pulsar-client-cpp/lib/ClientConnection.h:136
   #18 0x00007f712343c98d in pulsar::ClientConnection::close (this=0x55e805fc0a50, result=pulsar::ResultAuthenticationError, detach=false)
       at /code/pulsar-client-cpp/lib/ClientConnection.cc:1327
   #19 0x00007f71234300fe in pulsar::ClientConnection::ClientConnection (this=0x55e805fc0a50, logicalAddress="pulsar+ssl://localhost:6651",
       physicalAddress="pulsar+ssl://localhost:6651", executor=std::shared_ptr<pulsar::ExecutorService> (use count 3, weak count 1) = {...}, clientConfiguration=...,
       authentication=std::shared_ptr<pulsar::Authentication> (empty) = {...}, clientVersion="Pulsar-CPP-v3.4.0-pre", pool=...)
       at /code/pulsar-client-cpp/lib/ClientConnection.cc:219
   #20 0x00007f7123566e26 in pulsar::ConnectionPool::getConnectionAsync (this=0x55e805ca4240, logicalAddress="pulsar+ssl://localhost:6651",
       physicalAddress="pulsar+ssl://localhost:6651") at /code/pulsar-client-cpp/lib/ConnectionPool.cc:98
   #21 0x00007f71233f6ef8 in pulsar::BinaryProtoLookupService::getPartitionMetadataAsync (this=0x7f711c004090,
       topicName=std::shared_ptr<pulsar::TopicName> (use count 3, weak count 0) = {...}) at /code/pulsar-client-cpp/lib/BinaryProtoLookupService.cc:112
   #22 0x00007f71234e64b5 in pulsar::RetryableLookupService::getPartitionMetadataAsync(std::shared_ptr<pulsar::TopicName> const&)::{lambda()#1}::operator()() const (
       __closure=0x55e805f4dc50) at /code/pulsar-client-cpp/lib/RetryableLookupService.h:61
   ```


-- 
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] Test `test_acknowledge_failed ` failed after upgrading C++ client to 3.4.0 [pulsar-client-python]

Posted by "BewareMyPower (via GitHub)" <gi...@apache.org>.
BewareMyPower commented on issue #162:
URL: https://github.com/apache/pulsar-client-python/issues/162#issuecomment-1814033554

   Sorry there is something wrong with my installation. I have installed both the `libpulsar` from HomeBrew and the C++ client locally. So the Python extension links to the system `libpulsar` when running.
   
   So I linked the correct path via 
   
   ```bash
   export DYLD_LIBRARY_PATH=$HOME/softwares/pulsar-client-cpp/lib 
   ```
   
   and reproduced the error:
   
   ```
   ...
   ======================================================================
   ERROR: test_auth_junk_params (__main__.PulsarTest.test_auth_junk_params)
   ----------------------------------------------------------------------
   Traceback (most recent call last):
     File "/pulsar-client-python/tests/pulsar_test.py", line 519, in test_auth_junk_params
       client.subscribe("my-python-topic-auth-junk-params", "my-sub", consumer_type=ConsumerType.Shared)
     File "/opt/homebrew/lib/python3.11/site-packages/pulsar/__init__.py", line 946, in subscribe
       c._consumer = self._client.subscribe(topic, subscription_name, conf)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   RuntimeError: bad_weak_ptr
   ```
   
   The test failure should be `test_auth_junk_params`, not `test_acknowledge_failed.


-- 
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