[GitHub] [qpid-proton-j] C0urante commented on pull request #38: Fix leakage of socket handles at connection errors.

2022-01-27 Thread GitBox


C0urante commented on pull request #38:
URL: https://github.com/apache/qpid-proton-j/pull/38#issuecomment-1023767069


   Seems like this might fix https://issues.apache.org/jira/browse/PROTON-2347?


-- 
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: dev-unsubscr...@qpid.apache.org

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



-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (DISPATCH-2319) system_tests_one_router.test_43_dropped_presettled_receiver_stops fails

2022-01-27 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/DISPATCH-2319?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17483474#comment-17483474
 ] 

ASF GitHub Bot commented on DISPATCH-2319:
--

ganeshmurthy closed pull request #1502:
URL: https://github.com/apache/qpid-dispatch/pull/1502


   


-- 
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: dev-unsubscr...@qpid.apache.org

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


> system_tests_one_router.test_43_dropped_presettled_receiver_stops fails
> ---
>
> Key: DISPATCH-2319
> URL: https://issues.apache.org/jira/browse/DISPATCH-2319
> Project: Qpid Dispatch
>  Issue Type: Bug
>  Components: Tests
>Reporter: Ganesh Murthy
>Assignee: Ganesh Murthy
>Priority: Major
>
> {noformat}
> 21: ___ OneRouterTest.test_43_dropped_presettled_receiver_stops 
> 
> 21: 
> 21: self =  testMethod=test_43_dropped_presettled_receiver_stops>
> 21: 
> 21:     def test_43_dropped_presettled_receiver_stops(self):
> 21:         local_node = Node.connect(self.address, timeout=TIMEOUT)
> 21:         res = local_node.query('org.apache.qpid.dispatch.router')
> 21:         deliveries_ingress = 
> res.attribute_names.index('deliveriesIngress')
> 21:         presettled_dropped_count = 
> res.attribute_names.index('droppedPresettledDeliveries')
> 21:         ingress_delivery_count = res.results[0][deliveries_ingress]
> 21:         test = DroppedPresettledTest(self.address, 200, 
> ingress_delivery_count, presettled_dropped_count)
> 21:         test.run()
> 21: >       self.assertIsNone(test.error)
> 21: E       AssertionError: 'Messages sent to the router is 200, Messages 
> processed by the router is 107' is not None
> 21: 
> 21: 
> /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/tests/system_tests_one_router.py:666:
>  AssertionError
> 21: - generated xml file: 
> /__w/qpid-dispatch/qpid-dispatch/qpid-dispatch/build/tests/junitxmls/system_tests_one_router.xml
>  -
> 21: === short test summary info 
> 
> 21: FAILED ::OneRouterTest::test_43_dropped_presettled_receiver_stops - 
> Assertion...
> 21: === 1 failed, 55 passed in 77.73s (0:01:17) 
> 
> 10/38 Test #21: system_tests_one_router .***Failed   78.00 
> sec {noformat}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[GitHub] [qpid-dispatch] ganeshmurthy closed pull request #1502: DISPATCH-2319: Use correct index to fetch values from mangement results

2022-01-27 Thread GitBox


ganeshmurthy closed pull request #1502:
URL: https://github.com/apache/qpid-dispatch/pull/1502


   


-- 
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: dev-unsubscr...@qpid.apache.org

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



-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (DISPATCH-2126) qdr_delivery_t->settled flag race

2022-01-27 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/DISPATCH-2126?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17483436#comment-17483436
 ] 

ASF subversion and git services commented on DISPATCH-2126:
---

Commit 87183203648e09deb1cec877b9e85d5efb7dc6c0 in qpid-dispatch's branch 
refs/heads/main from Ken Giusti
[ https://gitbox.apache.org/repos/asf?p=qpid-dispatch.git;h=8718320 ]

DISPATCH-2126: mask TSAN warning on delivery settled flag


> qdr_delivery_t->settled flag race
> -
>
> Key: DISPATCH-2126
> URL: https://issues.apache.org/jira/browse/DISPATCH-2126
> Project: Qpid Dispatch
>  Issue Type: Bug
>  Components: Router Node
>Affects Versions: 1.16.0
>Reporter: Ken Giusti
>Assignee: Ken Giusti
>Priority: Major
>  Labels: race-condition, tsan
> Fix For: 1.19.0
>
>
> I/O thread reads the qdr_delivery_t->settled flag while calling the 
> delivery_update_handler, while core thread is updating it while processing 
> multicast.
> {noformat}
> 5: WARNING: ThreadSanitizer: data race (pid=568299) 
> 65: Read of size 1 at 0x7b58131c by thread T4: 
> 65: #0 qdr_connection_process 
> /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/connections.c:403 
> (libqpid-dispatch.so+0xc4a30) 
> 65: #1 AMQP_writable_conn_handler 
> /home/kgiusti/work/dispatch/qpid-dispatch/src/router_node.c:299 
> (libqpid-dispatch.so+0x122d42) 
> 65: #2 writable_handler 
> /home/kgiusti/work/dispatch/qpid-dispatch/src/container.c:395 
> (libqpid-dispatch.so+0x7b2e2) 
> 65: #3 qd_container_handle_event 
> /home/kgiusti/work/dispatch/qpid-dispatch/src/container.c:747 
> (libqpid-dispatch.so+0x7cfd5) 
> 65: #4 handle /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:1096 
> (libqpid-dispatch.so+0x130537) 
> 65: #5 thread_run /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:1121 
> (libqpid-dispatch.so+0x13063a) 
> 65: #6 _thread_init 
> /home/kgiusti/work/dispatch/qpid-dispatch/src/posix/threading.c:172 
> (libqpid-dispatch.so+0xad37a) 
> 65: #7   (libtsan.so.0+0x2d33f) 
> 65: 
> 65: Previous write of size 1 at 0x7b58131c by thread T1: 
> 65: #0 qdr_delivery_mcast_inbound_update_CT 
> /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/delivery.c:853 
> (libqpid-dispatch.so+0xd\
> 97bb) 
> 65: #1 qdr_update_delivery_CT 
> /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/delivery.c:671 
> (libqpid-dispatch.so+0xd8f22) 
> 65: #2 router_core_thread 
> /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/router_core_thread.c:239
>  (libqpid-dispatch.so+0xfb2ae) 
> 65: #3 _thread_init 
> /home/kgiusti/work/dispatch/qpid-dispatch/src/posix/threading.c:172 
> (libqpid-dispatch.so+0xad37a) 
> 65: #4   (libtsan.so.0+0x2d33f) 
> 65: 
> 65: Location is heap block of size 512 at 0x7b581200 allocated by thread 
> T2: 
> 65: #0 posix_memalign  (libtsan.so.0+0x3061d) 
> 65: #1 qd_alloc 
> /home/kgiusti/work/dispatch/qpid-dispatch/src/alloc_pool.c:396 
> (libqpid-dispatch.so+0x6ab9c) 
> 65: #2 new_qdr_delivery_t 
> /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/delivery.c:24 
> (libqpid-dispatch.so+0xd5ddd) 
> 65: #3 qdr_link_deliver 
> /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/transfer.c:47 
> (libqpid-dispatch.so+0x1038d9) 
> 65: #4 AMQP_rx_handler 
> /home/kgiusti/work/dispatch/qpid-dispatch/src/router_node.c:868 
> (libqpid-dispatch.so+0x124406) 
> 65: #5 do_receive 
> /home/kgiusti/work/dispatch/qpid-dispatch/src/container.c:227 
> (libqpid-dispatch.so+0x7a99b) 
> 65: #6 qd_container_handle_event 
> /home/kgiusti/work/dispatch/qpid-dispatch/src/container.c:737 
> (libqpid-dispatch.so+0x7cf4f) 
> 65: #7 handle /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:1096 
> (libqpid-dispatch.so+0x130537) 
> 65: #8 thread_run /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:1121 
> (libqpid-dispatch.so+0x13063a) 
> 65: #9 _thread_init 
> /home/kgiusti/work/dispatch/qpid-dispatch/src/posix/threading.c:172 
> (libqpid-dispatch.so+0xad37a) 
> 65: #10   (libtsan.so.0+0x2d33f)
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (DISPATCH-2126) qdr_delivery_t->settled flag race

2022-01-27 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/DISPATCH-2126?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17483437#comment-17483437
 ] 

ASF GitHub Bot commented on DISPATCH-2126:
--

asfgit merged pull request #1500:
URL: https://github.com/apache/qpid-dispatch/pull/1500


   


-- 
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: dev-unsubscr...@qpid.apache.org

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


> qdr_delivery_t->settled flag race
> -
>
> Key: DISPATCH-2126
> URL: https://issues.apache.org/jira/browse/DISPATCH-2126
> Project: Qpid Dispatch
>  Issue Type: Bug
>  Components: Router Node
>Affects Versions: 1.16.0
>Reporter: Ken Giusti
>Assignee: Ken Giusti
>Priority: Major
>  Labels: race-condition, tsan
> Fix For: 1.19.0
>
>
> I/O thread reads the qdr_delivery_t->settled flag while calling the 
> delivery_update_handler, while core thread is updating it while processing 
> multicast.
> {noformat}
> 5: WARNING: ThreadSanitizer: data race (pid=568299) 
> 65: Read of size 1 at 0x7b58131c by thread T4: 
> 65: #0 qdr_connection_process 
> /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/connections.c:403 
> (libqpid-dispatch.so+0xc4a30) 
> 65: #1 AMQP_writable_conn_handler 
> /home/kgiusti/work/dispatch/qpid-dispatch/src/router_node.c:299 
> (libqpid-dispatch.so+0x122d42) 
> 65: #2 writable_handler 
> /home/kgiusti/work/dispatch/qpid-dispatch/src/container.c:395 
> (libqpid-dispatch.so+0x7b2e2) 
> 65: #3 qd_container_handle_event 
> /home/kgiusti/work/dispatch/qpid-dispatch/src/container.c:747 
> (libqpid-dispatch.so+0x7cfd5) 
> 65: #4 handle /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:1096 
> (libqpid-dispatch.so+0x130537) 
> 65: #5 thread_run /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:1121 
> (libqpid-dispatch.so+0x13063a) 
> 65: #6 _thread_init 
> /home/kgiusti/work/dispatch/qpid-dispatch/src/posix/threading.c:172 
> (libqpid-dispatch.so+0xad37a) 
> 65: #7   (libtsan.so.0+0x2d33f) 
> 65: 
> 65: Previous write of size 1 at 0x7b58131c by thread T1: 
> 65: #0 qdr_delivery_mcast_inbound_update_CT 
> /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/delivery.c:853 
> (libqpid-dispatch.so+0xd\
> 97bb) 
> 65: #1 qdr_update_delivery_CT 
> /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/delivery.c:671 
> (libqpid-dispatch.so+0xd8f22) 
> 65: #2 router_core_thread 
> /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/router_core_thread.c:239
>  (libqpid-dispatch.so+0xfb2ae) 
> 65: #3 _thread_init 
> /home/kgiusti/work/dispatch/qpid-dispatch/src/posix/threading.c:172 
> (libqpid-dispatch.so+0xad37a) 
> 65: #4   (libtsan.so.0+0x2d33f) 
> 65: 
> 65: Location is heap block of size 512 at 0x7b581200 allocated by thread 
> T2: 
> 65: #0 posix_memalign  (libtsan.so.0+0x3061d) 
> 65: #1 qd_alloc 
> /home/kgiusti/work/dispatch/qpid-dispatch/src/alloc_pool.c:396 
> (libqpid-dispatch.so+0x6ab9c) 
> 65: #2 new_qdr_delivery_t 
> /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/delivery.c:24 
> (libqpid-dispatch.so+0xd5ddd) 
> 65: #3 qdr_link_deliver 
> /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/transfer.c:47 
> (libqpid-dispatch.so+0x1038d9) 
> 65: #4 AMQP_rx_handler 
> /home/kgiusti/work/dispatch/qpid-dispatch/src/router_node.c:868 
> (libqpid-dispatch.so+0x124406) 
> 65: #5 do_receive 
> /home/kgiusti/work/dispatch/qpid-dispatch/src/container.c:227 
> (libqpid-dispatch.so+0x7a99b) 
> 65: #6 qd_container_handle_event 
> /home/kgiusti/work/dispatch/qpid-dispatch/src/container.c:737 
> (libqpid-dispatch.so+0x7cf4f) 
> 65: #7 handle /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:1096 
> (libqpid-dispatch.so+0x130537) 
> 65: #8 thread_run /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:1121 
> (libqpid-dispatch.so+0x13063a) 
> 65: #9 _thread_init 
> /home/kgiusti/work/dispatch/qpid-dispatch/src/posix/threading.c:172 
> (libqpid-dispatch.so+0xad37a) 
> 65: #10   (libtsan.so.0+0x2d33f)
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[GitHub] [qpid-dispatch] asfgit merged pull request #1500: DISPATCH-2126: mask TSAN warning on delivery settled flag

