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

Verifier failure #91

Open
mpickering opened this issue Jan 16, 2019 · 2 comments
Open

Verifier failure #91

mpickering opened this issue Jan 16, 2019 · 2 comments
Assignees

Comments

@mpickering
Copy link
Contributor

The following entries file fails the verifier.

https://gist.githubusercontent.com/mpickering/70fbf67139616c4b07b1612d2346d9b9/raw/159805e72dfd2d86897ff7f6a4cd6cdfb3c40baa/Data.Distributive.Genericdistributive-0.5.3-8q2IgDtEwLpIcbv8aEzgqI

> cat /nix/store/rb2a9vkhnkjc6jf0fgfsv43dbnm0irbf-ghc-8.6.1-with-packages/cache/Data.Distributive.Genericdistributive-0.5.3-8q2IgDtEwLpIcbv8aEzgqI | /nix/store/r144r6amhd1hnwd0mvnfhqkq0q7s7p7r-kythe-0.0.28/bin/verifier -use_file_nodes -alsologtostderr -ignore-dups
Fact has invalid form:
  App(fact, ("", "", "", "", ""))
Segmentation fault

You can reproduce this if you wish using nix by

cachix use mpickering
nix-shell https://github.com/mpickering/haskell-indexer-nix/archive/38157c8c5153c561a91e88340fa297d0c573e823.tar.gz
@robinp
Copy link
Collaborator

robinp commented Jan 16, 2019

Odd. The verifier is used to verify the analyser itself, by corresponding the entries that were output with special source-code annotations that prescribe what entries should be output in a textual format (see ).

Here you run it on an entry-set whose file likely doesn't have the annotations (since it is not a source prepared for this purpose). But you are right that an empty set of annotations shouldn't cause failure. Maybe the indexer outputs some invalid entry. Let me check.

@robinp
Copy link
Collaborator

robinp commented Jan 16, 2019

Really odd.

$ cat test.entries | 
      /opt/kythe-v0.0.29/tools/entrystream --write_format=json | 
      /opt/kythe-v0.0.29/tools/entrystream --read_format=json > out.ents

$ cmp -b test.entries out.ents                                                                                                                    
cmp: EOF on out.ents after byte 354881, in line 3279                                   

$ hexdump -C test.entries | tail -n3
00056a30  79 74 68 65 2f 6c 6f 63  2f 65 6e 64 2a 03 37 36  |ythe/loc/end*.76|
00056a40  35 ab 01                                          |5..|

$ hexdump -C out.ents | tail -n3
00056a30  79 74 68 65 2f 6c 6f 63  2f 65 6e 64 2a 03 37 36  |ythe/loc/end*.76|
00056a40  35                                                |5|

It seems there's some garbage at the end of the entries file, which roundtripping through json silently removes.

@robinp robinp self-assigned this Jan 18, 2019
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

2 participants