harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geir Magnusson Jr." <g...@pobox.com>
Subject Re: [classlib][luni]Runtime.exec fails on Linux
Date Mon, 16 Oct 2006 14:03:41 GMT


Paulex Yang wrote:
> Geir Magnusson Jr. wrote:
>> I'm confused.  Didn't you just report this on Ubuntu?
> Let Leo speak for himself, but I thought Leo meant IBM VME + Harmony 
> classlib failed on Ubuntu and Redhat, but Alexey just reported that both 
> (VME and DRLVM) works on SUSE, that's why it seems interesting.

I understand that based on my experience with fork() and ubuntu under 
memory load...

geir

>>
>> I have had similar forking problems on Ubuntu 6 (I once found a bug in 
>> classlib related to forking...).
>>
>> I never figured out why Unbuntu does this, but it seemed that under 
>> memory stress, Ubuntu's fork() fails.  Try this - close Eclipse and 
>> run the test again...
>> geir
>>
>>
>> Leo Li wrote:
>>> Thank you.
>>> I have just run it on drlvm of unbuntu, it works.
>>> What a qurious problem!
>>>
>>>
>>> On 10/16/06, Alexey Varlamov <alexey.v.varlamov@gmail.com> wrote:
>>>>
>>>> Both DRLVM and J9 works for me (SUSE9).
>>>>
>>>> -- 
>>>> Alexey
>>>>
>>>> 2006/10/16, Leo Li <liyilei1979@gmail.com>:
>>>> > Hi, all:
>>>> >     The harmony Runtime.exec fails on Linux with ENOMEM.
>>>> >     Here is the testcase:
>>>> >
>>>> > public class Exec {
>>>> >    public static void main(String[] args) throws Exception {
>>>> >
>>>> >       Runtime.getRuntime().exec("ls");    }
>>>> > }
>>>> >
>>>> >    I have tried it on RedHat Enterprise 4 and Unbuntu, both get 
>>>> ENOMEM
>>>> in
>>>> > native code.
>>>> >
>>>> >    After digging into it, I found it fails in procimpl.c, line 135:
>>>> >
>>>> >        grdpid = fork ();
>>>> >
>>>> >    If the call to fork is changed to vfork, the testcase will pass 
>>>> but
>>>> > still get exitcode = 1 which indicates that some error has 
>>>> happened. The
>>>> > difference between fork and vfork is just whether page tables is 
>>>> copied
>>>> to
>>>> > child process or not. But I do not think it is the main cause. 
>>>> Besides,
>>>> > vfork has become outdated since it main usage is supplied by fork 
>>>> with
>>>> > copy-on-write function implemented in modern linux kernel. 
>>>> Furthermore,
>>>> > vfork is also not so safe as fork. So I do not think it is the 
>>>> accepted
>>>> way
>>>> > to solve the problem.
>>>> >
>>>> >   I will try whether it can be reproduced on drlvm of linux since 
>>>> I am
>>>> not
>>>> > sure whether it is relevent to VM or classlib. If any drlvm man 
>>>> can tell
>>>> me
>>>> > the result, it can avoid my trouble to build it on linux. :)
>>>> >
>>>> >
>>>> >
>>>> >
>>>> >
>>>> >
>>>> >
>>>> > --
>>>> > Leo Li
>>>> > China Software Development Lab, IBM
>>>> >
>>>> >
>>>>
>>>> ---------------------------------------------------------------------
>>>> Terms of use : http://incubator.apache.org/harmony/mailing.html
>>>> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
>>>> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>>>>
>>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> Terms of use : http://incubator.apache.org/harmony/mailing.html
>> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
>> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>>
>>
> 
> 

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Mime
View raw message