2022-01-27 Thread GitBox


asfgit merged pull request #1500:
URL: https://github.com/apache/qpid-dispatch/pull/1500


   


-- 
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: dev-unsubscr...@qpid.apache.org

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



-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[GitHub] [qpid-dispatch] kgiusti opened a new pull request #1501: DISPATCH-2132: atomic access to core uptime counter

2022-01-27 Thread GitBox


kgiusti opened a new pull request #1501:
URL: https://github.com/apache/qpid-dispatch/pull/1501


   And hides the atomic type under a handy-dandy macro.


-- 
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: dev-unsubscr...@qpid.apache.org

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



-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (DISPATCH-2132) core->uptime_ticks races

2022-01-27 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/DISPATCH-2132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17483433#comment-17483433
 ] 

ASF GitHub Bot commented on DISPATCH-2132:
--

kgiusti opened a new pull request #1501:
URL: https://github.com/apache/qpid-dispatch/pull/1501


   And hides the atomic type under a handy-dandy macro.


-- 
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: dev-unsubscr...@qpid.apache.org

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


> core->uptime_ticks races
> 
>
> Key: DISPATCH-2132
> URL: https://issues.apache.org/jira/browse/DISPATCH-2132
> Project: Qpid Dispatch
>  Issue Type: Bug
>  Components: Router Node
>Affects Versions: 1.16.0
>Reporter: Ken Giusti
>Assignee: Ken Giusti
>Priority: Minor
>  Labels: race-condition, tsan
> Fix For: 1.19.0
>
>
> TSAN flags many races while accessing core->uptime_ticks.  Likely harmless.  
> Replace core->uptime_ticks with atomic integer.
>  
> Example:
> 30: WARNING: ThreadSanitizer: data race (pid=632294) 
> 30: Read of size 4 at 0x7b64000352c8 by thread T3: 
> 30: #0 qdr_link_first_attach 
> /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/connections.c:608 
> (libqpid-dispatch.so+0xc5ee8) 
> 30: #1 AMQP_incoming_link_handler 
> /home/kgiusti/work/dispatch/qpid-dispatch/src/router_node.c:985 
> (libqpid-dispatch.so+0x1247f4) 
> 30: #2 setup_incoming_link 
> /home/kgiusti/work/dispatch/qpid-dispatch/src/container.c:205 
> (libqpid-dispatch.so+0x7a7f8) 
> 30: #3 qd_container_handle_event 
> /home/kgiusti/work/dispatch/qpid-dispatch/src/container.c:670 
> (libqpid-dispatch.so+0x7c935) 
> 30: #4 handle /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:1096 
> (libqpid-dispatch.so+0x130537) 
> 30: #5 thread_run /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:1121 
> (libqpid-dispatch.so+0x13063a) 
> 30: #6 _thread_init 
> /home/kgiusti/work/dispatch/qpid-dispatch/src/posix/threading.c:172 
> (libqpid-dispatch.so+0xad37a) 
> 30: #7   (libtsan.so.0+0x2d33f) 
> 30: 
> 30: Previous write of size 4 at 0x7b64000352c8 by thread T1: 
> 30: #0 qdr_process_tick_CT 
> /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/core_timer.c:111 
> (libqpid-dispatch.so+0x10a860) 
> 30: #1 router_core_thread 
> /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/router_core_thread.c:239
>  (libqpid-dispatch.so+0xfb2ae) 
> 30: #2 _thread_init 
> /home/kgiusti/work/dispatch/qpid-dispatch/src/posix/threading.c:172 
> (libqpid-dispatch.so+0xad37a) 
> 30: #3   (libtsan.so.0+0x2d33f)



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (DISPATCH-2126) qdr_delivery_t->settled flag race

2022-01-27 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/DISPATCH-2126?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17483414#comment-17483414
 ] 

ASF GitHub Bot commented on DISPATCH-2126:
--

jiridanek commented on a change in pull request #1500:
URL: https://github.com/apache/qpid-dispatch/pull/1500#discussion_r793958726



##
File path: tests/tsan.supp
##
@@ -29,6 +29,7 @@ race:qdr_link_stalled_outbound
 
 # DISPATCH-2126
 race:qdr_delivery_mcast_inbound_update_CT
+race:qdr_delivery_mcast_outbound_settled_CT

Review comment:
   The entries are regexes, so they would also match any method that 
contains this as a substring.
   
   `race:^qdr_delivery_mcast_outbound_settled_CT$` is imo preferable.
   
   I see that the entries in the file above and bellow don't use the regex 
anchors, so it's probably ok to leave them out here as well




-- 
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: dev-unsubscr...@qpid.apache.org

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


> qdr_delivery_t->settled flag race
> -
>
> Key: DISPATCH-2126
> URL: https://issues.apache.org/jira/browse/DISPATCH-2126
> Project: Qpid Dispatch
>  Issue Type: Bug
>  Components: Router Node
>Affects Versions: 1.16.0
>Reporter: Ken Giusti
>Assignee: Ken Giusti
>Priority: Major
>  Labels: race-condition, tsan
> Fix For: 1.19.0
>
>
> I/O thread reads the qdr_delivery_t->settled flag while calling the 
> delivery_update_handler, while core thread is updating it while processing 
> multicast.
> {noformat}
> 5: WARNING: ThreadSanitizer: data race (pid=568299) 
> 65: Read of size 1 at 0x7b58131c by thread T4: 
> 65: #0 qdr_connection_process 
> /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/connections.c:403 
> (libqpid-dispatch.so+0xc4a30) 
> 65: #1 AMQP_writable_conn_handler 
> /home/kgiusti/work/dispatch/qpid-dispatch/src/router_node.c:299 
> (libqpid-dispatch.so+0x122d42) 
> 65: #2 writable_handler 
> /home/kgiusti/work/dispatch/qpid-dispatch/src/container.c:395 
> (libqpid-dispatch.so+0x7b2e2) 
> 65: #3 qd_container_handle_event 
> /home/kgiusti/work/dispatch/qpid-dispatch/src/container.c:747 
> (libqpid-dispatch.so+0x7cfd5) 
> 65: #4 handle /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:1096 
> (libqpid-dispatch.so+0x130537) 
> 65: #5 thread_run /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:1121 
> (libqpid-dispatch.so+0x13063a) 
> 65: #6 _thread_init 
> /home/kgiusti/work/dispatch/qpid-dispatch/src/posix/threading.c:172 
> (libqpid-dispatch.so+0xad37a) 
> 65: #7   (libtsan.so.0+0x2d33f) 
> 65: 
> 65: Previous write of size 1 at 0x7b58131c by thread T1: 
> 65: #0 qdr_delivery_mcast_inbound_update_CT 
> /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/delivery.c:853 
> (libqpid-dispatch.so+0xd\
> 97bb) 
> 65: #1 qdr_update_delivery_CT 
> /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/delivery.c:671 
> (libqpid-dispatch.so+0xd8f22) 
> 65: #2 router_core_thread 
> /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/router_core_thread.c:239
>  (libqpid-dispatch.so+0xfb2ae) 
> 65: #3 _thread_init 
> /home/kgiusti/work/dispatch/qpid-dispatch/src/posix/threading.c:172 
> (libqpid-dispatch.so+0xad37a) 
> 65: #4   (libtsan.so.0+0x2d33f) 
> 65: 
> 65: Location is heap block of size 512 at 0x7b581200 allocated by thread 
> T2: 
> 65: #0 posix_memalign  (libtsan.so.0+0x3061d) 
> 65: #1 qd_alloc 
> /home/kgiusti/work/dispatch/qpid-dispatch/src/alloc_pool.c:396 
> (libqpid-dispatch.so+0x6ab9c) 
> 65: #2 new_qdr_delivery_t 
> /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/delivery.c:24 
> (libqpid-dispatch.so+0xd5ddd) 
> 65: #3 qdr_link_deliver 
> /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/transfer.c:47 
> (libqpid-dispatch.so+0x1038d9) 
> 65: #4 AMQP_rx_handler 
> /home/kgiusti/work/dispatch/qpid-dispatch/src/router_node.c:868 
> (libqpid-dispatch.so+0x124406) 
> 65: #5 do_receive 
> /home/kgiusti/work/dispatch/qpid-dispatch/src/container.c:227 
> (libqpid-dispatch.so+0x7a99b) 
> 65: #6 qd_container_handle_event 
> /home/kgiusti/work/dispatch/qpid-dispatch/src/container.c:737 
> (libqpid-dispatch.so+0x7cf4f) 
> 65: #7 handle /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:1096 
> (libqpid-dispatch.so+0x130537) 
> 65: #8 thread_run /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:1121 
> (libqpid-dispatch.so+0x13063a) 
> 65: #9 _thread_init 
> /home/kgiusti/work/dispatch/qpid-dispatch/src/posix/threading.c:172 
> (libqpid-dispatch.so+0xad37a) 
> 65: #10   (libtsan.so.0+0x2d33f)
> {noformat}



--
This message was sent by Atlassian Jira

[GitHub] [qpid-dispatch] jiridanek commented on a change in pull request #1500: DISPATCH-2126: mask TSAN warning on delivery settled flag

2022-01-27 Thread GitBox


jiridanek commented on a change in pull request #1500:
URL: https://github.com/apache/qpid-dispatch/pull/1500#discussion_r793958726



##
File path: tests/tsan.supp
##
@@ -29,6 +29,7 @@ race:qdr_link_stalled_outbound
 
 # DISPATCH-2126
 race:qdr_delivery_mcast_inbound_update_CT
+race:qdr_delivery_mcast_outbound_settled_CT

Review comment:
   The entries are regexes, so they would also match any method that 
contains this as a substring.
   
   `race:^qdr_delivery_mcast_outbound_settled_CT$` is imo preferable.
   
   I see that the entries in the file above and bellow don't use the regex 
anchors, so it's probably ok to leave them out here as well




-- 
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: dev-unsubscr...@qpid.apache.org

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



-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Assigned] (DISPATCH-2315) TSAN data race in qdr_connection_process

2022-01-27 Thread Ken Giusti (Jira)


 [ 
https://issues.apache.org/jira/browse/DISPATCH-2315?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ken Giusti reassigned DISPATCH-2315:


Assignee: Ken Giusti

> TSAN data race in qdr_connection_process
> 
>
> Key: DISPATCH-2315
> URL: https://issues.apache.org/jira/browse/DISPATCH-2315
> Project: Qpid Dispatch
>  Issue Type: Bug
>Reporter: Ganesh Murthy
>Assignee: Ken Giusti
>Priority: Major
>  Labels: race-condition, tsan
>
> {noformat}
> 62: ERROR
> 62: 
> 62: ==
> 62: ERROR: tearDownClass (system_tests_multicast.MulticastLinearTest)
> 62: --
> 62: Traceback (most recent call last):
> 62:   File "/home/travis/build/apache/qpid-dispatch/tests/system_test.py", 
> line 836, in tearDownClass
> 62:     cls.tester.teardown()
> 62:   File "/home/travis/build/apache/qpid-dispatch/tests/system_test.py", 
> line 779, in teardown
> 62:     raise RuntimeError("Errors during teardown: \n\n%s" % 
> "\n\n".join([str(e) for e in errors]))
> 62: RuntimeError: Errors during teardown: 
> 62: 
> 62: Process 16478 error: exit code 66, expected 0
> 62: qdrouterd -c INT.B.conf -I /home/travis/build/apache/qpid-dispatch/python
> 62: 
> /home/travis/build/apache/qpid-dispatch/build/tests/system_test.dir/system_tests_multicast/MulticastLinearTest/setUpClass/INT.B-2.cmd
> 62: 
> 62: ==
> 62: WARNING: ThreadSanitizer: data race (pid=16478)
> 62:   Read of size 1 at 0x7b44000213d4 by thread T2:
> 62:     #0 qdr_connection_process 
> /home/travis/build/apache/qpid-dispatch/src/router_core/connections.c:405 
> (qdrouterd+0x9d9c6)
> 62:     #1 AMQP_writable_conn_handler 
> /home/travis/build/apache/qpid-dispatch/src/router_node.c:299 
> (qdrouterd+0xdbb81)
> 62:     #2 writable_handler 
> /home/travis/build/apache/qpid-dispatch/src/container.c:388 
> (qdrouterd+0x662eb)
> 62:     #3 qd_conn_event_batch_complete 
> /home/travis/build/apache/qpid-dispatch/src/container.c:478 
> (qdrouterd+0x6769b)
> 62:     #4 thread_run 
> /home/travis/build/apache/qpid-dispatch/src/server.c:1149 (qdrouterd+0xe733e)
> 62:     #5 _thread_init 
> /home/travis/build/apache/qpid-dispatch/src/posix/threading.c:172 
> (qdrouterd+0x8c441)
> 62: 
> 62:   Previous write of size 1 at 0x7b44000213d4 by thread T1:
> 62:     #0 qdr_delivery_mcast_outbound_settled_CT 
> /home/travis/build/apache/qpid-dispatch/src/router_core/delivery.c:889 
> (qdrouterd+0xab913)
> 62:     #1 qdr_delivery_mcast_outbound_update_CT 
> /home/travis/build/apache/qpid-dispatch/src/router_core/delivery.c:1020 
> (qdrouterd+0xab913)
> 62:     #2 qdr_update_delivery_CT 
> /home/travis/build/apache/qpid-dispatch/src/router_core/delivery.c:680 
> (qdrouterd+0xac615)
> 62:     #3 router_core_thread 
> /home/travis/build/apache/qpid-dispatch/src/router_core/router_core_thread.c:236
>  (qdrouterd+0xc0fe0)
> 62:     #4 _thread_init 
> /home/travis/build/apache/qpid-dispatch/src/posix/threading.c:172 
> (qdrouterd+0x8c441)
> 62: 
> 62:   Location is heap block of size 320 at 0x7b4400021340 allocated by main 
> thread:
> 62:     #0 posix_memalign 
> ../../../../src/libsanitizer/tsan/tsan_interceptors_posix.cpp:835 
> (libtsan.so.0+0x3046d)
> 62:     #1 qd_alloc 
> /home/travis/build/apache/qpid-dispatch/src/alloc_pool.c:391 
> (qdrouterd+0x54d24)
> 62:     #2 new_qdr_delivery_t 
> /home/travis/build/apache/qpid-dispatch/src/router_core/delivery.c:24 
> (qdrouterd+0xa8442)
> 62:     #3 qdr_link_deliver_to 
> /home/travis/build/apache/qpid-dispatch/src/router_core/transfer.c:99 
> (qdrouterd+0xc6ecd)
> 62:     #4 AMQP_rx_handler 
> /home/travis/build/apache/qpid-dispatch/src/router_node.c:827 
> (qdrouterd+0xdf0cf)
> 62:     #5 do_receive 
> /home/travis/build/apache/qpid-dispatch/src/container.c:219 
> (qdrouterd+0x69b54)
> 62:     #6 qd_container_handle_event 
> /home/travis/build/apache/qpid-dispatch/src/container.c:734 
> (qdrouterd+0x69b54)
> 62:     #7 handle /home/travis/build/apache/qpid-dispatch/src/server.c:1108 
> (qdrouterd+0xe57a9)
> 62:     #8 thread_run 
> /home/travis/build/apache/qpid-dispatch/src/server.c:1133 (qdrouterd+0xe726c)
> 62:     #9 qd_server_run 
> /home/travis/build/apache/qpid-dispatch/src/server.c:1527 (qdrouterd+0xe7e6f)
> 62:     #10 main_process 
> /home/travis/build/apache/qpid-dispatch/router/src/main.c:115 
> (qdrouterd+0x2dda7)
> 62:     #11 main 
> /home/travis/build/apache/qpid-dispatch/router/src/main.c:369 
> (qdrouterd+0x2d092)
> 62: 
> 62:   Thread T2 (tid=16481, running) created by main thread at:
> 62:     #0 pthread_create 
> ../../../../src/libsanitizer/tsan/tsan_interceptors_posix.cpp:962 
> (libtsan.so.0+0x5ea79)
> 62:     #1 sys_thread 
> 

[jira] [Commented] (DISPATCH-2315) TSAN data race in qdr_connection_process

2022-01-27 Thread Ken Giusti (Jira)


[ 
https://issues.apache.org/jira/browse/DISPATCH-2315?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17483400#comment-17483400
 ] 

Ken Giusti commented on DISPATCH-2315:
--

We need to suppress this as well - the settled flag is read/written by 
different threads by design.

Not that it's a good design, but to fix this would require a re-think about how 
we share state in the router.

> TSAN data race in qdr_connection_process
> 
>
> Key: DISPATCH-2315
> URL: https://issues.apache.org/jira/browse/DISPATCH-2315
> Project: Qpid Dispatch
>  Issue Type: Bug
>Reporter: Ganesh Murthy
>Priority: Major
>  Labels: race-condition, tsan
>
> {noformat}
> 62: ERROR
> 62: 
> 62: ==
> 62: ERROR: tearDownClass (system_tests_multicast.MulticastLinearTest)
> 62: --
> 62: Traceback (most recent call last):
> 62:   File "/home/travis/build/apache/qpid-dispatch/tests/system_test.py", 
> line 836, in tearDownClass
> 62:     cls.tester.teardown()
> 62:   File "/home/travis/build/apache/qpid-dispatch/tests/system_test.py", 
> line 779, in teardown
> 62:     raise RuntimeError("Errors during teardown: \n\n%s" % 
> "\n\n".join([str(e) for e in errors]))
> 62: RuntimeError: Errors during teardown: 
> 62: 
> 62: Process 16478 error: exit code 66, expected 0
> 62: qdrouterd -c INT.B.conf -I /home/travis/build/apache/qpid-dispatch/python
> 62: 
> /home/travis/build/apache/qpid-dispatch/build/tests/system_test.dir/system_tests_multicast/MulticastLinearTest/setUpClass/INT.B-2.cmd
> 62: 
> 62: ==
> 62: WARNING: ThreadSanitizer: data race (pid=16478)
> 62:   Read of size 1 at 0x7b44000213d4 by thread T2:
> 62:     #0 qdr_connection_process 
> /home/travis/build/apache/qpid-dispatch/src/router_core/connections.c:405 
> (qdrouterd+0x9d9c6)
> 62:     #1 AMQP_writable_conn_handler 
> /home/travis/build/apache/qpid-dispatch/src/router_node.c:299 
> (qdrouterd+0xdbb81)
> 62:     #2 writable_handler 
> /home/travis/build/apache/qpid-dispatch/src/container.c:388 
> (qdrouterd+0x662eb)
> 62:     #3 qd_conn_event_batch_complete 
> /home/travis/build/apache/qpid-dispatch/src/container.c:478 
> (qdrouterd+0x6769b)
> 62:     #4 thread_run 
> /home/travis/build/apache/qpid-dispatch/src/server.c:1149 (qdrouterd+0xe733e)
> 62:     #5 _thread_init 
> /home/travis/build/apache/qpid-dispatch/src/posix/threading.c:172 
> (qdrouterd+0x8c441)
> 62: 
> 62:   Previous write of size 1 at 0x7b44000213d4 by thread T1:
> 62:     #0 qdr_delivery_mcast_outbound_settled_CT 
> /home/travis/build/apache/qpid-dispatch/src/router_core/delivery.c:889 
> (qdrouterd+0xab913)
> 62:     #1 qdr_delivery_mcast_outbound_update_CT 
> /home/travis/build/apache/qpid-dispatch/src/router_core/delivery.c:1020 
> (qdrouterd+0xab913)
> 62:     #2 qdr_update_delivery_CT 
> /home/travis/build/apache/qpid-dispatch/src/router_core/delivery.c:680 
> (qdrouterd+0xac615)
> 62:     #3 router_core_thread 
> /home/travis/build/apache/qpid-dispatch/src/router_core/router_core_thread.c:236
>  (qdrouterd+0xc0fe0)
> 62:     #4 _thread_init 
> /home/travis/build/apache/qpid-dispatch/src/posix/threading.c:172 
> (qdrouterd+0x8c441)
> 62: 
> 62:   Location is heap block of size 320 at 0x7b4400021340 allocated by main 
> thread:
> 62:     #0 posix_memalign 
> ../../../../src/libsanitizer/tsan/tsan_interceptors_posix.cpp:835 
> (libtsan.so.0+0x3046d)
> 62:     #1 qd_alloc 
> /home/travis/build/apache/qpid-dispatch/src/alloc_pool.c:391 
> (qdrouterd+0x54d24)
> 62:     #2 new_qdr_delivery_t 
> /home/travis/build/apache/qpid-dispatch/src/router_core/delivery.c:24 
> (qdrouterd+0xa8442)
> 62:     #3 qdr_link_deliver_to 
> /home/travis/build/apache/qpid-dispatch/src/router_core/transfer.c:99 
> (qdrouterd+0xc6ecd)
> 62:     #4 AMQP_rx_handler 
> /home/travis/build/apache/qpid-dispatch/src/router_node.c:827 
> (qdrouterd+0xdf0cf)
> 62:     #5 do_receive 
> /home/travis/build/apache/qpid-dispatch/src/container.c:219 
> (qdrouterd+0x69b54)
> 62:     #6 qd_container_handle_event 
> /home/travis/build/apache/qpid-dispatch/src/container.c:734 
> (qdrouterd+0x69b54)
> 62:     #7 handle /home/travis/build/apache/qpid-dispatch/src/server.c:1108 
> (qdrouterd+0xe57a9)
> 62:     #8 thread_run 
> /home/travis/build/apache/qpid-dispatch/src/server.c:1133 (qdrouterd+0xe726c)
> 62:     #9 qd_server_run 
> /home/travis/build/apache/qpid-dispatch/src/server.c:1527 (qdrouterd+0xe7e6f)
> 62:     #10 main_process 
> /home/travis/build/apache/qpid-dispatch/router/src/main.c:115 
> (qdrouterd+0x2dda7)
> 62:     #11 main 
> /home/travis/build/apache/qpid-dispatch/router/src/main.c:369 
> (qdrouterd+0x2d092)
> 62: 
> 62:   Thread T2 (tid=16481, running) created by main thread at:
> 62:     

[jira] [Resolved] (DISPATCH-2317) Router per-message annotations version negotiation

2022-01-27 Thread Ken Giusti (Jira)


 [ 
https://issues.apache.org/jira/browse/DISPATCH-2317?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ken Giusti resolved DISPATCH-2317.
--
Resolution: Fixed

> Router per-message annotations version negotiation
> --
>
> Key: DISPATCH-2317
> URL: https://issues.apache.org/jira/browse/DISPATCH-2317
> Project: Qpid Dispatch
>  Issue Type: New Feature
>  Components: Router Node
>Affects Versions: 1.18.0
>Reporter: Ken Giusti
>Assignee: Ken Giusti
>Priority: Major
> Fix For: 1.19.0
>
>
> Directly connected routers (and edge routers) exchange per-message router 
> annotations.  In order to support the ability to modify these annotations in 
> future releases, have a router advertise the format (version) of its message 
> annotations.
> This can be done via a new connection properties value which is set to the 
> version of annotations accepted by the router.  Directly-connected routers 
> would exchange these versions and agree to use the minimum version advertised.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (DISPATCH-2318) Double free of subscription on shutdown

2022-01-27 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/DISPATCH-2318?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17483392#comment-17483392
 ] 

ASF GitHub Bot commented on DISPATCH-2318:
--

asfgit closed pull request #1498:
URL: https://github.com/apache/qpid-dispatch/pull/1498


   


-- 
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: dev-unsubscr...@qpid.apache.org

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


> Double free of subscription on shutdown
> ---
>
> Key: DISPATCH-2318
> URL: https://issues.apache.org/jira/browse/DISPATCH-2318
> Project: Qpid Dispatch
>  Issue Type: Bug
>  Components: Router Node
>Affects Versions: 1.18.0
>Reporter: Ken Giusti
>Assignee: Ken Giusti
>Priority: Major
> Fix For: 1.19.0
>
>
> qdr_subscribe_CT incorrectly frees the subscription passed in if the action 
> is being dicarded.
> However qdr_subscribe_CT does not own the subscription - a pointer to the 
> subscription is held by the caller to qdr_core_subscribe().  The caller will 
> free it.
>  
> 2022-01-26T20:38:30.4511421Z 75: ==3807==ERROR: AddressSanitizer: attempting 
> double-free on 0x6060b0c0 in thread T3:                                   
>                   
> 2022-01-26T20:38:30.5203414Z 75:     #0 0x7f1b8b5a3627 in free 
> (/lib64/libasan.so.6+0xae627)                                                 
>                                 
> 2022-01-26T20:38:30.5211345Z 75:     #1 0x879ff3 in qdr_agent_free 
> /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/router_core/agent.c:153
>                    
> 2022-01-26T20:38:30.5229424Z 75:     #2 0x92fb3d in qdr_core_free 
> /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/router_core/router_core.c:329
>               
> 2022-01-26T20:38:30.5243461Z 75:     #3 0x99f01d in qd_router_free 
> /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/router_node.c:2179
>                         
> 2022-01-26T20:38:30.5249436Z 75:     #4 0x7fccf2 in qd_dispatch_free 
> /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/dispatch.c:374
>                           
> 2022-01-26T20:38:30.5752354Z 75:     #5 0x5cefb2 in QDR::deinitialize(bool) 
> const 
> /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/tests/c_unittests/./helpers.hp\
> p:265                                                                         
>                                                                               
>                  
> 2022-01-26T20:38:30.5753828Z 75:     #6 0x5ab4c5 in 
> check_amqp_listener_startup_log_message(qd_server_config_t, 
> std::__cxx11::basic_string, std\
> ::allocator >, std::__cxx11::basic_string, 
> std::allocator >) 
> /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/tests/c_un\
> ittests/test_listener_startup.cpp:58                                          
>                                                                               
>                  
> 2022-01-26T20:38:30.5755448Z 75:     #7 0x5ae797 in operator() 
> /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/tests/c_unittests/test_listener_startup.cpp:129
>    
> 2022-01-26T20:38:30.5757874Z 75:     #8 0x7f1b8ab7f5c3 in 
> execute_native_thread_routine (/lib64/libstdc++.so.6+0xd95c3)                 
>                                      
> 2022-01-26T20:38:30.5758403Z 75:     #9 0x7f1b89ec2a86 in start_thread 
> (/lib64/libc.so.6+0x8da86)                                                    
>                         
> 2022-01-26T20:38:30.5758836Z 75:     #10 0x7f1b89f468d3 in __GI___clone 
> (/lib64/libc.so.6+0x1118d3)                                                   
>                        
> 2022-01-26T20:38:30.5759199Z 75:                                              
>                                                                               
>                  
> 2022-01-26T20:38:30.5759801Z 75: 0x6060b0c0 is located 0 bytes inside of 
> 56-byte region [0x6060b0c0,0x6060b0f8)                                
>                   
> 2022-01-26T20:38:30.5760226Z 75: freed by thread T4 here:                     
>                                                                               
>                  
> 2022-01-26T20:38:30.5760605Z 75:     #0 0x7f1b8b5a3627 in free 
> (/lib64/libasan.so.6+0xae627)                                                 
>                                 
> 2022-01-26T20:38:30.5767193Z 75:     #1 0x9377b7 in qdr_subscribe_CT 
> /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/router_core/route_tables.c:675
>           
> 2022-01-26T20:38:30.5771793Z 75:    

[jira] [Resolved] (DISPATCH-2318) Double free of subscription on shutdown

2022-01-27 Thread Ken Giusti (Jira)


 [ 
https://issues.apache.org/jira/browse/DISPATCH-2318?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ken Giusti resolved DISPATCH-2318.
--
Resolution: Fixed

> Double free of subscription on shutdown
> ---
>
> Key: DISPATCH-2318
> URL: https://issues.apache.org/jira/browse/DISPATCH-2318
> Project: Qpid Dispatch
>  Issue Type: Bug
>  Components: Router Node
>Affects Versions: 1.18.0
>Reporter: Ken Giusti
>Assignee: Ken Giusti
>Priority: Major
> Fix For: 1.19.0
>
>
> qdr_subscribe_CT incorrectly frees the subscription passed in if the action 
> is being dicarded.
> However qdr_subscribe_CT does not own the subscription - a pointer to the 
> subscription is held by the caller to qdr_core_subscribe().  The caller will 
> free it.
>  
> 2022-01-26T20:38:30.4511421Z 75: ==3807==ERROR: AddressSanitizer: attempting 
> double-free on 0x6060b0c0 in thread T3:                                   
>                   
> 2022-01-26T20:38:30.5203414Z 75:     #0 0x7f1b8b5a3627 in free 
> (/lib64/libasan.so.6+0xae627)                                                 
>                                 
> 2022-01-26T20:38:30.5211345Z 75:     #1 0x879ff3 in qdr_agent_free 
> /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/router_core/agent.c:153
>                    
> 2022-01-26T20:38:30.5229424Z 75:     #2 0x92fb3d in qdr_core_free 
> /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/router_core/router_core.c:329
>               
> 2022-01-26T20:38:30.5243461Z 75:     #3 0x99f01d in qd_router_free 
> /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/router_node.c:2179
>                         
> 2022-01-26T20:38:30.5249436Z 75:     #4 0x7fccf2 in qd_dispatch_free 
> /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/dispatch.c:374
>                           
> 2022-01-26T20:38:30.5752354Z 75:     #5 0x5cefb2 in QDR::deinitialize(bool) 
> const 
> /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/tests/c_unittests/./helpers.hp\
> p:265                                                                         
>                                                                               
>                  
> 2022-01-26T20:38:30.5753828Z 75:     #6 0x5ab4c5 in 
> check_amqp_listener_startup_log_message(qd_server_config_t, 
> std::__cxx11::basic_string, std\
> ::allocator >, std::__cxx11::basic_string, 
> std::allocator >) 
> /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/tests/c_un\
> ittests/test_listener_startup.cpp:58                                          
>                                                                               
>                  
> 2022-01-26T20:38:30.5755448Z 75:     #7 0x5ae797 in operator() 
> /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/tests/c_unittests/test_listener_startup.cpp:129
>    
> 2022-01-26T20:38:30.5757874Z 75:     #8 0x7f1b8ab7f5c3 in 
> execute_native_thread_routine (/lib64/libstdc++.so.6+0xd95c3)                 
>                                      
> 2022-01-26T20:38:30.5758403Z 75:     #9 0x7f1b89ec2a86 in start_thread 
> (/lib64/libc.so.6+0x8da86)                                                    
>                         
> 2022-01-26T20:38:30.5758836Z 75:     #10 0x7f1b89f468d3 in __GI___clone 
> (/lib64/libc.so.6+0x1118d3)                                                   
>                        
> 2022-01-26T20:38:30.5759199Z 75:                                              
>                                                                               
>                  
> 2022-01-26T20:38:30.5759801Z 75: 0x6060b0c0 is located 0 bytes inside of 
> 56-byte region [0x6060b0c0,0x6060b0f8)                                
>                   
> 2022-01-26T20:38:30.5760226Z 75: freed by thread T4 here:                     
>                                                                               
>                  
> 2022-01-26T20:38:30.5760605Z 75:     #0 0x7f1b8b5a3627 in free 
> (/lib64/libasan.so.6+0xae627)                                                 
>                                 
> 2022-01-26T20:38:30.5767193Z 75:     #1 0x9377b7 in qdr_subscribe_CT 
> /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/router_core/route_tables.c:675
>           
> 2022-01-26T20:38:30.5771793Z 75:     #2 0x934a37 in router_core_thread 
> /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/router_core/router_core_thread.c:236
>   
> 2022-01-26T20:38:30.5774021Z 75:     #3 0x7f1b89ec2a86 in start_thread 
> (/lib64/libc.so.6+0x8da86)                                                    
>                         
> 2022-01-26T20:38:30.5774306Z 75:                                              
>                            

[GitHub] [qpid-dispatch] asfgit closed pull request #1498: DISPATCH-2318: fix double-free of subscription on shutdown

2022-01-27 Thread GitBox


asfgit closed pull request #1498:
URL: https://github.com/apache/qpid-dispatch/pull/1498


   


-- 
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: dev-unsubscr...@qpid.apache.org

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



-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (DISPATCH-2318) Double free of subscription on shutdown

2022-01-27 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/DISPATCH-2318?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17483391#comment-17483391
 ] 

ASF subversion and git services commented on DISPATCH-2318:
---

Commit 199452ed1df7508a2dca9f5efbbdaf6d5aaf7682 in qpid-dispatch's branch 
refs/heads/main from Ken Giusti
[ https://gitbox.apache.org/repos/asf?p=qpid-dispatch.git;h=199452e ]

DISPATCH-2318: fix double-free of subscription on shutdown

This closes #1498


> Double free of subscription on shutdown
> ---
>
> Key: DISPATCH-2318
> URL: https://issues.apache.org/jira/browse/DISPATCH-2318
> Project: Qpid Dispatch
>  Issue Type: Bug
>  Components: Router Node
>Affects Versions: 1.18.0
>Reporter: Ken Giusti
>Assignee: Ken Giusti
>Priority: Major
> Fix For: 1.19.0
>
>
> qdr_subscribe_CT incorrectly frees the subscription passed in if the action 
> is being dicarded.
> However qdr_subscribe_CT does not own the subscription - a pointer to the 
> subscription is held by the caller to qdr_core_subscribe().  The caller will 
> free it.
>  
> 2022-01-26T20:38:30.4511421Z 75: ==3807==ERROR: AddressSanitizer: attempting 
> double-free on 0x6060b0c0 in thread T3:                                   
>                   
> 2022-01-26T20:38:30.5203414Z 75:     #0 0x7f1b8b5a3627 in free 
> (/lib64/libasan.so.6+0xae627)                                                 
>                                 
> 2022-01-26T20:38:30.5211345Z 75:     #1 0x879ff3 in qdr_agent_free 
> /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/router_core/agent.c:153
>                    
> 2022-01-26T20:38:30.5229424Z 75:     #2 0x92fb3d in qdr_core_free 
> /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/router_core/router_core.c:329
>               
> 2022-01-26T20:38:30.5243461Z 75:     #3 0x99f01d in qd_router_free 
> /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/router_node.c:2179
>                         
> 2022-01-26T20:38:30.5249436Z 75:     #4 0x7fccf2 in qd_dispatch_free 
> /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/dispatch.c:374
>                           
> 2022-01-26T20:38:30.5752354Z 75:     #5 0x5cefb2 in QDR::deinitialize(bool) 
> const 
> /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/tests/c_unittests/./helpers.hp\
> p:265                                                                         
>                                                                               
>                  
> 2022-01-26T20:38:30.5753828Z 75:     #6 0x5ab4c5 in 
> check_amqp_listener_startup_log_message(qd_server_config_t, 
> std::__cxx11::basic_string, std\
> ::allocator >, std::__cxx11::basic_string, 
> std::allocator >) 
> /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/tests/c_un\
> ittests/test_listener_startup.cpp:58                                          
>                                                                               
>                  
> 2022-01-26T20:38:30.5755448Z 75:     #7 0x5ae797 in operator() 
> /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/tests/c_unittests/test_listener_startup.cpp:129
>    
> 2022-01-26T20:38:30.5757874Z 75:     #8 0x7f1b8ab7f5c3 in 
> execute_native_thread_routine (/lib64/libstdc++.so.6+0xd95c3)                 
>                                      
> 2022-01-26T20:38:30.5758403Z 75:     #9 0x7f1b89ec2a86 in start_thread 
> (/lib64/libc.so.6+0x8da86)                                                    
>                         
> 2022-01-26T20:38:30.5758836Z 75:     #10 0x7f1b89f468d3 in __GI___clone 
> (/lib64/libc.so.6+0x1118d3)                                                   
>                        
> 2022-01-26T20:38:30.5759199Z 75:                                              
>                                                                               
>                  
> 2022-01-26T20:38:30.5759801Z 75: 0x6060b0c0 is located 0 bytes inside of 
> 56-byte region [0x6060b0c0,0x6060b0f8)                                
>                   
> 2022-01-26T20:38:30.5760226Z 75: freed by thread T4 here:                     
>                                                                               
>                  
> 2022-01-26T20:38:30.5760605Z 75:     #0 0x7f1b8b5a3627 in free 
> (/lib64/libasan.so.6+0xae627)                                                 
>                                 
> 2022-01-26T20:38:30.5767193Z 75:     #1 0x9377b7 in qdr_subscribe_CT 
> /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/router_core/route_tables.c:675
>           
> 2022-01-26T20:38:30.5771793Z 75:     #2 0x934a37 in router_core_thread 
> 

[jira] [Created] (DISPATCH-2320) TSAN: alloc sequence is non-atomic

2022-01-27 Thread Ken Giusti (Jira)
Ken Giusti created DISPATCH-2320:


 Summary: TSAN: alloc sequence is non-atomic
 Key: DISPATCH-2320
 URL: https://issues.apache.org/jira/browse/DISPATCH-2320
 Project: Qpid Dispatch
  Issue Type: Bug
  Components: Router Node
Affects Versions: 1.18.0
Reporter: Ken Giusti


While the stack below appears to be a double-free of a qd_message_t it is not 
(see qd_python_send - the message is not shared with a link).  The reason TSAN 
complains is that the sequence number contained in the memory pool item is not 
atomic.  In the trace below the message was freed to the pool then reclaimed 
for use by qd_python_send.  The fact that the sequence # was not synchronized 
is causing TSAN pain.

Fix: make the sequence an atomic counter

 

: WARNING: ThreadSanitizer: data race (pid=1889)                                
                                                                                
             
:   Write of size 8 at 0x7b40af00 by thread T2 (mutexes: write M13):        
                                                                                
             
:     #0 qd_dealloc 
/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/alloc_pool.c:470
 (qdrouterd+0x44b652)                                                    
:     #1 free_qd_message_t 
/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/message.c:93 
(qdrouterd+0x46e049)                                                 
:     #2 qd_message_free 
/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/message.c:1128 
(qdrouterd+0x46e049)                                                 
:     #3 qd_python_send 
/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/python_embedded.c:798
 (qdrouterd+0x4830a0)                                           
:     #4 method_vectorcall_VARARGS  (libpython3.10.so.1.0+0x12ca80)       
                                                                                
             
:     #5 qd_router_timer_handler 
/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/router_node.c:1622
 (qdrouterd+0x4cf2dc)                                     
:     #6 qd_timer_visit 
/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/timer.c:320 
(qdrouterd+0x4dd7cf)                                                     
:     #7 handle 
/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/server.c:1026 
(qdrouterd+0x4d8a96)                                                           
:     #8 thread_run 
/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/server.c:1141 
(qdrouterd+0x4daeb7)                                                       
:     #9 _thread_init 
/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/posix/threading.c:172
 (qdrouterd+0x4812dd)                                             
:                                                                               
                                                                                
             
:   Previous read of size 8 at 0x7b40af00 by main thread:                   
                                                                                
             
:     #0 qd_alloc_sequence 
/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/alloc_pool.c:514
 (qdrouterd+0x44bef0)                                             
:     #1 qd_alloc_deref_safe_ptr 
/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/include/qpid/dispatch/alloc_pool.h:102
 (qdrouterd+0x45c033)                     
:     #2 cleanup_link 
/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/container.c:350 
(qdrouterd+0x45c033)                                                   
:     #3 qd_link_free 
/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/container.c:997 
(qdrouterd+0x45c1c9)                                                   
:     #4 qd_link_free 
/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/container.c:988 
(qdrouterd+0x45dd32)                                                   
:     #5 AMQP_link_detach_handler 
/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/router_node.c:1158
 (qdrouterd+0x4d38f1)                                    
:     #6 AMQP_link_detach_handler 
/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/router_node.c:1107
 (qdrouterd+0x4d38f1)                                    
:     #7 close_links 
/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/container.c:328 
(qdrouterd+0x45c2b9)                                                    
:     #8 qd_container_handle_event 
/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/container.c:525 
(qdrouterd+0x45f003)                                      
:     #9 handle 

[jira] [Updated] (DISPATCH-2318) Double free of subscription on shutdown

2022-01-27 Thread Ken Giusti (Jira)


 [ 
https://issues.apache.org/jira/browse/DISPATCH-2318?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ken Giusti updated DISPATCH-2318:
-
Summary: Double free of subscription on shutdown  (was: Double free of 
subscription on shudown)

> Double free of subscription on shutdown
> ---
>
> Key: DISPATCH-2318
> URL: https://issues.apache.org/jira/browse/DISPATCH-2318
> Project: Qpid Dispatch
>  Issue Type: Bug
>  Components: Router Node
>Affects Versions: 1.18.0
>Reporter: Ken Giusti
>Assignee: Ken Giusti
>Priority: Major
> Fix For: 1.19.0
>
>
> qdr_subscribe_CT incorrectly frees the subscription passed in if the action 
> is being dicarded.
> However qdr_subscribe_CT does not own the subscription - a pointer to the 
> subscription is held by the caller to qdr_core_subscribe().  The caller will 
> free it.
>  
> 2022-01-26T20:38:30.4511421Z 75: ==3807==ERROR: AddressSanitizer: attempting 
> double-free on 0x6060b0c0 in thread T3:                                   
>                   
> 2022-01-26T20:38:30.5203414Z 75:     #0 0x7f1b8b5a3627 in free 
> (/lib64/libasan.so.6+0xae627)                                                 
>                                 
> 2022-01-26T20:38:30.5211345Z 75:     #1 0x879ff3 in qdr_agent_free 
> /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/router_core/agent.c:153
>                    
> 2022-01-26T20:38:30.5229424Z 75:     #2 0x92fb3d in qdr_core_free 
> /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/router_core/router_core.c:329
>               
> 2022-01-26T20:38:30.5243461Z 75:     #3 0x99f01d in qd_router_free 
> /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/router_node.c:2179
>                         
> 2022-01-26T20:38:30.5249436Z 75:     #4 0x7fccf2 in qd_dispatch_free 
> /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/dispatch.c:374
>                           
> 2022-01-26T20:38:30.5752354Z 75:     #5 0x5cefb2 in QDR::deinitialize(bool) 
> const 
> /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/tests/c_unittests/./helpers.hp\
> p:265                                                                         
>                                                                               
>                  
> 2022-01-26T20:38:30.5753828Z 75:     #6 0x5ab4c5 in 
> check_amqp_listener_startup_log_message(qd_server_config_t, 
> std::__cxx11::basic_string, std\
> ::allocator >, std::__cxx11::basic_string, 
> std::allocator >) 
> /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/tests/c_un\
> ittests/test_listener_startup.cpp:58                                          
>                                                                               
>                  
> 2022-01-26T20:38:30.5755448Z 75:     #7 0x5ae797 in operator() 
> /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/tests/c_unittests/test_listener_startup.cpp:129
>    
> 2022-01-26T20:38:30.5757874Z 75:     #8 0x7f1b8ab7f5c3 in 
> execute_native_thread_routine (/lib64/libstdc++.so.6+0xd95c3)                 
>                                      
> 2022-01-26T20:38:30.5758403Z 75:     #9 0x7f1b89ec2a86 in start_thread 
> (/lib64/libc.so.6+0x8da86)                                                    
>                         
> 2022-01-26T20:38:30.5758836Z 75:     #10 0x7f1b89f468d3 in __GI___clone 
> (/lib64/libc.so.6+0x1118d3)                                                   
>                        
> 2022-01-26T20:38:30.5759199Z 75:                                              
>                                                                               
>                  
> 2022-01-26T20:38:30.5759801Z 75: 0x6060b0c0 is located 0 bytes inside of 
> 56-byte region [0x6060b0c0,0x6060b0f8)                                
>                   
> 2022-01-26T20:38:30.5760226Z 75: freed by thread T4 here:                     
>                                                                               
>                  
> 2022-01-26T20:38:30.5760605Z 75:     #0 0x7f1b8b5a3627 in free 
> (/lib64/libasan.so.6+0xae627)                                                 
>                                 
> 2022-01-26T20:38:30.5767193Z 75:     #1 0x9377b7 in qdr_subscribe_CT 
> /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/router_core/route_tables.c:675
>           
> 2022-01-26T20:38:30.5771793Z 75:     #2 0x934a37 in router_core_thread 
> /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/router_core/router_core_thread.c:236
>   
> 2022-01-26T20:38:30.5774021Z 75:     #3 0x7f1b89ec2a86 in start_thread 
> (/lib64/libc.so.6+0x8da86)                                                    
>                         
> 2022-01-26T20:38:30.5774306Z 

[jira] [Resolved] (DISPATCH-2316) Py_True/Py_False is not increfed, causing crash in policy tests with libpythond (debug python library)

2022-01-27 Thread Ganesh Murthy (Jira)


 [ 
https://issues.apache.org/jira/browse/DISPATCH-2316?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ganesh Murthy resolved DISPATCH-2316.
-
  Assignee: Jiri Daněk
Resolution: Fixed

> Py_True/Py_False is not increfed, causing crash in policy tests with 
> libpythond (debug python library)
> --
>
> Key: DISPATCH-2316
> URL: https://issues.apache.org/jira/browse/DISPATCH-2316
> Project: Qpid Dispatch
>  Issue Type: Bug
>  Components: Policy Engine
>Affects Versions: 1.18.0
>Reporter: Jiri Daněk
>Assignee: Jiri Daněk
>Priority: Major
> Fix For: 1.19.0
>
>
> {noformat}
> Debug memory block at address p=0x8a6e80: API ''
> 0 bytes originally requested
> The 7 pad bytes at p-7 are not all FORBIDDENBYTE (0xfd):
> at p-7: 0x00 *** OUCH
> at p-6: 0x00 *** OUCH
> at p-5: 0x00 *** OUCH
> at p-4: 0x00 *** OUCH
> at p-3: 0x00 *** OUCH
> at p-2: 0x00 *** OUCH
> at p-1: 0x00 *** OUCH
> Because memory is corrupted at the start, the count of bytes requested
>may be bogus, and checking the trailing pad bytes may segfault.
> The 8 pad bytes at tail=0x8a6e80 are not all FORBIDDENBYTE (0xfd):
> at tail+0: 0x00 *** OUCH
> at tail+1: 0x00 *** OUCH
> at tail+2: 0x00 *** OUCH
> at tail+3: 0x00 *** OUCH
> at tail+4: 0x00 *** OUCH
> at tail+5: 0x00 *** OUCH
> at tail+6: 0x00 *** OUCH
> at tail+7: 0x00 *** OUCH
> Enable tracemalloc to get the memory block allocation traceback
> Fatal Python error: _PyMem_DebugRawFree: bad ID: Allocated using API '', 
> verified using API 'o'
> Python runtime state: finalizing (tstate=0x01f43c50)
> Current thread 0x7f3f562fa740 (most recent call first):
>   Garbage-collecting
> 
> Abandon (core dumped)
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Created] (DISPATCH-2319) system_tests_one_router.test_43_dropped_presettled_receiver_stops fails

2022-01-27 Thread Ganesh Murthy (Jira)
Ganesh Murthy created DISPATCH-2319:
---

 Summary: 
system_tests_one_router.test_43_dropped_presettled_receiver_stops fails
 Key: DISPATCH-2319
 URL: https://issues.apache.org/jira/browse/DISPATCH-2319
 Project: Qpid Dispatch
  Issue Type: Bug
  Components: Tests
Reporter: Ganesh Murthy
Assignee: Ganesh Murthy


{noformat}
21: ___ OneRouterTest.test_43_dropped_presettled_receiver_stops 

21: 
21: self = 
21: 
21:     def test_43_dropped_presettled_receiver_stops(self):
21:         local_node = Node.connect(self.address, timeout=TIMEOUT)
21:         res = local_node.query('org.apache.qpid.dispatch.router')
21:         deliveries_ingress = res.attribute_names.index('deliveriesIngress')
21:         presettled_dropped_count = 
res.attribute_names.index('droppedPresettledDeliveries')
21:         ingress_delivery_count = res.results[0][deliveries_ingress]
21:         test = DroppedPresettledTest(self.address, 200, 
ingress_delivery_count, presettled_dropped_count)
21:         test.run()
21: >       self.assertIsNone(test.error)
21: E       AssertionError: 'Messages sent to the router is 200, Messages 
processed by the router is 107' is not None
21: 
21: 
/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/tests/system_tests_one_router.py:666:
 AssertionError
21: - generated xml file: 
/__w/qpid-dispatch/qpid-dispatch/qpid-dispatch/build/tests/junitxmls/system_tests_one_router.xml
 -
21: === short test summary info 

21: FAILED ::OneRouterTest::test_43_dropped_presettled_receiver_stops - 
Assertion...
21: === 1 failed, 55 passed in 77.73s (0:01:17) 

10/38 Test #21: system_tests_one_router .***Failed   78.00 sec 
{noformat}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[GitHub] [qpid-dispatch] kgiusti commented on a change in pull request #1498: DISPATCH-2318: fix double-free of subscription on shutdown

2022-01-27 Thread GitBox


kgiusti commented on a change in pull request #1498:
URL: https://github.com/apache/qpid-dispatch/pull/1498#discussion_r793764198



##
File path: src/router_core/route_tables.c
##
@@ -671,8 +671,7 @@ static void qdr_subscribe_CT(qdr_core_t *core, qdr_action_t 
*action, bool discar
 DEQ_INSERT_TAIL(addr->subscriptions, sub);
 qdr_addr_start_inlinks_CT(core, addr);
 }
-} else
-free(sub);
+}

Review comment:
   The lifecycle of the subscription instance starts when 
qdr_core_subscribe() is called, and ends when qdr_core_unsubscribe() is called. 
  These calls must be paired, like malloc()/free().
   
   The key point is that the caller to qdr_core_subscribe() always gets a 
pointer to the allocated sub regardless of what eventually happens to the 
action passed to the core thread.  That action holds a non-owning reference to 
the subscription instance.  But on discard the old code will free that pointer 
even tho it doesn't own it - the caller to qdr_core_subscribe() still holds a 
pointer to the sub.
   
   If removing this free triggers a new leak then the cause of that leak is due 
to the caller of qdr_core_subscribe() not calling qdr_core_unsubscribe() to 
free the sub, a violation of the contract.
   
   This is what makes "C" so much fun!  The language doesn't enforce the notion 
of ownership vs borrowing: it's totally legal to make multiple copies of a 
reference to a dynamic resource and scatter them throughout the code. We coders 
just have the simple task of making sure that resource remains available for as 
long as there are references outstanding.  Nobody ever gets that wrong (please 
read that with "sarcastic voice" enabled).  :)
   
   And don't get me started on mutability of a shared reference... I've done 
enough of "head desking" due to bugs caused by that. :)




-- 
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: dev-unsubscr...@qpid.apache.org

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



-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (DISPATCH-2318) Double free of subscription on shudown

2022-01-27 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/DISPATCH-2318?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17483246#comment-17483246
 ] 

ASF GitHub Bot commented on DISPATCH-2318:
--

kgiusti commented on a change in pull request #1498:
URL: https://github.com/apache/qpid-dispatch/pull/1498#discussion_r793764198



##
File path: src/router_core/route_tables.c
##
@@ -671,8 +671,7 @@ static void qdr_subscribe_CT(qdr_core_t *core, qdr_action_t 
*action, bool discar
 DEQ_INSERT_TAIL(addr->subscriptions, sub);
 qdr_addr_start_inlinks_CT(core, addr);
 }
-} else
-free(sub);
+}

Review comment:
   The lifecycle of the subscription instance starts when 
qdr_core_subscribe() is called, and ends when qdr_core_unsubscribe() is called. 
  These calls must be paired, like malloc()/free().
   
   The key point is that the caller to qdr_core_subscribe() always gets a 
pointer to the allocated sub regardless of what eventually happens to the 
action passed to the core thread.  That action holds a non-owning reference to 
the subscription instance.  But on discard the old code will free that pointer 
even tho it doesn't own it - the caller to qdr_core_subscribe() still holds a 
pointer to the sub.
   
   If removing this free triggers a new leak then the cause of that leak is due 
