sgx-migration
sgx-migration copied to clipboard
local LA migration "Error sending message! Bad file descriptor"
Hi,
I am getting the same error as https://github.com/SSGAalto/sgx-migration/issues/2. Did you happen to find any solution? Which boost version should I use?
Do you get exactly the same error in marshalling.cpp ? Or a different error based on boost? When trying to compile, I now get the error that io_service does not exist. Apparently the io_service was removed in Boost 1.7: https://www.boost.org/doc/libs/1_70_0/doc/html/boost_asio/history.html
Either you use boost before 1.7 or you update the TcpServer.cpp to use the current boost alternatives. I do not really have time to make this project work again but I am happy to accept Pull requests or discuss issues.
I tried with boost 1.58
Run commands:
./migration_enclave/me_app --me_lport=1500 --me_rport=1501
./migration_enclave/me_app --me_lport=1400 --me_rport=1401
./sample_app/app --me_ip=127.0.0.1 --me_port=1400 --dest_ip=127.0.0.1 --dest_port=1501 --test
./sample_app/app --me_ip=127.0.0.1 --me_port=1500 --receive
gdb backtrace when --
(gdb) bt #0 la_session_request_ocall (dest=0x7fffffffc2c0, dh_msg1=0x7fffffffc2d6, session_id=0x7fffffffc516) at untrusted/ula.cpp:108 #1 0x000000000040b56b in enclave_la_session_request_ocall (pms=0x7fffffffc2a0) at generated/enclave_u.c:340 #2 0x00007ffff7bbb2ae in CEnclave::ocall(unsigned int, _ocall_table_t const*, void*) () from /usr/lib/x86_64-linux-gnu/libsgx_urts.so #3 0x00007ffff7bb86ac in stack_sticker () from /usr/lib/x86_64-linux-gnu/libsgx_urts.so #4 0x00007ffff409933c in __morestack () #5 0x00007ffff409933c in __morestack () #6 0x00007ffff400779a in la_session_request_ocall (retval=0x7ffff482a0c8, dest=0x7ffff42b4690 <ME_INFO>, dh_msg1=0x7ffff482aa60, session_id=0x7ffff42c80b0) at generated/enclave_t.c:1697 #7 0x00007ffff40201bc in la_create (dest=0x7ffff42b4690 <ME_INFO>, session_id=0x7ffff42c80b0) at trusted/tla.cpp:161 #8 0x00007ffff40261ac in ME_establish_connection () at trusted/migration_library_internal.cpp:198 #9 0x00007ffff40267bb in ME_send_migration_data (dest_ip=0x7ffff482b7a0 "127.0.0.1", dest_port=0x7ffff482b790 "1501") at trusted/migration_library_internal.cpp:324 #10 0x00007ffff4025dc5 in ecall_migration_start (const_dest_ip=0x7ffff42c8070 "127.0.0.1", const_dest_port=0x7ffff42c8090 "1501") at trusted/migration_library.cpp:329 #11 0x00007ffff4005d0c in sgx_ecall_migration_start (pms=0x7fffffffcaf0) at generated/enclave_t.c:799 #12 0x00007ffff4009e59 in do_ecall () #13 0x00007ffff4098fe5 in enter_enclave () #14 0x00007ffff40991b2 in enclave_entry () #15 0x00007ffff7bb85db in __morestack () from /usr/lib/x86_64-linux-gnu/libsgx_urts.so #16 0x00007ffff7bbb700 in CEnclave::ecall(int, void const*, void*, bool) () from /usr/lib/x86_64-linux-gnu/libsgx_urts.so #17 0x00007ffff7bbd0f7 in _sgx_ecall(unsigned long, int, void const*, void*, bool) [clone .part.0] () from /usr/lib/x86_64-linux-gnu/libsgx_urts.so #18 0x000000000040bf8a in ecall_migration_start (eid=3, retval=0x7fffffffcb9c, dest_ip=0x7fffffffcdf0 "127.0.0.1", dest_port=0x7fffffffce10 "1501") at generated/enclave_u.c:587 #19 0x000000000040c9a7 in test_two_hop_migration (me_ip=0x7fffffffcdb0 "127.0.0.1", me_port=0x7fffffffcdd0 "1400", dest_ip=0x7fffffffcdf0 "127.0.0.1", dest_port=0x7fffffffce10 "1501") at src/app/main.cpp:276 #20 0x000000000040eb66 in main (argc=6, argv=0x7fffffffe108) at src/app/main.cpp:690
(gdb) n
110 error = send_message_read_response(socket, &msg, &msg_resp);
Error returns from send_message_read_response
function. Which originate from network_common.cpp --> TcpConnection.cpp at following call
int len = boost::asio::write(socket_, boost::asio::buffer(out_buf), boost::asio::transfer_all() , error);
I understand your busyness. However, any small hint or guidance will be helpful.