Fix: application SIGBUS when starting in parallel with sessiond
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 6 Nov 2013 12:03:10 +0000 (07:03 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 6 Nov 2013 12:10:59 +0000 (07:10 -0500)
commit5d32ea4466f42665808fe8cf7ac8b533cb512aee
tree319de34762931ae927b6e0e8b1ab808fe4a4d492
parent75b46fdf889cde49b02a7e15cae52e2e2d3e94bc
Fix: application SIGBUS when starting in parallel with sessiond

There is a race between application startup and sessiond startup, where
there is an intermediate state where applications can SIGBUS if they see
a zero-sized shm, if the shm has been created, but not ftruncated yet.

On the UST side, fix this by ensuring that UST can read the shared
memory file descriptor with a read() system call before they try
accessing it through a memory map (which triggers the SIGBUS if the
access goes beyond the file size).

On the sessiond side, another commit needs to ensure that the shared
memory is writeable by applications as long as its size is 0, which
allow applications to perform ftruncate and extend its size.

Fixes #623

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
liblttng-ust/lttng-ust-comm.c
This page took 0.024486 seconds and 4 git commands to generate.