telehash / gogotelehash

The official Telehash package for Go

Home Page:http://telehash.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

interop test occasional fail?

quartzjer opened this issue · comments

any ideas what might cause this to happen once in a while? is it my code? :)

go
src/mesh.c:39 mesh_new() mesh created version 3.0.10
src/e3x/self3.c:40 self3_new() self created with 1 csids
test/net_link.c:29: passed 1 tests
test/net_link.c:38: passed 2 tests
2014/11/20 15:53:58 golang: zi3qgzyfymmritlnjppuycbhystlblqi33sxmunzy5xxmbp4zl5q
2014/11/20 15:53:58 remote: tjeyplqm556njaekesikfkoyw5dseya5xqg2pgyp6svctulxw5ha
00:00:00.010 | zi3q tjey | addrbook     | Changed path from <nil> to {"type":"udp4","ip":"127.0.0.1","port":50891}
00:00:00.010 | zi3q tjey | addrbook     | Discovered path {"type":"udp4","ip":"127.0.0.1","port":50891} (latency=125ms, emwa=125ms)
src/net/udp4.c:37 udp4_pipe() new pipe to 127.0.0.1:53680
src/mesh.c:204 mesh_receive() mesh receiving handshake to tjeyplqm556njaekesikfkoyw5dseya5xqg2pgyp6svctulxw5ha via pipe 127.0.0.1:53680
src/mesh.c:235 mesh_receive() no link for hashname zi3qgzyfymmritlnjppuycbhystlblqi33sxmunzy5xxmbp4zl5q
src/mesh.c:95 mesh_add() mesh add {"hashname":"zi3qgzyfymmritlnjppuycbhystlblqi33sxmunzy5xxmbp4zl5q","keys":{"1a":"aligyu4e47jjqjqnt22v56r3rejuh7xvjq"}}
src/link.c:31 link_new() adding link zi3qgzyfymmritlnjppuycbhystlblqi33sxmunzy5xxmbp4zl5q
src/link.c:130 link_load() adding 1a key to link zi3qgzyfymmritlnjppuycbhystlblqi33sxmunzy5xxmbp4zl5q
src/link.c:153 link_load() delivering session token 7d56959feded13e075824841d58072e8 to zi3qgzyfymmritlnjppuycbhystlblqi33sxmunzy5xxmbp4zl5q
src/link.c:296 link_sync() link sync at 1416524039
src/net/udp4.c:21 udp4_send() udp4 to zi3qgzyfymmritlnjppuycbhystlblqi33sxmunzy5xxmbp4zl5q
00:00:00.051 | zi3q tjey | addrbook     | Updated path {"type":"udp4","ip":"127.0.0.1","port":50891} (latency=31.712012ms, emwa=83.020405ms)
00:00:00.051 | zi3q tjey | e3x          | Opened exchange
00:00:00.051 | zi3q tjey | e3x          | Opened channel "link" 1
src/mesh.c:204 mesh_receive() mesh receiving channel to tjeyplqm556njaekesikfkoyw5dseya5xqg2pgyp6svctulxw5ha via pipe 127.0.0.1:53680
src/e3x/exchange3.c:164 exchange3_receive() no handshake
src/mesh.c:283 mesh_receive() channel decryption fail for link zi3qgzyfymmritlnjppuycbhystlblqi33sxmunzy5xxmbp4zl5q (null)
src/mesh.c:204 mesh_receive() mesh receiving channel to tjeyplqm556njaekesikfkoyw5dseya5xqg2pgyp6svctulxw5ha via pipe 127.0.0.1:53680
src/e3x/exchange3.c:164 exchange3_receive() no handshake
src/mesh.c:283 mesh_receive() channel decryption fail for link zi3qgzyfymmritlnjppuycbhystlblqi33sxmunzy5xxmbp4zl5q (null)
src/mesh.c:204 mesh_receive() mesh receiving channel to tjeyplqm556njaekesikfkoyw5dseya5xqg2pgyp6svctulxw5ha via pipe 127.0.0.1:53680
src/e3x/exchange3.c:164 exchange3_receive() no handshake
src/mesh.c:283 mesh_receive() channel decryption fail for link zi3qgzyfymmritlnjppuycbhystlblqi33sxmunzy5xxmbp4zl5q (null)
^C

I'm able to reproduce the error.

I'm also woking on an interop testing tool (that uses docker). https://github.com/fd/interoper
The tool will run test commands between any number of implementations cross-checking everything.

Awesome news on the tool!

I haven't tried to diagnose this yet, but the (very untested/young) reliable channel support in telehash-c makes the go interop test stop:

./test/bin/test_net_link | /Users/jer/go/bin/test-net-link
src/mesh.c:39 mesh_new() mesh created version 3.0.10
src/e3x/self3.c:39 self3_new() self created with 1 csids
net_link.c:29: passed 1 tests
net_link.c:38: passed 2 tests
2014/12/07 13:34:55 golang: 76resw7bxkaeizpyo2oa2dmwhcaiztnnygcnns25zh5gefy2uida
2014/12/07 13:34:55 remote: g5fpdyvvyyr54eyt463havmxkfhkdcy2j47mirrfe6545ql7hcwq
00:00:00.009 | 76re g5fp | addrbook     | Discovered path {"type":"udp4","ip":"127.0.0.1","port":58079} (latency=125ms, emwa=125ms)
00:00:00.009 | 76re g5fp | addrbook     | Changed path from <nil> to {"type":"udp4","ip":"127.0.0.1","port":58079}
../unix/net_udp4.c:37 udp4_pipe() new pipe to 127.0.0.1:60918
src/mesh.c:232 mesh_receive() mesh receiving handshake to g5fpdyvvyyr54eyt463havmxkfhkdcy2j47mirrfe6545ql7hcwq via pipe 127.0.0.1:60918
src/mesh.c:263 mesh_receive() no link for hashname 76resw7bxkaeizpyo2oa2dmwhcaiztnnygcnns25zh5gefy2uida
src/mesh.c:123 mesh_add() mesh add {"hashname":"76resw7bxkaeizpyo2oa2dmwhcaiztnnygcnns25zh5gefy2uida","keys":{"1a":"am5ngxm6oo6s5lr7ly5rgo4msl5ojae67q"}}
src/link.c:31 link_new() adding link 76resw7bxkaeizpyo2oa2dmwhcaiztnnygcnns25zh5gefy2uida
src/link.c:130 link_load() adding 1a key to link 76resw7bxkaeizpyo2oa2dmwhcaiztnnygcnns25zh5gefy2uida
src/link.c:153 link_load() delivering session token dc3f5f34160a23b322b7fe9ec97e1831 to 76resw7bxkaeizpyo2oa2dmwhcaiztnnygcnns25zh5gefy2uida
src/link.c:297 link_sync() link sync at 1417984496
../unix/net_udp4.c:21 udp4_send() udp4 to 76resw7bxkaeizpyo2oa2dmwhcaiztnnygcnns25zh5gefy2uida
src/mesh.c:291 mesh_receive() incoming handshake for link 76resw7bxkaeizpyo2oa2dmwhcaiztnnygcnns25zh5gefy2uida
src/link.c:235 link_handshake() link ready
src/ext/link.c:60 ext_link_status() link down
src/ext/link.c:101 link_on_link() auto-linking
src/ext/link.c:61 ext_link_status() initiating new link channel
src/e3x/channel3.c:66 channel3_new() new reliable channel 01000000 2 link
src/link.c:332 link_channel() new outgoing channel open: link
00:00:00.046 | 76re g5fp | e3x          | Opened exchange
00:00:00.046 | 76re g5fp | e3x          | Opened channel "link" 2
src/mesh.c:232 mesh_receive() mesh receiving channel to g5fpdyvvyyr54eyt463havmxkfhkdcy2j47mirrfe6545ql7hcwq via pipe 127.0.0.1:60918
src/e3x/exchange3.c:167 exchange3_receive() decrypted head 29 body 0
src/mesh.c:320 mesh_receive() channel packet 31 bytes from 76resw7bxkaeizpyo2oa2dmwhcaiztnnygcnns25zh5gefy2uida
src/link.c:252 link_receive()   <-- {"c":2,"type":"link","seq":1}
src/e3x/channel3.c:378 channel3_sending() sending ack 1 acked 0
src/link.c:371 link_flush()     --> {"c":2,"ack":1}
src/e3x/exchange3.c:177 exchange3_send() encrypting head 15 body 0
../unix/net_udp4.c:21 udp4_send() udp4 to 76resw7bxkaeizpyo2oa2dmwhcaiztnnygcnns25zh5gefy2uida
src/e3x/channel3.c:378 channel3_sending() sending ack 1 acked 1
00:00:00.047 | 76re g5fp | e3x.tx       | RCV token=1385280e30f56763533c9f8a7cd6269d from={"type":"udp4","ip":"127.0.0.1","port":58079}

It's probably the c code, but thought I'd post here just as an artifact as I dig into it :)

@quartzjer I just push to interoper and I also moved it to the telehash org (hope that is okay).

I started documenting how interoper works (have a look at the README.md and the tests/ folder.

My goal is to support two modes.

  • Dev mode for running tests while working on a specific implementation. this will run your implementation as an SUT and as driver against all other implementations.
  • tournament mode for running all implementations against each other (again both as SUT and driver). This should also result in a interop report that can be published online.

I'm making good progress on the dev mode.

Some things that need discussion:

  • tournament mode would ideally be run once a day (regardless of code changes). who will do this and where will this be done?
  • all implementations must build and publish docker images which are specifically setup for the interop tool (this is not that hard but most CI systems don't support docker. except for Wercker and maybe some others. so there should be a simple way to update the images. again atleast once a day).

Moving the interop testing to it's own repo is great! Let's close this issue here and I'll go add some thoughts in ones there now, thanks :)