RE: graceful mulit-threaded shutdown
- From: Michael Meeks <michael ximian com>
- To: Tyler Kohn <TKohn axeda com>
- Cc: 'Jan Kratochvil' <lace jankratochvil net>,"'orbit-list gnome org'" <orbit-list gnome org>
- Subject: RE: graceful mulit-threaded shutdown
- Date: Tue, 11 Nov 2003 08:33:05 +0000
Hi Tyler,
On Mon, 2003-11-10 at 16:48, Tyler Kohn wrote:
> Thanks, I went ahead and did this and it works great for getting me out of
> the running thread, but I still am getting a seg fault. When it finally
> crashed during shutdown, the backtrace is:
As Jan says it's best to use a memory debugger of some sort; I would
recommend valgrind - google for it; you need to build ORBit2 with
--enable-purify and run with --alignment=8 but it's an extremely
powerful & useful tool.
> In my "run" method, after g_main_loop_run (loop) returns I call:
> CORBA_Object_release(servant, ev);
Servants are normally user-instantiated objects, and not CORBA_Objects
- is the above correct ?
> I'm not calling the shutdown directly as the destroy should handle this
Sure.
> I exit the run method and complete the shutting down of the rest of my app,
> it hangs for a second or two and then seg faults!
Of course, possibly this is indeed a bug :-) we're fixing a number of
interesting threading bugs in HEAD currenty.
> Am I not properly cleaning the client references? I'm wading throught the
> source, but would appreciate any insight.
A better trace using valgrind would prolly be helpful; checking the
servant unref prolly too. A patch to allow shutdown from any thread [
which should be feasible ] would be even nicer :-)
HTH,
Michael.
--
michael@ximian.com <><, Pseudo Engineer, itinerant idiot
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]