[Bugs] [Bug 1343374] Gluster fuse client crashed generating core dump
bugzilla at redhat.com
bugzilla at redhat.com
Tue Jun 7 08:50:10 UTC 2016
https://bugzilla.redhat.com/show_bug.cgi?id=1343374
Nithya Balachandran <nbalacha at redhat.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Comment #0 is|1 |0
private| |
Status|NEW |ASSIGNED
--- Comment #1 from Nithya Balachandran <nbalacha at redhat.com> ---
RCA:
There is a memory leak in the socket_connect code in case of failure.
In socket_connect ():
/* if sock != -1, then cleanup is done from the event handler */
if (ret == -1 && sock == -1) {
/* Cleaup requires to send notification to upper layer which
intern holds the big_lock. There can be dead-lock situation
if big_lock is already held by the current thread.
So transfer the ownership to seperate thread for cleanup.
*/
arg = GF_CALLOC (1, sizeof (*arg),
gf_sock_connect_error_state_t);
arg->this = THIS;
arg->trans = this;
arg->refd = refd;
th_ret = pthread_create (&th_id, NULL,
socket_connect_error_cbk,
arg);
if (th_ret) {
gf_log (this->name, GF_LOG_ERROR, "pthread_create"
"failed: %s", strerror(errno));
GF_FREE (arg);
GF_ASSERT (0);
}
}
pthread_create does not create a detached thread so the thread resources are
not cleaned up. socket_connect is called at 3 second intervals so this quickly
adds up causing the process to run out of memory.
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
More information about the Bugs
mailing list