Skip to content

Ephemeral MPC execution fails on retry due to port 5001 remaining bound after failed run #90

@SarthakSharm

Description

@SarthakSharm

When an MPC game fails mid-execution, port 5001 remains bound to the ephemeral server process (PID 1). Any subsequent game on the same pod immediately fails with listen tcp :5001: bind: address already in use without even attempting execution. The only recovery is a manual pod restart.
Environment

Component: ephemeral
Deployment: Kubernetes (AKS)

$ export RESULT_ID=$(cat billionaires.mpc | java -jar cs.jar ephemeral execute \
  -i $JEFFS_NET_WORTH_ID \
  -i $ELONS_NET_WORTH_ID \
  ephemeral-generic.default \
  | tail -n +2 \
  | sed 's/[][]//g')
ERROR StatusLogger Log4j2 could not find a logging implementation. Please add log4j-core to the classpath. Using SimpleLogger to log to the console...

$ echo $RESULT_ID
An error ocurred while executing the given command: Failed to trigger the backend Ephemeral service: status code: 500, message: error during MPC execution: listen tcp :5001: bind: address already in use. io.carbynestack.cli.exceptions.CsCliRunnerException: Failed to trigger the backend Ephemeral service: status code: 500, message: error during MPC execution: listen tcp :5001: bind: address already in use. at io.carbynestack.cli.client.ephemeral.command.ExecuteEphemeralClientCliCommandRunner.run(ExecuteEphemeralClientCliCommandRunner.java:60) at io.carbynestack.cli.CsClientCli.execute(CsClientCli.java:151) at io.carbynestack.cli.CsClientCli.parseConfig(CsClientCli.java:107) at io.carbynestack.cli.CsClientCli.parse(CsClientCli.java:72) at io.carbynestack.cli.CsCliApplication.run(CsCliApplication.java:115) at io.carbynestack.cli.CsCliApplication.main(CsCliApplication.java:160)

VCP1:

2026-03-05T05:29:05.061Z	DEBUG	ephemeral/server.go:168	Bodyfilter handler done
2026-03-05T05:29:05.061Z	DEBUG	ephemeral/server.go:219	Executing Compilation Handler: &{[caca3e70-eec8-4eb5-8a3b-03670981978f 1a24948b-7265-4438-bdb6-c2ded43ea6ae] [] 3772ff26-c4f4-441a-b49c-46cc80b0df97 # Prologue to read in the inputs
port=regint(10000)
listen(port)
socket_id = regint()
acceptclientconnection(socket_id, port)
v = sint.read_from_socket(socket_id, 2)

# The logic
first_billionaires_net_worth = v[0]
second_billionaires_net_worth= v[1]
result = first_billionaires_net_worth < second_billionaires_net_worth

# Epilogue to return the outputs 
resp = Array(1, sint)
resp[0] = result
sint.write_to_socket(socket_id, resp)
 {AMPHORASECRET}}
2026-03-05T05:29:05.061Z	INFO	ephemeral/server.go:238	Compiling the application	{"gameID": "3772ff26-c4f4-441a-b49c-46cc80b0df97"}
2026-03-05T05:29:05.179Z	DEBUG	ephemeral/spdz.go:263	Compiled Successfully	{"Command": "./compile.py -M mpc-program", "StdOut": "Default bit length: 64\r\nDefault security parameter: 40\r\nCompiling file /mp-spdz-642d11f_no-offline/Programs/Source/mpc-program.mpc\r\nWriting to /mp-spdz-642d11f_no-offline/Programs/Schedules/mpc-program.sch\r\nWriting to /mp-spdz-642d11f_no-offline/Programs/Bytecode/mpc-program-0.bc\r\nProgram requires at most:\r\n         105 integer bits\r\n         120 integer triples\r\n           7 virtual machine rounds\r\n", "StdErr": ""}
2026-03-05T05:29:05.179Z	DEBUG	ephemeral/server.go:247	Finished compiling the application	{"gameID": "3772ff26-c4f4-441a-b49c-46cc80b0df97"}
2026-03-05T05:29:05.179Z	DEBUG	ephemeral/server.go:250	Compilation handler done
2026-03-05T05:29:05.179Z	DEBUG	ephemeral/server.go:262	Created Activation context	{"Context": "context.Background.WithValue(type ephemeral.contextConf, val <not Stringer>).WithDeadline(2026-03-05 05:40:05.179132553 +0000 UTC m=+84221.164740570 [10m59.999985433s])", "Deadline": "2026-03-05T05:40:05.179Z"}
2026-03-05T05:29:05.201Z	DEBUG	ephemeral/server.go:269	Retrieved pod name ephemeral-generic-00001-deployment-74f6b6c56f-s6t2q
2026-03-05T05:29:05.204Z	DEBUG	client/client.go:110	Client gRPC connection established
2026-03-05T05:29:05.204Z	DEBUG	ephemeral/player.go:247	Sending event	{"event": "gameID:\"3772ff26-c4f4-441a-b49c-46cc80b0df97\" players:<id:100 players:2 pod:\"ephemeral-generic-00001-deployment-74f6b6c56f-s6t2q\" ip:\"20.204.215.0.sslip.io\" > name:\"Register\" ", "topic": "0"}
2026-03-05T05:29:05.204Z	DEBUG	client/client.go:119	Register client to eventsConnID3772ff26-c4f4-441a-b49c-46cc80b0df97EventScopeEventScropeSelf
2026-03-05T05:29:05.204Z	DEBUG	fsm/fsm.go:159	FSM process event &{Register  0xc0002c7480}
2026-03-05T05:29:05.204Z	DEBUG	fsm/fsm.go:190	FSM Transition &{{Register Init} Register Init Registering 0s}

2026-03-05T05:29:05.204Z	DEBUG	fsm/fsm.go:225	Execute Callback AfterEnter	{"state": "Registering", "event": {"Name":"Register","GameID":"","Meta":{"FSM":{},"TargetTopic":"0","SrcTopics":["3772ff26-c4f4-441a-b49c-46cc80b0df97"],"TransportMsg":{"gameID":"3772ff26-c4f4-441a-b49c-46cc80b0df97","players":[{"id":100,"players":2,"pod":"ephemeral-generic-00001-deployment-74f6b6c56f-s6t2q","ip":"20.204.215.0.sslip.io"}],"name":"Register"}}}}
2026-03-05T05:29:05.204Z	DEBUG	ephemeral/player.go:247	Sending event	{"event": "gameID:\"3772ff26-c4f4-441a-b49c-46cc80b0df97\" players:<id:100 players:2 pod:\"ephemeral-generic-00001-deployment-74f6b6c56f-s6t2q\" ip:\"20.204.215.0.sslip.io\" > name:\"PlayerReady\" ", "topic": "discovery"}
2026-03-05T05:29:05.204Z	DEBUG	client/client.go:164	Sending event gameID:"3772ff26-c4f4-441a-b49c-46cc80b0df97" players:<id:100 players:2 pod:"ephemeral-generic-00001-deployment-74f6b6c56f-s6t2q" ip:"20.204.215.0.sslip.io" > name:"PlayerReady" 
2026-03-05T05:29:10.229Z	DEBUG	client/client.go:201	Received event gameID:"3772ff26-c4f4-441a-b49c-46cc80b0df97" players:<id:100 players:2 pod:"ephemeral-generic-00001-deployment-74f6b6c56f-s6t2q" ip:"20.204.215.0.sslip.io" port:30000 > players:<id:101 players:2 pod:"ephemeral-generic-00001-deployment-65f48f5c5c-dmv82" ip:"20.207.70.46.sslip.io" port:30000 > name:"PlayersReady" 
2026-03-05T05:29:10.229Z	DEBUG	fsm/fsm.go:159	FSM process event &{PlayersReady  0xc000ae8900}
2026-03-05T05:29:10.229Z	DEBUG	fsm/fsm.go:190	FSM Transition &{{PlayersReady Registering} PlayersReady Registering Playing 2m0s}