to the caller of qdr_core_subscribe() not calling qdr_core_unsubscribe() to 
free the sub, a violation of the contract.
   
   This is what makes "C" so much fun!  The language doesn't enforce the notion 
of ownership vs borrowing: it's totally legal to make multiple copies of a 
reference to a dynamic resource and scatter them throughout the code. We coders 
just have the simple task of making sure that resource remains available for as 
long as there are references outstanding.  Nobody ever gets that wrong (please 
read that with "sarcastic voice" enabled).  :)
   
   And don't get me started on mutability of a shared reference... I've done 
enough of "head desking" due to bugs caused by that. :)




-- 
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: dev-unsubscr...@qpid.apache.org

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


> Double free of subscription on shudown
> --
>
> Key: DISPATCH-2318
> URL: https://issues.apache.org/jira/browse/DISPATCH-2318
> Project: Qpid Dispatch
>  Issue Type: Bug
>  Components: Router Node
>Affects Versions: 1.18.0
>Reporter: Ken Giusti
>Assignee: Ken Giusti
>Priority: Major
> Fix For: 1.19.0
>
>
> qdr_subscribe_CT incorrectly frees the subscription passed in if the action 
> is being dicarded.
> However qdr_subscribe_CT does not own the subscription - a pointer to the 
> subscription is held by the caller to qdr_core_subscribe().  The caller will 
> free it.
>  
> 2022-01-26T20:38:30.4511421Z 75: ==3807==ERROR: AddressSanitizer: attempting 
> double-free on 0x6060b0c0 in thread T3:                                   
>                   
> 2022-01-26T20:38:30.5203414Z 75:     #0 0x7f1b8b5a3627 in free 
> (/lib64/libasan.so.6+0xae627)                                                 
>                                 
> 2022-01-26T20:38:30.5211345Z 75:     #1 0x879ff3 in qdr_agent_free 
> /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/router_core/agent.c:153
>                    
> 2022-01-26T20:38:30.5229424Z 75:     #2 0x92fb3d in qdr_core_free 
> /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/router_core/router_core.c:329
>               
> 2022-01-26T20:38:30.5243461Z 75:     #3 0x99f01d in qd_router_free 
> /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/router_node.c:2179
>                         
> 2022-01-26T20:38:30.5249436Z 75:     #4 0x7fccf2 in qd_dispatch_free 
> /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/dispatch.c:374
>                           
> 2022-01-26T20:38:30.5752354Z 75:     #5 0x5cefb2 in QDR::deinitialize(bool) 
> const 
> /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/tests/c_unittests/./helpers.hp\
> p:265                                                                         
>                                                                               
>                  
> 2022-01-26T20:38:30.5753828Z 75:     #6 0x5ab4c5 in 
> check_amqp_listener_startup_log_message(qd_server_config_t, 
> std::__cxx11::basic_string, std\
> ::allocator >, std::__cxx11::basic_string, 
> std::allocator >) 
> /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/tests/c_un\
> ittests/test_listener_startup.cpp:58                                       

[jira] [Commented] (DISPATCH-2318) Double free of subscription on shudown

2022-01-27 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/DISPATCH-2318?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17483157#comment-17483157
 ] 

ASF GitHub Bot commented on DISPATCH-2318:
--

jiridanek commented on a change in pull request #1498:
URL: https://github.com/apache/qpid-dispatch/pull/1498#discussion_r793639170



##
File path: src/router_core/route_tables.c
##
@@ -671,8 +671,7 @@ static void qdr_subscribe_CT(qdr_core_t *core, qdr_action_t 
*action, bool discar
 DEQ_INSERT_TAIL(addr->subscriptions, sub);
 qdr_addr_start_inlinks_CT(core, addr);
 }
-} else
-free(sub);
+}

Review comment:
   I was not sure if this is safe thing to do, but it probably is: if this 
causes problems (=leak), that would mean there is bug somewhere else (maybe 
causing the "unsubscribe" action not to be scheduled).




-- 
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: dev-unsubscr...@qpid.apache.org

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


> Double free of subscription on shudown
> --
>
> Key: DISPATCH-2318
> URL: https://issues.apache.org/jira/browse/DISPATCH-2318
> Project: Qpid Dispatch
>  Issue Type: Bug
>  Components: Router Node
>Affects Versions: 1.18.0
>Reporter: Ken Giusti
>Assignee: Ken Giusti
>Priority: Major
> Fix For: 1.19.0
>
>
> qdr_subscribe_CT incorrectly frees the subscription passed in if the action 
> is being dicarded.
> However qdr_subscribe_CT does not own the subscription - a pointer to the 
> subscription is held by the caller to qdr_core_subscribe().  The caller will 
> free it.
>  
> 2022-01-26T20:38:30.4511421Z 75: ==3807==ERROR: AddressSanitizer: attempting 
> double-free on 0x6060b0c0 in thread T3:                                   
>                   
> 2022-01-26T20:38:30.5203414Z 75:     #0 0x7f1b8b5a3627 in free 
> (/lib64/libasan.so.6+0xae627)                                                 
>                                 
> 2022-01-26T20:38:30.5211345Z 75:     #1 0x879ff3 in qdr_agent_free 
> /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/router_core/agent.c:153
>                    
> 2022-01-26T20:38:30.5229424Z 75:     #2 0x92fb3d in qdr_core_free 
> /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/router_core/router_core.c:329
>               
> 2022-01-26T20:38:30.5243461Z 75:     #3 0x99f01d in qd_router_free 
> /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/router_node.c:2179
>                         
> 2022-01-26T20:38:30.5249436Z 75:     #4 0x7fccf2 in qd_dispatch_free 
> /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/dispatch.c:374
>                           
> 2022-01-26T20:38:30.5752354Z 75:     #5 0x5cefb2 in QDR::deinitialize(bool) 
> const 
> /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/tests/c_unittests/./helpers.hp\
> p:265                                                                         
>                                                                               
>                  
> 2022-01-26T20:38:30.5753828Z 75:     #6 0x5ab4c5 in 
> check_amqp_listener_startup_log_message(qd_server_config_t, 
> std::__cxx11::basic_string, std\
> ::allocator >, std::__cxx11::basic_string, 
> std::allocator >) 
> /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/tests/c_un\
> ittests/test_listener_startup.cpp:58                                          
>                                                                               
>                  
> 2022-01-26T20:38:30.5755448Z 75:     #7 0x5ae797 in operator() 
> /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/tests/c_unittests/test_listener_startup.cpp:129
>    
> 2022-01-26T20:38:30.5757874Z 75:     #8 0x7f1b8ab7f5c3 in 
> execute_native_thread_routine (/lib64/libstdc++.so.6+0xd95c3)                 
>                                      
> 2022-01-26T20:38:30.5758403Z 75:     #9 0x7f1b89ec2a86 in start_thread 
> (/lib64/libc.so.6+0x8da86)                                                    
>                         
> 2022-01-26T20:38:30.5758836Z 75:     #10 0x7f1b89f468d3 in __GI___clone 
> (/lib64/libc.so.6+0x1118d3)                                                   
>                        
> 2022-01-26T20:38:30.5759199Z 75:                                              
>                                                                               
>                  
> 2022-01-26T20:38:30.5759801Z 75: 0x6060b0c0 is located 0 bytes inside of 
> 56-byte region [0x6060b0c0,0x6060b0f8)                                
>           

