Closed GoogleCodeExporter closed 9 years ago
This issue was poorly titled -- it is not actually pprof itself that is
segfaulting.
My apologies.
Original comment by zack.sla...@gmail.com
on 17 Dec 2009 at 6:15
Curious. I don't know why ProfileData::Start() would be in sysinfo.cc. Can
you try
recompiling with
make distclean; ./configure CXXFLAGS=-g; make
?
Also, the 64-bit issues are unfortunately cpu-specific, so it does indeed
affect you.
I wonder if that's part of the problem. Try adding --with-frame-pointers (I think
that's the right flagname) to that configure command above, as well.
Original comment by csilv...@gmail.com
on 18 Dec 2009 at 6:51
I reconfigured using:
./configure --with-frame-pointers CXXFLAGS=-g --prefix=$PERF
and rebuilt my program using:
g++ -L$PERF_LIB -lprofiler q_test.cpp -o test_prof
Running this program still segfaults but with a different backtrace:
//====================================================================
Using host libthread_db library "/lib/libthread_db.so.1".
warning: Can't read pathname for load map: Input/output error.
Reading symbols from /share/gpt/lib/libprofiler.so.0...done.
Loaded symbols for /share/gpt/lib/libprofiler.so.0
Reading symbols from /usr/lib/libstdc++.so.6...done.
Loaded symbols for /usr/lib/libstdc++.so.6
Reading symbols from /lib/libm.so.6...done.
Loaded symbols for /lib/libm.so.6
Reading symbols from /lib/libgcc_s.so.1...done.
Loaded symbols for /lib/libgcc_s.so.1
Reading symbols from /lib/libc.so.6...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Core was generated by `./test_prof'.
Program terminated with signal 11, Segmentation fault.
#0 0x007b9492 in ProfileData::Options::frequency () at
./src/base/cycleclock.h:59
59 // This should return the number of cycles since power-on.
Thread-safe.
(gdb) where
#0 0x007b9492 in ProfileData::Options::frequency () at
./src/base/cycleclock.h:59
#1 0x007b9b4f in ProfileData::Options::frequency () at
./src/base/cycleclock.h:59
#2 0x007b9d85 in ProfileData::Options::frequency () at
./src/base/cycleclock.h:59
#3 0x007ba644 in ProfileData::Options::frequency () at
./src/base/cycleclock.h:59
#4 0x007ba87f in ProfileData::Options::frequency () at
./src/base/cycleclock.h:59
#5 0x007baa9d in ProfileData::Options::frequency () at
./src/base/cycleclock.h:59
#6 0x007ba8e3 in ProfileData::Options::frequency () at
./src/base/cycleclock.h:59
#7 0x007ba8ff in ProfileData::Options::frequency () at
./src/base/cycleclock.h:59
#8 0x007bcc16 in SubmitSpinLockProfileData () from
/share/gpt/lib/libprofiler.so.0
#9 0x007b488d in ?? () from /share/gpt/lib/libprofiler.so.0
#10 0xb7f31000 in ?? ()
#11 0x00d28dac in ?? () from /lib/libc.so.6
#12 0xbfad0cb8 in ?? ()
#13 0x002281f3 in call_init () from /lib/ld-linux.so.2
#14 0x002281f3 in call_init () from /lib/ld-linux.so.2
#15 0x00228303 in _dl_init_internal () from /lib/ld-linux.so.2
#16 0x0021a84f in _dl_start_user () from /lib/ld-linux.so.2
Using host libthread_db library "/lib/libthread_db.so.1".
warning: Can't read pathname for load map: Input/output error.
Reading symbols from /share/gpt/lib/libprofiler.so.0...done.
Loaded symbols for /share/gpt/lib/libprofiler.so.0
Reading symbols from /usr/lib/libstdc++.so.6...done.
Loaded symbols for /usr/lib/libstdc++.so.6
Reading symbols from /lib/libm.so.6...done.
Loaded symbols for /lib/libm.so.6
Reading symbols from /lib/libgcc_s.so.1...done.
Loaded symbols for /lib/libgcc_s.so.1
Reading symbols from /lib/libc.so.6...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Core was generated by `./test_prof'.
Program terminated with signal 11, Segmentation fault.
#0 0x007b9492 in ProfileData::Options::frequency () at
./src/base/cycleclock.h:59
59 // This should return the number of cycles since power-on.
Thread-safe.
(gdb) where
#0 0x007b9492 in ProfileData::Options::frequency () at
./src/base/cycleclock.h:59
#1 0x007b9b4f in ProfileData::Options::frequency () at
./src/base/cycleclock.h:59
#2 0x007b9d85 in ProfileData::Options::frequency () at
./src/base/cycleclock.h:59
#3 0x007ba644 in ProfileData::Options::frequency () at
./src/base/cycleclock.h:59
#4 0x007ba87f in ProfileData::Options::frequency () at
./src/base/cycleclock.h:59
#5 0x007baa9d in ProfileData::Options::frequency () at
./src/base/cycleclock.h:59
#6 0x007ba8e3 in ProfileData::Options::frequency () at
./src/base/cycleclock.h:59
#7 0x007ba8ff in ProfileData::Options::frequency () at
./src/base/cycleclock.h:59
#8 0x007bcc16 in SubmitSpinLockProfileData () from
/share/gpt/lib/libprofiler.so.0
#9 0x007b488d in ?? () from /share/gpt/lib/libprofiler.so.0
#10 0xb7f31000 in ?? ()
#11 0x00d28dac in ?? () from /lib/libc.so.6
#12 0xbfad0cb8 in ?? ()
#13 0x002281f3 in call_init () from /lib/ld-linux.so.2
#14 0x002281f3 in call_init () from /lib/ld-linux.so.2
#15 0x00228303 in _dl_init_internal () from /lib/ld-linux.so.2
#16 0x0021a84f in _dl_start_user () from /lib/ld-linux.so.2
//====================================================================
Let me know if I can provide any further information.
Original comment by zack.sla...@gmail.com
on 18 Dec 2009 at 3:20
Strange, cycleclock is not recursive. And neither is frequency() -- and
frequency()
isn't in cycleclock.h anyway. This stacktrace doesn't make any sense to me.
I'm not
sure what might be going on.
What happens when you run 'make check' from the perftools directory? Do the
unittests pass?
Original comment by csilv...@gmail.com
on 19 Dec 2009 at 2:01
How long should a typical run of "make check" take? I've got one that's going
on 20
minutes now. I'm dumping its output to a file which I'll attach when it
finishes.
I ran it once before without an output file -- I saw a fair number of
segfaults, so
I'm assuming it's doing poorly.
Original comment by zack.sla...@gmail.com
on 21 Dec 2009 at 3:54
See attached for the output -- I cut it off after it seemed to hang for quite a
while.
Original comment by zack.sla...@gmail.com
on 21 Dec 2009 at 4:09
Attachments:
Hmm, so tcmalloc_minimal_unittest passes, but tcmalloc_unittest doesn't. This
means
something in either the heap profiler or CPU profiler is causing trouble, even
when
neither is turned on (the unittest doesn't test either). Very curious. I have
to
suspect a problem with your installation somehow, but I don't know how to
diagnose
it, or to fix it. Perhaps you're linking against weird libc's somehow?
Original comment by csilv...@gmail.com
on 22 Dec 2009 at 3:02
What would be considered "weird libc's"? A particular version? Is there a
simple way
to determine whatsion is linked?
Original comment by zack.sla...@gmail.com
on 22 Dec 2009 at 4:14
No, not a particular version -- something like linking in one version of libc
and
another version of libstdc++, for instance.
My best suggestion is to try getting this to work on some other machine. If it
works
there, but not on yours, you can maybe try to track down what's different.
Original comment by csilv...@gmail.com
on 22 Dec 2009 at 4:18
Any more word on this -- were you able to try it on a different machine?
Otherwise,
or unless we can get more data some other way, I'm going to assume this is
specific to
your setup in some way, and close it CannotReproduce.
Original comment by csilv...@gmail.com
on 10 Mar 2010 at 6:51
OK, closing. Feel free to reopen if you have more info to report.
Original comment by csilv...@gmail.com
on 17 Mar 2010 at 11:30
Original issue reported on code.google.com by
zack.sla...@gmail.com
on 17 Dec 2009 at 6:06