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

Dont release element of qb_ipc_services when destroying ipc server #422

Closed
minhbq opened this issue Oct 2, 2020 · 1 comment
Closed

Comments

@minhbq
Copy link

minhbq commented Oct 2, 2020

I encountered a crash error when I try open and close many ipcserver.

I inspected and I think the reason libqb miss release element qb_list_head from qb_ipc_services list.

Here are ipcs.c in row 213:

qb_ipcs_unref(struct qb_ipcs_service *s)
{
int32_t free_it;

assert(s->ref_count > 0);
free_it = qb_atomic_int_dec_and_test(&s->ref_count);
if (free_it) {
	qb_util_log(LOG_DEBUG, "%s() - destroying", __func__);
	free(s);
}

}

I added more qb_list_del(&s->list) before free(s). And it works

@chrissie-c
Copy link
Contributor

Thanks for this, now fixed

bmwiedemann pushed a commit to bmwiedemann/openSUSE that referenced this issue Dec 9, 2020
https://build.opensuse.org/request/show/853522
by user yan_gao + dimstar_suse
- Update to version 2.0.2+20201203.def947e (v2.0.2):
- ipcs : Decrease log level. (#426)
- cov: Quieten some covscan warnings (#427)
- doxygen2man: Fix a couple of covscan-detected errors (#425)
- ipcs: Add missing qb_list_del when freeing server (#423) (gh#ClusterLabs/libqb#422)
- ipc: add qb_ipcc_auth_get() API call (#418)
- doxygen2man: Remove horrible hack (#420) (gh#ClusterLabs/libqb#419)
- doxygen2man: Add support for @code blocks (#417)
- man: Tidy man pages (#416)
- doxygen2man: Add option to read copyright line from the header file (#415) (gh#ClusterLabs/libqb#414) (forwarded request 853520 from yan_gao)
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