From: Dave H. <hel...@us...> - 2013-12-17 05:56:17
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "sfcb - Small Footprint CIM Broker". The branch, master_1.3 has been updated via a85824d2959084180b1086d4039124b15ed393c9 (commit) from 048e3abfb52f6ae5a5b15e33f482405c34a9fb4e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit a85824d2959084180b1086d4039124b15ed393c9 Author: Dave Heller <hel...@us...> Date: Tue Dec 17 00:53:53 2013 -0500 [sfcb-tix:#93] ProfileProvider segfault while stopping slpUpdate thread ----------------------------------------------------------------------- Summary of changes: profileProvider.c | 19 +++++++++++-------- 1 files changed, 11 insertions(+), 8 deletions(-) diff --git a/profileProvider.c b/profileProvider.c index 8fb9847..4c4ae41 100644 --- a/profileProvider.c +++ b/profileProvider.c @@ -81,12 +81,14 @@ CMPIStatus ProfileProviderMethodCleanup(CMPIMethodMI * mi, CMPIStatus st = { CMPI_RC_OK, NULL }; _SFCB_ENTER(TRACE_INDPROVIDER, "ProfileProviderCleanup"); #ifdef HAVE_SLP - // Tell SLP update thread that we're shutting down - _SFCB_TRACE(1, ("--- Stopping SLP thread")); - pthread_kill(slpUpdateThread, SIGUSR2); - // Wait for thread to complete - pthread_join(slpUpdateThread, NULL); - _SFCB_TRACE(1, ("--- SLP Thread stopped")); + if (slpUpdateThread) { + // Tell SLP update thread that we're shutting down + _SFCB_TRACE(1, ("--- Stopping SLP thread")); + pthread_kill(slpUpdateThread, SIGUSR2); + // Wait for thread to complete + pthread_join(slpUpdateThread, NULL); + _SFCB_TRACE(1, ("--- SLP Thread stopped")); + } #endif // HAVE_SLP _SFCB_RETURN(st); } @@ -248,8 +250,9 @@ spawnUpdateThread(const CMPIContext *ctx) pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE); rc = pthread_create(&newThread, &attr, slpUpdate, thread_args); if(rc) { - // deal with thread creation error - exit(1); + mlogf(M_ERROR, M_SHOW, "--- Could not create SLP update thread. SLP disabled."); + /* note: without SLP running, this provider is pretty useless. But + if it's marked "unload: never" there's not much we can do from here */ } } hooks/post-receive -- sfcb - Small Footprint CIM Broker |