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

Test "protocol works" fails #2

Open
svdo opened this issue Jan 22, 2018 · 0 comments
Open

Test "protocol works" fails #2

svdo opened this issue Jan 22, 2018 · 0 comments

Comments

@svdo
Copy link

svdo commented Jan 22, 2018

When running the tests of this library, I run into two issues with the test "protocol works".

  1. The test sometimes fails with message "[recv] failed reading: invalid bool encoding 128". When I see this happening, the program always seems to be the same:

    [===========================>                                                 ][garblerProto] sending garbled circuit (size=8)
        test-garbled-circuits: [recv] Failed reading: Invalid Bool encoding 128
        Empty call stack
    
        CallStack (from HasCallStack):
          error, called at src/Crypto/GarbledCircuits/Util.hs:216:20 in garbled-circuits-0.0.1.0-FHKktiiUTM732HsKI3murg:Crypto.GarbledCircuits.Util
        test-garbled-circuits: [recieve] too few bytes
        From:	demandInput
    
    
        CallStack (from HasCallStack):
    Protocol works: [Failed]
        *** Failed! Exception: 'thread blocked indefinitely in an MVar operation' (after 8 tests):
        Program {prog_input_gb = fromList [<0>], prog_input_ev = fromList [], prog_output = [<0>], prog_env = fromList [(<0>,Input in0 Garbler)]}
        (used seed 6949790451817726722)
    

    Any idea how to solve this?

  2. The test sometimes fails on network IO: "Exception: 'Network.Socket.connect: <socket: 9>: does not exist (Connection refused)' (after 1 test)". Looking at the code, it seems to me that this is a race condition where the evaluator tries to communicate with the garbler before it has had the chance to setup its connection. Does this sound familiar, and do you have a solution for this?

Thanks!

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