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

An improper locking bug(e.g., deadlock) on the lock &mutex #234

Open
ycaibb opened this issue Sep 5, 2021 · 1 comment
Open

An improper locking bug(e.g., deadlock) on the lock &mutex #234

ycaibb opened this issue Sep 5, 2021 · 1 comment

Comments

@ycaibb
Copy link

ycaibb commented Sep 5, 2021

Hi, developers, thank you for your checking. It seems the lock mutex is not released correctly when write(daemon_pipe[1], &type, 1) != 1 in the function dispatch_request?

flowgrind/src/daemon.c

Lines 1504 to 1514 in 9618dd3

pthread_mutex_lock(&mutex);
if (!requests) {
requests = request;
requests_last = request;
} else {
requests_last->next = request;
requests_last = request;
}
if (write(daemon_pipe[1], &type, 1) != 1) /* Doesn't matter what we write */
return -1;

@ycaibb
Copy link
Author

ycaibb commented Sep 9, 2021

Hi, developers @arnd @alexander-zimmermann

Any comments would be highly appreciated. Thank you.

Best Regards,

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

1 participant