Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #34443

Re: Java program "debugging" itself...

From Eric Sosman <esosman@comcast-dot-net.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: Java program "debugging" itself...
Date 2016-06-02 11:14 -0400
Organization A noiseless patient Spider
Message-ID <nipign$8m8$1@dont-email.me> (permalink)
References <slrnnl0dj5.456.avl@login.logic.tuwien.ac.at> <nipf58$ova$1@dont-email.me> <slrnnl0isb.456.avl@login.logic.tuwien.ac.at>

Show all headers | View raw


On 6/2/2016 11:06 AM, Andreas Leitgeb wrote:
> Martin Gregorie <martin@address-in-sig.invalid> wrote:
>> On Thu, 02 Jun 2016 13:36:37 +0000, Andreas Leitgeb wrote:
>>> My application is a server that runs separate tasks as requested by
>>> clients.
>>> Rarely it happens, that one of the tasks goes awry, due to some bug in
>>> the task's code itself.  Latest incident was a loop that accidentally
>>> didn't terminate but grew a StringBuilder's buffer beyond any bounds.
>> Are these tasks running in their own address space or are they sharing an
>> address space with your server and its other children?
>
> Well, all is running in a single VM, and it has to be that way.
>
> Most of the tasks are "quick-shots" (that complete within fractions
> of seconds) and interactive (dialog) applications.  If I started them
> in their own VM, these would take up to 10 seconds to finish or to
> become ready. (actual measurements from earlier stages of the project)

     As a hybrid approach, could you use a suite of N long-running JVM's,
each executing one task at a time but executing many in succession?  In
normal operation you'd "amortize" the JVM startup cost over the many
tasks it would handle in its lifetime, but still be able to kill off a
task that misbehaved (by killing, and presumably replacing, its JVM).

     Sounds like a lot of work, but I can't think of a way within one JVM
to insulate the "benign" tasks from a "malignant" one.

-- 
esosman@comcast-dot-net.invalid
"Don't be afraid of work. Make work afraid of you." -- TLM

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Java program "debugging" itself... Andreas Leitgeb <avl@logic.at> - 2016-06-02 13:36 +0000
  Re: Java program "debugging" itself... Martin Gregorie <martin@address-in-sig.invalid> - 2016-06-02 14:17 +0000
    Re: Java program "debugging" itself... Andreas Leitgeb <avl@logic.at> - 2016-06-02 15:06 +0000
      Re: Java program "debugging" itself... Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-06-02 11:14 -0400
        Re: Java program "debugging" itself... Andreas Leitgeb <avl@logic.at> - 2016-06-02 15:43 +0000
  Re: Java program "debugging" itself... "comp.lang.coffee" <kirandesai84@gmail.com> - 2016-06-02 07:21 -0700
    Re: Java program "debugging" itself... Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-06-02 10:38 -0400
      Re: Java program "debugging" itself... Robert Klemme <shortcutter@googlemail.com> - 2016-06-02 22:24 +0200
    Re: Java program "debugging" itself... Andreas Leitgeb <avl@logic.at> - 2016-06-02 15:28 +0000
      Re: Java program "debugging" itself... Martin Gregorie <martin@address-in-sig.invalid> - 2016-06-02 22:22 +0000
        Re: Java program "debugging" itself... Andreas Leitgeb <avl@logic.at> - 2016-06-03 15:58 +0000
          Re: Java program "debugging" itself... Wanja Gayk <brixomatic@yahoo.com> - 2016-06-04 21:32 +0200

csiph-web