Gnats XXXX -- Solaris GUI Ghosting / Non-thread safe event processing

Subject:     Information about RiverWare behavior
Date:   Mon, 04 Jun 2007 17:27:28 -0600
From:   Bill Oakley <Billo@Colorado.EDU>
To:   riverware@maelstrom.Colorado.EDU
I don't know if this will be useful or not...

During the team/bug meeting I was running regression tests, and the
tvaDailyDmi test hung (as Phil saw earlier). I was able to attach to
it, with the following stack:

(dbx riverware) where 20
current thread: t@1
[1] _lwp_sema_wait(0x5f01568, 0x0, 0x0, 0x0, 0x0, 0x2), at 0xfdc1fa54
[2] _park(0x5f01568, 0xff2cc000, 0x0, 0x5f014a0, 0x23154, 0x0), at 0xff2a96f4
[3] _swtch(0x5f014a0, 0x5f014a0, 0xff2cc000, 0x5, 0x1000, 0x0), at 0xff2a93bc
[4] _mutex_adaptive_lock(0xff2d7864, 0x4c00, 0x1000, 0xfffeffff, 0x1, 0x4d58), at 0xff2aadc8
[5] _cmutex_lock(0xfdc40608, 0xff2cc000, 0xff3e00c4, 0xfdbc1d70, 0xfe970d90, 0xff221438), at 0xff2aaadc
[6] malloc(0x80, 0x6c, 0xfe970d90, 0xff3e07a8, 0x0, 0x5), at 0xfdbc1d70
[7] operator new(0x80, 0x0, 0x13740, 0xfffffff8, 0xfebea8d4, 0x80), at 0xfebd71b8
[8] std::basic_stringbuf >::setbuf(0xffbed050, 0x0, 0x80, 0x0, 0xffffff93, 0xffffff93), at 0xfdd62508
[9] std::basic_stringbuf >::xsputn(0xffbed050, 0x5cae28a, 0x13, 0x0, 0x0, 0xfddeba04), at 0xfdd626c8
[10] std::operator<<(0xfdd625e8, 0x0, 0xffbed048, 0xffbed0a8, 0x1002, 0x13), at 0xfdd76adc
=>[11] operator<<(os = CLASS, s = 0x5cae28a "Exited with status "), line 177 in "cwiostream.hpp"
[12] cwProcessMgr::sigchld_handler(this = 0x65fa788, info = 0xffbed5c0), line 173 in "cwProcessMgr.cpp"
[13] sigchld_handler(_ARG1 = 18, info = 0xffbed5c0, _ARG3 = 0xffbed308), line 118 in "cwProcessMgr.cpp"
[14] __sighndlr(0x12, 0xffbed5c0, 0xffbed308, 0x32e40e8, 0x5f01548, 0x5f01538), at 0xff2bb218
[15] sigacthandler(0x12, 0x5f014a0, 0x0, 0x0, 0x0, 0xff2cc000), at 0xff2b821c
---- called from signal handler with signal 18 (SIGCLD) ------

I interrupted RiverWare several times, and the stack was the same
through _mutex_adaptive_lock (although it differed slightly above
there). RiverWare is reacting to its child (the DMI executable)
exiting, and is inserting a status message into a cwostringstream:

cwostringstream os;
os << "Exited with status " << info->si_status <<
hex << " (0x" << info->si_status << ")";

In particular:

inline cwostream& operator<< (cwostream& os, const char* s)
{
dynamic_cast(os) << s;
return os;
}

I suppose a similar condition (unrelated to the DMI) could present
itself as the user interface not updating.

Bill