2026-03-05T05:29:10.229Z	DEBUG	fsm/fsm.go:225	Execute Callback AfterEnter	{"state": "Playing", "event": {"Name":"PlayersReady","GameID":"","Meta":{"FSM":{},"TargetTopic":"0","SrcTopics":null,"TransportMsg":{"gameID":"3772ff26-c4f4-441a-b49c-46cc80b0df97","players":[{"id":100,"players":2,"pod":"ephemeral-generic-00001-deployment-74f6b6c56f-s6t2q","ip":"20.204.215.0.sslip.io","port":30000},{"id":101,"players":2,"pod":"ephemeral-generic-00001-deployment-65f48f5c5c-dmv82","ip":"20.207.70.46.sslip.io","port":30000}],"name":"PlayersReady"}}}}
2026-03-05T05:29:10.229Z	INFO	ephemeral/spdz.go:110	Created ProxyEntries	{"ProxyEntries": [{"host":"20.207.70.46.sslip.io","port":"30000","localPort":"5001"}], "Players": [{"id":100,"players":2,"pod":"ephemeral-generic-00001-deployment-74f6b6c56f-s6t2q","ip":"20.204.215.0.sslip.io","port":30000},{"id":101,"players":2,"pod":"ephemeral-generic-00001-deployment-65f48f5c5c-dmv82","ip":"20.207.70.46.sslip.io","port":30000}]}
2026-03-05T05:29:10.229Z	DEBUG	ephemeral/spdz.go:77	Starting MPC execution
2026-03-05T05:29:10.229Z	INFO	network/proxy.go:138	Adding TCP Proxy Entry for 'localhost:5001' -> '20.207.70.46.sslip.io:30000'	{"gameID": "3772ff26-c4f4-441a-b49c-46cc80b0df97"}
2026-03-05T05:29:10.229Z	INFO	network/proxy.go:170	Checking if connection to peer works for config: &{20.207.70.46.sslip.io 30000 5001}
2026-03-05T05:29:10.229Z	DEBUG	network/tcpchecker.go:92	Attempting to establish mTLS connection to 20.207.70.46.sslip.io:30000
2026-03-05T05:29:11.454Z	DEBUG	network/tcpchecker.go:124	TCPCheck - connection established
2026-03-05T05:29:11.454Z	INFO	network/proxy.go:175	TCP check to '20.207.70.46.sslip.io:30000' is OK
2026-03-05T05:29:11.455Z	INFO	network/proxy.go:74	Starting TCP Proxy	{"gameID": "3772ff26-c4f4-441a-b49c-46cc80b0df97"}
2026-03-05T05:29:11.455Z	INFO	network/proxy.go:91	Waiting until proxyEntry is started for local Port 5001
2026-03-05T05:29:11.455Z	DEBUG	network/ping_aware_target.go:99	Checking if the next 4 bytes contain the ping header
2026-03-05T05:29:11.455Z	DEBUG	network/ping_aware_target.go:99	Checking if the next 4 bytes contain the ping header
2026-03-05T05:29:11.455Z	DEBUG	network/ping_aware_target.go:44	Received a ping message
2026-03-05T05:29:11.455Z	DEBUG	network/ping_aware_target.go:51	Responded with pong message
2026-03-05T05:29:11.455Z	DEBUG	network/ping_aware_target.go:78	Closing the ping connection
2026-03-05T05:29:11.455Z	INFO	ephemeral/spdz.go:359	Writing to IPFile: 	{"path": "/mp-spdz/ip-file", "content": "localhost\nlocalhost\n", "proxy address": "localhost", "parties": 2}
2026-03-05T05:29:11.455Z	ERROR	ephemeral/spdz.go:223	Activation finished with proxy error	{"gameID": "3772ff26-c4f4-441a-b49c-46cc80b0df97", "ProxyError": "listen tcp :5001: bind: address already in use"}
2026-03-05T05:29:11.455Z	DEBUG	io/feeder.go:129	Close connections
2026-03-05T05:29:11.455Z	DEBUG	io/carrier.go:108	Closing connection	{"ConnectionInfo": null}
2026-03-05T05:29:11.455Z	DEBUG	ephemeral/spdz.go:276	Starting MPC	{"gameID": "3772ff26-c4f4-441a-b49c-46cc80b0df97"}
2026-03-05T05:29:11.455Z	DEBUG	network/proxy.go:181	Waiting for TCP proxy to stop	{"gameID": "3772ff26-c4f4-441a-b49c-46cc80b0df97"}
2026-03-05T05:29:11.455Z	DEBUG	network/proxy.go:188	Stopped the TCP proxy	{"gameID": "3772ff26-c4f4-441a-b49c-46cc80b0df97"}
2026-03-05T05:29:11.455Z	ERROR	ephemeral/player.go:182	Error during code execution: listen tcp :5001: bind: address already in use
2026-03-05T05:29:11.455Z	DEBUG	ephemeral/player.go:247	Sending event	{"event": "gameID:\"3772ff26-c4f4-441a-b49c-46cc80b0df97\" players:<id:100 players:2 pod:\"ephemeral-generic-00001-deployment-74f6b6c56f-s6t2q\" ip:\"20.204.215.0.sslip.io\" > name:\"PlayingError\" ", "topic": "0"}
2026-03-05T05:29:11.455Z	DEBUG	ephemeral/spdz.go:313	Creating new tuple streamer	{"TupleType": {"Name":"BIT_GFP","PreprocessingName":"Bits","SpdzProtocol":{"Descriptor":"SPDZ gfp","Shorthand":"p"}}, "TupleStock": 50000, "Player-Data": "Player-Data/2-p-128/", "gameID": "3772ff26-c4f4-441a-b49c-46cc80b0df97", "ThreadNr": 0}
2026-03-05T05:29:11.455Z	DEBUG	fsm/fsm.go:159	FSM process event &{PlayingError  0xc000818d80}
2026-03-05T05:29:11.455Z	DEBUG	fsm/fsm.go:190	FSM Transition &{{PlayingError Playing} PlayingError Playing PlayerFinishedWithError 0s}

2026-03-05T05:29:11.455Z	ERROR	ephemeral/server.go:295	error during MPC execution: listen tcp :5001: bind: address already in use	{"gameID": "3772ff26-c4f4-441a-b49c-46cc80b0df97"}
2026-03-05T05:29:11.455Z	DEBUG	ephemeral/server.go:302	Activation finalized
2026-03-05T05:29:11.455Z	DEBUG	fsm/fsm.go:225	Execute Callback AfterEnter	{"state": "PlayerFinishedWithError", "event": {"Name":"PlayingError","GameID":"","Meta":{"FSM":{},"TargetTopic":"0","SrcTopics":["3772ff26-c4f4-441a-b49c-46cc80b0df97"],"TransportMsg":{"gameID":"3772ff26-c4f4-441a-b49c-46cc80b0df97","players":[{"id":100,"players":2,"pod":"ephemeral-generic-00001-deployment-74f6b6c56f-s6t2q","ip":"20.204.215.0.sslip.io"}],"name":"PlayingError"}}}}
2026-03-05T05:29:11.455Z	DEBUG	ephemeral/player.go:247	Sending event	{"event": "gameID:\"3772ff26-c4f4-441a-b49c-46cc80b0df97\" players:<id:100 players:2 pod:\"ephemeral-generic-00001-deployment-74f6b6c56f-s6t2q\" ip:\"20.204.215.0.sslip.io\" > name:\"GameFinishedWithError\" ", "topic": "discovery"}
2026-03-05T05:29:11.455Z	DEBUG	ephemeral/player.go:247	Sending event	{"event": "gameID:\"3772ff26-c4f4-441a-b49c-46cc80b0df97\" players:<id:100 players:2 pod:\"ephemeral-generic-00001-deployment-74f6b6c56f-s6t2q\" ip:\"20.204.215.0.sslip.io\" > name:\"PlayerDone\" ", "topic": "0"}
2026-03-05T05:29:11.455Z	DEBUG	ephemeral/player.go:206	Player finished with error: game failed with error: PlayingError
	History:  ->  ->  -> Init -> Registering -> Playing -> PlayerFinishedWithError