[GitHub] [qpid-dispatch] jiridanek commented on a change in pull request #1498: DISPATCH-2318: fix double-free of subscription on shutdown

2022-01-27 Thread GitBox


jiridanek commented on a change in pull request #1498:
URL: https://github.com/apache/qpid-dispatch/pull/1498#discussion_r793639170



##
File path: src/router_core/route_tables.c
##
@@ -671,8 +671,7 @@ static void qdr_subscribe_CT(qdr_core_t *core, qdr_action_t 
*action, bool discar
 DEQ_INSERT_TAIL(addr->subscriptions, sub);
 qdr_addr_start_inlinks_CT(core, addr);
 }
-} else
-free(sub);
+}

Review comment:
   I was not sure if this is safe thing to do, but it probably is: if this 
causes problems (=leak), that would mean there is bug somewhere else (maybe 
causing the "unsubscribe" action not to be scheduled).




-- 
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: dev-unsubscr...@qpid.apache.org

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



-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Updated] (DISPATCH-2203) Alloc_pool_item_t sequence number should be atomic

2022-01-27 Thread Jira


 [ 
https://issues.apache.org/jira/browse/DISPATCH-2203?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jiri Daněk updated DISPATCH-2203:
-
Affects Version/s: 1.18.0

> Alloc_pool_item_t sequence number should be atomic
> --
>
> Key: DISPATCH-2203
> URL: https://issues.apache.org/jira/browse/DISPATCH-2203
> Project: Qpid Dispatch
>  Issue Type: Test
>  Components: Router Node
>Affects Versions: 1.16.1, 1.18.0
>Reporter: Charles E. Rolke
>Priority: Major
>  Labels: race-condition
>
> Alloc pool uses a sequence number for safe pointer dereferencing. 
> {code:java}
> Definition
>   Line 55: uintmax_t sequence;  // uintmax_t ensures proper alignment of 
> following data
> In qd_alloc:
>   Line 406: item->sequence = 0;
> in qd_dealloc:
>   Line 477: item->sequence++;
> In qd_alloc_sequence:
>   Line 525: reuturn item->sequence;
> {code}
> It is reasonably certain that multiple threads will be referencing the same 
> item at nearly the same time. The code as shown gets flagged by tsan.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (DISPATCH-2203) Alloc_pool_item_t sequence number should be atomic

2022-01-27 Thread Jira


[ 
https://issues.apache.org/jira/browse/DISPATCH-2203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17483130#comment-17483130
 ] 

Jiri Daněk commented on DISPATCH-2203:
--

https://github.com/apache/qpid-dispatch/runs/4957906112?check_suite_focus=true#step:27:1123

{noformat}
WARNING: ThreadSanitizer: data race (pid=1889)
  Write of size 8 at 0x7b40af00 by thread T2 (mutexes: write M13):
#0 qd_dealloc 
/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/alloc_pool.c:470
 (qdrouterd+0x44b652)
#1 free_qd_message_t 
/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/message.c:93 
(qdrouterd+0x46e049)
#2 qd_message_free 
/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/message.c:1128 
(qdrouterd+0x46e049)
#3 qd_python_send 
/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/python_embedded.c:798
 (qdrouterd+0x4830a0)
#4 method_vectorcall_VARARGS  (libpython3.10.so.1.0+0x12ca80)
#5 qd_router_timer_handler 
/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/router_node.c:1622
 (qdrouterd+0x4cf2dc)
#6 qd_timer_visit 
/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/timer.c:320 
(qdrouterd+0x4dd7cf)
#7 handle 
/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/server.c:1026 
(qdrouterd+0x4d8a96)
#8 thread_run 
/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/server.c:1141 
(qdrouterd+0x4daeb7)
#9 _thread_init 
/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/posix/threading.c:172
 (qdrouterd+0x4812dd)

  Previous read of size 8 at 0x7b40af00 by main thread:
#0 qd_alloc_sequence 
/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/alloc_pool.c:514
 (qdrouterd+0x44bef0)
#1 qd_alloc_deref_safe_ptr 
/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/include/qpid/dispatch/alloc_pool.h:102
 (qdrouterd+0x45c033)
#2 cleanup_link 
/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/container.c:350 
(qdrouterd+0x45c033)
#3 qd_link_free 
/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/container.c:997 
(qdrouterd+0x45c1c9)
#4 qd_link_free 
/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/container.c:988 
(qdrouterd+0x45dd32)
#5 AMQP_link_detach_handler 
/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/router_node.c:1158
 (qdrouterd+0x4d38f1)
#6 AMQP_link_detach_handler 
/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/router_node.c:1107
 (qdrouterd+0x4d38f1)
#7 close_links 
/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/container.c:328 
(qdrouterd+0x45c2b9)
#8 qd_container_handle_event 
/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/container.c:525 
(qdrouterd+0x45f003)
#9 handle 
/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/server.c:1116 
(qdrouterd+0x4d8b01)
#10 thread_run 
/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/server.c:1141 
(qdrouterd+0x4dadc4)
#11 qd_server_run 
/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/server.c:1535 
(qdrouterd+0x4dba1c)
#12 main_process 
/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/router/src/main.c:115
 (qdrouterd+0x426e5c)
#13 main 
/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/router/src/main.c:369
 (qdrouterd+0x42626c)

  Location is heap block of size 256 at 0x7b40af00 allocated by thread T1:
#0 posix_memalign  (libtsan.so.0+0x32a23)
#1 qd_alloc 
/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/alloc_pool.c:391
 (qdrouterd+0x44ad29)
#2 new_qd_message_t 
/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/message.c:93 
(qdrouterd+0x470e7d)
#3 qd_message_copy 
/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/message.c:1136 
(qdrouterd+0x470e7d)
#4 qdr_forward_new_delivery_CT 
/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/router_core/forwarder.c:153
 (qdrouterd+0x4a64d7)
#5 qdr_forward_multicast_CT 
/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/router_core/forwarder.c:497
 (qdrouterd+0x4a9155)
#6 qdr_forward_message_CT 
/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/router_core/forwarder.c:1122
 (qdrouterd+0x4aab70)
#7 qdr_in_process_send_to_CT 
/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/router_core/transfer.c:924
 (qdrouterd+0x4bc7dd)
#8 qdr_send_to_CT 
/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/router_core/transfer.c:899
 (qdrouterd+0x4bc943)
#9 router_core_thread 
/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/router_core/router_core_thread.c:236
 (qdrouterd+0x4b53fa)
#10 _thread_init 
/home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/posix/threading.c:172
 

[jira] [Commented] (DISPATCH-2316) Py_True/Py_False is not increfed, causing crash in policy tests with libpythond (debug python library)

2022-01-27 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/DISPATCH-2316?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17483014#comment-17483014
 ] 

ASF GitHub Bot commented on DISPATCH-2316:
--

asfgit merged pull request #1496:
URL: https://github.com/apache/qpid-dispatch/pull/1496


   


-- 
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: dev-unsubscr...@qpid.apache.org

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


> Py_True/Py_False is not increfed, causing crash in policy tests with 
> libpythond (debug python library)
> --
>
> Key: DISPATCH-2316
> URL: https://issues.apache.org/jira/browse/DISPATCH-2316
> Project: Qpid Dispatch
>  Issue Type: Bug
>  Components: Policy Engine
>Affects Versions: 1.18.0
>Reporter: Jiri Daněk
>Priority: Major
> Fix For: 1.19.0
>
>
> {noformat}
> Debug memory block at address p=0x8a6e80: API ''
> 0 bytes originally requested
> The 7 pad bytes at p-7 are not all FORBIDDENBYTE (0xfd):
> at p-7: 0x00 *** OUCH
> at p-6: 0x00 *** OUCH
> at p-5: 0x00 *** OUCH
> at p-4: 0x00 *** OUCH
> at p-3: 0x00 *** OUCH
> at p-2: 0x00 *** OUCH
> at p-1: 0x00 *** OUCH
> Because memory is corrupted at the start, the count of bytes requested
>may be bogus, and checking the trailing pad bytes may segfault.
> The 8 pad bytes at tail=0x8a6e80 are not all FORBIDDENBYTE (0xfd):
> at tail+0: 0x00 *** OUCH
> at tail+1: 0x00 *** OUCH
> at tail+2: 0x00 *** OUCH
> at tail+3: 0x00 *** OUCH
> at tail+4: 0x00 *** OUCH
> at tail+5: 0x00 *** OUCH
> at tail+6: 0x00 *** OUCH
> at tail+7: 0x00 *** OUCH
> Enable tracemalloc to get the memory block allocation traceback
> Fatal Python error: _PyMem_DebugRawFree: bad ID: Allocated using API '', 
> verified using API 'o'
> Python runtime state: finalizing (tstate=0x01f43c50)
> Current thread 0x7f3f562fa740 (most recent call first):
>   Garbage-collecting
> 
> Abandon (core dumped)
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (DISPATCH-2316) Py_True/Py_False is not increfed, causing crash in policy tests with libpythond (debug python library)

2022-01-27 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/DISPATCH-2316?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17483013#comment-17483013
 ] 

ASF subversion and git services commented on DISPATCH-2316:
---

