UnifiedLogReader
UnifiedLogReader copied to clipboard
Timesync without items causes tracev3 file to fail to parse
From https://github.com/ydkhatri/UnifiedLogReader/blob/master/UnifiedLog/Lib.py#L300
elif item_id == 0x6102: # uuid
self.system_boot_uuid = UUID(bytes=buffer[pos:pos+16])
self.boot_uuid_ts_list = GetBootUuidTimeSyncList(self.ts_list, self.system_boot_uuid)
if not self.boot_uuid_ts_list:
raise ValueError('Could not get Timesync for boot uuid! Cannot parse file..')
If self.boot_uuid_ts_list is an empty list the tracev3 file fails to parse.
I've change this to if self.boot_uuid_ts_list is None:, since GetBootUuidTimeSyncList returns None if it cannot find a Timesync corresponding with the boot identifier.
Let me know if this matched the intended behavior
Also FindClosestTimesyncItemInList raises IndexError if the Timesync items list is empty.
Yes, that should be fine. Without the right timesync entries, we cannot provide a date and time for any log event, so it fails to parse. Perhaps later this can be added as a feature, to parse the log entries but with a blank date/time field.
Without the right timesync entries, we cannot provide a date and time for any log event, so it fails to parse.
I've observed valid tracev3 files without corresponding timesync files
Perhaps later this can be added as a feature, to parse the log entries but with a blank date/time field.
there is timebase information in the tracev3 header as well
Do you know if this is still an issue?
Do you know if this is still an issue?
I do not, have not touched this codebase in a while