Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 340700 - [LTTng] File descriptors exhausted because traces are never closed
Summary: [LTTng] File descriptors exhausted because traces are never closed
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: LinuxTools (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: Francois Chouinard CLA
QA Contact: Francois Chouinard CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-22 15:28 EDT by Alexandre Montplaisir CLA
Modified: 2022-01-13 14:53 EST (History)
0 users

See Also:


Attachments
Proposed fix (1.27 KB, patch)
2011-03-22 15:39 EDT, Alexandre Montplaisir CLA
fchouinard: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandre Montplaisir CLA 2011-03-22 15:28:06 EDT
Build Identifier: M20110210-1200

After running for a while and opening many experiments and traces, the trace reading library crashes with the following error:

ERROR:tracefile.c:1429:map_block: assertion failed: (block_num < tf->num_blocks)



Reproducible: Always

Steps to Reproduce:
1. I used the following code to load a trace:
testSomething() {
    ITmfTrace[] traces = new ITmfTrace[1];
    traces[0] = new LTTngTrace(traceFile.getPath());
    fExperiment = new TmfExperiment<LttngEvent>(LttngEvent.class, "Headless", traces);

    /* do stuff */

    fExperiment.dispose();
}

2. Call testSomething() many times.

3. Eclipse crashes after hitting the file descriptor limit (1024 by default), as the descriptor are never released.
Comment 1 Alexandre Montplaisir CLA 2011-03-22 15:39:15 EDT
Created attachment 191708 [details]
Proposed fix

Here is a small change that fixes the above problem.
Comment 2 Francois Chouinard CLA 2011-03-29 18:39:38 EDT
Patch committed. Thanks Alexandre.
Comment 3 Francois Chouinard CLA 2011-07-22 15:04:42 EDT
Delivered with 0.8