Negative Bytes Credit

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Negative Bytes Credit

sidarthsc
Hi,

We recently upgraded to version 7.0.7 of the Java broker. We are using a
customized version of version 0.16 of the client. Yes, it's ancient, and we
are considering upgrading, but that is difficult for us for multiple
reasons. We noticed the following error in our logs after upgrading from
7.0.6 to 7.0.7:

ERROR [IO-/10.252.224.25:43564] - Bytes credit used value was negative: -497

Could you help us figure out the meaning of this error?

Thanks




--
Sent from: http://qpid.2158936.n2.nabble.com/Apache-Qpid-users-f2158936.html

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Negative Bytes Credit

Oleksandr Rudyy
Hi Sidarth,

It looks like a defect to me.
Can you provide any code reproducing the issue? Any sample app or test case
would be of great help?
Any information about your consumption use case would be helpful as well.

Kind Regards,
Alex



On Mon, 10 Jun 2019 at 22:05, sidarthsc <[hidden email]>
wrote:

> Hi,
>
> We recently upgraded to version 7.0.7 of the Java broker. We are using a
> customized version of version 0.16 of the client. Yes, it's ancient, and we
> are considering upgrading, but that is difficult for us for multiple
> reasons. We noticed the following error in our logs after upgrading from
> 7.0.6 to 7.0.7:
>
> ERROR [IO-/10.252.224.25:43564] - Bytes credit used value was negative:
> -497
>
> Could you help us figure out the meaning of this error?
>
> Thanks
>
>
>
>
> --
> Sent from:
> http://qpid.2158936.n2.nabble.com/Apache-Qpid-users-f2158936.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Negative Bytes Credit

sidarthsc
I will try to get that information to you asap. Do you know if this error
messages signifies something impactful? Functionally, the broker appears to
be doing fine. Our throughput has not not decreased and most vitals, e.g.
heap memory, look okay.



--
Sent from: http://qpid.2158936.n2.nabble.com/Apache-Qpid-users-f2158936.html

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Negative Bytes Credit

Oleksandr Rudyy
Sidarth,

I cannot see any negative effect from the error at the moment. I believe
that WARN log level should be used to report the issue like this one.
Though, it is unclear for me yet whether it is a client or broker defect.

Kind Regards,
Alex


On Tue, 11 Jun 2019 at 23:50, sidarthsc <[hidden email]>
wrote:

> I will try to get that information to you asap. Do you know if this error
> messages signifies something impactful? Functionally, the broker appears to
> be doing fine. Our throughput has not not decreased and most vitals, e.g.
> heap memory, look okay.
>
>
>
> --
> Sent from:
> http://qpid.2158936.n2.nabble.com/Apache-Qpid-users-f2158936.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Negative Bytes Credit

sidarthsc
Thanks Alex. Could you point to the broker code that logs this message? I'd
like understand the context in which it's being logged, to see if I can
reproduce the issue for you.



--
Sent from: http://qpid.2158936.n2.nabble.com/Apache-Qpid-users-f2158936.html

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Negative Bytes Credit

Oleksandr Rudyy
Sidarth,

The log is reported from line 76 of class WindowCreditManager from method
restoreCredit[1].
The latter can be invoked in multiple code paths:
* when message is delivered with accept mode NONE and acquire mode
PRE_AQUIRED
* on receiving complete when message is delivered with accept mode NONE and
acquire mode NOT_AQUIRED
* on receiving flush
* after finishing handling of incoming bytes
* when subscriber cannot acquire message but already used the credits in
order to acquire
* when message cannot be delivered due to conversion issue from one
protocol into another
* on state changes in IO layer

Kind Regards,
Alex

[1]
https://github.com/apache/qpid-broker-j/blob/dcffe40f54366cb585344d0ec2d57e9dde6d62c8/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/WindowCreditManager.java#L76



On Wed, 12 Jun 2019 at 23:09, sidarthsc <[hidden email]>
wrote:

> Thanks Alex. Could you point to the broker code that logs this message? I'd
> like understand the context in which it's being logged, to see if I can
> reproduce the issue for you.
>
>
>
> --
> Sent from:
> http://qpid.2158936.n2.nabble.com/Apache-Qpid-users-f2158936.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Negative Bytes Credit

rgodfrey
In reply to this post by Oleksandr Rudyy
Alex,

looks like a broker defect to me.  If the bytes (or message) credit is set
to "infinite credit", then the useCreditForMessage method won't update the
used bytes (or message) credit.  However the restoreCredit method always
tries to deduct from the bytes (or message) used value, which will lead to
this error.  Since the default for the JMS client is (IIRC) an infinite
bytes credit paired with a fixed amount of message credit then we will see
this error.  Ironically it is being seen in 7.0.7 because we fixed a real
bug in 7.0.6 (https://issues.apache.org/jira/browse/QPID-8225).  The
"error" observed by Sirdath here is (as you say elsewhere) completely
harmless and can be ignored.

-- Rob

On Wed, 12 Jun 2019 at 11:52, Oleksandr Rudyy <[hidden email]> wrote:

> Sidarth,
>
> I cannot see any negative effect from the error at the moment. I believe
> that WARN log level should be used to report the issue like this one.
> Though, it is unclear for me yet whether it is a client or broker defect.
>
> Kind Regards,
> Alex
>
>
> On Tue, 11 Jun 2019 at 23:50, sidarthsc <[hidden email]>
> wrote:
>
> > I will try to get that information to you asap. Do you know if this error
> > messages signifies something impactful? Functionally, the broker appears
> to
> > be doing fine. Our throughput has not not decreased and most vitals, e.g.
> > heap memory, look okay.
> >
> >
> >
> > --
> > Sent from:
> > http://qpid.2158936.n2.nabble.com/Apache-Qpid-users-f2158936.html
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
> >
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Negative Bytes Credit

Oleksandr Rudyy
Rob,
Thanks a lot for the hint how to fix.
I committed the changes as part of
https://issues.apache.org/jira/browse/QPID-8322.
I will merge them into 7.0.x and 7.1.x branches for inclusion into 7.0.8
and 7.1.4 releases accordingly.

Kind Regards,
Alex

On Thu, 13 Jun 2019 at 21:00, Rob Godfrey <[hidden email]> wrote:

> Alex,
>
> looks like a broker defect to me.  If the bytes (or message) credit is set
> to "infinite credit", then the useCreditForMessage method won't update the
> used bytes (or message) credit.  However the restoreCredit method always
> tries to deduct from the bytes (or message) used value, which will lead to
> this error.  Since the default for the JMS client is (IIRC) an infinite
> bytes credit paired with a fixed amount of message credit then we will see
> this error.  Ironically it is being seen in 7.0.7 because we fixed a real
> bug in 7.0.6 (https://issues.apache.org/jira/browse/QPID-8225).  The
> "error" observed by Sirdath here is (as you say elsewhere) completely
> harmless and can be ignored.
>
> -- Rob
>
> On Wed, 12 Jun 2019 at 11:52, Oleksandr Rudyy <[hidden email]> wrote:
>
> > Sidarth,
> >
> > I cannot see any negative effect from the error at the moment. I believe
> > that WARN log level should be used to report the issue like this one.
> > Though, it is unclear for me yet whether it is a client or broker defect.
> >
> > Kind Regards,
> > Alex
> >
> >
> > On Tue, 11 Jun 2019 at 23:50, sidarthsc <[hidden email]>
> > wrote:
> >
> > > I will try to get that information to you asap. Do you know if this
> error
> > > messages signifies something impactful? Functionally, the broker
> appears
> > to
> > > be doing fine. Our throughput has not not decreased and most vitals,
> e.g.
> > > heap memory, look okay.
> > >
> > >
> > >
> > > --
> > > Sent from:
> > > http://qpid.2158936.n2.nabble.com/Apache-Qpid-users-f2158936.html
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [hidden email]
> > > For additional commands, e-mail: [hidden email]
> > >
> > >
> >
>