coredump in function localtime_r()
807575Jan 11 2006 — edited Jan 12 2006Hi,
My process crashed with signal SIGSEGV.
stack trace of the process shows it was in localtime_r() function at that time.
detected a multithreaded program
t@40 (l@40) terminated by signal SEGV (access to address exceeded protections)
0xfd633bc4: strncpy+0x05d0: st %i3, [%i0]
Current function is pps::BOReserveUnits::createSession
257 localtime_r(&sessionStartDate, &localTime);
(/opt/SUNWspro/bin/../WS6U2/bin/sparcv9/dbx) where
current thread: t@40
[1] strncpy(0x8, 0xffbef754, 0x8, 0x41736961, 0x81010100, 0x8), at 0xfd633bc4
[2] getzname(0x8, 0xfd6c2940, 0x0, 0xc, 0xfd6bc008, 0xffbef750), at 0xfd6537f4
[3] tzset(0xffbef75c, 0xfd6bf564, 0x0, 0xfd6bf564, 0xffbef750, 0xfd6bf570), at 0xfd653718
[4] mktime(0x43c3054c, 0xfd6bc008, 0xfd6bf570, 0xfdd80440, 0x1, 0x1), at 0xfd65321c
[5] _telldir(0x8f27e718, 0x8f27e6f4, 0xfd6bf570, 0xfd6bc008, 0xfd6bc008, 0x0), at 0xfd6523e4
[6] localtime_u(0x8f27e718, 0x8f27e6f4, 0x8f27e718, 0x0, 0x4d4f0036, 0x4d4f004d), at 0xfd6525ec
=>[7] pps::BOReserveUnits::createSession(this = 0x6f3fb0, i_pImplContainer = 0x8f27ebb8), line 257 in "PPSVC_BOReserveUnits.cpp"
[8] pps::BOReserveUnits::completeProcessing(this = 0x6f3fb0, i_pImplContainer = 0x8f27ebb8), line 202 in "PPSVC_BOReserveUnits.cpp"
[9] pps::BasicBusinessObject::process(this = 0x6f3fb0, i_pImplContainer = 0x8f27ebb8), line 123 in "PPSVC_BasicBusinessObject.cpp"
[10] pps::NEBasicServiceObject::doExecute(this = 0x6f7c70, i_pReqCtx = 0x1d2f790, i_pImplContainer = 0x8f27ebb8), line 138 in "PPSVC_NEBasicServiceObject.cpp"
[11] pps::ServiceObject::execute(this = 0x6f7c70, i_pReqContext = 0x1d2f790, i_pImplContainer = 0x8f27ebb8), line 310 in "PPSVC_ServiceObject.cpp"
[12] pps::LocalEventHandlingStrategy::dispatch(this = 0x7577e8, i_pCtx = 0x1d2f790, i_pImplContainer = 0x8f27ebb8), line 108 in "PPSEH_LocalEventHandlingStrategy.cpp"
[13] pps::PPSEventHandler::handleEvent(this = 0x757718), line 441 in "PPSEH_EventHandler.cpp"
[14] pps::PPSEventHandler::svc(this = 0x757718), line 375 in "PPSEH_EventHandler.cpp"
[15] ACE_Task_Base::svc_run(args = 0x757718), line 203 in "Task.cpp"
[16] ACE_Thread_Adapter::invoke_i(this = 0xf66738), line 148 in "Thread_Adapter.cpp"
[17] ACE_Thread_Adapter::invoke(this = 0xf66738), line 91 in "Thread_Adapter.cpp"
[18] ace_thread_adapter(args = 0xf66738), line 127 in "Base_Thread_Adapter.cpp"
void BOReserveUnits::createSession(ImplContainer *i_pImplContainer)
{
PPS_METHOD_TRACE("BOReserveUnits::createSession()");
SessionIF *sessionImpl = i_pImplContainer->getSessionImpl(m_pParentSO->getSessionImplVer());
SessionSt &sessionSt = sessionImpl->getSessionSt();
Entity *eventObj = i_pImplContainer->getEventObject();
UtString str;
NumericType num;
try{
eventObj->get(EO_ATTR_SOURCE_ID,num);
sessionSt.m_MdId = num;
eventObj->get(EO_ATTR_SESSION_ID,num);
sessionSt.m_SessionId=num;
//eventObj->get(EO_ATTR_START_TIME, str);
//sessionSt.m_SessionStartDate = PPSLibUtils::StringToDate(str.c_str());
time_t sessionStartDate = ACE_OS::time(0);
struct tm localTime;
localtime_r(&sessionStartDate, &localTime);
//localTime.tm_isdst = 1;
sessionSt.m_SessionStartDate = ACE_OS::mktime(&localTime);
}
catch(...) {
throw AppException(APP_EVENT_OBJECT_ERROR, PPS_SRC_NOT_AVAILABLE, MsgParam(EO_ATTR_SOURCE_ID
)+MsgParam(EO_ATTR_SESSION_ID)+MsgParam(EO_ATTR_START_TIME));
}