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

Unable to read build ID header #33

Closed
moshtalaghi opened this issue May 12, 2016 · 1 comment
Closed

Unable to read build ID header #33

moshtalaghi opened this issue May 12, 2016 · 1 comment

Comments

@moshtalaghi
Copy link

I'm useing create_llvm_prof to use with PGO.
I ran my application which is built with -g under perf record -b which generates perf.data
The perf.data is 366 MB and I can run perf report on it which tells me that the file is okay
While reading the perf.data, create_llvm_prof quits with following error:
E0512 19:20:31.186863 8230 data_reader.cc:15] Unable to read build ID header. Requested 8 bytes, 18424226071644201007 bytes remaining.
E0512 19:20:31.205049 8230 profile_creator.cc:78] Error reading profile.

When I debug, perf_reader.cc:1325, section_iter->offset has a value of 0x50000100000001 which is odd section_iter->size is set to 0xffffffff
type is : HEADER_BUILD_ID

when I continue:

In buffer_reader.cc:12, size_ is 0xffffffff since offset_ is set to the huge value above, the if condition is met and false is returned which causes the error.

@moshtalaghi
Copy link
Author

a little clarification on my debug points:

breakpoint 1 : perf_reader.cc:1325 SeekSet(section_iter->offset);>
breakpoint 2 : buffer_reader.cc:12 <if (offset_ + size > size_)>

breakpoint 1
section_iter->offset == 0x50000100000001
section_iter->size == 0xffffffff

breakpoint 2:
size_ == 0x15d7e030
size == 8
offset_ == 0x50000100000001

backtrace at breakpoint 2:
#0 quipper::BufferReader::ReadData (this=0x7fffffffd828, size=8, dest=0x7fffffffd498) at chromiumos-wide-profiling/buffer_reader.cc:12
#1 0x00000000005d917b in quipper::DataReader::ReadDataValue (this=0x7fffffffd828, size=8, , dest=0x7fffffffd498) at chromiumos-wide-profiling/data_reader.cc:13
#2 0x00000000005ab4a0 in quipper::PerfReader::ReadBuildIDMetadata (this=0x7fffffffdae8, data=0x7fffffffd828, size=4294967295) at chromiumos-wide-profiling/perf_reader.cc:1384
#3 0x00000000005a2a24 in quipper::PerfReader::ReadMetadata (this=0x7fffffffdae8, data=0x7fffffffd828) at chromiumos-wide-profiling/perf_reader.cc:1334
#4 0x00000000005a1842 in quipper::PerfReader::ReadFromData (this=0x7fffffffdae8, data=0x7fffffffd828) at chromiumos-wide-profiling/perf_reader.cc:706
#5 0x00000000005a116d in quipper::PerfReader::ReadFromPointer (this=0x7fffffffdae8, data=0x7fffe0907010 "PERFILE2h", size=366469168) at chromiumos-wide-profiling/perf_reader.cc:657
#6 0x00000000005a1121 in quipper::PerfReader::ReadFromVector (this=0x7fffffffdae8, ) at chromiumos-wide-profiling/perf_reader.cc:648
#7 0x00000000005a1092 in quipper::PerfReader::ReadFile (this=0x7fffffffdae8, ) at chromiumos-wide-profiling/perf_reader.cc:644
#8 0x00000000004379f1 in autofdo::PerfDataSampleReader::Append (this=0x9ccbc0, ) at sample_reader.cc:203
#9 0x0000000000436b36 in autofdo::FileSampleReader::Read (this=0x9ccbc0) at sample_reader.cc:89
#10 0x00000000004369ca in autofdo::SampleReader::ReadAndSetTotalCount (this=0x9ccbc0) at sample_reader.cc:72
#11 0x0000000000429fba in autofdo::ProfileCreator::ReadSample (this=0x7fffffffe140, , ) at profile_creator.cc:77
#12 0x000000000042a0f4 in autofdo::ProfileCreator::CreateProfile (this=0x7fffffffe140, , , writer=0x9c4dd0, ) at profile_creator.cc:45
#13 0x000000000045e88c in main (argc=1, argv=0x7fffffffe2d8) at create_llvm_prof.cc:78

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

No branches or pull requests

1 participant