2026-03-05T05:29:11.455Z	DEBUG	io/tuple_streamer.go:144	Generated tuple file header: 1d000000000000005350445a206766700010000000958907458f2136861bd7554a24340001	{"gameID": "3772ff26-c4f4-441a-b49c-46cc80b0df97", "TupleType": {"Name":"BIT_GFP","PreprocessingName":"Bits","SpdzProtocol":{"Descriptor":"SPDZ gfp","Shorthand":"p"}}, "ThreadNr": 0}
2026-03-05T05:29:11.455Z	DEBUG	io/tuple_streamer.go:127	Tuple type in creating new StreamerBIT_GFPBits	{"gameID": "3772ff26-c4f4-441a-b49c-46cc80b0df97", "TupleType": {"Name":"BIT_GFP","PreprocessingName":"Bits","SpdzProtocol":{"Descriptor":"SPDZ gfp","Shorthand":"p"}}, "ThreadNr": 0}
2026-03-05T05:29:11.455Z	INFO	ephemeral/forwarder.go:55	Context canceled, cleaning up assigned resources...
2026-03-05T05:29:11.455Z	DEBUG	client/client.go:161	Close the event forwarding as context is done
2026-03-05T05:29:11.455Z	DEBUG	ephemeral/spdz.go:309	Skipping tuple type	{"TupleType": "BIT_GF2N", "gameID": "3772ff26-c4f4-441a-b49c-46cc80b0df97"}
2026-03-05T05:29:11.455Z	DEBUG	ephemeral/spdz.go:313	Creating new tuple streamer	{"TupleType": {"Name":"INPUT_MASK_GFP","PreprocessingName":"Inputs","SpdzProtocol":{"Descriptor":"SPDZ gfp","Shorthand":"p"}}, "TupleStock": 50000, "Player-Data": "Player-Data/2-p-128/", "gameID": "3772ff26-c4f4-441a-b49c-46cc80b0df97", "ThreadNr": 0}
2026-03-05T05:29:11.455Z	DEBUG	client/client.go:198	Stop receiiving events as context is done. (err: rpc error: code = Canceled desc = context canceled)
2026-03-05T05:29:11.455Z	DEBUG	client/client.go:145	Stopping client connection
2026-03-05T05:29:11.455Z	DEBUG	client/client.go:145	Stopping client connection
2026-03-05T05:29:11.455Z	DEBUG	io/tuple_streamer.go:144	Generated tuple file header: 1d000000000000005350445a206766700010000000958907458f2136861bd7554a24340001	{"gameID": "3772ff26-c4f4-441a-b49c-46cc80b0df97", "TupleType": {"Name":"INPUT_MASK_GFP","PreprocessingName":"Inputs","SpdzProtocol":{"Descriptor":"SPDZ gfp","Shorthand":"p"}}, "ThreadNr": 0}
2026-03-05T05:29:11.456Z	DEBUG	io/tuple_streamer.go:127	Tuple type in creating new StreamerINPUT_MASK_GFPInputs	{"gameID": "3772ff26-c4f4-441a-b49c-46cc80b0df97", "TupleType": {"Name":"INPUT_MASK_GFP","PreprocessingName":"Inputs","SpdzProtocol":{"Descriptor":"SPDZ gfp","Shorthand":"p"}}, "ThreadNr": 0}
2026-03-05T05:29:11.456Z	DEBUG	ephemeral/spdz.go:309	Skipping tuple type	{"TupleType": "INPUT_MASK_GF2N", "gameID": "3772ff26-c4f4-441a-b49c-46cc80b0df97"}
2026-03-05T05:29:11.456Z	DEBUG	ephemeral/spdz.go:309	Skipping tuple type	{"TupleType": "INVERSE_TUPLE_GFP", "gameID": "3772ff26-c4f4-441a-b49c-46cc80b0df97"}
2026-03-05T05:29:11.456Z	DEBUG	ephemeral/spdz.go:309	Skipping tuple type	{"TupleType": "INVERSE_TUPLE_GF2N", "gameID": "3772ff26-c4f4-441a-b49c-46cc80b0df97"}
2026-03-05T05:29:11.456Z	DEBUG	ephemeral/spdz.go:309	Skipping tuple type	{"TupleType": "SQUARE_TUPLE_GFP", "gameID": "3772ff26-c4f4-441a-b49c-46cc80b0df97"}
2026-03-05T05:29:11.456Z	DEBUG	ephemeral/spdz.go:309	Skipping tuple type	{"TupleType": "SQUARE_TUPLE_GF2N", "gameID": "3772ff26-c4f4-441a-b49c-46cc80b0df97"}
2026-03-05T05:29:11.456Z	ERROR	client/client.go:133	Error stopping gRPC client rpc error: code = Canceled desc = grpc: the client connection is closing
2026-03-05T05:29:11.456Z	DEBUG	ephemeral/spdz.go:313	Creating new tuple streamer	{"TupleType": {"Name":"MULTIPLICATION_TRIPLE_GFP","PreprocessingName":"Triples","SpdzProtocol":{"Descriptor":"SPDZ gfp","Shorthand":"p"}}, "TupleStock": 50000, "Player-Data": "Player-Data/2-p-128/", "gameID": "3772ff26-c4f4-441a-b49c-46cc80b0df97", "ThreadNr": 0}
2026-03-05T05:29:11.456Z	DEBUG	io/tuple_streamer.go:144	Generated tuple file header: 1d000000000000005350445a206766700010000000958907458f2136861bd7554a24340001	{"gameID": "3772ff26-c4f4-441a-b49c-46cc80b0df97", "TupleType": {"Name":"MULTIPLICATION_TRIPLE_GFP","PreprocessingName":"Triples","SpdzProtocol":{"Descriptor":"SPDZ gfp","Shorthand":"p"}}, "ThreadNr": 0}
2026-03-05T05:29:11.456Z	DEBUG	io/tuple_streamer.go:127	Tuple type in creating new StreamerMULTIPLICATION_TRIPLE_GFPTriples	{"gameID": "3772ff26-c4f4-441a-b49c-46cc80b0df97", "TupleType": {"Name":"MULTIPLICATION_TRIPLE_GFP","PreprocessingName":"Triples","SpdzProtocol":{"Descriptor":"SPDZ gfp","Shorthand":"p"}}, "ThreadNr": 0}
2026-03-05T05:29:11.456Z	DEBUG	ephemeral/spdz.go:309	Skipping tuple type	{"TupleType": "MULTIPLICATION_TRIPLE_GF2N", "gameID": "3772ff26-c4f4-441a-b49c-46cc80b0df97"}
2026-03-05T05:29:11.456Z	DEBUG	io/tuple_streamer.go:188	Starting tuple streamer for type %sBIT_GFP	{"gameID": "3772ff26-c4f4-441a-b49c-46cc80b0df97", "TupleType": {"Name":"BIT_GFP","PreprocessingName":"Bits","SpdzProtocol":{"Descriptor":"SPDZ gfp","Shorthand":"p"}}, "ThreadNr": 0}
2026-03-05T05:29:11.456Z	DEBUG	io/tuple_streamer.go:189	Active Goroutines: %d585	{"gameID": "3772ff26-c4f4-441a-b49c-46cc80b0df97", "TupleType": {"Name":"BIT_GFP","PreprocessingName":"Bits","SpdzProtocol":{"Descriptor":"SPDZ gfp","Shorthand":"p"}}, "ThreadNr": 0}
2026-03-05T05:29:11.456Z	DEBUG	io/tuple_streamer.go:188	Starting tuple streamer for type %sINPUT_MASK_GFP	{"gameID": "3772ff26-c4f4-441a-b49c-46cc80b0df97", "TupleType": {"Name":"INPUT_MASK_GFP","PreprocessingName":"Inputs","SpdzProtocol":{"Descriptor":"SPDZ gfp","Shorthand":"p"}}, "ThreadNr": 0}
2026-03-05T05:29:11.456Z	DEBUG	io/tuple_streamer.go:189	Active Goroutines: %d586	{"gameID": "3772ff26-c4f4-441a-b49c-46cc80b0df97", "TupleType": {"Name":"INPUT_MASK_GFP","PreprocessingName":"Inputs","SpdzProtocol":{"Descriptor":"SPDZ gfp","Shorthand":"p"}}, "ThreadNr": 0}
2026-03-05T05:29:11.456Z	DEBUG	io/tuple_streamer.go:188	Starting tuple streamer for type %sMULTIPLICATION_TRIPLE_GFP	{"gameID": "3772ff26-c4f4-441a-b49c-46cc80b0df97", "TupleType": {"Name":"MULTIPLICATION_TRIPLE_GFP","PreprocessingName":"Triples","SpdzProtocol":{"Descriptor":"SPDZ gfp","Shorthand":"p"}}, "ThreadNr": 0}
2026-03-05T05:29:11.456Z	DEBUG	io/tuple_streamer.go:189	Active Goroutines: %d587	{"gameID": "3772ff26-c4f4-441a-b49c-46cc80b0df97", "TupleType": {"Name":"MULTIPLICATION_TRIPLE_GFP","PreprocessingName":"Triples","SpdzProtocol":{"Descriptor":"SPDZ gfp","Shorthand":"p"}}, "ThreadNr": 0}
2026-03-05T05:29:11.456Z	INFO	ephemeral/spdz.go:332	Starting Player-Online.x	{"gameID": "3772ff26-c4f4-441a-b49c-46cc80b0df97", "command": ["./Player-Online.x 0 mpc-program -N 2 --ip-file-name /mp-spdz/ip-file --file-prep-per-thread"]}
2026-03-05T05:29:11.456Z	ERROR	ephemeral/spdz.go:336	Error while executing the user code	{"gameID": "3772ff26-c4f4-441a-b49c-46cc80b0df97", "StdErr": "", "StdOut": "", "error": "context canceled"}
2026-03-05T05:29:11.456Z	DEBUG	io/tuple_streamer.go:217	Terminate tuple streamer	{"gameID": "3772ff26-c4f4-441a-b49c-46cc80b0df97", "TupleType": {"Name":"INPUT_MASK_GFP","PreprocessingName":"Inputs","SpdzProtocol":{"Descriptor":"SPDZ gfp","Shorthand":"p"}}, "ThreadNr": 0, "Provided bytes": 0, "Discarded bytes": 0}
2026-03-05T05:29:11.456Z	DEBUG	io/tuple_streamer.go:217	Terminate tuple streamer	{"gameID": "3772ff26-c4f4-441a-b49c-46cc80b0df97", "TupleType": {"Name":"MULTIPLICATION_TRIPLE_GFP","PreprocessingName":"Triples","SpdzProtocol":{"Descriptor":"SPDZ gfp","Shorthand":"p"}}, "ThreadNr": 0, "Provided bytes": 0, "Discarded bytes": 0}
2026-03-05T05:29:11.456Z	DEBUG	io/tuple_streamer.go:217	Terminate tuple streamer	{"gameID": "3772ff26-c4f4-441a-b49c-46cc80b0df97", "TupleType": {"Name":"BIT_GFP","PreprocessingName":"Bits","SpdzProtocol":{"Descriptor":"SPDZ gfp","Shorthand":"p"}}, "ThreadNr": 0, "Provided bytes": 0, "Discarded bytes": 0}
2026-03-05T05:29:11.472Z	DEBUG	opa/client.go:105	Sending OPA request	{"url": "http://opa.default.svc.cluster.local:8081/v1/data/carbynestack/def/execute", "payload": "{\"input\":{\"executor\":\"elon@carbynestack.io\",\"inputs\":[{\"secretId\":\"caca3e70-eec8-4eb5-8a3b-03670981978f\",\"owner\":\"elon@carbynestack.io\",\"accessPolicy\":\"carbynestack.def\"},{\"secretId\":\"1a24948b-7265-4438-bdb6-c2ded43ea6ae\",\"owner\":\"elon@carbynestack.io\",\"accessPolicy\":\"carbynestack.def\"}],\"playerCount\":2,\"subject\":\"ephemeral-generic\",\"time\":{\"formatted\":\"2026-03-05 05:29:11.472455351 +0000 UTC m=+83567.458063359\",\"nano\":1772688551472455351}}}"}
2026-03-05T05:29:11.479Z	DEBUG	io/feeder.go:138	Received secret shared parameters "[ajarrqRMaK tjO6QKJ/oR]..." (len: 2)	{"gameID": "3772ff26-c4f4-441a-b49c-46cc80b0df97"}
2026-03-05T05:29:11.479Z	DEBUG	io/carrier.go:52	Connecting to localhost:10000
2026-03-05T05:29:11.479Z	DEBUG	io/carrier.go:108	Closing connection	{"ConnectionInfo": null}

VCP2

2026-03-05T05:29:10.087Z	DEBUG	ephemeral/server.go:219	Executing Compilation Handler: &{[caca3e70-eec8-4eb5-8a3b-03670981978f 1a24948b-7265-4438-bdb6-c2ded43ea6ae] [] 3772ff26-c4f4-441a-b49c-46cc80b0df97 # Prologue to read in the inputs
port=regint(10000)
listen(port)
socket_id = regint()
acceptclientconnection(socket_id, port)
v = sint.read_from_socket(socket_id, 2)

# The logic
first_billionaires_net_worth = v[0]
second_billionaires_net_worth= v[1]
result = first_billionaires_net_worth < second_billionaires_net_worth

# Epilogue to return the outputs 
resp = Array(1, sint)
resp[0] = result
sint.write_to_socket(socket_id, resp)
 {AMPHORASECRET}}
2026-03-05T05:29:10.087Z	INFO	ephemeral/server.go:238	Compiling the application	{"gameID": "3772ff26-c4f4-441a-b49c-46cc80b0df97"}
2026-03-05T05:29:10.201Z	DEBUG	ephemeral/spdz.go:263	Compiled Successfully	{"Command": "./compile.py -M mpc-program", "StdOut": "Default bit length: 64\r\nDefault security parameter: 40\r\nCompiling file /mp-spdz-642d11f_no-offline/Programs/Source/mpc-program.mpc\r\nWriting to /mp-spdz-642d11f_no-offline/Programs/Schedules/mpc-program.sch\r\nWriting to /mp-spdz-642d11f_no-offline/Programs/Bytecode/mpc-program-0.bc\r\nProgram requires at most:\r\n         105 integer bits\r\n         120 integer triples\r\n           7 virtual machine rounds\r\n", "StdErr": ""}
2026-03-05T05:29:10.201Z	DEBUG	ephemeral/server.go:247	Finished compiling the application	{"gameID": "3772ff26-c4f4-441a-b49c-46cc80b0df97"}
2026-03-05T05:29:10.201Z	DEBUG	ephemeral/server.go:250	Compilation handler done
2026-03-05T05:29:10.201Z	DEBUG	ephemeral/server.go:262	Created Activation context	{"Context": "context.Background.WithValue(type ephemeral.contextConf, val <not Stringer>).WithDeadline(2026-03-05 05:40:10.201974235 +0000 UTC m=+86783.878985922 [10m59.999981104s])", "Deadline": "2026-03-05T05:40:10.201Z"}
2026-03-05T05:29:10.224Z	DEBUG	ephemeral/server.go:269	Retrieved pod name ephemeral-generic-00001-deployment-65f48f5c5c-dmv82
2026-03-05T05:29:10.226Z	DEBUG	client/client.go:110	Client gRPC connection established
2026-03-05T05:29:10.226Z	DEBUG	ephemeral/player.go:247	Sending event	{"event": "gameID:\"3772ff26-c4f4-441a-b49c-46cc80b0df97\" players:<id:101 players:2 pod:\"ephemeral-generic-00001-deployment-65f48f5c5c-dmv82\" ip:\"20.207.70.46.sslip.io\" > name:\"Register\" ", "topic": "1"}
2026-03-05T05:29:10.226Z	DEBUG	client/client.go:119	Register client to eventsConnID3772ff26-c4f4-441a-b49c-46cc80b0df97EventScopeEventScropeSelf
2026-03-05T05:29:10.226Z	DEBUG	fsm/fsm.go:159	FSM process event &{Register  0xc00004b4c0}
2026-03-05T05:29:10.226Z	DEBUG	fsm/fsm.go:190	FSM Transition &{{Register Init} Register Init Registering 0s}

