Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Error raised when opening mongod log with mplotqueries #757

Closed
clegaspi opened this issue Dec 28, 2019 · 5 comments
Closed

Error raised when opening mongod log with mplotqueries #757

clegaspi opened this issue Dec 28, 2019 · 5 comments
Assignees
Milestone

Comments

@clegaspi
Copy link

clegaspi commented Dec 28, 2019

Expected behavior

Loading mongod log file successfully with mplotqueries

Actual/current behavior

I get the following traceback when opening a certain mongod log file:

parsing <filename_redacted> [                                        ] 0.0 % Traceback (most recent call last):
  File "/opt/miniconda3/envs/mtools/bin/mplotqueries", line 8, in <module>
    sys.exit(main())
  File "/opt/miniconda3/envs/mtools/lib/python3.6/site-packages/mtools/mplotqueries/mplotqueries.py", line 714, in main
    tool.run()
  File "/opt/miniconda3/envs/mtools/lib/python3.6/site-packages/mtools/mplotqueries/mplotqueries.py", line 146, in run
    self.parse_logevents()
  File "/opt/miniconda3/envs/mtools/lib/python3.6/site-packages/mtools/mplotqueries/mplotqueries.py", line 256, in parse_logevents
    if self.plot_instance.accept_line(logevent):
  File "/opt/miniconda3/envs/mtools/lib/python3.6/site-packages/mtools/mplotqueries/plottypes/scatter_type.py", line 59, in accept_line
    return getattr(logevent, self.field) is not None
  File "/opt/miniconda3/envs/mtools/lib/python3.6/site-packages/mtools/util/logevent.py", line 222, in duration
    self._duration = int(groups.group(1)) * 1000
AttributeError: 'NoneType' object has no attribute 'group'

The same log file loads as expected on mtools 1.5.3. I can explore this error further on my own to identify the log line it has an issue with, and to make sure my Python muscles don't atrophy, but I wanted to make this issue known.

Steps to reproduce the actual/current behavior

  1. Create conda environment with python 3.6.9
  2. pip install mtools matplotlib
  3. mplotqueries <filename>
  4. Error occurs

Environment

Software Version
mtools 1.6.0
MongoDB server 4.2.2 (for log files)
Operating system Mojave 10.14.6
conda 4.7.12
python 3.6.9
matplotlib 3.1.2
@clegaspi clegaspi changed the title Error raised when opening mongod log Error raised when opening mongod log with mplotqueries Dec 28, 2019
@stennie
Copy link
Collaborator

stennie commented Dec 28, 2019

@clegaspi It would be excellent if you can provide a snippet of log that reproduces this issue.

Are you using any other command line options for mplotqueries?

Thanks,
Stennie

@clegaspi
Copy link
Author

clegaspi commented Dec 28, 2019 via email

@stennie stennie added this to the 1.6.1 milestone Dec 28, 2019
@clegaspi
Copy link
Author

clegaspi commented Dec 29, 2019

Ok, I got the log line

2019-12-26T21:56:49.041+0000 I STORAGE [WTCheckpointThread] WiredTiger message [1577397409:41893][2600:0x7fd43eab3700], file:index-205--8166419544135621535.wt, WT_SESSION.checkpoint: Checkpoint has been running for 20 seconds and wrote: 5000 pages (205 MB)

The LogEvent class tries to parse this as a "Checkpoint took x seconds to complete" line, but it doesn't match the regex. I can see that this check is new in 1.6.0, so 1.5.3 skips this line altogether.

@stennie
Copy link
Collaborator

stennie commented Dec 29, 2019

Thanks for tracking down the specific log line @clegaspi. Bug fix on the way :)

@clegaspi
Copy link
Author

Cool beans, thanks, Stennie!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants