Hi Mathieu,
I did as you suggested, but I can still reproduce the issue.
Hi Jesus,
The problem lays in that there is no metadata file at all in your trace
subdirectory. babeltrace then thinks it is not a directory that contains
a trace (could contain other yet unforeseen information not part of CTF
data), so it just skips the directory without complaining.
If you try putting a corrupted, or invalid, metadata file in the
directory, you will see that it fails.
When pointing babeltrace to a single trace that does not contain any
metadata file, here is the expected behavior:
compudj@thinkos:~/lttng-traces/test/ust$ babeltrace
demo-13604-20120508-212139
[error] Cannot open any trace for reading.
[error] opening trace "demo-13604-20120508-212139" for reading.
compudj@thinkos:~/lttng-traces/test/ust$ echo $?
1
The reason why it produces an error when directly pointing to the trace
is because babeltrace cannot find any trace to open, so it returns a
failure.
Does this explanation bring light on the error reporting behavior ?
Thanks,
Mathieu
Regards,
Jesus
-----Original Message-----
From: bugs@lttng.org [mailto:bugs@lttng.org]
Sent: May-25-12 5:06 PM
Subject: [Babeltrace - Bug #239] Babeltrace ignores errors for an app when conversion for other apps is OK
Issue #239 has been updated by Mathieu Desnoyers.
Issue #239 has been reported by Jesus Garcia.
----------------------------------------
Bug #239: Babeltrace ignores errors for an app when conversion for other apps is OK
https://bugs.lttng.org/issues/239
Author: Jesus Garcia
Status: New
Priority: Normal
Assignee:
Category:
Target version: Babeltrace 1.0
Hi Guys,
We have found the following issue in Babeltrace rc2:
Can you try reproducing with babeltrace git master branch HEAD,
currently at commit b945d4a5943030cdfbe697570c8c9d76838f7473 ? Fixes
have been done for these issues.
Thanks,
Mathieu
--
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com
----------------------------------------
Bug #239: Babeltrace ignores errors for an app when conversion for other apps is OK
https://bugs.lttng.org/issues/239#change-474
Author: Jesus Garcia
Status: New
Priority: Normal
Assignee:
Category:
Target version: Babeltrace 1.0
Hi Guys,
We have found the following issue in Babeltrace rc2:
When running babeltrace over a session directory containing several directories for several apps, babeltrace does not notice that there are issues with one of the apps.
In this particular case the issue is that one of the apps (let's call it appX) does not have a metadata file. The CTF files are fine.
Here is the result:
SC-1:/home/trace # babeltrace TRACact008_1/SC-1 > /tmp/deleteme.txt
SC-1:/home/trace # echo $?
0
SC-1:/home/trace # ll /tmp/deleteme.txt
rw-r--r- 1 root root 1087710 May 25 16:47 /tmp/deleteme.txt <<=====<< babeltrace converted everything else from the other apps
SC-1:/home/trace #
However, when running babeltrace for appX only, it does produce errors:
SC-1:/home/trace # babeltrace TRACact008_1/SC-1/ust/TestApp_type1-12988-20120525-162422/ > /tmp/deleteme.txt
[error] Cannot open any trace for reading.
[error] opening trace "TRACact008_1/SC-1/ust/TestApp_type1-12988-20120525-162422/" for reading.
SC-1:/home/trace # echo $?
1
SC-1:/home/trace # ll /tmp/deleteme.txt
rw-r--r- 1 root root 0 May 25 16:49 /tmp/deleteme.txt
SC-1:/home/trace #
So, when converting the whole session babeltrace should convert what it can (as it did), but then also report any errors and return 1 as error code.
Thanks,
Jesus
--
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://bugs.lttng.org/my/account
--
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com