[omniORB] Error creating JTC Thread inside OmniORB thread??
Stein-Ole
stein-ole.gabrielsen at westerngeco.com
Thu Sep 16 13:59:26 BST 2004
Hello,
I'm currently attempting to port some code from Orbacus to OmniORB, but I
keep coming up against a problem whenever I try to create a JTC thread
inside what I think is an OmniORB thread. Below is a typical example.
One of the processes I have tried to port to OmniORB core dumps when
running it. When running dbx, I get the following output :-
(I realise how meaningful these messages are, so I've highlighted the
relevant parts in red)
(dbx 1) where
current thread: t at 16
[1] realfree(0x6d006600e84904, 0xffffffff7bfc1760, 0x1007648e8,
0xffffffff7bfb4f50, 0x1007648d8, 0x6d00650072002d), at 0xffffffff7be4a29c
[2] cleanfree(0x0, 0xffffffff7bfc1648, 0xffffffff7bfb4f50, 0x0,
0xffffffff7bfc1648, 0xffffffff7bfc1748), at 0xffffffff7be4abd8
[3] _malloc_unlocked(0x3b, 0x0, 0xffffffff7bfb4f50, 0x40,
0xffffffff7c207b78, 0x0), at 0xffffffff7be49cc0
[4] malloc(0x3b, 0x1007648f4, 0x1007c2800, 0x56000020, 0x5600, 0xff00),
at 0xffffffff7be49bac
[5] operator new(0x3b, 0xa, 0x104684, 0x100259654, 0xffffffff7c207b78,
0xffffffff7c30c138), at 0xffffffff7c207adc
[6] std::basic_string<char,std::char_traits<char>,std::allocator<char>
>::__getRep(0x9, 0x9, 0x9, 0x2ad930, 0x1002593bc, 0xffffffff7c6f89f8),
at 0xffffffff7c44b234
[7] std::basic_string<char,std::char_traits<char>,std::allocator<char>
>::basic_string(0xffffffff79403590, 0x100713753, 0xffffffff7940358f,
0xffffffff7c2069c4, 0x0, 0x9), at 0xffffffff7c44ad84
=>[8] std::operator==<char,std::char_traits<char>,std::allocator<char>
>(lhs = CLASS, rhs = 0x100713753 "SB-ss_raw"), line 1672 in "string"
* [9] UIServant::handleCoreProcessUpdate(this = 0x100738d30), line 193
in "UIServant.cc"
[10] UIServant::ProcessListener::run(this = 0x10077b9a0), line 100 in
"UIServant.cc"
[11] JTCThread::_JTC_startThreadHook(this = 0x10077b9a0), line 1282 in
"Thread.cpp"
* [12] _JTC_threadAdapter(arg = 0x10077b9a0), line 195 in "Thread.cpp"
(dbx 2) up
Current function is UIServant::handleCoreProcessUpdate
193 if((*it).second.getName().find(SHTGTHR_SS_NAME) !=
string::npos ||
(dbx 3) up
Current function is UIServant::ProcessListener::run
100 servant_->handleCoreProcessUpdate();
(dbx 4) up
Current function is JTCThread::_JTC_startThreadHook
dbx: warning: can't find file "/triacq/data2/JTC-1.0.12/jtc/src/Thread.cpp"
dbx: warning: see `help finding-files'
Below is a portion of the UIServant header file that the ProcessListener
is a JTCThread :-
class ProcessListener : public JTCThread,
public ModelListener {
public:
static const int maxEventsQueued = 20;
ProcessListener(UIServant* servant)
: ModelListener(maxEventsQueued), servant_(servant) {}
virtual void run();
void terminate();
private:
UIServant* servant_;
};
typedef JTCHandleT<ProcessListener> ProcessListenerHandle;
friend class ProcessListener;
I guess the question is have anyone seen this problem and if so do you
have a
workaround?
I only see this problem when a create a JTCThread. I can use mutexes
without a problem.
Best regards
Stein-Ole Gabrielsen
More information about the omniORB-list
mailing list