shadow / shadow-plugin-bitcoin

A Shadow plug-in that runs the Bitcoin Satoshi reference software

Home Page:https://shadow.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No bytes being read or written

00h-i-r-a00 opened this issue · comments

For Shadow 1.10.2, I ran the first example that runs tgen with 10 clients. It doesn't seem to be creating a shadow.data directory, even though the logging seems to be coming out fine. It exits cleanly with the following last few lines:

00:00:23.998121 [thread-0] 00:19:59.000000001 [tgen-message] [server111.0.0.11] [_tgendriver_onHeartbeat] [driver-heartbeat] transfers-completed=0 bytes-read=0 bytes-write=0 transfers-error=0
00:00:23.998136 [thread-0] 00:19:59.000000001 [tgen-message] [server2
11.0.0.12] [_tgendriver_onHeartbeat] [driver-heartbeat] transfers-completed=0 bytes-read=0 bytes-write=0 transfers-error=0
00:00:23.998192 [thread-0] 00:19:59.000000001 [tgen-message] [server311.0.0.13] [_tgendriver_onHeartbeat] [driver-heartbeat] transfers-completed=0 bytes-read=0 bytes-write=0 transfers-error=0
00:00:23.998214 [thread-0] 00:19:59.000000001 [tgen-message] [server4
11.0.0.14] [_tgendriver_onHeartbeat] [driver-heartbeat] transfers-completed=0 bytes-read=0 bytes-write=0 transfers-error=0
00:00:23.998230 [thread-0] 00:19:59.000000001 [tgen-message] [server5~11.0.0.15] [_tgendriver_onHeartbeat] [driver-heartbeat] transfers-completed=0 bytes-read=0 bytes-write=0 transfers-error=0
00:00:23.999269 [thread-0] n/a [shadow-message] [n/a] [_topology_clearCache] path cache cleared, spent 0.000000 seconds computing 0 shortest paths
00:00:00.000000 [thread-0] n/a [shadow-message] [n/a] [master_free] Shadow v1.10.2 (built 2017-03-08) shut down cleanly at 2017-03-08 22:11:37

Running the basic example with bitcoin plugin installed gives me this:

fieldsofgold@fieldsofgold-VirtualBox:/shadow-plugin-bitcoin/run$ ../src/bitcoind/shadow-bitcoind -y -i ../resource/shadow.config.xml -r -t | grep -e "received: getaddr" -e "received: verack"
copying /home/fieldsofgold/shadow-plugin-bitcoin/run/data/bcdnode1
copying /home/fieldsofgold/shadow-plugin-bitcoin/run/data/bcdnode2
[2017-03-09 00:31:08.029713] bitcoind: Data directory reset in output path
[2017-03-09 00:31:08.058293] bitcoind: set environmental variables for libevent: EVENT_NOSELECT, EVENT_NOPOLL, EVENT_NOKQUEUE, EVENT_NODEVPOLL, EVENT_NOEVPORT, EVENT_NOWIN32
[2017-03-09 00:31:08.058512] bitcoind: calling '/home/fieldsofgold/.shadow/bin/shadow --preload=/home/fieldsofgold/.shadow/lib/libshadow-preload-bitcoind.so /home/fieldsofgold/shadow-plugin-bitcoin/resource/shadow.config.xml', output directed to '/home/fieldsofgold/shadow-plugin-bitcoin/run/data/shadow.log'
write skipping worker
gmodule init bitcoind
read skipping worker
check_init done
read skipping worker
gmodule init bitcoind
check_init done
pthread_key_create:0x7ffa3e0da3a0
pthread_create:0
pthread_key_create:0x7ffa3e0da3d0
pthread_create:1
pthread_key_create:0x1877288
pthread_create:2
passing to pth_pthread_create
returning from pth_pthread_create
pthread_key_create:0x7ffa3e0da63c
pthread_create:3
pthread_mutex_lock: initializing
pthread_key_create:0x7ffa3e0da5d0
pthread_create:4
passing to pth_pthread_create
returning from pth_pthread_create
passing to pth_pthread_create
returning from pth_pthread_create
passing to pth_pthread_create
returning from pth_pthread_create
passing to pth_pthread_create
returning from pth_pthread_create
passing to pth_pthread_create
returning from pth_pthread_create
passing to pth_pthread_create
returning from pth_pthread_create
passing to pth_pthread_create
returning from pth_pthread_create
pthread_key_create:0x7ffa3e0da3a0
pthread_create:0
pthread_key_create:0x7ffa3e0da3d0
pthread_create:1
pthread_key_create:0x1a05b88
pthread_create:2
passing to pth_pthread_create
returning from pth_pthread_create
pthread_key_create:0x7ffa3e0da63c
pthread_create:3
pthread_mutex_lock: initializing
pthread_key_create:0x7ffa3e0da5d0
pthread_create:4
passing to pth_pthread_create
returning from pth_pthread_create
passing to pth_pthread_create
returning from pth_pthread_create
passing to pth_pthread_create
returning from pth_pthread_create
passing to pth_pthread_create
returning from pth_pthread_create
passing to pth_pthread_create
returning from pth_pthread_create
passing to pth_pthread_create
returning from pth_pthread_create
passing to pth_pthread_create
returning from pth_pthread_create
write: going to pth fd:22
pthread_mutex_lock: initializing
00:00:00.526166 [thread-0] 00:00:13.603000000 [bitcoind-message] [bcdnode2
11.0.0.1] [CLogPrintStr] received: verack (0 bytes)
00:00:00.527154 [thread-0] 00:00:13.603000000 [bitcoind-message] [bcdnode111.0.0.2] [CLogPrintStr] received: verack (0 bytes)
00:00:00.537597 [thread-0] 00:00:13.804000000 [bitcoind-message] [bcdnode2
11.0.0.1] [CLogPrintStr] received: verack (0 bytes)
00:00:00.537742 [thread-0] 00:00:13.804000000 [bitcoind-message] [bcdnode211.0.0.1] [CLogPrintStr] received: getaddr (0 bytes)
00:00:00.538197 [thread-0] 00:00:13.804000000 [bitcoind-message] [bcdnode1
11.0.0.2] [CLogPrintStr] received: verack (0 bytes)
00:00:00.538338 [thread-0] 00:00:13.804000000 [bitcoind-message] [bcdnode1~11.0.0.2] [CLogPrintStr] received: getaddr (0 bytes)
[2017-03-09 00:31:09.958384] bitcoind: Shadow returned 0 in 0:00:01.899714 seconds

The common thing between running the vanilla shadow and its bitcoin version is that in both cases 0 bytes are being read and written, is that expected behavior?

Also, there are some errors in the shadow.log file. One of them is:

ERROR: Read : Failed to open file /home/fieldsofgold/shadow-plugin-bitcoin/run/data/bcdnode2/peers.dat

The entire log file is here. Could anyone please help me with this. Thanks!

I don't use the bitcoin plugin regularly, but I looked through this for a bit and can't tell exactly what is going on. Maybe someone else has an idea...

(I'm hoping to refresh the bitcoin plugin once Shadow v1.12 comes out - we've overhauled the plugin framework and it should be much cleaner to run bitcoin at that point. Until then, my guess is that it will take quite a bit of work to get bitcoin running correctly.)

@robgjansen Any idea when v1.12 comes out?

I am going to look more into this. Specifically, the source of this error
Error: Couldn't open socket for incoming connections (socket returned error Address family not supported by protocol (97)
which keeps recurring in the log file.

@robgjansen Any idea when v1.12 comes out?

We are working on it now - I am aiming for June/July.