[kaffe] Thread handling in Kaffe

Warwick Hunter whunter at agile.tv
Thu Feb 20 20:07:02 PST 2003


Cal

I hit this bug quite a while ago when the old Kaffe
bug reporting database was still alive. I think this
is caused by the native code that handles child processes
is not doing the cleanup properly.

I looked at the code a while ago, but I didn't have time
to trace through it all to work out exactly why this is
happening.

Warwick

cal kaiwen wrote:
> 
> Hi,
> 
> Thank you for the feedback.
> 
> Instead, me friend debug our code and found out that the exception was 
> actually thrown here, not at thread creation or reuse. Is my mistake, 
> sorry :)
> 
> 
> Process p = Runtime.getRuntime().exec("ping -n 1 " + host);
> 
> p.destroy;
> 
> 
> Eventhough the process is destroy, you can see a lot of kaffe defunct 
> error message in the runnning process by doing ps -ae.
> 
> Has anyone encountered this before? Any work around for this?
> 
> Thank you,
> Calvin
> 
> 
>> From: Dalibor Topic <robilad at yahoo.com>
>> To: calvin kaiwen <cal_kaiwen at hotmail.com>, Timothy Stack 
>> <stack at cs.utah.edu>
>> CC: kaffe at kaffe.org
>> Subject: Re: [kaffe] Thread handling in Kaffe
>> Date: Thu, 20 Feb 2003 05:37:31 -0800 (PST)
>>
>> hi Calvin,
>>
>> --- calvin kaiwen <cal_kaiwen at hotmail.com> wrote:
>>
>> > At Step 2: Internal Threads.
>> > Will this step help me with solving my 'thread not
>> > reuse' problem?
>>
>> maybe ;) probably not, though. As Tim said, the
>> problem is that "Kaffe won't run the gc/finalizer if
>> the process runs out of file descriptors.", so it
>> looks like a gc-vs-threading bug to me.
>>
>> One way to go after this bug would be to add some
>> special case handling code in wherever the exception
>> gets dispatched to run the gc/finalizer when the
>> process runs out of file descriptors and then retry
>> the file operation. Read FAQ/FAQ.debuging for a start
>> on how to go about finding where the action happens in
>> order to find out what could be a likely target for
>> your patch.
>>
>> you could also try using some other threading
>> implementation. ./configure --help should show a
>> --with-threads option. you can pick one of the options
>> under kaffe/kaffevm/systems. Kaffe should use internal
>> threads (unix-jthreads) by default, btw.
>>
>> cheers,
>> dalibor topic
>>
>>
>> __________________________________________________
>> Do you Yahoo!?
>> Yahoo! Tax Center - forms, calculators, tips, more
>> http://taxes.yahoo.com/
>>
>> _______________________________________________
>> kaffe mailing list
>> kaffe at kaffe.org
>> http://kaffe.org/cgi-bin/mailman/listinfo/kaffe
> 
> 
> 
> _________________________________________________________________
> Add photos to your messages with MSN 8. Get 2 months FREE*. 
> http://join.msn.com/?page=features/featuredemail
> 
> 
> _______________________________________________
> kaffe mailing list
> kaffe at kaffe.org
> http://kaffe.org/cgi-bin/mailman/listinfo/kaffe


-- 
Warwick Hunter                    Agile TV Corporation
Voice: +61 7 5584 5912            Fax: +61 7 5575 9550
mailto:whunter at agile.tv           http://www.agile.tv





More information about the kaffe mailing list