Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #34446
| Path | csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail |
|---|---|
| From | Robert Klemme <shortcutter@googlemail.com> |
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Java program "debugging" itself... |
| Date | Thu, 2 Jun 2016 22:24:59 +0200 |
| Lines | 31 |
| Message-ID | <drbj0tFdgogU1@mid.individual.net> (permalink) |
| References | <slrnnl0dj5.456.avl@login.logic.tuwien.ac.at> <98c956a8-ae76-415d-9347-2c7ff4e1775a@googlegroups.com> <nipgcu$12i$1@dont-email.me> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Trace | individual.net yV46c36EiRCbNwwGo0HO7gBzAAud4bAK3NSx4nKv3Ry+WErVU= |
| Cancel-Lock | sha1:+Qip+Pt72mTMTHZq0RgA5kGK6bU= |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 |
| In-Reply-To | <nipgcu$12i$1@dont-email.me> |
| Xref | csiph.com comp.lang.java.programmer:34446 |
Show key headers only | View raw
On 02.06.2016 16:38, Eric Sosman wrote: > The problem is a lot like that of Linux' OOM Killer: The task that > hits the limit is not necessarily the task at fault. If a runaway task > gobbles up almost all the memory and then a well-behaved task gets an > OutOfMemoryException on something innocuous like `new int[10]', the > exception is thrown to the "wrong" thread: Not the runaway, but the > innocent bystander. I think this hints straight at an important underlying issue - regardless of whether the option exists that Andreas has asked for: how do you determine the "culprit"? Eric has illustrated one example, here's another one: one thread allocates tens of thousands of int[100] while another thread allocates a single char[10000] hitting a memory limit (or worse, OOM because of fragmentation). Basically it starts with, you would have to keep track of the overall resource consumption of a task or thread. Then define criteria for termination and then you need to find a way to implement that. One approach that comes to mind is JMX: a process can connect to itself and monitor its own activity (btw. "monitor" is a much better term than "debug" for this thread's title). Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll 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