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

Spaces in path or filename prevent translation of addresses to function names #375

Closed
alk opened this issue Aug 23, 2015 · 4 comments
Closed

Comments

@alk
Copy link
Contributor

alk commented Aug 23, 2015

Originally reported on Google Code with ID 372

What steps will reproduce the problem?
1. Use pprof like this: pprof /path/with/spa\ ce/in/it /path/to/profile.prof

What is the expected output? What do you see instead?
Only function addresses are printed instead of names.

What version of the product are you using? On what operating system?
perftools 1.8.3, Arch Linux (Kernel 3.0), 64 Bit

Please provide any additional information below.
It seems that spaces in paths or filenames are not handled correctly, which essentially
leads to addr2line being passed a broken path (see output below).

proj Tests$ pprof bin/Debug/proj\ Tests /tmp/proj-test.prof 
Using local file bin/Debug/proj Tests.
Using local file /tmp/proj-test.prof.
/usr/bin/addr2line: 'bin/Debug/proj': No such file

Reported by sascha.liebsch on 2011-10-21 12:29:22

@alk
Copy link
Contributor Author

alk commented Aug 23, 2015

Yeah, there are probably several places in pprof where we're not careful about quoting
arguments to system() or ``.  If you wanted to write a patch to fix them up, that would
be great!  Otherwise I'll add it to my list of things to do.

Ideally we'd change our system calls to use the list-form rather than the string-argument
form.  If we could do that and still have it redirect stdout and stderr to /dev/null,
that would be ideal.  May not be possible/easy, though.

Reported by csilvers on 2011-10-21 20:45:21

  • Labels added: Type-Defect, Priority-Medium

@alk
Copy link
Contributor Author

alk commented Aug 23, 2015

Well, I'd need to learn Perl first before being able to write that patch, so I don't
think it's going to happen... ;)
However, having this bug report here should help people that run into the same issue
to not spend an hour or more ineffectively searching the web for help (like I did).
Once you know what's wrong, you can easily work around it, so no need to hurry. Spaces
are evil anyway.

Reported by sascha.liebsch on 2011-10-21 21:42:19

@alk
Copy link
Contributor Author

alk commented Aug 23, 2015

OK, I've made the change.  It should be in the next release.

Reported by csilvers on 2011-10-25 23:47:08

  • Status changed: Started

@alk
Copy link
Contributor Author

alk commented Aug 23, 2015

This should be fixed in perftools 1.9, just released.

Reported by csilvers on 2011-12-23 00:49:38

  • Status changed: Fixed

@alk alk closed this as completed Aug 23, 2015
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

1 participant