[jira] [Commented] (PROTON-784) Settled Deliveries keep piling up, and do not seem to get freed from heap

2015-01-08 Thread Rafael H. Schloming (JIRA)

[ 
https://issues.apache.org/jira/browse/PROTON-784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14269270#comment-14269270
 ] 

Rafael H. Schloming commented on PROTON-784:


No worries, thanks for looking into it!

> Settled Deliveries keep piling up, and do not seem to get freed from heap
> -
>
> Key: PROTON-784
> URL: https://issues.apache.org/jira/browse/PROTON-784
> Project: Qpid Proton
>  Issue Type: Bug
>  Components: proton-c
>Affects Versions: 0.9
>Reporter: German Shepherd (PrE)
> Fix For: 0.9
>
>
> When running the ProtonC 0.8, this issue was not present.
> Then, in ProtonC 0.9 (Git trunk of 12/19/2014), there are changes in a way 
> the deliveries are handled (engine.c).
> Correct me if I'm wrong, but given the behavior in 0.8, and keeping the same 
> application side approach to ProtonC, while running 0.9, I would expect the 
> Deliveries to be eventually freed from heap. Or is there a new plan on how to 
> approach this ?
> I'm calling pn_messenger_settle with PN_CUMMULATIVE for both input and output 
> trackers, and the delivery->local.settled gets set to true (verified).
> Here is the dump of Deliveries, after there is one message received:
> {{tag=, local.type=36, remote.type=0, local.settled=1, remote.settled=1, 
> updated=0, current=0, writable=0, readable=0, work=0}}
> Then my application code sends a message to broker. The previous, now fully 
> settled Delivery, is not freed - here is the dump (there are now two 
> Deliveries on heap):
> {{tag=, local.type=36, remote.type=0, local.settled=1, remote.settled=1, 
> updated=0, current=0, writable=0, readable=0, work=0}}
> {{tag=\x00\x00\x00\x00\x00\x00\x00\x00, local.type=36, remote.type=36, 
> local.settled=1, remote.settled=1, updated=0, current=0, writable=0, 
> readable=0, work=0}}
> Continuing, by received one more message and also sending one to broker, 
> there are now four Deliveries on the heap.
> {{tag=, local.type=36, remote.type=0, local.settled=1, remote.settled=1, 
> updated=0, current=0, writable=0, readable=0, work=0}}
> {{tag=\x00\x00\x00\x00\x00\x00\x00\x00, local.type=36, remote.type=36, 
> local.settled=1, remote.settled=1, updated=0, current=0, writable=0, 
> readable=0, work=0}}
> {{tag=, local.type=36, remote.type=0, local.settled=1, remote.settled=1, 
> updated=0, current=0, writable=0, readable=0, work=0}}
> {{tag=\x01\x00\x00\x00\x00\x00\x00\x00, local.type=36, remote.type=36, 
> local.settled=1, remote.settled=1, updated=0, current=0, writable=0, 
> readable=0, work=0}}
> And so on, until it eventually runs out of heap.
> I have done an extensive debug session, looking at the refcounts, behavior 
> inside the pn_delivery_finalize(), places this gets called from, etc.
> One thing that hits the eye is the missing pn_full_settle() function, which 
> is now replaced somehow differently by other code. Also, the tpwork-ers used 
> to decref the Disposions, this is also modified for 0.9 (compared to 0.8).
> I'm not sure (yet) what is going on in there, it also might just be some 
> error of mine (so I'm not immediately describing this as a bug, and I might 
> provide more information as the situation unravels).
> At this moment, I would appreciate some hints on this topic, and also a 
> review of the particular functionality (dispositon of Deliveries) in ProtonC 
> 0.9.
> Thanks a lot !
> (minor edit - text formatting - on 12/21/2014)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (PROTON-784) Settled Deliveries keep piling up, and do not seem to get freed from heap

2015-01-07 Thread Chuck Rolke (JIRA)

[ 
https://issues.apache.org/jira/browse/PROTON-784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14268309#comment-14268309
 ] 

Chuck Rolke commented on PROTON-784:


Rafi, Thanks for your patience.

Running against the QPID examples has an issue in that it doesn't settle 
deliveries. So they do pile up but it's not proton's fault. I fixed that in 
linux but not in windows so that's why windows still looked broken. You can 
call this jira fixed.


> Settled Deliveries keep piling up, and do not seem to get freed from heap
> -
>
> Key: PROTON-784
> URL: https://issues.apache.org/jira/browse/PROTON-784
> Project: Qpid Proton
>  Issue Type: Bug
>  Components: proton-c
>Affects Versions: 0.9
>Reporter: German Shepherd (PrE)
> Fix For: 0.9
>
>
> When running the ProtonC 0.8, this issue was not present.
> Then, in ProtonC 0.9 (Git trunk of 12/19/2014), there are changes in a way 
> the deliveries are handled (engine.c).
> Correct me if I'm wrong, but given the behavior in 0.8, and keeping the same 
> application side approach to ProtonC, while running 0.9, I would expect the 
> Deliveries to be eventually freed from heap. Or is there a new plan on how to 
> approach this ?
> I'm calling pn_messenger_settle with PN_CUMMULATIVE for both input and output 
> trackers, and the delivery->local.settled gets set to true (verified).
> Here is the dump of Deliveries, after there is one message received:
> {{tag=, local.type=36, remote.type=0, local.settled=1, remote.settled=1, 
> updated=0, current=0, writable=0, readable=0, work=0}}
> Then my application code sends a message to broker. The previous, now fully 
> settled Delivery, is not freed - here is the dump (there are now two 
> Deliveries on heap):
> {{tag=, local.type=36, remote.type=0, local.settled=1, remote.settled=1, 
> updated=0, current=0, writable=0, readable=0, work=0}}
> {{tag=\x00\x00\x00\x00\x00\x00\x00\x00, local.type=36, remote.type=36, 
> local.settled=1, remote.settled=1, updated=0, current=0, writable=0, 
> readable=0, work=0}}
> Continuing, by received one more message and also sending one to broker, 
> there are now four Deliveries on the heap.
> {{tag=, local.type=36, remote.type=0, local.settled=1, remote.settled=1, 
> updated=0, current=0, writable=0, readable=0, work=0}}
> {{tag=\x00\x00\x00\x00\x00\x00\x00\x00, local.type=36, remote.type=36, 
> local.settled=1, remote.settled=1, updated=0, current=0, writable=0, 
> readable=0, work=0}}
> {{tag=, local.type=36, remote.type=0, local.settled=1, remote.settled=1, 
> updated=0, current=0, writable=0, readable=0, work=0}}
> {{tag=\x01\x00\x00\x00\x00\x00\x00\x00, local.type=36, remote.type=36, 
> local.settled=1, remote.settled=1, updated=0, current=0, writable=0, 
> readable=0, work=0}}
> And so on, until it eventually runs out of heap.
> I have done an extensive debug session, looking at the refcounts, behavior 
> inside the pn_delivery_finalize(), places this gets called from, etc.
> One thing that hits the eye is the missing pn_full_settle() function, which 
> is now replaced somehow differently by other code. Also, the tpwork-ers used 
> to decref the Disposions, this is also modified for 0.9 (compared to 0.8).
> I'm not sure (yet) what is going on in there, it also might just be some 
> error of mine (so I'm not immediately describing this as a bug, and I might 
> provide more information as the situation unravels).
> At this moment, I would appreciate some hints on this topic, and also a 
> review of the particular functionality (dispositon of Deliveries) in ProtonC 
> 0.9.
> Thanks a lot !
> (minor edit - text formatting - on 12/21/2014)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (PROTON-784) Settled Deliveries keep piling up, and do not seem to get freed from heap

2015-01-06 Thread Rafael H. Schloming (JIRA)

[ 
https://issues.apache.org/jira/browse/PROTON-784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14266036#comment-14266036
 ] 

Rafael H. Schloming commented on PROTON-784:


I don't mean to suggest there isn't an issue. I just want to confirm whether or 
not the change I made above actually fixed the problem you were seeing but for 
linux only.

> Settled Deliveries keep piling up, and do not seem to get freed from heap
> -
>
> Key: PROTON-784
> URL: https://issues.apache.org/jira/browse/PROTON-784
> Project: Qpid Proton
>  Issue Type: Bug
>  Components: proton-c
>Affects Versions: 0.9
>Reporter: German Shepherd (PrE)
> Fix For: 0.9
>
>
> When running the ProtonC 0.8, this issue was not present.
> Then, in ProtonC 0.9 (Git trunk of 12/19/2014), there are changes in a way 
> the deliveries are handled (engine.c).
> Correct me if I'm wrong, but given the behavior in 0.8, and keeping the same 
> application side approach to ProtonC, while running 0.9, I would expect the 
> Deliveries to be eventually freed from heap. Or is there a new plan on how to 
> approach this ?
> I'm calling pn_messenger_settle with PN_CUMMULATIVE for both input and output 
> trackers, and the delivery->local.settled gets set to true (verified).
> Here is the dump of Deliveries, after there is one message received:
> {{tag=, local.type=36, remote.type=0, local.settled=1, remote.settled=1, 
> updated=0, current=0, writable=0, readable=0, work=0}}
> Then my application code sends a message to broker. The previous, now fully 
> settled Delivery, is not freed - here is the dump (there are now two 
> Deliveries on heap):
> {{tag=, local.type=36, remote.type=0, local.settled=1, remote.settled=1, 
> updated=0, current=0, writable=0, readable=0, work=0}}
> {{tag=\x00\x00\x00\x00\x00\x00\x00\x00, local.type=36, remote.type=36, 
> local.settled=1, remote.settled=1, updated=0, current=0, writable=0, 
> readable=0, work=0}}
> Continuing, by received one more message and also sending one to broker, 
> there are now four Deliveries on the heap.
> {{tag=, local.type=36, remote.type=0, local.settled=1, remote.settled=1, 
> updated=0, current=0, writable=0, readable=0, work=0}}
> {{tag=\x00\x00\x00\x00\x00\x00\x00\x00, local.type=36, remote.type=36, 
> local.settled=1, remote.settled=1, updated=0, current=0, writable=0, 
> readable=0, work=0}}
> {{tag=, local.type=36, remote.type=0, local.settled=1, remote.settled=1, 
> updated=0, current=0, writable=0, readable=0, work=0}}
> {{tag=\x01\x00\x00\x00\x00\x00\x00\x00, local.type=36, remote.type=36, 
> local.settled=1, remote.settled=1, updated=0, current=0, writable=0, 
> readable=0, work=0}}
> And so on, until it eventually runs out of heap.
> I have done an extensive debug session, looking at the refcounts, behavior 
> inside the pn_delivery_finalize(), places this gets called from, etc.
> One thing that hits the eye is the missing pn_full_settle() function, which 
> is now replaced somehow differently by other code. Also, the tpwork-ers used 
> to decref the Disposions, this is also modified for 0.9 (compared to 0.8).
> I'm not sure (yet) what is going on in there, it also might just be some 
> error of mine (so I'm not immediately describing this as a bug, and I might 
> provide more information as the situation unravels).
> At this moment, I would appreciate some hints on this topic, and also a 
> review of the particular functionality (dispositon of Deliveries) in ProtonC 
> 0.9.
> Thanks a lot !
> (minor edit - text formatting - on 12/21/2014)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (PROTON-784) Settled Deliveries keep piling up, and do not seem to get freed from heap

2015-01-05 Thread Chuck Rolke (JIRA)

[ 
https://issues.apache.org/jira/browse/PROTON-784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14265271#comment-14265271
 ] 

Chuck Rolke commented on PROTON-784:


I'm sure there is an issue. It may not be this issue.

> Settled Deliveries keep piling up, and do not seem to get freed from heap
> -
>
> Key: PROTON-784
> URL: https://issues.apache.org/jira/browse/PROTON-784
> Project: Qpid Proton
>  Issue Type: Bug
>  Components: proton-c
>Affects Versions: 0.9
>Reporter: German Shepherd (PrE)
> Fix For: 0.9
>
>
> When running the ProtonC 0.8, this issue was not present.
> Then, in ProtonC 0.9 (Git trunk of 12/19/2014), there are changes in a way 
> the deliveries are handled (engine.c).
> Correct me if I'm wrong, but given the behavior in 0.8, and keeping the same 
> application side approach to ProtonC, while running 0.9, I would expect the 
> Deliveries to be eventually freed from heap. Or is there a new plan on how to 
> approach this ?
> I'm calling pn_messenger_settle with PN_CUMMULATIVE for both input and output 
> trackers, and the delivery->local.settled gets set to true (verified).
> Here is the dump of Deliveries, after there is one message received:
> {{tag=, local.type=36, remote.type=0, local.settled=1, remote.settled=1, 
> updated=0, current=0, writable=0, readable=0, work=0}}
> Then my application code sends a message to broker. The previous, now fully 
> settled Delivery, is not freed - here is the dump (there are now two 
> Deliveries on heap):
> {{tag=, local.type=36, remote.type=0, local.settled=1, remote.settled=1, 
> updated=0, current=0, writable=0, readable=0, work=0}}
> {{tag=\x00\x00\x00\x00\x00\x00\x00\x00, local.type=36, remote.type=36, 
> local.settled=1, remote.settled=1, updated=0, current=0, writable=0, 
> readable=0, work=0}}
> Continuing, by received one more message and also sending one to broker, 
> there are now four Deliveries on the heap.
> {{tag=, local.type=36, remote.type=0, local.settled=1, remote.settled=1, 
> updated=0, current=0, writable=0, readable=0, work=0}}
> {{tag=\x00\x00\x00\x00\x00\x00\x00\x00, local.type=36, remote.type=36, 
> local.settled=1, remote.settled=1, updated=0, current=0, writable=0, 
> readable=0, work=0}}
> {{tag=, local.type=36, remote.type=0, local.settled=1, remote.settled=1, 
> updated=0, current=0, writable=0, readable=0, work=0}}
> {{tag=\x01\x00\x00\x00\x00\x00\x00\x00, local.type=36, remote.type=36, 
> local.settled=1, remote.settled=1, updated=0, current=0, writable=0, 
> readable=0, work=0}}
> And so on, until it eventually runs out of heap.
> I have done an extensive debug session, looking at the refcounts, behavior 
> inside the pn_delivery_finalize(), places this gets called from, etc.
> One thing that hits the eye is the missing pn_full_settle() function, which 
> is now replaced somehow differently by other code. Also, the tpwork-ers used 
> to decref the Disposions, this is also modified for 0.9 (compared to 0.8).
> I'm not sure (yet) what is going on in there, it also might just be some 
> error of mine (so I'm not immediately describing this as a bug, and I might 
> provide more information as the situation unravels).
> At this moment, I would appreciate some hints on this topic, and also a 
> review of the particular functionality (dispositon of Deliveries) in ProtonC 
> 0.9.
> Thanks a lot !
> (minor edit - text formatting - on 12/21/2014)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (PROTON-784) Settled Deliveries keep piling up, and do not seem to get freed from heap