Commit 4f7b5bf27e012289a096dd5b8ef808a988dfc19a in qpid-dispatch's branch 
refs/heads/main from Jiri Daněk
[ https://gitbox.apache.org/repos/asf?p=qpid-dispatch.git;h=4f7b5bf ]

DISPATCH-2316 Py_INCREF usage of Py_True/Py_False to prevent crashes during GC 
(#1496)


> Py_True/Py_False is not increfed, causing crash in policy tests with 
> libpythond (debug python library)
> --
>
> Key: DISPATCH-2316
> URL: https://issues.apache.org/jira/browse/DISPATCH-2316
> Project: Qpid Dispatch
>  Issue Type: Bug
>  Components: Policy Engine
>Affects Versions: 1.18.0
>Reporter: Jiri Daněk
>Priority: Major
> Fix For: 1.19.0
>
>
> {noformat}
> Debug memory block at address p=0x8a6e80: API ''
> 0 bytes originally requested
> The 7 pad bytes at p-7 are not all FORBIDDENBYTE (0xfd):
> at p-7: 0x00 *** OUCH
> at p-6: 0x00 *** OUCH
> at p-5: 0x00 *** OUCH
> at p-4: 0x00 *** OUCH
> at p-3: 0x00 *** OUCH
> at p-2: 0x00 *** OUCH
> at p-1: 0x00 *** OUCH
> Because memory is corrupted at the start, the count of bytes requested
>may be bogus, and checking the trailing pad bytes may segfault.
> The 8 pad bytes at tail=0x8a6e80 are not all FORBIDDENBYTE (0xfd):
> at tail+0: 0x00 *** OUCH
> at tail+1: 0x00 *** OUCH
> at tail+2: 0x00 *** OUCH
> at tail+3: 0x00 *** OUCH
> at tail+4: 0x00 *** OUCH
> at tail+5: 0x00 *** OUCH
> at tail+6: 0x00 *** OUCH
> at tail+7: 0x00 *** OUCH
> Enable tracemalloc to get the memory block allocation traceback
> Fatal Python error: _PyMem_DebugRawFree: bad ID: Allocated using API '', 
> verified using API 'o'
> Python runtime state: finalizing (tstate=0x01f43c50)
> Current thread 0x7f3f562fa740 (most recent call first):
>   Garbage-collecting
> 
> Abandon (core dumped)
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[GitHub] [qpid-dispatch] asfgit merged pull request #1496: DISPATCH-2316 Py_INCREF usage of Py_True/Py_False to prevent crashes

2022-01-27 Thread GitBox


asfgit merged pull request #1496:
URL: https://github.com/apache/qpid-dispatch/pull/1496


   


-- 
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: dev-unsubscr...@qpid.apache.org

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



-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (DISPATCH-2144) Fatal Python error: _PyMem_DebugMalloc: Python memory allocator called without holding the GIL

2022-01-27 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/DISPATCH-2144?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17483005#comment-17483005
 ] 

ASF GitHub Bot commented on DISPATCH-2144:
--

asfgit merged pull request #1495:
URL: https://github.com/apache/qpid-dispatch/pull/1495


   


-- 
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: dev-unsubscr...@qpid.apache.org

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


> Fatal Python error: _PyMem_DebugMalloc: Python memory allocator called 
> without holding the GIL
> --
>
> Key: DISPATCH-2144
> URL: https://issues.apache.org/jira/browse/DISPATCH-2144
> Project: Qpid Dispatch
>  Issue Type: Bug
>  Components: Policy Engine
>Affects Versions: 1.16.0
>Reporter: Jiri Daněk
>Assignee: Ken Giusti
>Priority: Major
> Fix For: 1.19.0
>
>
> To reproduce, install python3-debug on Fedora, then use it to build and run 
> Dispatch
> https://github.com/jiridanek/qpid-dispatch/runs/2629007367?check_suite_focus=true#step:25:7044
> {noformat}
> 25: Router QDR.Policy output file:
> 25: 
> 25: 
> /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/python/qpid_dispatch_internal/policy/policy_util.py:65:
>  ResourceWarning: unclosed  family=AddressFamily.AF_INET6, type=SocketKind.SOCK_STREAM, proto=0, 
> laddr=('::', 0, 0, 0)>
> 25:   if is_ipv6_enabled():
> 25: ResourceWarning: Enable tracemalloc to get the object allocation traceback
> 25: Fatal Python error: _PyMem_DebugMalloc: Python memory allocator called 
> without holding the GIL
> 25: Python runtime state: initialized
> 25: 
> 25: Thread 0x7f0e8fffcec0 (most recent call first):
> 25: 
> {noformat}
> Unrelated error in the same log that I noticed at random
> {noformat}
> 23: E   /builddir/build/BUILD/Python-3.9.5/Modules/gcmodule.c:114: 
> gc_decref: Assertion "gc_get_refs(g) > 0" failed: refcount is too small
> 23: E   Enable tracemalloc to get the memory block allocation 
> traceback
> 23: E   
> 23: E   object address  : 0x7fd3e1b90cd0
> 23: E   object refcount : 117
> 23: E   object type : 0x7b695c30
> 23: E   object type name: Agent
> 23: E   object repr : 
> 
> 23: E   
> 23: E   Fatal Python error: _PyObject_AssertFailed: 
> _PyObject_AssertFailed
> 23: E   Python runtime state: initialized
> 23: E   
> 23: E   Current thread 0x7fd3e39e3ec0 (most recent call first):
> 23: E   
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (DISPATCH-2144) Fatal Python error: _PyMem_DebugMalloc: Python memory allocator called without holding the GIL

2022-01-27 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/DISPATCH-2144?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17483004#comment-17483004
 ] 

ASF subversion and git services commented on DISPATCH-2144:
---

Commit b131cdc35bd1e0365bb025c4544b89a8d2412a39 in qpid-dispatch's branch 
refs/heads/main from Jiri Daněk
[ https://gitbox.apache.org/repos/asf?p=qpid-dispatch.git;h=b131cdc ]

DISPATCH-2144 Fatal Python error: _PyMem_DebugMalloc: Python memory allocator 
called without holding the GIL (#1495)


> Fatal Python error: _PyMem_DebugMalloc: Python memory allocator called 
> without holding the GIL
> --
>
> Key: DISPATCH-2144
> URL: https://issues.apache.org/jira/browse/DISPATCH-2144
> Project: Qpid Dispatch
>  Issue Type: Bug
>  Components: Policy Engine
>Affects Versions: 1.16.0
>Reporter: Jiri Daněk
>Assignee: Ken Giusti
>Priority: Major
> Fix For: 1.19.0
>
>
> To reproduce, install python3-debug on Fedora, then use it to build and run 
> Dispatch
> https://github.com/jiridanek/qpid-dispatch/runs/2629007367?check_suite_focus=true#step:25:7044
> {noformat}
> 25: Router QDR.Policy output file:
> 25: 
> 25: 
> /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/python/qpid_dispatch_internal/policy/policy_util.py:65:
>  ResourceWarning: unclosed  family=AddressFamily.AF_INET6, type=SocketKind.SOCK_STREAM, proto=0, 
> laddr=('::', 0, 0, 0)>
> 25:   if is_ipv6_enabled():
> 25: ResourceWarning: Enable tracemalloc to get the object allocation traceback
> 25: Fatal Python error: _PyMem_DebugMalloc: Python memory allocator called 
> without holding the GIL
> 25: Python runtime state: initialized
> 25: 
> 25: Thread 0x7f0e8fffcec0 (most recent call first):
> 25: 
> {noformat}
> Unrelated error in the same log that I noticed at random
> {noformat}
> 23: E   /builddir/build/BUILD/Python-3.9.5/Modules/gcmodule.c:114: 
> gc_decref: Assertion "gc_get_refs(g) > 0" failed: refcount is too small
> 23: E   Enable tracemalloc to get the memory block allocation 
> traceback
> 23: E   
> 23: E   object address  : 0x7fd3e1b90cd0
> 23: E   object refcount : 117
> 23: E   object type : 0x7b695c30
> 23: E   object type name: Agent
> 23: E   object repr : 
> 
> 23: E   
> 23: E   Fatal Python error: _PyObject_AssertFailed: 
> _PyObject_AssertFailed
> 23: E   Python runtime state: initialized
> 23: E   
> 23: E   Current thread 0x7fd3e39e3ec0 (most recent call first):
> 23: E   
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[GitHub] [qpid-dispatch] asfgit merged pull request #1495: DISPATCH-2144 Fatal Python error: _PyMem_DebugMalloc: Python memory allocator called without holding the GIL

2022-01-27 Thread GitBox


asfgit merged pull request #1495:
URL: https://github.com/apache/qpid-dispatch/pull/1495


   


-- 
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: dev-unsubscr...@qpid.apache.org

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



-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (DISPATCH-2144) Fatal Python error: _PyMem_DebugMalloc: Python memory allocator called without holding the GIL

2022-01-27 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/DISPATCH-2144?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17483000#comment-17483000
 ] 

ASF subversion and git services commented on DISPATCH-2144:
---

Commit 8150ced7d75b1ac82a5d9f8d877a2516a79b5981 in qpid-dispatch's branch 
refs/heads/jd_2022_01_25_DISPATCH-2144 from Jiri Daněk
[ https://gitbox.apache.org/repos/asf?p=qpid-dispatch.git;h=8150ced ]

DISPATCH-2144 Fatal Python error: _PyMem_DebugMalloc: Python memory allocator 
called without holding the GIL


> Fatal Python error: _PyMem_DebugMalloc: Python memory allocator called 
> without holding the GIL
> --
>
> Key: DISPATCH-2144
> URL: https://issues.apache.org/jira/browse/DISPATCH-2144
> Project: Qpid Dispatch
>  Issue Type: Bug
>  Components: Policy Engine
>Affects Versions: 1.16.0
>Reporter: Jiri Daněk
>Assignee: Ken Giusti
>Priority: Major
> Fix For: 1.19.0
>
>
> To reproduce, install python3-debug on Fedora, then use it to build and run 
> Dispatch
> https://github.com/jiridanek/qpid-dispatch/runs/2629007367?check_suite_focus=true#step:25:7044
> {noformat}
> 25: Router QDR.Policy output file:
> 25: 
> 25: 
> /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/python/qpid_dispatch_internal/policy/policy_util.py:65:
>  ResourceWarning: unclosed  family=AddressFamily.AF_INET6, type=SocketKind.SOCK_STREAM, proto=0, 
> laddr=('::', 0, 0, 0)>
> 25:   if is_ipv6_enabled():
> 25: ResourceWarning: Enable tracemalloc to get the object allocation traceback
> 25: Fatal Python error: _PyMem_DebugMalloc: Python memory allocator called 
> without holding the GIL
> 25: Python runtime state: initialized
> 25: 
> 25: Thread 0x7f0e8fffcec0 (most recent call first):
> 25: 
> {noformat}
> Unrelated error in the same log that I noticed at random
> {noformat}
> 23: E   /builddir/build/BUILD/Python-3.9.5/Modules/gcmodule.c:114: 
> gc_decref: Assertion "gc_get_refs(g) > 0" failed: refcount is too small
> 23: E   Enable tracemalloc to get the memory block allocation 
> traceback
> 23: E   
> 23: E   object address  : 0x7fd3e1b90cd0
> 23: E   object refcount : 117
> 23: E   object type : 0x7b695c30
> 23: E   object type name: Agent
> 23: E   object repr : 
> 
> 23: E   
> 23: E   Fatal Python error: _PyObject_AssertFailed: 
> _PyObject_AssertFailed
> 23: E   Python runtime state: initialized
> 23: E   
> 23: E   Current thread 0x7fd3e39e3ec0 (most recent call first):
> 23: E   
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org