[Swift-devel] behaviour on out-of-memory

Mihael Hategan hategan at mcs.anl.gov
Fri Feb 8 11:24:43 CST 2008


On Fri, 2008-02-08 at 17:19 +0000, Ben Clifford wrote:
> 
> On Fri, 8 Feb 2008, Mihael Hategan wrote:
> 
> > Yep. Hard problem. In general, OOMs are tricky to handle. I was thinking
> > of pre-allocating some space to use in such cases for clean shutdown,
> > but given the concurrency, this may or may not work properly.
> 
> For my purposes, I don't really need anything cleaner than the JVM exiting 
> with an error code sometime around the memory running out.

Not correct semantics when swift acts as a service (think I2U2). I
should probably find a way to immediately cancel a whole workflow when
OOMs are caught so that client software can un-reference it and
eventually get back to stability. But again, not having enough memory
may cause arbitrary breakage in arbitrary threads, so it's hard to
guarantee consistency after such a thing.

So let's keep chatting, maybe something will come up.

> 
> I hacked in a try/catch around karajan's EventWorker.run() which is 
> catching enough for me at the moment.

Normally it should generate a fault and propagate it up the call stack,
but that may itself require memory.

> 




More information about the Swift-devel mailing list