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

OverflowError: cannot convert float infinity to integer #9

Closed
grooverdan opened this issue Apr 5, 2018 · 9 comments
Closed

OverflowError: cannot convert float infinity to integer #9

grooverdan opened this issue Apr 5, 2018 · 9 comments
Assignees
Labels
bug Something isn't working invalid This doesn't seem right

Comments

@grooverdan
Copy link

Ended up being caused by an empty file:

-rw-rw-r-- 1 dan dan 0 Apr 4 20:30 stacks.mysql-64-oltp_read_only_1.2018-04-04 20:30:08-05:00

Traceback (most recent call last):
  File "/home/dan/pyenv/lib/python2.7/site-packages/flask/app.py", line 1997, in __call__
    return self.wsgi_app(environ, start_response)
  File "/home/dan/pyenv/lib/python2.7/site-packages/flask/app.py", line 1985, in wsgi_app
    response = self.handle_exception(e)
  File "/home/dan/pyenv/lib/python2.7/site-packages/flask/app.py", line 1540, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/home/dan/pyenv/lib/python2.7/site-packages/flask/app.py", line 1982, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/dan/pyenv/lib/python2.7/site-packages/flask/app.py", line 1614, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/dan/pyenv/lib/python2.7/site-packages/flask/app.py", line 1517, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/dan/pyenv/lib/python2.7/site-packages/flask/app.py", line 1612, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/dan/pyenv/lib/python2.7/site-packages/flask/app.py", line 1598, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/dan/flamescope/app/views/heatmap.py", line 34, in get_heatmap
    return jsonify(generate_heatmap(filename, rows))
  File "/home/dan/flamescope/app/util/heatmap.py", line 120, in generate_heatmap
    cols = int(ceil(end) - floor(start))
OverflowError: cannot convert float infinity to integer
@grooverdan
Copy link
Author

grooverdan commented Apr 5, 2018

Header only (perf script --debug-mode) files cause the same backtrace:

-rw-rw-r-- 1 dan  dan      1384 Apr  4 21:01 stacks.mysql-prep.2018-04-04 21:01:35-05:00
-rw-rw-r-- 1 dan  dan      1384 Apr  4 21:01 stacks.mysql-prep.2018-04-04 21:01:58-05:00

@brendangregg brendangregg added the bug Something isn't working label Apr 5, 2018
@brendangregg
Copy link
Contributor

Yes, the UI should say "empty file" or something, instead of crashing. Needs to be fixed.

@smarter
Copy link

smarter commented Apr 5, 2018

I've got the same issue on all perf files generated from jvm applications. Here's an example: perf-54606.data.gz

@spiermar
Copy link
Contributor

spiermar commented Apr 6, 2018

@brendangregg can you check this example file? I'll also add a another issue to track general file error handling.

@spiermar spiermar added the review Tagged for review. label Apr 6, 2018
@rogerwelin
Copy link

Im getting the same error, perf file was generated using https://github.com/jvm-profiling-tools/async-profiler and the cmd I used was: ./profiler.sh -d 30 -o collapsed -f /tmp/traces.txt 30497

the file is not empty (~10mb)

@ceeaspb
Copy link
Contributor

ceeaspb commented Apr 11, 2018

@rogerwelin async-profiler with -o collapsed aggregates all the samples into counts per stack trace. flamescope needs each individual sample with a timestamp so it can generate the heatmap over time and flamegraph for a certain time range. I have opened a new feature request in async-profiler for this.

@ceeaspb
Copy link
Contributor

ceeaspb commented Apr 11, 2018

@smarter did you produce perf script output file from the raw perf.data file? If not you'll need to.

@spiermar
Copy link
Contributor

@grooverdan File handling improvements will be tracked on #18

@rogerwelin @smarter these seem to be invalid files. Let me know if otherwise and I'll reopen the issue.

@ceeaspb Thanks for the help on this!

@spiermar spiermar added invalid This doesn't seem right and removed review Tagged for review. labels Apr 11, 2018
@spiermar spiermar assigned spiermar and unassigned brendangregg Apr 11, 2018
@Liron24
Copy link

Liron24 commented Nov 22, 2018

@ceeaspb can you please elaborate on :

@smarter did you produce perf script output file from the raw perf.data file? If not you'll need to.

I have the same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

7 participants