2015-01-05 Thread Rafael H. Schloming (JIRA)

[ 
https://issues.apache.org/jira/browse/PROTON-784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14265176#comment-14265176
 ] 

Rafael H. Schloming commented on PROTON-784:


I'm a bit confused as to how the fix could be platform specific. Are you sure 
the issue was there on linux prior to my fix?

> Settled Deliveries keep piling up, and do not seem to get freed from heap
> -
>
> Key: PROTON-784
> URL: https://issues.apache.org/jira/browse/PROTON-784
> Project: Qpid Proton
>  Issue Type: Bug
>  Components: proton-c
>Affects Versions: 0.9
>Reporter: German Shepherd (PrE)
> Fix For: 0.9
>
>
> When running the ProtonC 0.8, this issue was not present.
> Then, in ProtonC 0.9 (Git trunk of 12/19/2014), there are changes in a way 
> the deliveries are handled (engine.c).
> Correct me if I'm wrong, but given the behavior in 0.8, and keeping the same 
> application side approach to ProtonC, while running 0.9, I would expect the 
> Deliveries to be eventually freed from heap. Or is there a new plan on how to 
> approach this ?
> I'm calling pn_messenger_settle with PN_CUMMULATIVE for both input and output 
> trackers, and the delivery->local.settled gets set to true (verified).
> Here is the dump of Deliveries, after there is one message received:
> {{tag=, local.type=36, remote.type=0, local.settled=1, remote.settled=1, 
> updated=0, current=0, writable=0, readable=0, work=0}}
> Then my application code sends a message to broker. The previous, now fully 
> settled Delivery, is not freed - here is the dump (there are now two 
> Deliveries on heap):
> {{tag=, local.type=36, remote.type=0, local.settled=1, remote.settled=1, 
> updated=0, current=0, writable=0, readable=0, work=0}}
> {{tag=\x00\x00\x00\x00\x00\x00\x00\x00, local.type=36, remote.type=36, 
> local.settled=1, remote.settled=1, updated=0, current=0, writable=0, 
> readable=0, work=0}}
> Continuing, by received one more message and also sending one to broker, 
> there are now four Deliveries on the heap.
> {{tag=, local.type=36, remote.type=0, local.settled=1, remote.settled=1, 
> updated=0, current=0, writable=0, readable=0, work=0}}
> {{tag=\x00\x00\x00\x00\x00\x00\x00\x00, local.type=36, remote.type=36, 
> local.settled=1, remote.settled=1, updated=0, current=0, writable=0, 
> readable=0, work=0}}
> {{tag=, local.type=36, remote.type=0, local.settled=1, remote.settled=1, 
> updated=0, current=0, writable=0, readable=0, work=0}}
> {{tag=\x01\x00\x00\x00\x00\x00\x00\x00, local.type=36, remote.type=36, 
> local.settled=1, remote.settled=1, updated=0, current=0, writable=0, 
> readable=0, work=0}}
> And so on, until it eventually runs out of heap.
> I have done an extensive debug session, looking at the refcounts, behavior 
> inside the pn_delivery_finalize(), places this gets called from, etc.
> One thing that hits the eye is the missing pn_full_settle() function, which 
> is now replaced somehow differently by other code. Also, the tpwork-ers used 
> to decref the Disposions, this is also modified for 0.9 (compared to 0.8).
> I'm not sure (yet) what is going on in there, it also might just be some 
> error of mine (so I'm not immediately describing this as a bug, and I might 
> provide more information as the situation unravels).
> At this moment, I would appreciate some hints on this topic, and also a 
> review of the particular functionality (dispositon of Deliveries) in ProtonC 
> 0.9.
> Thanks a lot !
> (minor edit - text formatting - on 12/21/2014)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (PROTON-784) Settled Deliveries keep piling up, and do not seem to get freed from heap

2015-01-05 Thread Chuck Rolke (JIRA)

[ 
https://issues.apache.org/jira/browse/PROTON-784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14265090#comment-14265090
 ] 

Chuck Rolke commented on PROTON-784:


On Linux this issue appears resolved. On Windows it's still an issue and I'm 
investigating further from my end.

-Cheers


> Settled Deliveries keep piling up, and do not seem to get freed from heap
> -
>
> Key: PROTON-784
> URL: https://issues.apache.org/jira/browse/PROTON-784
> Project: Qpid Proton
>  Issue Type: Bug
>  Components: proton-c
>Affects Versions: 0.9
>Reporter: German Shepherd (PrE)
> Fix For: 0.9
>
>
> When running the ProtonC 0.8, this issue was not present.
> Then, in ProtonC 0.9 (Git trunk of 12/19/2014), there are changes in a way 
> the deliveries are handled (engine.c).
> Correct me if I'm wrong, but given the behavior in 0.8, and keeping the same 
> application side approach to ProtonC, while running 0.9, I would expect the 
> Deliveries to be eventually freed from heap. Or is there a new plan on how to 
> approach this ?
> I'm calling pn_messenger_settle with PN_CUMMULATIVE for both input and output 
> trackers, and the delivery->local.settled gets set to true (verified).
> Here is the dump of Deliveries, after there is one message received:
> {{tag=, local.type=36, remote.type=0, local.settled=1, remote.settled=1, 
> updated=0, current=0, writable=0, readable=0, work=0}}
> Then my application code sends a message to broker. The previous, now fully 
> settled Delivery, is not freed - here is the dump (there are now two 
> Deliveries on heap):
> {{tag=, local.type=36, remote.type=0, local.settled=1, remote.settled=1, 
> updated=0, current=0, writable=0, readable=0, work=0}}
> {{tag=\x00\x00\x00\x00\x00\x00\x00\x00, local.type=36, remote.type=36, 
> local.settled=1, remote.settled=1, updated=0, current=0, writable=0, 
> readable=0, work=0}}
> Continuing, by received one more message and also sending one to broker, 
> there are now four Deliveries on the heap.
> {{tag=, local.type=36, remote.type=0, local.settled=1, remote.settled=1, 
> updated=0, current=0, writable=0, readable=0, work=0}}
> {{tag=\x00\x00\x00\x00\x00\x00\x00\x00, local.type=36, remote.type=36, 
> local.settled=1, remote.settled=1, updated=0, current=0, writable=0, 
> readable=0, work=0}}
> {{tag=, local.type=36, remote.type=0, local.settled=1, remote.settled=1, 
> updated=0, current=0, writable=0, readable=0, work=0}}
> {{tag=\x01\x00\x00\x00\x00\x00\x00\x00, local.type=36, remote.type=36, 
> local.settled=1, remote.settled=1, updated=0, current=0, writable=0, 
> readable=0, work=0}}
> And so on, until it eventually runs out of heap.
> I have done an extensive debug session, looking at the refcounts, behavior 
> inside the pn_delivery_finalize(), places this gets called from, etc.
> One thing that hits the eye is the missing pn_full_settle() function, which 
> is now replaced somehow differently by other code. Also, the tpwork-ers used 
> to decref the Disposions, this is also modified for 0.9 (compared to 0.8).
> I'm not sure (yet) what is going on in there, it also might just be some 
> error of mine (so I'm not immediately describing this as a bug, and I might 
> provide more information as the situation unravels).
> At this moment, I would appreciate some hints on this topic, and also a 
> review of the particular functionality (dispositon of Deliveries) in ProtonC 
> 0.9.
> Thanks a lot !
> (minor edit - text formatting - on 12/21/2014)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (PROTON-784) Settled Deliveries keep piling up, and do not seem to get freed from heap

2015-01-05 Thread Rafael H. Schloming (JIRA)

[ 
https://issues.apache.org/jira/browse/PROTON-784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14264501#comment-14264501
 ] 

Rafael H. Schloming commented on PROTON-784:


Any chance you can come up with a minimal reproducer in terms of the proton 
API? I have no clue how messaging is using proton internally, so a minimal 
reproducer in terms of the messaging API doesn't tell me a lot.

> Settled Deliveries keep piling up, and do not seem to get freed from heap
> -
>
> Key: PROTON-784
> URL: https://issues.apache.org/jira/browse/PROTON-784
> Project: Qpid Proton
>  Issue Type: Bug
>  Components: proton-c
>Affects Versions: 0.9
>Reporter: German Shepherd (PrE)
> Fix For: 0.9
>
>
> When running the ProtonC 0.8, this issue was not present.
> Then, in ProtonC 0.9 (Git trunk of 12/19/2014), there are changes in a way 
> the deliveries are handled (engine.c).
> Correct me if I'm wrong, but given the behavior in 0.8, and keeping the same 
> application side approach to ProtonC, while running 0.9, I would expect the 
> Deliveries to be eventually freed from heap. Or is there a new plan on how to 
> approach this ?
> I'm calling pn_messenger_settle with PN_CUMMULATIVE for both input and output 
> trackers, and the delivery->local.settled gets set to true (verified).
> Here is the dump of Deliveries, after there is one message received:
> {{tag=, local.type=36, remote.type=0, local.settled=1, remote.settled=1, 
> updated=0, current=0, writable=0, readable=0, work=0}}
> Then my application code sends a message to broker. The previous, now fully 
> settled Delivery, is not freed - here is the dump (there are now two 
> Deliveries on heap):
> {{tag=, local.type=36, remote.type=0, local.settled=1, remote.settled=1, 
> updated=0, current=0, writable=0, readable=0, work=0}}
> {{tag=\x00\x00\x00\x00\x00\x00\x00\x00, local.type=36, remote.type=36, 
> local.settled=1, remote.settled=1, updated=0, current=0, writable=0, 
> readable=0, work=0}}
> Continuing, by received one more message and also sending one to broker, 
> there are now four Deliveries on the heap.
> {{tag=, local.type=36, remote.type=0, local.settled=1, remote.settled=1, 
> updated=0, current=0, writable=0, readable=0, work=0}}
> {{tag=\x00\x00\x00\x00\x00\x00\x00\x00, local.type=36, remote.type=36, 
> local.settled=1, remote.settled=1, updated=0, current=0, writable=0, 
> readable=0, work=0}}
> {{tag=, local.type=36, remote.type=0, local.settled=1, remote.settled=1, 
> updated=0, current=0, writable=0, readable=0, work=0}}
> {{tag=\x01\x00\x00\x00\x00\x00\x00\x00, local.type=36, remote.type=36, 
> local.settled=1, remote.settled=1, updated=0, current=0, writable=0, 
> readable=0, work=0}}
> And so on, until it eventually runs out of heap.
> I have done an extensive debug session, looking at the refcounts, behavior 
> inside the pn_delivery_finalize(), places this gets called from, etc.
> One thing that hits the eye is the missing pn_full_settle() function, which 
> is now replaced somehow differently by other code. Also, the tpwork-ers used 
> to decref the Disposions, this is also modified for 0.9 (compared to 0.8).
> I'm not sure (yet) what is going on in there, it also might just be some 
> error of mine (so I'm not immediately describing this as a bug, and I might 
> provide more information as the situation unravels).
> At this moment, I would appreciate some hints on this topic, and also a 
> review of the particular functionality (dispositon of Deliveries) in ProtonC 
> 0.9.
> Thanks a lot !
> (minor edit - text formatting - on 12/21/2014)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (PROTON-784) Settled Deliveries keep piling up, and do not seem to get freed from heap

2015-01-05 Thread German Shepherd (PrE) (JIRA)

[ 
https://issues.apache.org/jira/browse/PROTON-784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14264322#comment-14264322
 ] 

German Shepherd (PrE) commented on PROTON-784:
--

I'm back at work. And - so I got to compile the 0.9 with the Rafael's patch 
(BTW. thanks for that !):
it is stable and it does work well, the deliveries are removed from heap (or 
put onto the list for reuse) now. 
Nice.

I will let it work over night, sending and receiving messages, to see the 
longer-term outcome.

Note. I'm testing the plain ProtonC (the Messenger), not the Qpid additions to 
it, 
so I can't comment on whether it fixed the situation Chuck has reported.

