severity 459611 wishlist
thanks

Hello,

On Wed, 20 Feb 2008, Norman Ramsey wrote:
> I believe in defensive programming and also in 'defense in depth'.
> Their application in this case suggests that index++ and swish++
> should guarantee to terminate even if both parent and child processes
> are in error (i.e., parent sets no limits and child runs forever).

and later:
> BTW I would argue that cron jobs should not consume more than say 20%
> of a machine's resources, so a daily should not take more than 4.8
> hours, and hourly should not take more than 12 minutes, etc.
> But this could be configurable.

I produced the enclosed script "rlimit" that I believe can be used
to resource limit any child process. Ideally it (or something very
like it) should be used with appropriate values instead of the "nice"
that precedes most program executions in cron. Since resource limits
are inherited by child processes this should provide some part of the
solution.

My next upload of swish++ (which is a newer upstream version as well)
will contain this script and some remarks on how it can be used.

and later:
>   1. For each type of file index++ understands, you should be able to
>      estimate the resources index++ needs to index that file.  Maybe
>      you need to get some constant factors at postinst time (perhaps
>      by looking in /proc/cpuinfo) or maybe not.

I think programming this and your remaining suggestions may add too
much to the complexity of swish++. I will forward your request to
upstream.

On Sat, 16 Feb 2008, A. Costa wrote:
> This bug has had a "major effect" on my system.
>
> If the bugs are the same and my severity rating was appropriate,
> then both bugs should be 'important'.  Is that OK with you?

I believe that running swish++ under "rlimit" should provide
"temporary relief". As said above a comprehensive solution which
incorporates the examination of (mis)behaviour of child processes into
swish++ may be more involved.

As a consequence, I am now downgrading this to "wishlist".

Regards,

Kapil.
--
#!/bin/sh
# Copyright (C) 2008 Kapil Hari Paranjape <[EMAIL PROTECTED]>
# The contents of this file are released in the Public Domain
# A sample script to run a filter with
# some limits set as by ulimit

ulimargs="$*"
cmd="$*"
ulimargs=${ulimargs%%--*}
cmd=${cmd##*--}

ulimit ${ulimargs} > /dev/null 2>&1

[ -n "$cmd" ] || exit 0

if [ -z "$cmd" ]
then
        echo "usage:" $0 "<ulimit arguments> -- <filter cmd and args>"
        exit 1
fi

exec ${cmd}

Attachment: signature.asc
Description: Digital signature

Reply via email to