patchCERTI - Patches: patch #6937, Fix crash on exit of rtia

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #6937: Fix crash on exit of rtia

Submitter:  Mathias Fröhlich <frohlich>
Submitted:  Fri 09 Oct 2009 08:19:28 PM UTC
   
 
Category:  CERTI Priority:  5 - Normal
Status:  Ready For Test Privacy:  Public
Assigned to:  erk Open/Closed:  Closed

Sun 11 Oct 2009 11:23:08 AM UTC, comment #3: 

Hi Matthias,

Agreed we should fix any robustness related bug
as fast as possible.
I did check-in your patch to CVS HEAD with an extra
comment aka "FIXME" in order to review
for may  be a better solution involving re-design/factoring.

The relationship to the stall problem
exists at the design level.
This is the way constrained/regulator federate are handled
during join *and* resign.


Eric NOULARD <erk>
Group administrator
Sat 10 Oct 2009 08:54:11 AM UTC, comment #2: 


Hi Eric,

the test case where this happened was just having rtig run on a linux host. Have one billard federate on solaris8. And an other one on win32. The arguments to the billard thing were just the minimal required arguments. I believe that they are time constrained. And the billard thing was stopped by ctrl-c. Then rtia quits and tries to resign in the destructor. And while resigning it tries to switch of time regulation which crashes because of time management already being destroyed.

The fix is not really releated to the stalled problem report.

I thought of different solutions here.
One might be to just quit the connection from rtia in case the federate dies. rtig must be capable of deleting that federate from its list anyway as this kind of thing could also happen in many different ways. Just let the machine running a federate crash for some reason, or kill the rtia process by accident. The connection dies and I would like rtig to continue even if the federate was time regulating.
It is nice that rtia tries to be kind, but rtia being unkind should work well anyway. Ensuring that rtig behaves well and let rtia just reflect what happend with its federate end might be a even more robust solution.

So that attached change is just a minimal invasive solution to avoid a crash.

So, I would like to have that crash fixed before the not even started discussion about the enable time regulation start thing has finished.

Open for any other solution in the longer term - but an application should never crash even if more intrusive changes might be worthwhile and even more conforming to some standard ...

Greetings

Mathias

Mathias Fröhlich <frohlich>
Fri 09 Oct 2009 09:35:46 PM UTC, comment #1: 

Hi Mathias,

I'll wait before applying that one.
There is clearly a design issue there.

FederationManagement is currently not usable without
TimeManagement but we do authorize
the construction of a FederationManagement object
with its tm member set to NULL!!.

Moreover from the code
FederationManagement and TimeManagement need each other.

TimeManagement needs FederationManagement that's OK.
However FederationManagement needs TM because at
join time the FM receives the number of currently regulator
federate and their lk.

I wouldn't expect to have this that early.
The joining federate is neither regulator nor constrained...
We should handle this at enableRegulating/enableContrain
time.

I link the patch to the "late arriving federate bug"
and think a little more about it.

Your patch is functionnally fine but I think it may
shadow a design problem.

Eric NOULARD <erk>
Group administrator
Fri 09 Oct 2009 08:19:28 PM UTC, original submission:  


Hi,

The attached patch fixes a crash on exit where rtia resigns the current federate from the federation in the destructor of certi::FederationManagement. At this stage or rtia shutdown the TimeManagement class is already destroyed but is again accessed in ~FederationManagement from the resign call.

The attached change moves the resign call before all the RTIA class members are destroyed.

Please apply

Thanks

Mathias

Mathias Fröhlich <frohlich>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #18836:  rtia-crash.diff added by frohlich (3KiB - text/x-patch)

 

Digest:
   bug dependencies.

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by erk (Posted a comment)
  • -email is unavailable- added by frohlich (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2009-10-21 erk Open/ClosedOpen Closed
    2009-10-11 erk StatusIn Progress Ready For Test
    2009-10-09 erk Dependencies- Depends on bugs #27595
    2009-10-09 erk CategoryNone CERTI
        StatusNone In Progress
        Assigned toNone erk
    2009-10-09 frohlich Attached File- Added rtia-crash.diff, #18836

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code