> Settled Deliveries keep piling up, and do not seem to get freed from heap
> -
>
> Key: PROTON-784
> URL: https://issues.apache.org/jira/browse/PROTON-784
> Project: Qpid Proton
>  Issue Type: Bug
>  Components: proton-c
>Affects Versions: 0.9
>Reporter: German Shepherd (PrE)
> Fix For: 0.9
>
>
> When running the ProtonC 0.8, this issue was not present.
> Then, in ProtonC 0.9 (Git trunk of 12/19/2014), there are changes in a way 
> the deliveries are handled (engine.c).
> Correct me if I'm wrong, but given the behavior in 0.8, and keeping the same 
> application side approach to ProtonC, while running 0.9, I would expect the 
> Deliveries to be eventually freed from heap. Or is there a new plan on how to 
> approach this ?
> I'm calling pn_messenger_settle with PN_CUMMULATIVE for both input and output 
> trackers, and the delivery->local.settled gets set to true (verified).
> Here is the dump of Deliveries, after there is one message received:
> {{tag=, local.type=36, remote.type=0, local.settled=1, remote.settled=1, 
> updated=0, current=0, writable=0, readable=0, work=0}}
> Then my application code sends a message to broker. The previous, now fully 
> settled Delivery, is not freed - here is the dump (there are now two 
> Deliveries on heap):
> {{tag=, local.type=36, remote.type=0, local.settled=1, remote.settled=1, 
> updated=0, current=0, writable=0, readable=0, work=0}}
> {{tag=\x00\x00\x00\x00\x00\x00\x00\x00, local.type=36, remote.type=36, 
> local.settled=1, remote.settled=1, updated=0, current=0, writable=0, 
> readable=0, work=0}}
> Continuing, by received one more message and also sending one to broker, 
> there are now four Deliveries on the heap.
> {{tag=, local.type=36, remote.type=0, local.settled=1, remote.settled=1, 
> updated=0, current=0, writable=0, readable=0, work=0}}
> {{tag=\x00\x00\x00\x00\x00\x00\x00\x00, local.type=36, remote.type=36, 
> local.settled=1, remote.settled=1, updated=0, current=0, writable=0, 
> readable=0, work=0}}
> {{tag=, local.type=36, remote.type=0, local.settled=1, remote.settled=1, 
> updated=0, current=0, writable=0, readable=0, work=0}}
> {{tag=\x01\x00\x00\x00\x00\x00\x00\x00, local.type=36, remote.type=36, 
> local.settled=1, remote.settled=1, updated=0, current=0, writable=0, 
> readable=0, work=0}}
> And so on, until it eventually runs out of heap.
> I have done an extensive debug session, looking at the refcounts, behavior 
> inside the pn_delivery_finalize(), places this gets called from, etc.
> One thing that hits the eye is the missing pn_full_settle() function, which 
> is now replaced somehow differently by other code. Also, the tpwork-ers used 
> to decref the Disposions, this is also modified for 0.9 (compared to 0.8).
> I'm not sure (yet) what is going on in there, it also might just be some 
> error of mine (so I'm not immediately describing this as a bug, and I might 
> provide more information as the situation unravels).
> At this moment, I would appreciate some hints on this topic, and also a 
> review of the particular functionality (dispositon of Deliveries) in ProtonC 
> 0.9.
> Thanks a lot !
> (minor edit - text formatting - on 12/21/2014)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (PROTON-784) Settled Deliveries keep piling up, and do not seem to get freed from heap

2015-01-02 Thread Chuck Rolke (JIRA)

[ 
https://issues.apache.org/jira/browse/PROTON-784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14262956#comment-14262956
 ] 

Chuck Rolke commented on PROTON-784:


I built with your last patch but the issue persists.


> Settled Deliveries keep piling up, and do not seem to get freed from heap
> -
>
> Key: PROTON-784
> URL: https://issues.apache.org/jira/browse/PROTON-784
> Project: Qpid Proton
>  Issue Type: Bug
>  Components: proton-c
>Affects Versions: 0.9
>Reporter: German Shepherd (PrE)
> Fix For: 0.9
>
>
> When running the ProtonC 0.8, this issue was not present.
> Then, in ProtonC 0.9 (Git trunk of 12/19/2014), there are changes in a way 
> the deliveries are handled (engine.c).
> Correct me if I'm wrong, but given the behavior in 0.8, and keeping the same 
> application side approach to ProtonC, while running 0.9, I would expect the 
> Deliveries to be eventually freed from heap. Or is there a new plan on how to 
> approach this ?
> I'm calling pn_messenger_settle with PN_CUMMULATIVE for both input and output 
> trackers, and the delivery->local.settled gets set to true (verified).
> Here is the dump of Deliveries, after there is one message received:
> {{tag=, local.type=36, remote.type=0, local.settled=1, remote.settled=1, 
> updated=0, current=0, writable=0, readable=0, work=0}}
> Then my application code sends a message to broker. The previous, now fully 
> settled Delivery, is not freed - here is the dump (there are now two 
> Deliveries on heap):
> {{tag=, local.type=36, remote.type=0, local.settled=1, remote.settled=1, 
> updated=0, current=0, writable=0, readable=0, work=0}}
> {{tag=\x00\x00\x00\x00\x00\x00\x00\x00, local.type=36, remote.type=36, 
> local.settled=1, remote.settled=1, updated=0, current=0, writable=0, 
> readable=0, work=0}}
> Continuing, by received one more message and also sending one to broker, 
> there are now four Deliveries on the heap.
> {{tag=, local.type=36, remote.type=0, local.settled=1, remote.settled=1, 
> updated=0, current=0, writable=0, readable=0, work=0}}
> {{tag=\x00\x00\x00\x00\x00\x00\x00\x00, local.type=36, remote.type=36, 
> local.settled=1, remote.settled=1, updated=0, current=0, writable=0, 
> readable=0, work=0}}
> {{tag=, local.type=36, remote.type=0, local.settled=1, remote.settled=1, 
> updated=0, current=0, writable=0, readable=0, work=0}}
> {{tag=\x01\x00\x00\x00\x00\x00\x00\x00, local.type=36, remote.type=36, 
> local.settled=1, remote.settled=1, updated=0, current=0, writable=0, 
> readable=0, work=0}}
> And so on, until it eventually runs out of heap.
> I have done an extensive debug session, looking at the refcounts, behavior 
> inside the pn_delivery_finalize(), places this gets called from, etc.
> One thing that hits the eye is the missing pn_full_settle() function, which 
> is now replaced somehow differently by other code. Also, the tpwork-ers used 
> to decref the Disposions, this is also modified for 0.9 (compared to 0.8).
> I'm not sure (yet) what is going on in there, it also might just be some 
> error of mine (so I'm not immediately describing this as a bug, and I might 
> provide more information as the situation unravels).
> At this moment, I would appreciate some hints on this topic, and also a 
> review of the particular functionality (dispositon of Deliveries) in ProtonC 
> 0.9.
> Thanks a lot !
> (minor edit - text formatting - on 12/21/2014)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (PROTON-784) Settled Deliveries keep piling up, and do not seem to get freed from heap

2014-12-28 Thread Rafael H. Schloming (JIRA)

[ 
https://issues.apache.org/jira/browse/PROTON-784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14259646#comment-14259646
 ] 

Rafael H. Schloming commented on PROTON-784:


I ran into what I believe is likely to be the same issue during my own testing. 
I committed a fix that solves the issue I ran into and hopefully both the 
issues you are seeing as well. It would be great if you guys could verify that 
it does in fact fix your issues also.

> Settled Deliveries keep piling up, and do not seem to get freed from heap
> -
>
> Key: PROTON-784
> URL: https://issues.apache.org/jira/browse/PROTON-784
> Project: Qpid Proton
>  Issue Type: Bug
>  Components: proton-c
>Affects Versions: 0.9
>Reporter: German Shepherd (PrE)
> Fix For: 0.9
>
>
> When running the ProtonC 0.8, this issue was not present.
> Then, in ProtonC 0.9 (Git trunk of 12/19/2014), there are changes in a way 
> the deliveries are handled (engine.c).
> Correct me if I'm wrong, but given the behavior in 0.8, and keeping the same 
> application side approach to ProtonC, while running 0.9, I would expect the 
> Deliveries to be eventually freed from heap. Or is there a new plan on how to 
> approach this ?
> I'm calling pn_messenger_settle with PN_CUMMULATIVE for both input and output 
> trackers, and the delivery->local.settled gets set to true (verified).
> Here is the dump of Deliveries, after there is one message received:
> {{tag=, local.type=36, remote.type=0, local.settled=1, remote.settled=1, 
> updated=0, current=0, writable=0, readable=0, work=0}}
> Then my application code sends a message to broker. The previous, now fully 
> settled Delivery, is not freed - here is the dump (there are now two 
> Deliveries on heap):
> {{tag=, local.type=36, remote.type=0, local.settled=1, remote.settled=1, 
> updated=0, current=0, writable=0, readable=0, work=0}}
> {{tag=\x00\x00\x00\x00\x00\x00\x00\x00, local.type=36, remote.type=36, 
> local.settled=1, remote.settled=1, updated=0, current=0, writable=0, 
> readable=0, work=0}}
> Continuing, by received one more message and also sending one to broker, 
> there are now four Deliveries on the heap.
> {{tag=, local.type=36, remote.type=0, local.settled=1, remote.settled=1, 
> updated=0, current=0, writable=0, readable=0, work=0}}
> {{tag=\x00\x00\x00\x00\x00\x00\x00\x00, local.type=36, remote.type=36, 
> local.settled=1, remote.settled=1, updated=0, current=0, writable=0, 
> readable=0, work=0}}
> {{tag=, local.type=36, remote.type=0, local.settled=1, remote.settled=1, 
> updated=0, current=0, writable=0, readable=0, work=0}}
> {{tag=\x01\x00\x00\x00\x00\x00\x00\x00, local.type=36, remote.type=36, 
> local.settled=1, remote.settled=1, updated=0, current=0, writable=0, 
> readable=0, work=0}}
> And so on, until it eventually runs out of heap.
> I have done an extensive debug session, looking at the refcounts, behavior 
> inside the pn_delivery_finalize(), places this gets called from, etc.
> One thing that hits the eye is the missing pn_full_settle() function, which 
> is now replaced somehow differently by other code. Also, the tpwork-ers used 
> to decref the Disposions, this is also modified for 0.9 (compared to 0.8).
> I'm not sure (yet) what is going on in there, it also might just be some 
> error of mine (so I'm not immediately describing this as a bug, and I might 
> provide more information as the situation unravels).
> At this moment, I would appreciate some hints on this topic, and also a 
> review of the particular functionality (dispositon of Deliveries) in ProtonC 
> 0.9.
> Thanks a lot !
> (minor edit - text formatting - on 12/21/2014)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (PROTON-784) Settled Deliveries keep piling up, and do not seem to get freed from heap

2014-12-28 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/PROTON-784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14259642#comment-14259642
 ] 

ASF subversion and git services commented on PROTON-784:


Commit ae8e0fd32573004dfa0520d2a9c835d920f90e28 in qpid-proton's branch 
refs/heads/master from Rafael Schloming
[ https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;h=ae8e0fd ]

PROTON-784: remove settled deliveries from the delivery map to prevent buildup


> Settled Deliveries keep piling up, and do not seem to get freed from heap
> -
>
> Key: PROTON-784
> URL: https://issues.apache.org/jira/browse/PROTON-784
> Project: Qpid Proton
>  Issue Type: Bug
>  Components: proton-c
>Affects Versions: 0.9
>Reporter: German Shepherd (PrE)
> Fix For: 0.9
>
>
> When running the ProtonC 0.8, this issue was not present.
> Then, in ProtonC 0.9 (Git trunk of 12/19/2014), there are changes in a way 
> the deliveries are handled (engine.c).
> Correct me if I'm wrong, but given the behavior in 0.8, and keeping the same 
> application side approach to ProtonC, while running 0.9, I would expect the 
> Deliveries to be eventually freed from heap. Or is there a new plan on how to 
> approach this ?
> I'm calling pn_messenger_settle with PN_CUMMULATIVE for both input and output 
> trackers, and the delivery->local.settled gets set to true (verified).
> Here is the dump of Deliveries, after there is one message received:
> {{tag=, local.type=36, remote.type=0, local.settled=1, remote.settled=1, 
> updated=0, current=0, writable=0, readable=0, work=0}}
> Then my application code sends a message to broker. The previous, now fully 
> settled Delivery, is not freed - here is the dump (there are now two 
> Deliveries on heap):
> {{tag=, local.type=36, remote.type=0, local.settled=1, remote.settled=1, 
> updated=0, current=0, writable=0, readable=0, work=0}}
> {{tag=\x00\x00\x00\x00\x00\x00\x00\x00, local.type=36, remote.type=36, 
> local.settled=1, remote.settled=1, updated=0, current=0, writable=0, 
> readable=0, work=0}}
> Continuing, by received one more message and also sending one to broker, 
> there are now four Deliveries on the heap.
> {{tag=, local.type=36, remote.type=0, local.settled=1, remote.settled=1, 
> updated=0, current=0, writable=0, readable=0, work=0}}
> {{tag=\x00\x00\x00\x00\x00\x00\x00\x00, local.type=36, remote.type=36, 
> local.settled=1, remote.settled=1, updated=0, current=0, writable=0, 
> readable=0, work=0}}
> {{tag=, local.type=36, remote.type=0, local.settled=1, remote.settled=1, 
> updated=0, current=0, writable=0, readable=0, work=0}}
> {{tag=\x01\x00\x00\x00\x00\x00\x00\x00, local.type=36, remote.type=36, 
> local.settled=1, remote.settled=1, updated=0, current=0, writable=0, 
> readable=0, work=0}}
> And so on, until it eventually runs out of heap.
> I have done an extensive debug session, looking at the refcounts, behavior 
> inside the pn_delivery_finalize(), places this gets called from, etc.
> One thing that hits the eye is the missing pn_full_settle() function, which 
> is now replaced somehow differently by other code. Also, the tpwork-ers used 
> to decref the Disposions, this is also modified for 0.9 (compared to 0.8).
> I'm not sure (yet) what is going on in there, it also might just be some 
> error of mine (so I'm not immediately describing this as a bug, and I might 
> provide more information as the situation unravels).
> At this moment, I would appreciate some hints on this topic, and also a 
> review of the particular functionality (dispositon of Deliveries) in ProtonC 
> 0.9.
> Thanks a lot !
> (minor edit - text formatting - on 12/21/2014)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (PROTON-784) Settled Deliveries keep piling up, and do not seem to get freed from heap

2014-12-23 Thread Chuck Rolke (JIRA)

[ 
https://issues.apache.org/jira/browse/PROTON-784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14257524#comment-14257524
 ] 

Chuck Rolke commented on PROTON-784:


A simple reproducer is available in the Qpid messaging examples. Add 
{noformat}
diff --git a/qpid/cpp/examples/messaging/client.cpp 
b/qpid/cpp/examples/messaging/client.cpp
index d695dd9..f580d45 100644
--- a/qpid/cpp/examples/messaging/client.cpp
+++ b/qpid/cpp/examples/messaging/client.cpp
@@ -61,12 +61,18 @@ int main(int argc, char** argv) {
 
Message request;
 request.setReplyTo(responseQueue);
+for (int j=0; j<5000; j++) {
+std::cout << "pass " << j << std::endl;
+if (1250 == j) {
+std::cout << "Break here. Next transmit won't go" << std::endl;
+}
for (int i=0; i<4; i++) {
 request.setContentObject(s[i]);
 sender.send(request);
 Message response = receiver.fetch();
 std::cout << request.getContentObject() << " -> " << 
response.getContentObject() << std::endl;
}
+}
 connection.close();
 return 0;
 } catch(const std::exception& error) {
{noformat}

The oddball 1250 comes from a limit set in cpp/src/qpid/broker/amqp/Outgoing.cpp
..., deliveries(5000), ...
Deliveries are supposed to come back from proton through 
OutgoingFromQueue::handle
but that function is never called.

> Settled Deliveries keep piling up, and do not seem to get freed from heap
> -
>
> Key: PROTON-784
> URL: https://issues.apache.org/jira/browse/PROTON-784
> Project: Qpid Proton
>  Issue Type: Bug
>  Components: proton-c
>Affects Versions: 0.9
>Reporter: German Shepherd (PrE)
> Fix For: 0.9
>
>
> When running the ProtonC 0.8, this issue was not present.
> Then, in ProtonC 0.9 (Git trunk of 12/19/2014), there are changes in a way 
> the deliveries are handled (engine.c).
> Correct me if I'm wrong, but given the behavior in 0.8, and keeping the same 
> application side approach to ProtonC, while running 0.9, I would expect the 
> Deliveries to be eventually freed from heap. Or is there a new plan on how to 
> approach this ?
> I'm calling pn_messenger_settle with PN_CUMMULATIVE for both input and output 
> trackers, and the delivery->local.settled gets set to true (verified).
> Here is the dump of Deliveries, after there is one message received:
> {{tag=, local.type=36, remote.type=0, local.settled=1, remote.settled=1, 
> updated=0, current=0, writable=0, readable=0, work=0}}
> Then my application code sends a message to broker. The previous, now fully 
> settled Delivery, is not freed - here is the dump (there are now two 
> Deliveries on heap):
> {{tag=, local.type=36, remote.type=0, local.settled=1, remote.settled=1, 
> updated=0, current=0, writable=0, readable=0, work=0}}
> {{tag=\x00\x00\x00\x00\x00\x00\x00\x00, local.type=36, remote.type=36, 
> local.settled=1, remote.settled=1, updated=0, current=0, writable=0, 
> readable=0, work=0}}
> Continuing, by received one more message and also sending one to broker, 
> there are now four Deliveries on the heap.
> {{tag=, local.type=36, remote.type=0, local.settled=1, remote.settled=1, 
> updated=0, current=0, writable=0, readable=0, work=0}}
> {{tag=\x00\x00\x00\x00\x00\x00\x00\x00, local.type=36, remote.type=36, 
> local.settled=1, remote.settled=1, updated=0, current=0, writable=0, 
> readable=0, work=0}}
> {{tag=, local.type=36, remote.type=0, local.settled=1, remote.settled=1, 
> updated=0, current=0, writable=0, readable=0, work=0}}
> {{tag=\x01\x00\x00\x00\x00\x00\x00\x00, local.type=36, remote.type=36, 
> local.settled=1, remote.settled=1, updated=0, current=0, writable=0, 
> readable=0, work=0}}
> And so on, until it eventually runs out of heap.
> I have done an extensive debug session, looking at the refcounts, behavior 
> inside the pn_delivery_finalize(), places this gets called from, etc.
> One thing that hits the eye is the missing pn_full_settle() function, which 
> is now replaced somehow differently by other code. Also, the tpwork-ers used 
> to decref the Disposions, this is also modified for 0.9 (compared to 0.8).
> I'm not sure (yet) what is going on in there, it also might just be some 
> error of mine (so I'm not immediately describing this as a bug, and I might 
> provide more information as the situation unravels).
> At this moment, I would appreciate some hints on this topic, and also a 
> review of the particular functionality (dispositon of Deliveries) in ProtonC 
> 0.9.
> Thanks a lot !
> (minor edit - text formatting - on 12/21/2014)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (PROTON-784) Settled Deliveries keep piling up, and do not seem to get freed from heap

2014-12-21 Thread German Shepherd (JIRA)

[ 
https://issues.apache.org/jira/browse/PROTON-784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14255095#comment-14255095
 ] 

German Shepherd commented on PROTON-784:


Sure. I'll be back at work on the first week of January, and I'll immediately 
post all the info related to this, including some additional debug prints.

I understand the change (0.8 -> 0.9) as you describe it, there is no issue with 
that on my side (I'm starting to like the 0.9 more and more as I go through).
Altough it makes me stuck with 0.8 which keeps the heap usage deterministic and 
locked on a particular level, but the 0.9 adds to it the never-released 
deliveries, so the heap grows indefinitely.

Generally, I can say I'm running the msgr_recv.c-like code (I run my own app 
which is functionaly close to msgr_recv, but in general, there are no specific 
changes that should indicate such an issue or make it obvious to happen).

As far as I recall (I'm out of work now), the pn_delivery_finalize() actually 
gets called, but it can't release the delivery (or put it on the delivery_pool 
list) as there is the tpwork scheduled (and the finalize is not called any more 
after that) - the pni_preserve_delivery() returns "true" in the particular call 
(although the delivery->local.settled is "true", but the delivery->tpwork is 
"true" as well).

The one thing I need is to simply remove the delivery from heap (as the 
ultimate outcome - or maybe the deliver_pool list will solve this as well ?), 
when it gets the delivery->local.settled set to "true" and all the tpwork 
associated to it is done.

> Settled Deliveries keep piling up, and do not seem to get freed from heap
> -
>
> Key: PROTON-784
> URL: https://issues.apache.org/jira/browse/PROTON-784
> Project: Qpid Proton
>  Issue Type: Bug
>  Components: proton-c
>Affects Versions: 0.9
>Reporter: German Shepherd
> Fix For: 0.9
>
>
> When running the ProtonC 0.8, this issue was not present.
> Then, in ProtonC 0.9 (Git trunk of 12/19/2014), there are changes in a way 
> the deliveries are handled (engine.c).
> Correct me if I'm wrong, but given the behavior in 0.8, and keeping the same 
> application side approach to ProtonC, while running 0.9, I would expect the 
> Deliveries to be eventually freed from heap. Or is there a new plan on how to 
> approach this ?
> I'm calling pn_messenger_settle with PN_CUMMULATIVE for both input and output 
> trackers, and the delivery->local.settled gets set to true (verified).
> Here is the dump of Deliveries, after there is one message received:
> {{tag=, local.type=36, remote.type=0, local.settled=1, remote.settled=1, 
> updated=0, current=0, writable=0, readable=0, work=0}}
> Then my application code sends a message to broker. The previous, now fully 
> settled Delivery, is not freed - here is the dump (there are now two 
> dispositions on heap):
> {{tag=, local.type=36, remote.type=0, local.settled=1, remote.settled=1, 
> updated=0, current=0, writable=0, readable=0, work=0}}
> {{tag=\x00\x00\x00\x00\x00\x00\x00\x00, local.type=36, remote.type=36, 
> local.settled=1, remote.settled=1, updated=0, current=0, writable=0, 
> readable=0, work=0}}
> Continuing, by received one more message and also sending one to broker, 
> there are now four Deliveries on the heap.
> {tag=, local.type=36, remote.type=0, local.settled=1, remote.settled=1, 
> updated=0, current=0, writable=0, readable=0, work=0}
> {tag=\x00\x00\x00\x00\x00\x00\x00\x00, local.type=36, remote.type=36, 
> local.settled=1, remote.settled=1, updated=0, current=0, writable=0, 
> readable=0, work=0}
> {tag=, local.type=36, remote.type=0, local.settled=1, remote.settled=1, 
> updated=0, current=0, writable=0, readable=0, work=0}
> {tag=\x01\x00\x00\x00\x00\x00\x00\x00, local.type=36, remote.type=36, 
> local.settled=1, remote.settled=1, updated=0, current=0, writable=0, 
> readable=0, work=0}
> And so on, until it eventually runs out of heap.
> I have done an extensive debug session, looking at the refcounts, behavior 
> inside the pn_delivery_finalize(), places this gets called from, etc.
> One thing that hits the eye is the missing pn_full_settle() function, which 
> is now replaced somehow differently by other code. Also, the tpwork-ers used 
> to decref the Disposions, this is also modified for 0.9 (compared to 0.8).
> I'm not sure (yet) what is going on in there, it also might just be some 
> error of mine (so I'm not immediately describing this as a bug, and I might 
> provide more information as the situation unravels).
> At this moment, I would appreciate some hints on this topic, and also a 
> review of the particular functionality (dispositon of Deliveries) in ProtonC 
> 0.9.
> Thanks a lot !



--
This message was sent by Atlassian JIRA
(v6.3.4#633

[jira] [Commented] (PROTON-784) Settled Deliveries keep piling up, and do not seem to get freed from heap

2014-12-20 Thread Rafael H. Schloming (JIRA)

[ 
https://issues.apache.org/jira/browse/PROTON-784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14254691#comment-14254691
 ] 

Rafael H. Schloming commented on PROTON-784:


This sounds like a bug somewhere. The refcounting changes you mention shouldn't 
change the observable behaviour of the APIs you are using. They are for the 
benefit of the language bindings which directly incref/decref proton objects. 
Can you provide a small test case that reproduces the behaviour you are seeing?

> Settled Deliveries keep piling up, and do not seem to get freed from heap
> -
>
> Key: PROTON-784
> URL: https://issues.apache.org/jira/browse/PROTON-784
> Project: Qpid Proton
>  Issue Type: Bug
>  Components: proton-c
>Affects Versions: 0.9
>Reporter: German Shepherd
> Fix For: 0.9
>
>
> When running the ProtonC 0.8, this issue was not present.
> Then, in ProtonC 0.9 (Git trunk of 12/19/2014), there are changes in a way 
> the deliveries are handled (engine.c).
> Correct me if I'm wrong, but given the behavior in 0.8, and keeping the same 
> application side approach to ProtonC, while running 0.9, I would expect the 
> Deliveries to be eventually freed from heap. Or is there a new plan on how to 
> approach this ?
> I'm calling pn_messenger_settle with PN_CUMMULATIVE for both input and output 
> trackers, and the delivery->local.settled gets set to true (verified).
> Here is the dump of Deliveries, after there is one message received:
> {{tag=, local.type=36, remote.type=0, local.settled=1, remote.settled=1, 
> updated=0, current=0, writable=0, readable=0, work=0}}
> Then my application code sends a message to broker. The previous, now fully 
> settled Delivery, is not freed - here is the dump (there are now two 
> dispositions on heap):
> {{tag=, local.type=36, remote.type=0, local.settled=1, remote.settled=1, 
> updated=0, current=0, writable=0, readable=0, work=0}}
> {{tag=\x00\x00\x00\x00\x00\x00\x00\x00, local.type=36, remote.type=36, 
> local.settled=1, remote.settled=1, updated=0, current=0, writable=0, 
> readable=0, work=0}}
> Continuing, by received one more message and also sending one to broker, 
> there are now four Deliveries on the heap.
> {tag=, local.type=36, remote.type=0, local.settled=1, remote.settled=1, 
> updated=0, current=0, writable=0, readable=0, work=0}
> {tag=\x00\x00\x00\x00\x00\x00\x00\x00, local.type=36, remote.type=36, 
> local.settled=1, remote.settled=1, updated=0, current=0, writable=0, 
> readable=0, work=0}
> {tag=, local.type=36, remote.type=0, local.settled=1, remote.settled=1, 
> updated=0, current=0, writable=0, readable=0, work=0}
> {tag=\x01\x00\x00\x00\x00\x00\x00\x00, local.type=36, remote.type=36, 
> local.settled=1, remote.settled=1, updated=0, current=0, writable=0, 
> readable=0, work=0}
> And so on, until it eventually runs out of heap.
> I have done an extensive debug session, looking at the refcounts, behavior 
> inside the pn_delivery_finalize(), places this gets called from, etc.
> One thing that hits the eye is the missing pn_full_settle() function, which 
> is now replaced somehow differently by other code. Also, the tpwork-ers used 
> to decref the Disposions, this is also modified for 0.9 (compared to 0.8).
> I'm not sure (yet) what is going on in there, it also might just be some 
> error of mine (so I'm not immediately describing this as a bug, and I might 
> provide more information as the situation unravels).
> At this moment, I would appreciate some hints on this topic, and also a 
> review of the particular functionality (dispositon of Deliveries) in ProtonC 
> 0.9.
> Thanks a lot !



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)