2026-03-05T05:29:10.226Z	DEBUG	fsm/fsm.go:225	Execute Callback AfterEnter	{"state": "Registering", "event": {"Name":"Register","GameID":"","Meta":{"FSM":{},"TargetTopic":"1","SrcTopics":["3772ff26-c4f4-441a-b49c-46cc80b0df97"],"TransportMsg":{"gameID":"3772ff26-c4f4-441a-b49c-46cc80b0df97","players":[{"id":101,"players":2,"pod":"ephemeral-generic-00001-deployment-65f48f5c5c-dmv82","ip":"20.207.70.46.sslip.io"}],"name":"Register"}}}}
2026-03-05T05:29:10.226Z	DEBUG	ephemeral/player.go:247	Sending event	{"event": "gameID:\"3772ff26-c4f4-441a-b49c-46cc80b0df97\" players:<id:101 players:2 pod:\"ephemeral-generic-00001-deployment-65f48f5c5c-dmv82\" ip:\"20.207.70.46.sslip.io\" > name:\"PlayerReady\" ", "topic": "discovery"}
2026-03-05T05:29:10.226Z	DEBUG	client/client.go:164	Sending event gameID:"3772ff26-c4f4-441a-b49c-46cc80b0df97" players:<id:101 players:2 pod:"ephemeral-generic-00001-deployment-65f48f5c5c-dmv82" ip:"20.207.70.46.sslip.io" > name:"PlayerReady" 
2026-03-05T05:29:10.250Z	DEBUG	client/client.go:201	Received event gameID:"3772ff26-c4f4-441a-b49c-46cc80b0df97" players:<id:100 players:2 pod:"ephemeral-generic-00001-deployment-74f6b6c56f-s6t2q" ip:"20.204.215.0.sslip.io" port:30000 > players:<id:101 players:2 pod:"ephemeral-generic-00001-deployment-65f48f5c5c-dmv82" ip:"20.207.70.46.sslip.io" port:30000 > name:"PlayersReady" 
2026-03-05T05:29:10.251Z	DEBUG	fsm/fsm.go:159	FSM process event &{PlayersReady  0xc00004b640}
2026-03-05T05:29:10.251Z	DEBUG	fsm/fsm.go:190	FSM Transition &{{PlayersReady Registering} PlayersReady Registering Playing 2m0s}

