[lttng-dev] "No space left on device" results in corrupt trace data set

Woegerer, Paul Paul_Woegerer at mentor.com
Fri Nov 16 10:59:02 EST 2012


On 11/16/2012 04:54 PM, Julien Desfossez wrote:
> On 16/11/12 10:39 AM, Woegerer, Paul wrote:
>> Does that mean that the live tracing feature that currently lives in the
>> lttngtop-live branch will go into lttng-tools and babeltrace any time soon ?
> 
> The main change of lttng-tools 2.2 is the live tracing feature.
> The way it is implemented in the lttngtop-live branch is more a
> proof-of-concept, we will be starting the clean implementation
> discussions here as soon as we have lttng-tools 2.1 released (which
> should be around the end of this month).
> 
> In the mean time, to solve the problem you are currently experiencing,
> you could manually add a flush on the metadata channel after the session
> is started to make sure it is written on disk quickly (that's what is
> done in lttngtop-live at the beginning). Of course like David said, if

I will try that. Thanks !

--
Paul

> you have new events/applications enabled during tracing, the metadata
> needs to be flushed again.
> 
> Thanks,
> 
> Julien
> 
> 
>>
>> Thanks
>> Paul
>>
>>>
>>> Thanks,
>>>
>>> Mathieu
>>>
>>>>
>>>> Cheers!
>>>> David
>>>>
>>>> Woegerer, Paul:
>>>>> Hi,
>>>>>
>>>>> embedded users sometimes have to trace to tmpfs (e.g. streaming in not
>>>>> an option due to missing network connectivity).
>>>>>
>>>>> Ramdisks of 16M to 128M size are created and as long as the ram disk
>>>>> does not get full, tracing works fine. Unfortunately if the disk gets
>>>>> full things fall apart:
>>>>>
>>>>> PERROR: Error in file write: No space left on device [in
>>>>> lttng_consumer_on_read_subbuffer_mmap() at consumer.c:1367]
>>>>>
>>>>> The consumer daemon will not be able to write the metadata channel and
>>>>> therefore the trace data set will be unusable (cannot be read with
>>>>> babeltrace).
>>>>>
>>>>> -rwxrwxrwx 1 testuser users        0 Nov 16 11:22 metadata
>>>>> -rwxrwxrwx 1 testuser users 15728640 Nov 16 11:22 myevents_0
>>>>> -rwxrwxrwx 1 testuser users     4096 Nov 16 11:22 myevents_1
>>>>>
>>>>> Is it possible to somehow reserve the file size (fallocate) for metadata
>>>>> so that in case the disk gets full at least the metadata gets written
>>>>> and the resulting trace set is readable with babeltrace ?
>>>>>
>>>>> I wonder if that is possible at all. The consumer daemon doesn't know
>>>>> upfront how much would need to be reserved for metadata, right ?
>>>>>
>>>>> Any ideas ?
>>>>>
>>>>> Thanks,
>>>>> Paul
>>>>>
>>>>>
>>>>
>>>> _______________________________________________
>>>> lttng-dev mailing list
>>>> lttng-dev at lists.lttng.org
>>>> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
>>>
>>
>>


-- 
Paul Woegerer | SW Development Engineer
http://go.mentor.com/sourceryanalyzer

Mentor Embedded(tm) | Prinz Eugen Straße 72/2/4, Vienna, 1040 Austria
Nucleus® | Linux® | Android(tm) | Services | UI | Multi-OS

Android is a trademark of Google Inc. Use of this trademark is subject
to Google Permissions.
Linux is the registered trademark of Linus Torvalds in the U.S. and
other countries.



More information about the lttng-dev mailing list