Skip to content

Script crashes #22

@turion

Description

@turion

I tried nix-bisect to find a particularly nasty failure with many dependency failures.

First try: Try to follow the readme

  • Go to my nixpkgs clone
  • Identify good and bad commits to start with
  • $ extra-bisect start 4561be306455a4ed12c5c66408816298d14eb8f9 master
    Some good revs are not ancestors of the bad rev.
    git bisect cannot work properly in this case.
    Maybe you mistook good and bad revs?
    

Second try

$ extra-bisect start 

$ extra-bisect good 4561be306455a4ed12c5c66408816298d14eb8f9 
Good
fatal: ambiguous argument 'refs/bisect/bad': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
Traceback (most recent call last):
  File "/run/user/1000/tmp.MDs43NfLu4/bin/extra-bisect", line 11, in <module>
    load_entry_point('nix-bisect', 'console_scripts', 'extra-bisect')()
  File "/home/turion/nix/nix-bisect/nix_bisect/extra_bisect.py", line 217, in _main
    return args.func(args)
  File "/home/turion/nix/nix-bisect/nix_bisect/extra_bisect.py", line 37, in _handle_good
    if bisect_runner.has_good_and_bad():
  File "/home/turion/nix/nix-bisect/nix_bisect/bisect_runner.py", line 11, in has_good_and_bad
    return len(get_good_commits()) > 0 and git.rev_parse("refs/bisect/bad") is not None
  File "/home/turion/nix/nix-bisect/nix_bisect/git.py", line 277, in rev_parse
    subprocess.check_output(["git", "rev-parse"] + args + [commit_ish])
  File "/nix/store/xb1mp0f16lv23rwhfdc1665v5r20jfmm-python3-3.7.6/lib/python3.7/subprocess.py", line 411, in check_output
    **kwargs).stdout
  File "/nix/store/xb1mp0f16lv23rwhfdc1665v5r20jfmm-python3-3.7.6/lib/python3.7/subprocess.py", line 512, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['git', 'rev-parse', 'refs/bisect/bad']' returned non-zero exit status 128.

Ok, I guess I need to specify bad first?

$ extra-bisect bad master
Note: switching to '8411006d6bcd7f6e6a8a1a80ce8fcdccdd16c6ab'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 8411006d6bc Merge pull request #169236 from winterqt/bump-jesec-rtorrent

Does it know now what my good commit is? Let's be sure.

$ extra-bisect good 4561be306455a4ed12c5c66408816298d14eb8f9 
Good
HEAD is now at 8411006d6bc Merge pull request #169236 from winterqt/bump-jesec-rtorrent

Fine. Let's give it a spin.

$ extra-bisect run nix-build-status --max-rebuild 100 --failure-line "Error: Cannot find module 'fuse-box/sparky'" rstudio
$ bisect-env nix-build-status --max-rebuild 100 --failure-line 'Error: Cannot find module '"'"'fuse-box/sparky'"'"'' rstudio
Querying status of /nix/store/a79c3gljhnj3m9b0r79lhyyik7sd12cq-RStudio-1.4.1717.drv.
error: builder for '/nix/store/a79c3gljhnj3m9b0r79lhyyik7sd12cq-RStudio-1.4.1717.drv' failed with exit code 2;
       last 10 log lines:
       >      [java] Linking into /build/source/src/gwt/www/rstudio; Writing extras to /build/source/src/gwt/extras/rstudio
       >      [java]    Link succeeded
       >      [java]    Linking succeeded -- 5.398s
       >
       > build:
       >
       > BUILD SUCCESSFUL
       > Total time: 10 minutes 51 seconds
       > [ 54%] Built target gwt_build
       > make: *** [Makefile:156: all] Error 2
       For full logs, run 'nix log /nix/store/a79c3gljhnj3m9b0r79lhyyik7sd12cq-RStudio-1.4.1717.drv'.
error: builder for '/nix/store/a79c3gljhnj3m9b0r79lhyyik7sd12cq-RStudio-1.4.1717.drv' failed with exit code 2;
       last 10 log lines:
       >      [java] Linking into /build/source/src/gwt/www/rstudio; Writing extras to /build/source/src/gwt/extras/rstudio
       >      [java]    Link succeeded
       >      [java]    Linking succeeded -- 4.836s
       >
       > build:
       >
       > BUILD SUCCESSFUL
       > Total time: 10 minutes 16 seconds
       > [ 54%] Built target gwt_build
       > make: *** [Makefile:156: all] Error 2
       For full logs, run 'nix log /nix/store/a79c3gljhnj3m9b0r79lhyyik7sd12cq-RStudio-1.4.1717.drv'.
Traceback (most recent call last):
  File "/run/user/1000/tmp.MDs43NfLu4/bin/nix-build-status", line 11, in <module>
    load_entry_point('nix-bisect', 'console_scripts', 'nix-build-status')()
  File "/home/turion/nix/nix-bisect/nix_bisect/build_status.py", line 193, in _main
    else (),
  File "/home/turion/nix/nix-bisect/nix_bisect/build_status.py", line 57, in build_status
    if failure_line is None or drv.log_contains(failure_line):
  File "/home/turion/nix/nix-bisect/nix_bisect/derivation.py", line 79, in log_contains
    return nix.log_contains(self.drv, line) == "yes"
  File "/home/turion/nix/nix-bisect/nix_bisect/nix.py", line 262, in log_contains
    if phrase in log_content:
TypeError: argument of type 'NoneType' is not iterable

It worked a lot (half an hour before spitting out this error).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions