[libfabric-users] Heap use after free from completion queue data fi_cq_sread()

Hefty, Sean sean.hefty at intel.com
Fri Feb 21 12:28:53 PST 2020

> The message in question contains a header of fixed size for future data
> entries. Other messages of variable size can be sent and received after
> the header information. The time libfabric needs to generate a
> completion queue entry (and therefore to complete receiving the header)
> seems to correlate to the total amount of data transfered. I did not
> find hints in the documentation or the guides that could explain this
> behaviour. Is that behaviour normal, at least for certain configurations
> with the socket provider or do I have another bug?

A completion cannot be generated until the data has been transferred.  Obviously, the more data there is the transfer, the longer it takes.

> So is there either a way to signal libfabric to exit that blocking
> state, to specify a condition for example via a flag or to access info
> about the state of an endpoint receiving data (whether or not in work,
> so the waiting could be done outside)?

fi_cq_signal() can be used to release a thread waiting on sread.

- Sean

More information about the Libfabric-users mailing list