Article View: borland.public.jbuilder.java.api
Article #345Re: Deadlock
From: Gillmer J. Derge (TeamB)
Date: Sat, 27 Sep 2003 14:59
Date: Sat, 27 Sep 2003 14:59
26 lines
2021 bytes
2021 bytes
"Aleksandar Pecanov" <pecanov@mt.net.mk> wrote in message
news:pan.2003.09.27.09.12.01.595247@mt.net.mk...
> The following code terminates my application:
>
> public DBValue value( Object val ) {
> DBValue v = value(val);
> v.setValue(val);
>
> return v;
> }
>
> It took me quite some time to find out that this was my problem,
> because I didn't expect the virtual machine to become aware of a
deadlock.
> I'm using JDK 1.4.2 (for linux).
> How does deadlock detection work in Java, and since when was it
implemented?
This isn't deadlock. It's a stack overflow due to infinite recursion.
You're essentially running out of memory. value calls value which calls
value which calls value ... until you eventually run out of space to
remember the arguments of each method call and a StackOverflowError is
thrown.
--
Gillmer J. Derge (TeamB)
Technical Details
Message-ID:
<3f75a558$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-06!sn-xit-09!supernews.com!newshosting.com!news-xfer1.atl.newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<pan.2003.09.27.09.12.01.595247@mt.net.mk>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1089d0,704e8f05d1fdbb6d X-Google-Attributes: gid1089d0,public X-Google-ArrivalTime: 2003-09-27 08:17:28 PST From: "Gillmer J. Derge \(TeamB\)" <spam@gillmerderge.com> Newsgroups: borland.public.jbuilder.java.api References: <pan.2003.09.27.09.12.01.595247@mt.net.mk> Subject: Re: Deadlock Date: Sat, 27 Sep 2003 10:59:33 -0400 Lines: 27 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 65.110.133.233 Message-ID: <3f75a558$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1064674648 65.110.133.233 (27 Sep 2003 07:57:28 -0700) Path: arc1-ca.pugleaf.net!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-06!sn-xit-09!supernews.com!newshosting.com!news-xfer1.atl.newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail