Loading ifs/include/preload/ipc_types.hpp +2 −0 Original line number Diff line number Diff line Loading @@ -8,6 +8,8 @@ #include <preload/preload.hpp> extern "C" { #include <mercury.h> #include <mercury_types.h> #include <mercury_proc_string.h> #include <margo.h> } Loading ifs/include/preload/rpc/ld_rpc_data.hpp +1 −4 Original line number Diff line number Diff line Loading @@ -74,16 +74,13 @@ int rpc_send_read(const hg_id_t ipc_read_data_id, const hg_id_t rpc_read_data_id err = out.res; LD_LOG_TRACE(debug_fd, "Got response %d\n", out.res); /* clean up resources consumed by this rpc */ margo_bulk_free(in.bulk_handle); margo_free_output(handle, &out); } else { LD_LOG_ERROR0(debug_fd, "RPC rpc_send_read (timed out)"); err = EAGAIN; } in.path = nullptr; margo_bulk_free(in.bulk_handle); margo_free_input(handle, &in); margo_destroy(handle); return err; Loading ifs/main.hpp +0 −1 Original line number Diff line number Diff line Loading @@ -32,7 +32,6 @@ // margo extern "C" { #include <abt.h> #include <abt-snoozer.h> #include <mercury.h> #include <margo.h> } Loading ifs/src/daemon/adafs_daemon.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ void init_environment() { * Destroys the margo, argobots, and mercury environments */ void destroy_enviroment() { // margo_diag_dump(RPC_DATA->server_ipc_mid(), "-", 0); ADAFS_DATA->spdlogger()->info("About to finalize the margo server"); margo_finalize(RPC_DATA->server_rpc_mid()); margo_finalize(RPC_DATA->server_ipc_mid()); Loading ifs/src/preload/margo_ipc.cpp +0 −14 Original line number Diff line number Diff line Loading @@ -93,15 +93,11 @@ bool ipc_send_get_fs_config(const hg_id_t ipc_get_config_id) { printf("[ERR] Retrieving fs configurations from daemon"); } /* clean up resources consumed by this rpc */ out.rootdir = nullptr; out.mountdir = nullptr; out.hosts_raw = nullptr; margo_free_output(handle, &out); } else { LD_LOG_ERROR0(debug_fd, "IPC send_get_config (timed out)\n"); } margo_free_input(handle, &in); margo_destroy(handle); return ret == HG_SUCCESS; } Loading Loading @@ -141,9 +137,6 @@ int ipc_send_open(const string& path, int flags, const mode_t mode, const hg_id_ LD_LOG_ERROR0(debug_fd, "IPC send_open (timed out)\n"); } in.path = nullptr; // XXX temporary. If this is not done free input crashes because of invalid pointer?! margo_free_input(handle, &in); margo_destroy(handle); return err; } Loading Loading @@ -179,16 +172,12 @@ int ipc_send_stat(const string& path, string& attr, const hg_id_t ipc_stat_id) { attr = out.db_val; } /* clean up resources consumed by this rpc */ out.db_val = nullptr; margo_free_output(handle, &out); } else { LD_LOG_ERROR0(debug_fd, "IPC send_stat (timed out)\n"); err = 1; } in.path = nullptr; // XXX temporary. If this is not done free input crashes because of invalid pointer?! margo_free_input(handle, &in); margo_destroy(handle); return err; } Loading Loading @@ -226,9 +215,6 @@ int ipc_send_unlink(const string& path, const hg_id_t ipc_unlink_id) { LD_LOG_ERROR0(debug_fd, "IPC send_unlink (timed out)\n"); } in.path = nullptr; // XXX temporary. If this is not done free input crashes because of invalid pointer?! margo_free_input(handle, &in); margo_destroy(handle); return err; } No newline at end of file Loading
ifs/include/preload/ipc_types.hpp +2 −0 Original line number Diff line number Diff line Loading @@ -8,6 +8,8 @@ #include <preload/preload.hpp> extern "C" { #include <mercury.h> #include <mercury_types.h> #include <mercury_proc_string.h> #include <margo.h> } Loading
ifs/include/preload/rpc/ld_rpc_data.hpp +1 −4 Original line number Diff line number Diff line Loading @@ -74,16 +74,13 @@ int rpc_send_read(const hg_id_t ipc_read_data_id, const hg_id_t rpc_read_data_id err = out.res; LD_LOG_TRACE(debug_fd, "Got response %d\n", out.res); /* clean up resources consumed by this rpc */ margo_bulk_free(in.bulk_handle); margo_free_output(handle, &out); } else { LD_LOG_ERROR0(debug_fd, "RPC rpc_send_read (timed out)"); err = EAGAIN; } in.path = nullptr; margo_bulk_free(in.bulk_handle); margo_free_input(handle, &in); margo_destroy(handle); return err; Loading
ifs/main.hpp +0 −1 Original line number Diff line number Diff line Loading @@ -32,7 +32,6 @@ // margo extern "C" { #include <abt.h> #include <abt-snoozer.h> #include <mercury.h> #include <margo.h> } Loading
ifs/src/daemon/adafs_daemon.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ void init_environment() { * Destroys the margo, argobots, and mercury environments */ void destroy_enviroment() { // margo_diag_dump(RPC_DATA->server_ipc_mid(), "-", 0); ADAFS_DATA->spdlogger()->info("About to finalize the margo server"); margo_finalize(RPC_DATA->server_rpc_mid()); margo_finalize(RPC_DATA->server_ipc_mid()); Loading
ifs/src/preload/margo_ipc.cpp +0 −14 Original line number Diff line number Diff line Loading @@ -93,15 +93,11 @@ bool ipc_send_get_fs_config(const hg_id_t ipc_get_config_id) { printf("[ERR] Retrieving fs configurations from daemon"); } /* clean up resources consumed by this rpc */ out.rootdir = nullptr; out.mountdir = nullptr; out.hosts_raw = nullptr; margo_free_output(handle, &out); } else { LD_LOG_ERROR0(debug_fd, "IPC send_get_config (timed out)\n"); } margo_free_input(handle, &in); margo_destroy(handle); return ret == HG_SUCCESS; } Loading Loading @@ -141,9 +137,6 @@ int ipc_send_open(const string& path, int flags, const mode_t mode, const hg_id_ LD_LOG_ERROR0(debug_fd, "IPC send_open (timed out)\n"); } in.path = nullptr; // XXX temporary. If this is not done free input crashes because of invalid pointer?! margo_free_input(handle, &in); margo_destroy(handle); return err; } Loading Loading @@ -179,16 +172,12 @@ int ipc_send_stat(const string& path, string& attr, const hg_id_t ipc_stat_id) { attr = out.db_val; } /* clean up resources consumed by this rpc */ out.db_val = nullptr; margo_free_output(handle, &out); } else { LD_LOG_ERROR0(debug_fd, "IPC send_stat (timed out)\n"); err = 1; } in.path = nullptr; // XXX temporary. If this is not done free input crashes because of invalid pointer?! margo_free_input(handle, &in); margo_destroy(handle); return err; } Loading Loading @@ -226,9 +215,6 @@ int ipc_send_unlink(const string& path, const hg_id_t ipc_unlink_id) { LD_LOG_ERROR0(debug_fd, "IPC send_unlink (timed out)\n"); } in.path = nullptr; // XXX temporary. If this is not done free input crashes because of invalid pointer?! margo_free_input(handle, &in); margo_destroy(handle); return err; } No newline at end of file