diff options
author | Keith M Wesolowski <wesolows@foobazco.org> | 2014-04-22 00:14:03 +0000 |
---|---|---|
committer | Keith M Wesolowski <wesolows@foobazco.org> | 2014-04-28 14:46:38 +0000 |
commit | cf0abc40832dadf64f650978f7f6d5226993baf3 (patch) | |
tree | 770f1e145cb9acc53a0c3ed3e2fd292c428a3305 /usr/src | |
parent | 66ea8d8f092ef35be9878fc7725cf1c5980b2210 (diff) | |
download | illumos-joyent-cf0abc40832dadf64f650978f7f6d5226993baf3.tar.gz |
OS-2751 ldap_cachemgr dies in getldap_get_rootDSE
Reviewed by: Richard Lowe <richlowe@richlowe.net>
Reviewed by: Robert Mustacchi <rm@joyent.com>
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/cmd/sgs/include/debug.h | 3 | ||||
-rw-r--r-- | usr/src/cmd/sgs/include/rtld.h | 2 | ||||
-rw-r--r-- | usr/src/cmd/sgs/liblddbg/common/liblddbg.msg | 2 | ||||
-rw-r--r-- | usr/src/cmd/sgs/liblddbg/common/llib-llddbg | 2 | ||||
-rw-r--r-- | usr/src/cmd/sgs/liblddbg/common/mapfile-vers | 2 | ||||
-rw-r--r-- | usr/src/cmd/sgs/liblddbg/common/util.c | 13 | ||||
-rw-r--r-- | usr/src/cmd/sgs/rtld/common/_rtld.h | 1 | ||||
-rw-r--r-- | usr/src/cmd/sgs/rtld/common/util.c | 21 |
8 files changed, 17 insertions, 29 deletions
diff --git a/usr/src/cmd/sgs/include/debug.h b/usr/src/cmd/sgs/include/debug.h index 9db202574d..5f740afe57 100644 --- a/usr/src/cmd/sgs/include/debug.h +++ b/usr/src/cmd/sgs/include/debug.h @@ -502,7 +502,6 @@ extern void Dbg_help(void); #define Dbg_util_intoolate Dbg64_util_intoolate #define Dbg_util_lcinterface Dbg64_util_lcinterface #define Dbg_util_nl Dbg64_util_nl -#define Dbg_util_no_init Dbg64_util_no_init #define Dbg_util_scc_entry Dbg64_util_scc_entry #define Dbg_util_scc_title Dbg64_util_scc_title #define Dbg_util_str Dbg64_util_str @@ -736,7 +735,6 @@ extern void Dbg_help(void); #define Dbg_util_intoolate Dbg32_util_intoolate #define Dbg_util_lcinterface Dbg32_util_lcinterface #define Dbg_util_nl Dbg32_util_nl -#define Dbg_util_no_init Dbg32_util_no_init #define Dbg_util_scc_entry Dbg32_util_scc_entry #define Dbg_util_scc_title Dbg32_util_scc_title #define Dbg_util_str Dbg32_util_str @@ -1051,7 +1049,6 @@ extern void Dbg_util_edge_out(Rt_map *, Rt_map *); extern void Dbg_util_intoolate(Rt_map *); extern void Dbg_util_lcinterface(Rt_map *, int, char *); extern void Dbg_util_nl(Lm_list *, int); -extern void Dbg_util_no_init(Rt_map *); extern void Dbg_util_scc_entry(Rt_map *, uint_t); extern void Dbg_util_scc_title(Lm_list *, int); extern void Dbg_util_str(Lm_list *, const char *); diff --git a/usr/src/cmd/sgs/include/rtld.h b/usr/src/cmd/sgs/include/rtld.h index 344671d515..45a52df324 100644 --- a/usr/src/cmd/sgs/include/rtld.h +++ b/usr/src/cmd/sgs/include/rtld.h @@ -719,6 +719,8 @@ struct rt_map { Capchain *rt_capchain; /* capabilities chain data */ uint_t rt_cntl; /* link-map control list we belong to */ uint_t rt_aflags; /* auditor flags, see LML_TFLG_AUD_ */ + Rt_cond rt_cv; /* for waiting on flags changes */ + Rt_lock rt_lock; /* for coordinating flags changes */ /* address of _init */ void (*rt_init)(void); /* address of _fini */ diff --git a/usr/src/cmd/sgs/liblddbg/common/liblddbg.msg b/usr/src/cmd/sgs/liblddbg/common/liblddbg.msg index 71f432220f..34c012acab 100644 --- a/usr/src/cmd/sgs/liblddbg/common/liblddbg.msg +++ b/usr/src/cmd/sgs/liblddbg/common/liblddbg.msg @@ -1102,8 +1102,6 @@ @ MSG_UTL_DYN "dynamically triggered" @ MSG_UTL_DONE "done" -@ MSG_UTL_NOINIT "warning: calling %s whose init has not completed" - @ MSG_UTL_DBNOTIFY "notify debugger: event: %s state: %s" @ MSG_UTL_SCC_TITLE " cycle detected - sorting cyclic dependencies in %s" diff --git a/usr/src/cmd/sgs/liblddbg/common/llib-llddbg b/usr/src/cmd/sgs/liblddbg/common/llib-llddbg index 0b6bfc747b..e3a43c6e0c 100644 --- a/usr/src/cmd/sgs/liblddbg/common/llib-llddbg +++ b/usr/src/cmd/sgs/liblddbg/common/llib-llddbg @@ -502,8 +502,6 @@ void Dbg32_util_lcinterface(Rt_map *, int, char *); void Dbg64_util_lcinterface(Rt_map *, int, char *); void Dbg32_util_nl(Lm_list *, int); void Dbg64_util_nl(Lm_list *, int); -void Dbg32_util_no_init(Rt_map *); -void Dbg64_util_no_init(Rt_map *); void Dbg32_util_scc_entry(Rt_map *, uint_t); void Dbg64_util_scc_entry(Rt_map *, uint_t); void Dbg32_util_scc_title(Lm_list *, int); diff --git a/usr/src/cmd/sgs/liblddbg/common/mapfile-vers b/usr/src/cmd/sgs/liblddbg/common/mapfile-vers index 0e4338fce1..1fac50603d 100644 --- a/usr/src/cmd/sgs/liblddbg/common/mapfile-vers +++ b/usr/src/cmd/sgs/liblddbg/common/mapfile-vers @@ -490,8 +490,6 @@ SYMBOL_VERSION SUNWprivate_4.83 { Dbg64_util_intoolate; Dbg32_util_nl; Dbg64_util_nl; - Dbg32_util_no_init; - Dbg64_util_no_init; Dbg32_util_scc_entry; Dbg64_util_scc_entry; Dbg32_util_scc_title; diff --git a/usr/src/cmd/sgs/liblddbg/common/util.c b/usr/src/cmd/sgs/liblddbg/common/util.c index 02de483a82..575a9bd15f 100644 --- a/usr/src/cmd/sgs/liblddbg/common/util.c +++ b/usr/src/cmd/sgs/liblddbg/common/util.c @@ -66,19 +66,6 @@ Dbg_util_call_init(Rt_map *lmp, int flag) } void -Dbg_util_no_init(Rt_map *lmp) -{ - Lm_list *lml = LIST(lmp); - - if (DBG_NOTCLASS(DBG_C_INIT)) - return; - - Dbg_util_nl(lml, DBG_NL_STD); - dbg_print(lml, MSG_INTL(MSG_UTL_NOINIT), NAME(lmp)); - Dbg_util_nl(lml, DBG_NL_STD); -} - -void Dbg_util_intoolate(Rt_map *lmp) { Lm_list *lml = LIST(lmp); diff --git a/usr/src/cmd/sgs/rtld/common/_rtld.h b/usr/src/cmd/sgs/rtld/common/_rtld.h index 3cbb58fe25..ece14a855e 100644 --- a/usr/src/cmd/sgs/rtld/common/_rtld.h +++ b/usr/src/cmd/sgs/rtld/common/_rtld.h @@ -764,7 +764,6 @@ extern int remove_hdl(Grp_hdl *, Rt_map *, int *); extern void remove_lmc(Lm_list *, Rt_map *, Aliste, const char *); extern void remove_lml(Lm_list *); extern void remove_so(Lm_list *, Rt_map *, Rt_map *); -extern int rt_cond_wait(Rt_cond *, Rt_lock *); extern int rt_critical(void); extern int rt_bind_guard(int); extern int rt_bind_clear(int); diff --git a/usr/src/cmd/sgs/rtld/common/util.c b/usr/src/cmd/sgs/rtld/common/util.c index 1c0e708624..2427784a81 100644 --- a/usr/src/cmd/sgs/rtld/common/util.c +++ b/usr/src/cmd/sgs/rtld/common/util.c @@ -623,16 +623,22 @@ is_dep_init(Rt_map *dlmp, Rt_map *clmp) if ((dlmp == clmp) || (rtld_flags & RT_FL_INITFIRST)) return; + rt_mutex_lock(&dlmp->rt_lock); + while ((FLAGS(dlmp) & + (FLG_RT_RELOCED | FLG_RT_INITCALL | FLG_RT_INITDONE)) == + (FLG_RT_RELOCED | FLG_RT_INITCALL)) { + leave(LIST(dlmp), 0); + (void) _lwp_cond_wait(&dlmp->rt_cv, (mutex_t *)&dlmp->rt_lock); + rt_mutex_unlock(&dlmp->rt_lock); + (void) enter(0); + rt_mutex_lock(&dlmp->rt_lock); + } + rt_mutex_unlock(&dlmp->rt_lock); + if ((FLAGS(dlmp) & (FLG_RT_RELOCED | FLG_RT_INITDONE)) == (FLG_RT_RELOCED | FLG_RT_INITDONE)) return; - if ((FLAGS(dlmp) & (FLG_RT_RELOCED | FLG_RT_INITCALL)) == - (FLG_RT_RELOCED | FLG_RT_INITCALL)) { - DBG_CALL(Dbg_util_no_init(dlmp)); - return; - } - if ((tobj = calloc(2, sizeof (Rt_map *))) != NULL) { tobj[0] = dlmp; call_init(tobj, DBG_INIT_DYN); @@ -748,7 +754,10 @@ call_init(Rt_map **tobj, int flag) * signifies that a .fini must be called should it exist. * Clear the sort field for use in later .fini processing. */ + rt_mutex_lock(&lmp->rt_lock); FLAGS(lmp) |= FLG_RT_INITDONE; + _lwp_cond_broadcast(&lmp->rt_cv); + rt_mutex_unlock(&lmp->rt_lock); SORTVAL(lmp) = -1; /* |