[lttng-dev] LTTng memory map

Mathieu Desnoyers mathieu.desnoyers at efficios.com
Fri Sep 30 01:24:41 UTC 2016


Yes, we open and then unlink the file in the shm within consumerd. 
Its inode stays reserved on the disk as long as we have at least 
one handle on it. 

We do file descriptor passing from consumerd to sessiond to 
the application over unix sockets. 

The reason why we unlink the file shortly after creation by consumerd 
is to make sure we teardown all resources cleanly even in case the 
consumerd would be killed by a SIGKILL. 

Thanks, 

Mathieu 

----- On Sep 28, 2016, at 7:38 PM, Jeffrey Chen <cpthk at live.com> wrote: 

> It looks like the code that called shm_open() is called at the lttng-consumerd
> daemon. But, somehow it show up in the pmap at my service process. I noticed
> all my processes that loads liblttng-ust would have this entry. Do you know
> what's the reason?

> From: lttng-dev <lttng-dev-bounces at lists.lttng.org> on behalf of Jeffrey Chen
> <cpthk at live.com>
> Sent: Tuesday, September 27, 2016 11:20 AM
> To: lttng-dev
> Subject: [lttng-dev] LTTng memory map

> Hi LTTng:

> Our service has been running overnight with LTTng enabled to do some memory
> consumption testing. We noticed the linux pmap output would have several memory
> map used by LTTng, and are marked as deleted. Do you know what are them? Why
> are they left in the system and marked as deleted? Thanks.

> 00007fc3017ee000 40968 592 592 rw-s- ust-shm-consumer-58905 (deleted)

> 00007fc3017ee000 0 0 0 rw-s- ust-shm-consumer-58905 (deleted)

> 00007fc303ff0000 40968 0 0 rw-s- ust-shm-consumer-58905 (deleted)

> 00007fc303ff0000 0 0 0 rw-s- ust-shm-consumer-58905 (deleted)

> 00007fc3067f2000 40968 0 0 rw-s- ust-shm-consumer-58905 (deleted)

> 00007fc3067f2000 0 0 0 rw-s- ust-shm-consumer-58905 (deleted)

> 00007fc308ff4000 40968 0 0 rw-s- ust-shm-consumer-58905 (deleted)

> 00007fc308ff4000 0 0 0 rw-s- ust-shm-consumer-58905 (deleted)

> 00007fc30b7f6000 40968 0 0 rw-s- ust-shm-consumer-58905 (deleted)

> 00007fc30b7f6000 0 0 0 rw-s- ust-shm-consumer-58905 (deleted)

> 00007fc30dff8000 40968 524 524 rw-s- ust-shm-consumer-58905 (deleted)

> 00007fc30dff8000 0 0 0 rw-s- ust-shm-consumer-58905 (deleted)

> 00007fc3107fa000 40968 0 0 rw-s- ust-shm-consumer-58905 (deleted)

> 00007fc3107fa000 0 0 0 rw-s- ust-shm-consumer-58905 (deleted)

> 00007fc312ffc000 40968 244 244 rw-s- ust-shm-consumer-58905 (deleted)

> 00007fc312ffc000 0 0 0 rw-s- ust-shm-consumer-58905 (deleted)

> 00007fc3157fe000 40968 396 396 rw-s- ust-shm-consumer-58905 (deleted)

> 00007fc3157fe000 0 0 0 rw-s- ust-shm-consumer-58905 (deleted)

> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

-- 
Mathieu Desnoyers 
EfficiOS Inc. 
http://www.efficios.com 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.lttng.org/pipermail/lttng-dev/attachments/20160930/ea2666bf/attachment.html>


More information about the lttng-dev mailing list