Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup of threads managing connections to SharedFS #20

Open
OmSaran opened this issue Nov 18, 2021 · 1 comment
Open

Cleanup of threads managing connections to SharedFS #20

OmSaran opened this issue Nov 18, 2021 · 1 comment

Comments

@OmSaran
Copy link
Contributor

OmSaran commented Nov 18, 2021

I am trying to run a simple program to init_fs() and shutdown_fs() Assise multiple times in the same process.

But I faced some issues with the socket connections being cleaned up properly. My guess is that Assise previously relied on OS cleaning up the socket descriptors during the cleanup of the process, which will not happen if we reinitialize LibFS in the same process.

I have taken a stab at fixing this and it works for my specific use case where I use it in local mode (strata mode).

Here is the pull request: #19

Would be great if you could review this.

Also, here is the sample program that I was trying to make it work for:

#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <string.h>
#include <assert.h>

#include <mlfs/mlfs_interface.h>


int main() {
    int i;
    for(i=1; i<=3; i++) {
        printf("Init %d \n", i);
        init_fs();

        printf("Shutdown %d \n", i);
        shutdown_fs();
        sleep(3);
    }

    return 0;
}

Thanks!

@wreda
Copy link
Contributor

wreda commented Nov 30, 2021

Getting to this now.

Thanks for the PR! This looks okay to me for a single-node setup. I'm currently testing to see if it works with RDMA. Will hopefully merge it in soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants