Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

error parsing Firebird trace log #14

Open
hmoffatt opened this issue Apr 7, 2020 · 0 comments
Open

error parsing Firebird trace log #14

hmoffatt opened this issue Apr 7, 2020 · 0 comments

Comments

@hmoffatt
Copy link

hmoffatt commented Apr 7, 2020

I'm getting exceptions parsing trace logs.

  File "./conv.py", line 12, in <module>
    for event in data:
  File "/home/hamish/tmp/fdb/.pyvenv/lib/python3.7/site-packages/fdb/trace.py", line 972, in parse
    for rec in (self.parse_event(x) for x in self._iter_trace_blocks(lines)):
  File "/home/hamish/tmp/fdb/.pyvenv/lib/python3.7/site-packages/fdb/trace.py", line 972, in <genexpr>
    for rec in (self.parse_event(x) for x in self._iter_trace_blocks(lines)):
  File "/home/hamish/tmp/fdb/.pyvenv/lib/python3.7/site-packages/fdb/trace.py", line 959, in parse_event
    return self._parse_block(record_parser)
  File "/home/hamish/tmp/fdb/.pyvenv/lib/python3.7/site-packages/fdb/trace.py", line 941, in _parse_block
    result = parser()
  File "/home/hamish/tmp/fdb/.pyvenv/lib/python3.7/site-packages/fdb/trace.py", line 660, in __parser_start_transaction
    self._parse_attachment_info(values)
  File "/home/hamish/tmp/fdb/.pyvenv/lib/python3.7/site-packages/fdb/trace.py", line 299, in _parse_attachment_info
    pad, s = attachment_id.split('_')
ValueError: too many values to unpack (expected 2)

The input trace is as simple as

2020-04-07T17:06:29.4110 (5080:001FC38C) START_TRANSACTION
	C:\PROGRAM FILES (X86)\FIREBIRD\FIREBIRD_2_5\SECURITY2.FDB (ATT_3555, SYSDBA:NONE, NONE, <internal>)
		(TRA_9474, CONCURRENCY | WAIT | READ_ONLY)

2020-04-07T17:06:29.4110 (5080:001FC38C) ROLLBACK_TRANSACTION
	C:\PROGRAM FILES (X86)\FIREBIRD\FIREBIRD_2_5\SECURITY2.FDB (ATT_3555, SYSDBA:NONE, NONE, <internal>)
		(TRA_9474, CONCURRENCY | WAIT | READ_ONLY)
      0 ms, 1 fetch(es), 1 mark(s)

2020-04-07T17:06:29.4160 (5080:001F0C1C) TRACE_INIT
	SESSION_16 IBE_7/04/2020 5:06:17 PM

It looks like it's getting confused by the underscores in the Firebird install path. If I change the FIREBIRD_2_5 to something without underscores in the trace then the error goes away.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant