[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [StrongED] Transient not expiring



In message <cc30159a52.martin@xxxxxxxxxxxxxxxx>
          Martin Bazley <martin.bazley@xxxxxxxxxxxxxxxx> wrote:

> The following bytes were arranged on 2 Jun 2012 by Fred Graute :
>
> > You could try commenting out the lines dealing with header text and
> > see it that allows Transient to expire. That would confirm it.
>
> Well, that was interesting...
>
> After commenting out line 65, I ran 2.06a again.  This time the error
> was the intriguing "Too many tasks" at line 229 in "ExpireDirs", and the
> next set of consequences hinted why - a seemingly infinite pile of
> Filer_Action windows, all attempting to delete the exact same set of
> directories, and most of them failing because said directories had
> already been deleted (concurrently) by a different window in the pile.

It's taken a while but I think I've found the cause of the problem. I
say think because I'm not seeing the same effects as Martin, instead I
get an abort somewhere in the OS and then error messages from the Wimp
(hence this machine has seen way too many resets this past week).

The problem is with the SWI FilerAction_SendSelectedFile and how it was
used by Transient. The PRMs don't say how much data can the passed to it
and the StrongHelp manuals suggest that you can send a list of leafnames
(space-separated), and that's what Transient was doing.

As it turns out there _is_ a limit to length of the list, it's 235 bytes
(256-20-1) as this is what fits into the message that FilerSWIs passes
to FilerAction (FilerSWIs implements the SWI part of FilerAction).

FilerSWIs checks if the data it's already holding + the data passed in
exceeds its 235 byte RMA-based buffer. If so, it sends the buffer
contents to FilerAction and then copies the data passed to the buffer
_without_ checking if this will overrun the buffer.

So, when there's too much data the buffer is overrun, overwriting part
of the RMA. Leading to all kinds of errors depending on what's being
overwritten. (One for the Bugs section in ROOL's forum, I think).

The solution was to limit the amount of data that Transient sends to
FilerAction_SendSelectedFile, splitting it if required. It all seems to
work now. Expiring the directories for several users, including one that
had a list of directories to delete measuring some 700 bytes, is handled
correctly.

Cheers,

Fred.

-- 
StrongED developer
http://www.stronged.iconbar.com/

-- 
To unsubscribe send a mail to StrongED+unsubscribe@xxxxxxxxxxxxxx