projects
/
lttng-ust.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: lttng perf counter deadlock
[lttng-ust.git]
/
liblttng-ust
/
lttng-ust-comm.c
diff --git
a/liblttng-ust/lttng-ust-comm.c
b/liblttng-ust/lttng-ust-comm.c
index 0c6db9fea3326a835d7423357e5719b67c497246..b067b3da1bbc9b71084b121c46a7a530976db041 100644
(file)
--- a/
liblttng-ust/lttng-ust-comm.c
+++ b/
liblttng-ust/lttng-ust-comm.c
@@
-86,6
+86,8
@@
static int initialized;
*
* ust_lock nests within the dynamic loader lock (within glibc) because
* it is taken within the library constructor.
*
* ust_lock nests within the dynamic loader lock (within glibc) because
* it is taken within the library constructor.
+ *
+ * The ust fd tracker lock nests within the ust_mutex.
*/
static pthread_mutex_t ust_mutex = PTHREAD_MUTEX_INITIALIZER;
*/
static pthread_mutex_t ust_mutex = PTHREAD_MUTEX_INITIALIZER;
@@
-421,6
+423,7
@@
void lttng_ust_fixup_tls(void)
lttng_fixup_nest_count_tls();
lttng_fixup_procname_tls();
lttng_fixup_ust_mutex_nest_tls();
lttng_fixup_nest_count_tls();
lttng_fixup_procname_tls();
lttng_fixup_ust_mutex_nest_tls();
+ lttng_ust_fixup_perf_counter_tls();
lttng_ust_fixup_fd_tracker_tls();
}
lttng_ust_fixup_fd_tracker_tls();
}
@@
-655,6
+658,10
@@
int handle_register_done(struct sock_info *sock_info)
sock_info->registration_done = 1;
decrement_sem_count(1);
sock_info->registration_done = 1;
decrement_sem_count(1);
+ if (!sock_info->statedump_pending) {
+ sock_info->initial_statedump_done = 1;
+ decrement_sem_count(1);
+ }
return 0;
}
return 0;
}
@@
-2061,6
+2068,8
@@
void ust_before_fork(sigset_t *save_sigset)
ust_lock_nocheck();
urcu_bp_before_fork();
ust_lock_nocheck();
urcu_bp_before_fork();
+ lttng_ust_lock_fd_tracker();
+ lttng_perf_lock();
}
static void ust_after_fork_common(sigset_t *restore_sigset)
}
static void ust_after_fork_common(sigset_t *restore_sigset)
@@
-2068,6
+2077,8
@@
static void ust_after_fork_common(sigset_t *restore_sigset)
int ret;
DBG("process %d", getpid());
int ret;
DBG("process %d", getpid());
+ lttng_perf_unlock();
+ lttng_ust_unlock_fd_tracker();
ust_unlock();
pthread_mutex_unlock(&ust_fork_mutex);
ust_unlock();
pthread_mutex_unlock(&ust_fork_mutex);
This page took
0.023739 seconds
and
4
git commands to generate.