2026-03-05T05:29:10.251Z	DEBUG	fsm/fsm.go:225	Execute Callback AfterEnter	{"state": "Playing", "event": {"Name":"PlayersReady","GameID":"","Meta":{"FSM":{},"TargetTopic":"1","SrcTopics":null,"TransportMsg":{"gameID":"3772ff26-c4f4-441a-b49c-46cc80b0df97","players":[{"id":100,"players":2,"pod":"ephemeral-generic-00001-deployment-74f6b6c56f-s6t2q","ip":"20.204.215.0.sslip.io","port":30000},{"id":101,"players":2,"pod":"ephemeral-generic-00001-deployment-65f48f5c5c-dmv82","ip":"20.207.70.46.sslip.io","port":30000}],"name":"PlayersReady"}}}}
2026-03-05T05:29:10.251Z	INFO	ephemeral/spdz.go:110	Created ProxyEntries	{"ProxyEntries": [{"host":"20.204.215.0.sslip.io","port":"30000","localPort":"5000"}], "Players": [{"id":100,"players":2,"pod":"ephemeral-generic-00001-deployment-74f6b6c56f-s6t2q","ip":"20.204.215.0.sslip.io","port":30000},{"id":101,"players":2,"pod":"ephemeral-generic-00001-deployment-65f48f5c5c-dmv82","ip":"20.207.70.46.sslip.io","port":30000}]}
2026-03-05T05:29:10.251Z	DEBUG	ephemeral/spdz.go:77	Starting MPC execution
2026-03-05T05:29:10.251Z	INFO	network/proxy.go:138	Adding TCP Proxy Entry for 'localhost:5000' -> '20.204.215.0.sslip.io:30000'	{"gameID": "3772ff26-c4f4-441a-b49c-46cc80b0df97"}
2026-03-05T05:29:10.251Z	INFO	network/proxy.go:74	Starting TCP Proxy	{"gameID": "3772ff26-c4f4-441a-b49c-46cc80b0df97"}
2026-03-05T05:29:10.251Z	INFO	network/proxy.go:91	Waiting until proxyEntry is started for local Port 5000
2026-03-05T05:29:10.251Z	DEBUG	network/proxy.go:86	Retrying to ping after 50ms	{"gameID": "3772ff26-c4f4-441a-b49c-46cc80b0df97"}
2026-03-05T05:29:10.301Z	DEBUG	network/ping_aware_target.go:99	Checking if the next 4 bytes contain the ping header
2026-03-05T05:29:10.301Z	DEBUG	network/ping_aware_target.go:99	Checking if the next 4 bytes contain the ping header
2026-03-05T05:29:10.301Z	DEBUG	network/ping_aware_target.go:44	Received a ping message
2026-03-05T05:29:10.301Z	DEBUG	network/ping_aware_target.go:51	Responded with pong message
2026-03-05T05:29:10.301Z	DEBUG	network/ping_aware_target.go:78	Closing the ping connection
2026-03-05T05:29:10.301Z	INFO	ephemeral/spdz.go:359	Writing to IPFile: 	{"path": "/mp-spdz/ip-file", "content": "localhost\nlocalhost\n", "proxy address": "localhost", "parties": 2}
2026-03-05T05:29:10.301Z	DEBUG	ephemeral/spdz.go:276	Starting MPC	{"gameID": "3772ff26-c4f4-441a-b49c-46cc80b0df97"}
2026-03-05T05:29:10.301Z	DEBUG	ephemeral/spdz.go:313	Creating new tuple streamer	{"TupleType": {"Name":"BIT_GFP","PreprocessingName":"Bits","SpdzProtocol":{"Descriptor":"SPDZ gfp","Shorthand":"p"}}, "TupleStock": 50000, "Player-Data": "Player-Data/2-p-128/", "gameID": "3772ff26-c4f4-441a-b49c-46cc80b0df97", "ThreadNr": 0}
2026-03-05T05:29:10.302Z	DEBUG	io/tuple_streamer.go:144	Generated tuple file header: 1d000000000000005350445a206766700010000000958907458f2136861bd7554a24340001	{"gameID": "3772ff26-c4f4-441a-b49c-46cc80b0df97", "TupleType": {"Name":"BIT_GFP","PreprocessingName":"Bits","SpdzProtocol":{"Descriptor":"SPDZ gfp","Shorthand":"p"}}, "ThreadNr": 0}
2026-03-05T05:29:10.302Z	DEBUG	io/tuple_streamer.go:127	Tuple type in creating new StreamerBIT_GFPBits	{"gameID": "3772ff26-c4f4-441a-b49c-46cc80b0df97", "TupleType": {"Name":"BIT_GFP","PreprocessingName":"Bits","SpdzProtocol":{"Descriptor":"SPDZ gfp","Shorthand":"p"}}, "ThreadNr": 0}
2026-03-05T05:29:10.302Z	DEBUG	ephemeral/spdz.go:309	Skipping tuple type	{"TupleType": "BIT_GF2N", "gameID": "3772ff26-c4f4-441a-b49c-46cc80b0df97"}
2026-03-05T05:29:10.302Z	DEBUG	ephemeral/spdz.go:313	Creating new tuple streamer	{"TupleType": {"Name":"INPUT_MASK_GFP","PreprocessingName":"Inputs","SpdzProtocol":{"Descriptor":"SPDZ gfp","Shorthand":"p"}}, "TupleStock": 50000, "Player-Data": "Player-Data/2-p-128/", "gameID": "3772ff26-c4f4-441a-b49c-46cc80b0df97", "ThreadNr": 0}
2026-03-05T05:29:10.302Z	DEBUG	io/tuple_streamer.go:144	Generated tuple file header: 1d000000000000005350445a206766700010000000958907458f2136861bd7554a24340001	{"gameID": "3772ff26-c4f4-441a-b49c-46cc80b0df97", "TupleType": {"Name":"INPUT_MASK_GFP","PreprocessingName":"Inputs","SpdzProtocol":{"Descriptor":"SPDZ gfp","Shorthand":"p"}}, "ThreadNr": 0}
2026-03-05T05:29:10.302Z	DEBUG	io/tuple_streamer.go:127	Tuple type in creating new StreamerINPUT_MASK_GFPInputs	{"gameID": "3772ff26-c4f4-441a-b49c-46cc80b0df97", "TupleType": {"Name":"INPUT_MASK_GFP","PreprocessingName":"Inputs","SpdzProtocol":{"Descriptor":"SPDZ gfp","Shorthand":"p"}}, "ThreadNr": 0}
2026-03-05T05:29:10.302Z	DEBUG	ephemeral/spdz.go:309	Skipping tuple type	{"TupleType": "INPUT_MASK_GF2N", "gameID": "3772ff26-c4f4-441a-b49c-46cc80b0df97"}
2026-03-05T05:29:10.302Z	DEBUG	ephemeral/spdz.go:309	Skipping tuple type	{"TupleType": "INVERSE_TUPLE_GFP", "gameID": "3772ff26-c4f4-441a-b49c-46cc80b0df97"}
2026-03-05T05:29:10.302Z	DEBUG	ephemeral/spdz.go:309	Skipping tuple type	{"TupleType": "INVERSE_TUPLE_GF2N", "gameID": "3772ff26-c4f4-441a-b49c-46cc80b0df97"}
2026-03-05T05:29:10.302Z	DEBUG	ephemeral/spdz.go:309	Skipping tuple type	{"TupleType": "SQUARE_TUPLE_GFP", "gameID": "3772ff26-c4f4-441a-b49c-46cc80b0df97"}
2026-03-05T05:29:10.302Z	DEBUG	ephemeral/spdz.go:309	Skipping tuple type	{"TupleType": "SQUARE_TUPLE_GF2N", "gameID": "3772ff26-c4f4-441a-b49c-46cc80b0df97"}
2026-03-05T05:29:10.302Z	DEBUG	ephemeral/spdz.go:313	Creating new tuple streamer	{"TupleType": {"Name":"MULTIPLICATION_TRIPLE_GFP","PreprocessingName":"Triples","SpdzProtocol":{"Descriptor":"SPDZ gfp","Shorthand":"p"}}, "TupleStock": 50000, "Player-Data": "Player-Data/2-p-128/", "gameID": "3772ff26-c4f4-441a-b49c-46cc80b0df97", "ThreadNr": 0}
2026-03-05T05:29:10.302Z	DEBUG	io/tuple_streamer.go:144	Generated tuple file header: 1d000000000000005350445a206766700010000000958907458f2136861bd7554a24340001	{"gameID": "3772ff26-c4f4-441a-b49c-46cc80b0df97", "TupleType": {"Name":"MULTIPLICATION_TRIPLE_GFP","PreprocessingName":"Triples","SpdzProtocol":{"Descriptor":"SPDZ gfp","Shorthand":"p"}}, "ThreadNr": 0}
2026-03-05T05:29:10.302Z	DEBUG	io/tuple_streamer.go:127	Tuple type in creating new StreamerMULTIPLICATION_TRIPLE_GFPTriples	{"gameID": "3772ff26-c4f4-441a-b49c-46cc80b0df97", "TupleType": {"Name":"MULTIPLICATION_TRIPLE_GFP","PreprocessingName":"Triples","SpdzProtocol":{"Descriptor":"SPDZ gfp","Shorthand":"p"}}, "ThreadNr": 0}
2026-03-05T05:29:10.302Z	DEBUG	ephemeral/spdz.go:309	Skipping tuple type	{"TupleType": "MULTIPLICATION_TRIPLE_GF2N", "gameID": "3772ff26-c4f4-441a-b49c-46cc80b0df97"}
2026-03-05T05:29:10.302Z	DEBUG	io/tuple_streamer.go:188	Starting tuple streamer for type %sBIT_GFP	{"gameID": "3772ff26-c4f4-441a-b49c-46cc80b0df97", "TupleType": {"Name":"BIT_GFP","PreprocessingName":"Bits","SpdzProtocol":{"Descriptor":"SPDZ gfp","Shorthand":"p"}}, "ThreadNr": 0}
2026-03-05T05:29:10.302Z	DEBUG	io/tuple_streamer.go:189	Active Goroutines: %d2105	{"gameID": "3772ff26-c4f4-441a-b49c-46cc80b0df97", "TupleType": {"Name":"BIT_GFP","PreprocessingName":"Bits","SpdzProtocol":{"Descriptor":"SPDZ gfp","Shorthand":"p"}}, "ThreadNr": 0}
2026-03-05T05:29:10.302Z	DEBUG	io/tuple_streamer.go:188	Starting tuple streamer for type %sINPUT_MASK_GFP	{"gameID": "3772ff26-c4f4-441a-b49c-46cc80b0df97", "TupleType": {"Name":"INPUT_MASK_GFP","PreprocessingName":"Inputs","SpdzProtocol":{"Descriptor":"SPDZ gfp","Shorthand":"p"}}, "ThreadNr": 0}
2026-03-05T05:29:10.302Z	DEBUG	io/tuple_streamer.go:189	Active Goroutines: %d2106	{"gameID": "3772ff26-c4f4-441a-b49c-46cc80b0df97", "TupleType": {"Name":"INPUT_MASK_GFP","PreprocessingName":"Inputs","SpdzProtocol":{"Descriptor":"SPDZ gfp","Shorthand":"p"}}, "ThreadNr": 0}
2026-03-05T05:29:10.302Z	DEBUG	io/tuple_streamer.go:188	Starting tuple streamer for type %sMULTIPLICATION_TRIPLE_GFP	{"gameID": "3772ff26-c4f4-441a-b49c-46cc80b0df97", "TupleType": {"Name":"MULTIPLICATION_TRIPLE_GFP","PreprocessingName":"Triples","SpdzProtocol":{"Descriptor":"SPDZ gfp","Shorthand":"p"}}, "ThreadNr": 0}
2026-03-05T05:29:10.302Z	DEBUG	io/tuple_streamer.go:189	Active Goroutines: %d2107	{"gameID": "3772ff26-c4f4-441a-b49c-46cc80b0df97", "TupleType": {"Name":"MULTIPLICATION_TRIPLE_GFP","PreprocessingName":"Triples","SpdzProtocol":{"Descriptor":"SPDZ gfp","Shorthand":"p"}}, "ThreadNr": 0}
2026-03-05T05:29:10.302Z	INFO	ephemeral/spdz.go:332	Starting Player-Online.x	{"gameID": "3772ff26-c4f4-441a-b49c-46cc80b0df97", "command": ["./Player-Online.x 1 mpc-program -N 2 --ip-file-name /mp-spdz/ip-file --file-prep-per-thread"]}
2026-03-05T05:29:10.317Z	DEBUG	opa/client.go:105	Sending OPA request	{"url": "http://opa.default.svc.cluster.local:8081/v1/data/carbynestack/def/execute", "payload": "{\"input\":{\"executor\":\"elon@carbynestack.io\",\"inputs\":[{\"secretId\":\"caca3e70-eec8-4eb5-8a3b-03670981978f\",\"owner\":\"elon@carbynestack.io\",\"accessPolicy\":\"carbynestack.def\"},{\"secretId\":\"1a24948b-7265-4438-bdb6-c2ded43ea6ae\",\"owner\":\"elon@carbynestack.io\",\"accessPolicy\":\"carbynestack.def\"}],\"playerCount\":2,\"subject\":\"ephemeral-generic\",\"time\":{\"formatted\":\"2026-03-05 05:29:10.317049391 +0000 UTC m=+86123.994061088\",\"nano\":1772688550317049391}}}"}
2026-03-05T05:29:10.323Z	DEBUG	io/feeder.go:138	Received secret shared parameters "[aMj8m+QVkX ScsRZ+/gMf]..." (len: 2)	{"gameID": "3772ff26-c4f4-441a-b49c-46cc80b0df97"}
2026-03-05T05:29:10.323Z	DEBUG	io/carrier.go:52	Connecting to localhost:10001
2026-03-05T05:29:15.323Z	DEBUG	network/proxy.go:233	Connection attempt to localhost:10001 active for 5.00006618s
2026-03-05T05:29:20.323Z	DEBUG	network/proxy.go:233	Connection attempt to localhost:10001 active for 10.000250043s
2026-03-05T05:29:25.324Z	DEBUG	network/proxy.go:233	Connection attempt to localhost:10001 active for 15.000597114s
2026-03-05T05:29:30.324Z	DEBUG	network/proxy.go:233	Connection attempt to localhost:10001 active for 20.000794734s
2026-03-05T05:29:35.324Z	DEBUG	network/proxy.go:233	Connection attempt to localhost:10001 active for 25.000852409s
2026-03-05T05:29:40.324Z	DEBUG	network/proxy.go:233	Connection attempt to localhost:10001 active for 30.001031068s
2026-03-05T05:29:45.324Z	DEBUG	network/proxy.go:233	Connection attempt to localhost:10001 active for 35.000709767s
2026-03-05T05:29:50.324Z	DEBUG	network/proxy.go:233	Connection attempt to localhost:10001 active for 40.000446211s
2026-03-05T05:29:55.323Z	DEBUG	network/proxy.go:233	Connection attempt to localhost:10001 active for 45.000278028s
2026-03-05T05:30:00.324Z	DEBUG	network/proxy.go:233	Connection attempt to localhost:10001 active for 50.000368597s
2026-03-05T05:30:05.324Z	DEBUG	network/proxy.go:233	Connection attempt to localhost:10001 active for 55.000795706s
2026-03-05T05:30:10.251Z	DEBUG	client/client.go:201	Received event gameID:"3772ff26-c4f4-441a-b49c-46cc80b0df97" players:<id:100 players:2 pod:"ephemeral-generic-00001-deployment-74f6b6c56f-s6t2q" ip:"20.204.215.0.sslip.io" port:30000 > players:<id:101 players:2 pod:"ephemeral-generic-00001-deployment-65f48f5c5c-dmv82" ip:"20.207.70.46.sslip.io" port:30000 > name:"GameError" 
2026-03-05T05:30:10.324Z	DEBUG	network/proxy.go:233	Connection attempt to localhost:10001 active for 1m0.000617863s
2026-03-05T05:30:10.324Z	ERROR	ephemeral/spdz.go:336	Error while executing the user code	{"gameID": "3772ff26-c4f4-441a-b49c-46cc80b0df97", "StdErr": "", "StdOut": "Using security parameter 40\r\nterminate called after throwing an instance of 'std::runtime_error'\r\n  what():  No client after one minute\r\nAborted (core dumped)\r\n", "error": "exit status 134"}
2026-03-05T05:30:10.324Z	DEBUG	io/tuple_streamer.go:217	Terminate tuple streamer	{"gameID": "3772ff26-c4f4-441a-b49c-46cc80b0df97", "TupleType": {"Name":"MULTIPLICATION_TRIPLE_GFP","PreprocessingName":"Triples","SpdzProtocol":{"Descriptor":"SPDZ gfp","Shorthand":"p"}}, "ThreadNr": 0, "Provided bytes": 0, "Discarded bytes": 0}
2026-03-05T05:30:10.324Z	DEBUG	io/tuple_streamer.go:217	Terminate tuple streamer	{"gameID": "3772ff26-c4f4-441a-b49c-46cc80b0df97", "TupleType": {"Name":"BIT_GFP","PreprocessingName":"Bits","SpdzProtocol":{"Descriptor":"SPDZ gfp","Shorthand":"p"}}, "ThreadNr": 0, "Provided bytes": 0, "Discarded bytes": 0}
2026-03-05T05:30:10.324Z	ERROR	ephemeral/server.go:295	error during MPC execution: error while executing the user code: exit status 134	{"gameID": "3772ff26-c4f4-441a-b49c-46cc80b0df97"}
2026-03-05T05:30:10.324Z	DEBUG	io/tuple_streamer.go:217	Terminate tuple streamer	{"gameID": "3772ff26-c4f4-441a-b49c-46cc80b0df97", "TupleType": {"Name":"INPUT_MASK_GFP","PreprocessingName":"Inputs","SpdzProtocol":{"Descriptor":"SPDZ gfp","Shorthand":"p"}}, "ThreadNr": 0, "Provided bytes": 0, "Discarded bytes": 0}
2026-03-05T05:30:10.324Z	DEBUG	ephemeral/server.go:302	Activation finalized
2026-03-05T05:30:10.324Z	DEBUG	ephemeral/spdz.go:226	Stopping SPDZ activation - context closed
2026-03-05T05:30:10.324Z	DEBUG	io/feeder.go:129	Close connections
2026-03-05T05:30:10.324Z	DEBUG	io/carrier.go:108	Closing connection	{"ConnectionInfo": null}
2026-03-05T05:30:10.324Z	DEBUG	io/carrier.go:108	Closing connection	{"ConnectionInfo": null}
2026-03-05T05:30:10.324Z	DEBUG	network/proxy.go:181	Waiting for TCP proxy to stop	{"gameID": "3772ff26-c4f4-441a-b49c-46cc80b0df97"}
2026-03-05T05:30:10.324Z	DEBUG	client/client.go:145	Stopping client connection
2026-03-05T05:30:10.324Z	DEBUG	client/client.go:198	Stop receiiving events as context is done. (err: rpc error: code = Canceled desc = context canceled)
2026-03-05T05:30:10.324Z	INFO	ephemeral/forwarder.go:55	Context canceled, cleaning up assigned resources...
2026-03-05T05:30:10.324Z	DEBUG	client/client.go:145	Stopping client connection
2026-03-05T05:30:10.324Z	DEBUG	client/client.go:161	Close the event forwarding as context is done
2026-03-05T05:30:10.324Z	DEBUG	network/proxy.go:188	Stopped the TCP proxy	{"gameID": "3772ff26-c4f4-441a-b49c-46cc80b0df97"}
2026-03-05T05:30:10.324Z	ERROR	client/client.go:191	Error stopping gRPC client rpc error: code = Canceled desc = grpc: the client connection is closing
2026-03-05T05:30:10.324Z	ERROR	ephemeral/player.go:182	Error during code execution: SPDZ activation cancelled due to closed context
2026-03-05T05:30:10.324Z	DEBUG	ephemeral/player.go:247	Sending event	{"event": "gameID:\"3772ff26-c4f4-441a-b49c-46cc80b0df97\" players:<id:101 players:2 pod:\"ephemeral-generic-00001-deployment-65f48f5c5c-dmv82\" ip:\"20.207.70.46.sslip.io\" > name:\"PlayingError\" ", "topic": "1"}

Suggested Fix:
Fix the proxy lifecycle in code
Changes needed in pkg/ephemeral/network/proxy.go:

Move activeProxyIndicatorCh initialization to before the goroutine is launched, and use defer close(activeProxyIndicatorCh) inside the goroutine so it always closes on both success and failure
Replace the select/default in Stop() with a blocking <-activeProxyIndicatorCh so it genuinely waits for the goroutine to exit before returning

A secondary issue exists in pkg/ephemeral/server.go where respCh, errCh, and execErrCh are server-level fields reassigned per request, creating a data race under concurrent or fast-retry requests. These should be scoped as local variables per request and passed via context.

Additional context:

kubectl exec -it ephemeral-generic-00001-deployment-74f6b6c56f-s6t2q \
  -c ephemeral-ephemeral -- cat /proc/net/tcp6
  sl  local_address                         remote_address                        st tx_queue rx_queue tr tm->when retrnsmt   uid  timeout inode
   0: 00000000000000000000000000000000:1389 00000000000000000000000000000000:0000 0A 00000000:00000000 00:00000000 00000000     0        0 8620467 1 0000000000000000 100 0 0 10 0
   1: 00000000000000000000000000000000:1F4C 00000000000000000000000000000000:0000 0A 00000000:00000000 00:00000000 00000000  1000        0 8609892 1 0000000000000000 100 0 0 10 0
   2: 00000000000000000000000000000000:1F56 00000000000000000000000000000000:0000 0A 00000000:00000000 00:00000000 00000000  1000        0 8609888 1 0000000000000000 100 0 0 10 0
   3: 00000000000000000000000000000000:2382 00000000000000000000000000000000:0000 0A 00000000:00000000 00:00000000 00000000  1000        0 8609890 1 0000000000000000 100 0 0 10 0
   4: 00000000000000000000000000000000:2383 00000000000000000000000000000000:0000 0A 00000000:00000000 00:00000000 00000000  1000        0 8609883 1 0000000000000000 100 0 0 10 0
   5: 0000000000000000FFFF00001000F40A:1F4C 0000000000000000FFFF00000500E00A:AB20 06 00000000:00000000 03:00000572 00000000     0        0 0 3 0000000000000000
   6: 0000000000000000FFFF00001000F40A:2382 0000000000000000FFFF0000DC01F40A:A5D6 01 00000000:00000000 02:000001E8 00000000  1000        0 8606467 3 0000000000000000 20 4 31 10 -1
   7: 0000000000000000FFFF00001000F40A:1F4C 0000000000000000FFFF00000500E00A:9648 06 00000000:00000000 03:0000095A 00000000     0        0 0 3 0000000000000000
   8: 0000000000000000FFFF00001000F40A:1F4C 0000000000000000FFFF00000500E00A:8DCE 06 00000000:00000000 03:0000112A 00000000     0        0 0 3 0000000000000000
   9: 0000000000000000FFFF00001000F40A:1F4C 0000000000000000FFFF00000500E00A:C5BA 06 00000000:00000000 03:00000D42 00000000     0        0 0 3 0000000000000000
  10: 0000000000000000FFFF00001000F40A:1F4C 0000000000000000FFFF00000500E00A:9068 06 00000000:00000000 03:00001512 00000000     0        0 0 3 0000000000000000
  11: 0000000000000000FFFF00001000F40A:1F4C 0000000000000000FFFF00000500E00A:8E14 06 00000000:00000000 03:0000018A 00000000     0        0 0 3 0000000000000000
aks1@carbyne-stack-smpc:~/carbynestack/deployments$ kubectl exec -it ephemeral-generic-00001-deployment-74f6b6c56f-s6t2q \
  -c ephemeral-ephemeral -- sh -c \
  'for pid in /proc/[0-9]*; do ls -la $pid/fd 2>/dev/null | grep -q "socket:\[8620467\]" && echo "Found in PID: $(basename $pid)"; done'
Found in PID: 1
command terminated with exit code 1
aks1@carbyne-stack-smpc:~/carbynestack/deployments$ kubectl exec -it ephemeral-generic-00001-deployment-74f6b6c56f-s6t2q \
  -c ephemeral-ephemeral -- cat /proc/<PID>/cmdline | tr '\0' ' '^C
aks1@carbyne-stack-smpc:~/carbynestack/deployments$ kubectl exec -it ephemeral-generic-00001-deployment-74f6b6c56f-s6t2q \
  -c ephemeral-ephemeral -- cat /proc/1/cmdline | tr '\0' ' '
/ko-app/ephemeral

The port in question (5001, hex 1389) was confirmed bound to PID 1 (/ko-app/ephemeral) via /proc/net/tcp6 and /proc/1/cmdline on the affected pod, ruling out any external process as the cause.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions