PR26131: garbled data might appear in staprun data channel output
The relay v2 data writing lacked inode locking protection against
concurrent readers (on the stapio side).
The garbled data often contains '\0' bytes and might replace good data
or get appended to the good data stream.
Because the context of relay data writers may not allow sleeping, we use
a simple bounded spinlock to acquire the inode lock at our best effort
(up to about 300K cycles). Data loss might occur when we fail to obtain
the inode lock in which case it will be recorded as a "transportation
failure" and will get reported as a warning message. Increasing the
buffer size via 'staprun -b SIZE' would help reduce the risk of lock
contention.
The relay v1 implementation is not covered in this patch since it is old
and not even used on CentOS 6.
Succcessfully stress-tested on CentOS 6, CentOS 7, and Fedora 28. Also
tested with the kernel-debug packages' kernels on CentOS 7 and Fedora 28.