Acquiring a buffer from exhausted byte buffer pool causes NPE

Description

If the byte buffer provider fails to deliver an empty buffer from the pool we are only logging the exception and returning null. This can cause a direct NPE after that if the pool is exhausted. Thus, we must improve handling of such situations. Either we propagate the exception to the caller or we ensure that there is always a null check after a call to borrow byte buffer is made. We should also implement specific actions if buffer is not available.

Most likely this situation occurred because a large invocation was captured and sent (error in serializing/writing bytes in the output stream).

In addition we should document this to our Q&A section as the easy solution for this is to increase the direct memory given to the Agent/CMR.

Environment

None

Assignee

Ivan Senic

Reporter

Ivan Senic

Labels

None

Integrator

Patrice Bouillet

Components

Sprint

None

Fix versions

Affects versions

Priority

Medium
Configure