Better crash handling

A forum for general AmigaOS 4.x support questions that are not platform-specific

Better crash handling

Postby Deniil » Fri Aug 19, 2011 9:38 am

About every other crash locks up the computer (or so it seems). I would assume this is because of a deadlock in intuition when the Grim Reaper wants to load.

I have a suggestion: I think intuition should track all locks to IBase and PubScreenList and all other such locks. when a task crashes the crash handler should verify if the crashed task holds any locks and if it does they should be unlocked before launching the Reaper.

In a few rare events this may create a collision which is what the locks should have prevented. However, if the survival of the running OS is in any way prioritized (which is why there is a crash handler in the first place), this is MUCH better than the *guaranteed* lockup that would otherwise happen if a task crashes with a lockup on intuition.

This is not a case of the best solution IMO, it is a matter of the least fatal solution.
Deniil
 
Posts: 108
Joined: Mon Jul 11, 2011 7:59 pm

Re: Better crash handling

Postby tonyw » Sat Aug 20, 2011 11:19 am

...when a task crashes the crash handler should verify if the crashed task holds any locks...


And therein lies the problem. There is no way of obtaining that information with the current architecture. We're working towards it slowly but it will take time.
cheers
tony
User avatar
tonyw
AmigaOS Core Developer
AmigaOS Core Developer
 
Posts: 1385
Joined: Wed Mar 09, 2011 2:36 pm
Location: Sydney, Australia

Re: Better crash handling

Postby nbache » Sun Aug 21, 2011 2:55 am

tonyw wrote:
...when a task crashes the crash handler should verify if the crashed task holds any locks...


And therein lies the problem. There is no way of obtaining that information with the current architecture. We're working towards it slowly but it will take time.

Well, Deniil did say "I think intuition should track all locks to IBase and PubScreenList and all other such locks", so in that scenario we would no longer be solely working within the confines of the current architechture, right? But whether such tracking, done by/in Intuition would be a logical and reasonable step on the route towards resource tracking in general in AmigaOS, I don't know.

Best regards,

Niels
User avatar
nbache
Beta Tester
Beta Tester
 
Posts: 1387
Joined: Mon Dec 20, 2010 8:25 pm
Location: Copenhagen, Denmark

Re: Better crash handling

Postby Deniil » Thu Aug 25, 2011 4:37 pm

Yes, I mean that intuition should implement this kind of very simple mechanism. I assume most functions imply a lock, such as OpenScreen/Window, CloseScreen/Window, not just the explicit Lock functions. Most of the time it locks up it seems to be some app that aren't handling its pubscreen properly, which becomes obvious now that we have Ringhio. Or some other silly race condition.

The same applies for dos.library since I've seen way too many times that DOS seems to lockup because of some bug in some program. Everything appears to be working but as soon as any app touches a DOS functions it freezes. At this point you obviously cannot save your work or do anything even if the mouse pointer still moves and music keeps on playing (until EOF).

The point isn't to be able to see the GrimReaper. The point is that the OS shouldn't freeze for silly programming mistakes.

It simply needs to become more rubust, resource tracking or not. Semaphore timeouts could possibly be an intermediate solution.
Deniil
 
Posts: 108
Joined: Mon Jul 11, 2011 7:59 pm


Return to General AmigaOS

Who is online

Users browsing this forum: No registered users and 3 guests

cron