Project

General

Profile

Bug #1350

Updated by Jonathan Rajotte Julien over 2 years ago

Below lttng packages are using in our project. 
 Lttng_tools: 2.12.3 
 Lttng_ust: 2.12.1 
 Babeltrace: 1.5.8 

 1. 
 In Lttng live mode, we get below babletrace error when we call "babeltrace --clock-date --no-delta -i lttng-live net://localhost/host/xxxxx/session" 
 <pre> 
 [error] ctf_clock_declaration_visit: unexpected unary expression for clock offset 
 [error] ctf_visitor_construct_metadata: clock declaration error 
 [error] Error in CTF metadata constructor -22 
 [error] [Context] Cannot open_mmap_trace of format ctf. 
 [error] Error adding trace 
 [warning] [Context] Cannot open_trace of format lttng-live at path net://localhost/host/xxxxx/session. 
 [warning] [Context] cannot open trace "net://localhost/host/xxxxx/session" for reading. 
 [error] opening trace "net://localhost/host/xxxxx/session" for reading. 
 [error] none of the specified trace paths could be opened. 
 </pre> 

 Finally we port commit: 61cf588beae752e5ddfc60b6b5310f769ac9e852 from master branch to 1.5.8, then the issue is fixed. 

 2. With this commit: 61cf588beae752e5ddfc60b6b5310f769ac9e852, we find test case: tests/bin/intersection/test_intersection fails. 
 1) The 1st reason is wrong clock offset_s    = 1351530929945824323, refer to below : 
 <pre> 
 cat tests/ctf-traces/intersection/3eventsintersect/metadata 

 ..... 
 clock { 
	 name = test_clock; 
	 uuid = "7b9e2f2a-530e-4ab1-816f-0831b5c09140"; 
	 description = "This is a test clock"; 
	 freq = 1000000000; 
	 precision = 10; 
	 offset_s = 1351530929945824323; 
	 offset = 0; 
	 absolute = TRUE; 
 }; 
 </pre> 
 There is a overflow in clock_offset_ns() if clock offset_s    = 1351530929945824323. 
 <pre> 
 static inline 
 uint64_t clock_offset_ns(struct ctf_clock *clock) 
 { 
         return clock->offset_s * 1000000000ULL 
                         + clock_cycles_to_ns(clock, clock->offset); 
 } 
 </pre> <pre> 

 Double check the babeltrace 2, it is already fixed to "offset_s = 13515309;" in tests/data/ctf-traces/intersection/3eventsintersect/metadata  

 2) The 2nd reason is the regression of commit: 61cf588beae752e5ddfc60b6b5310f769ac9e852. uint64_t should be changed to int64_t in some codes related to option "--stream-intersection". 
 Attach 3 related patches based on branch remotes/origin/stable-1.5. 

 So why commit 61cf588beae752e5ddfc60b6b5310f769ac9e852 is not merged to branch 1.5? Is there any reason or side effect of this commit? 


Back