Skip to content

analyze-profile: java.util.zip.ZipException: incorrect header check OR out of date profiling documentation #8840

Closed

Description

@ghorn

Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

In bazel 0.27.0, I try to run a profile like:

$ bazel clean --expunge
$ bazel build --profile=/home/greg/bazel_prof_yo //foo
INFO: Writing tracer profile to '/home/greg/bazel_prof_yo'
INFO: Analyzed target //foo (30 packages loaded, 1998 targets configured).
INFO: Found 1 target...
Target //foo up-to-date:
  bazel-bin/foo
INFO: Elapsed time: 23.230s, Critical Path: 9.99s
INFO: 152 processes: 5 linux-sandbox, 147 local.
INFO: Build completed successfully, 312 total actions

looks good so far. Then I try to analyze the profile and this happens:

$ bazel analyze-profile /home/greg/bazel_prof_yo
WARNING: This information is intended for consumption by Bazel developers only, and may change at any time.  Script against it at your own risk
INFO: Loading /home/greg/bazel_prof_yo
java.util.zip.ZipException: incorrect header check
ERROR: Failed to analyze profile file(s): incorrect header check

What operating system are you running Bazel on?

Ubuntu 18.04

What's the output of bazel info release?

release 0.27.0- (@Non-Git)

If bazel info release returns "development version" or "(@Non-Git)", tell us how you built Bazel.

nix

Have you found anything relevant by searching the web?

nothing

Activity

  1. ghorn commented on Jul 9, 2019

    @ghorn
    Author

    The profile output file is human readable, looks like a json doc. Could the problem be that it is expected to be zipped?

  2. ghorn commented on Jul 9, 2019

    @ghorn
    Author

    Hmm... this file is compatible with chrome://tracing. Did --experimental_generate_json_trace_profile become standard? If so then the problem is https://docs.bazel.build/versions/master/skylark/performance.html#performance-profiling being out of date.

  3. added
    team-Performance
    untriaged
    on Jul 9, 2019
  4. changed the title [-]analyze-profile: java.util.zip.ZipException: incorrect header check[/-] [+]analyze-profile: java.util.zip.ZipException: incorrect header check OR out of date profiling documentation[/+] on Jul 9, 2019
  5. meisterT commented on Jul 11, 2019

    @meisterT
    Member

    We do want to make the JSON profile the default, but that should not have happened yet. I'll investigate.

  6. added
    P1
    and removed
    untriaged
    on Jul 11, 2019
  7. self-assigned this
    on Jul 11, 2019
  8. meisterT commented on Jul 11, 2019

    @meisterT
    Member
  9. gydeveloper commented on Oct 2, 2019

    @gydeveloper

    @meisterT Curious, why analyze-profile was deprecated? It was really beneficial for us to parse the phase information as part of our CI and publish this in a data-warehouse for analysis-

    === PHASE SUMMARY INFORMATION ===
    
    Total launch phase time          978 ms    2.67%
    Total init phase time            178 ms    0.49%
    Total loading phase time         381 ms    1.04%
    Total analysis phase time       2.618 s    7.15%
    Total preparation phase time    46.0 ms    0.13%
    Total execution phase time     32.366 s   88.46%
    Total finish phase time         19.3 ms    0.05%
    Total run time                 36.586 s  100.00%
    

    The trace files are good for diving deeper into an issue, but not well suite for gathering daily CI build stats. We have a large project, with 150 gradle modules. We'd like to monitor when regressions to our build time occurs.

    Let me know if you have any other suggestions that I may have missed. Trace files seem to solve a different problem IMO.

    Thanks!

  10. jin commented on Oct 17, 2019

    @jin
    Member

    @meisterT do you have any insight as to why this information isn't part of BEP?

  11. sansri264 commented on Oct 29, 2019

    @sansri264

    Is there an alternative way to get the Critical path section's information with the new json profile?

  12. drigz commented on Dec 19, 2019

    @drigz
    Contributor

    Also, docs for --profile still say to use bazel analyze-profile:

    https://docs.bazel.build/versions/master/command-line-reference.html:

    If set, profile Bazel and write data to the specified file. Use bazel analyze- profile to analyze the profile.

  13. SrodriguezO commented on Jan 6, 2020

    @SrodriguezO

    Curious, why analyze-profile was deprecated? It was really beneficial for us to parse the phase information as part of our CI and publish

    Curious about this too.. it seems the two profile modes served different use cases. @meisterT is there a way of getting a simple summary using the new profiler?

  14. meisterT commented on Jan 9, 2020

    @meisterT
    Member

    Not yet, but I am working on it.

  15. meisterT commented on Jan 9, 2020

    @meisterT
    Member

    Work will be tracked in #10140

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

Metadata

Metadata

Assignees

Labels

P1team-Performancetype: bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions