Re: [jira] Created: (HARMONY-638) [classlib] Tests hang on in luni : tests.api.java.io.FileTest / test_setReadOnly on Ubunti 6.06

2006-06-22 Thread Oliver Deakin



Geir Magnusson Jr wrote:

Oliver Deakin wrote:
  

Geir Magnusson Jr wrote:


However, in our case, when I say exec never returns I mean exec()
never returns.

so you'd never actually get to do IO above, because you are hanging in
exec().

Big difference, right?
  
  
Certainly 



So I assume you agree?  (Just want to make sure that I'm not missing
something terribly important here...)
  


Yes, that is a different case to what I was imagining (and what was on 
that page I linked).

Seems that *I* was missing something important ;)


- do you have a stack trace that gives more info for what each
  

of the threads are
doing? Could you attach it to the JIRA if you do please - Ive just tried
running a cut down
version of the test on my SLES9 machine and it exited fine, so it would
be useful to have
a trace from your machine to see what's happening.




Done
  


Thanks

Regards,
Oliver


geir


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  


--
Oliver Deakin
IBM United Kingdom Limited


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [jira] Created: (HARMONY-638) [classlib] Tests hang on in luni : tests.api.java.io.FileTest / test_setReadOnly on Ubunti 6.06

2006-06-22 Thread Tim Ellison
Magnusson, Geir wrote:
 Could you send me the code for Process so I can see what's going on
 here? :)

Process is a boring abstract type, I suspect that you want to look at
SystemProcess [1] and the associated natives [2].


[1]
http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/process/SystemProcess.java?view=markup

[2]
http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/native-src/shared/luni/process.c?view=markup


Regards,
Tim

-- 

Tim Ellison ([EMAIL PROTECTED])
IBM Java technology centre, UK.

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [jira] Created: (HARMONY-638) [classlib] Tests hang on in luni : tests.api.java.io.FileTest / test_setReadOnly on Ubunti 6.06

2006-06-22 Thread Geir Magnusson Jr
thx - I've figured out what's going on...

fork() is failing

When I run eclipse w a big max heap, it fails.  When it's default heap,
it doesn't.  I'd love to claim that it's Eclipe's fault, but clearly
there's some ulimit thingy in Ubuntu.

Anyway, I'm going to rework the natives so that fork failure results in
an exception since I can make it happen.

Stay tuned.

geir


Tim Ellison wrote:
 Magnusson, Geir wrote:
 Could you send me the code for Process so I can see what's going on
 here? :)
 
 Process is a boring abstract type, I suspect that you want to look at
 SystemProcess [1] and the associated natives [2].
 
 
 [1]
 http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/process/SystemProcess.java?view=markup
 
 [2]
 http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/native-src/shared/luni/process.c?view=markup
 
 
 Regards,
 Tim
 

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [jira] Created: (HARMONY-638) [classlib] Tests hang on in luni : tests.api.java.io.FileTest / test_setReadOnly on Ubunti 6.06

2006-06-22 Thread Geir Magnusson Jr
This is now resolved.  Waiting for squawks of protest before closing.

Things to think about/do :

1) We need richer return codes from procimpl.c execProgram() for windows.

2) I'll find out what config on Ubuntu allowed this behavior (had fork()
fail) and we should add a regression for it, and start doing more stress
testing, as I wonder what else we'll find

geir


Geir Magnusson Jr wrote:
 And btw, thanks to Tim, Mark and Oliver for thinking about this problem...
 
 Geir Magnusson Jr wrote:
 thx - I've figured out what's going on...

 fork() is failing

 When I run eclipse w a big max heap, it fails.  When it's default heap,
 it doesn't.  I'd love to claim that it's Eclipe's fault, but clearly
 there's some ulimit thingy in Ubuntu.

 Anyway, I'm going to rework the natives so that fork failure results in
 an exception since I can make it happen.

 Stay tuned.

 geir


 Tim Ellison wrote:
 Magnusson, Geir wrote:
 Could you send me the code for Process so I can see what's going on
 here? :)
 Process is a boring abstract type, I suspect that you want to look at
 SystemProcess [1] and the associated natives [2].


 [1]
 http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/process/SystemProcess.java?view=markup

 [2]
 http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/native-src/shared/luni/process.c?view=markup


 Regards,
 Tim

 -
 Terms of use : http://incubator.apache.org/harmony/mailing.html
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 
 -
 Terms of use : http://incubator.apache.org/harmony/mailing.html
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [jira] Created: (HARMONY-638) [classlib] Tests hang on in luni : tests.api.java.io.FileTest / test_setReadOnly on Ubunti 6.06

2006-06-21 Thread Oliver Deakin

I remember seeing problems like this before, in a non-Harmony jre, where a
Runtime.exec() would never return. I hunted around and found an 
interesting page

on JavaWorld:

 http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html

I found the Why Runtime.exec() hangs section very useful, and it 
solved my problem
at the time. I'm not saying that what you're seeing is definitely the 
same thing that I encountered,
but it may help. I notice that in this test stdout and stderr for the 
process are not read - is it
possible that it is producing some output, and since it isn't being read 
the process just waits

leading to the exec never exiting?

Regards,
Oliver


Geir Magnusson Jr (JIRA) wrote:

[classlib] Tests hang on in luni : tests.api.java.io.FileTest / 
test_setReadOnly on Ubunti 6.06
---

 Key: HARMONY-638
 URL: http://issues.apache.org/jira/browse/HARMONY-638
 Project: Harmony
Type: Bug

  Components: Classlib  
Reporter: Geir Magnusson Jr



it seems that exec() doesn't work - it never returns.  Bug in IBM j9 kernel 
classes?

Mark Hindress is trying to duplcate to reconfirm.

ubuntu 6.06
gcc 3.4
invoked by Sun Java 1.5.0_07
IBM J9 for linux, v3 mk II



  


--
Oliver Deakin
IBM United Kingdom Limited


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [jira] Created: (HARMONY-638) [classlib] Tests hang on in luni : tests.api.java.io.FileTest / test_setReadOnly on Ubunti 6.06

2006-06-21 Thread Geir Magnusson Jr


Oliver Deakin wrote:
 I remember seeing problems like this before, in a non-Harmony jre, where a
 Runtime.exec() would never return. I hunted around and found an
 interesting page
 on JavaWorld:
 
  http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html
 
 I found the Why Runtime.exec() hangs section very useful, and it
 solved my problem
 at the time. I'm not saying that what you're seeing is definitely the
 same thing that I encountered,
 but it may help. I notice that in this test stdout and stderr for the
 process are not read - is it
 possible that it is producing some output, and since it isn't being read
 the process just waits
 leading to the exec never exiting?

I think the phrasing in the article is misleading, because we're not
seeing exec() *return*, which is a different issue than the case that
they are talking about, namely the subsequent waitFor() not returning.

So I think this doesn't apply.  Interesting reading, though.

geir

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [jira] Created: (HARMONY-638) [classlib] Tests hang on in luni : tests.api.java.io.FileTest / test_setReadOnly on Ubunti 6.06

2006-06-21 Thread Oliver Deakin

The example returns once they have fixed it. If you look at the example
just before the Why Runtime.exec() hangs heading (BadExecJava2.java)
you will see a situation that is almost exactly the same as in the test 
case.

i.e. an exec followed by a waitFor(), without any reading of streams.
In this case the exec never returns.

The later example is how to fix it.

Regards,
Oliver


Geir Magnusson Jr wrote:

Oliver Deakin wrote:
  

I remember seeing problems like this before, in a non-Harmony jre, where a
Runtime.exec() would never return. I hunted around and found an
interesting page
on JavaWorld:

 http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html

I found the Why Runtime.exec() hangs section very useful, and it
solved my problem
at the time. I'm not saying that what you're seeing is definitely the
same thing that I encountered,
but it may help. I notice that in this test stdout and stderr for the
process are not read - is it
possible that it is producing some output, and since it isn't being read
the process just waits
leading to the exec never exiting?



I think the phrasing in the article is misleading, because we're not
seeing exec() *return*, which is a different issue than the case that
they are talking about, namely the subsequent waitFor() not returning.

So I think this doesn't apply.  Interesting reading, though.

geir

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  


--
Oliver Deakin
IBM United Kingdom Limited


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [jira] Created: (HARMONY-638) [classlib] Tests hang on in luni : tests.api.java.io.FileTest / test_setReadOnly on Ubunti 6.06

2006-06-21 Thread Geir Magnusson Jr


Oliver Deakin wrote:
 The example returns once they have fixed it. If you look at the example
 just before the Why Runtime.exec() hangs heading (BadExecJava2.java)
 you will see a situation that is almost exactly the same as in the test
 case.
 i.e. an exec followed by a waitFor(), without any reading of streams.
 In this case the exec never returns.
 
 The later example is how to fix it.

I don't think so.

When they are saying the exec never returns, they are meaning that
from the POV of the programmer, the spawned thing never returns.

That's why you can do

exec()
do IO
waitFor()
done

However, in our case, when I say exec never returns I mean exec()
never returns.

so you'd never actually get to do IO above, because you are hanging in
exec().

Big difference, right?

geir


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [jira] Created: (HARMONY-638) [classlib] Tests hang on in luni : tests.api.java.io.FileTest / test_setReadOnly on Ubunti 6.06

2006-06-21 Thread Oliver Deakin

Geir Magnusson Jr wrote:

Oliver Deakin wrote:
  

The example returns once they have fixed it. If you look at the example
just before the Why Runtime.exec() hangs heading (BadExecJava2.java)
you will see a situation that is almost exactly the same as in the test
case.
i.e. an exec followed by a waitFor(), without any reading of streams.
In this case the exec never returns.

The later example is how to fix it.



I don't think so.

When they are saying the exec never returns, they are meaning that
from the POV of the programmer, the spawned thing never returns.

That's why you can do

exec()
do IO
waitFor()
done

However, in our case, when I say exec never returns I mean exec()
never returns.

so you'd never actually get to do IO above, because you are hanging in
exec().

Big difference, right?
  


Certainly - do you have a stack trace that gives more info for what each 
of the threads are
doing? Could you attach it to the JIRA if you do please - Ive just tried 
running a cut down
version of the test on my SLES9 machine and it exited fine, so it would 
be useful to have

a trace from your machine to see what's happening.

Thanks,
Oliver


geir


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  


--
Oliver Deakin
IBM United Kingdom Limited


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [jira] Created: (HARMONY-638) [classlib] Tests hang on in luni : tests.api.java.io.FileTest / test_setReadOnly on Ubunti 6.06

2006-06-21 Thread Geir Magnusson Jr


Oliver Deakin wrote:
 Geir Magnusson Jr wrote:

 However, in our case, when I say exec never returns I mean exec()
 never returns.

 so you'd never actually get to do IO above, because you are hanging in
 exec().

 Big difference, right?
   
 
 Certainly 

So I assume you agree?  (Just want to make sure that I'm not missing
something terribly important here...)

- do you have a stack trace that gives more info for what each
 of the threads are
 doing? Could you attach it to the JIRA if you do please - Ive just tried
 running a cut down
 version of the test on my SLES9 machine and it exited fine, so it would
 be useful to have
 a trace from your machine to see what's happening.
 

Done

geir


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [jira] Created: (HARMONY-638) [classlib] Tests hang on in luni : tests.api.java.io.FileTest / test_setReadOnly on Ubunti 6.06

2006-06-21 Thread Magnusson, Geir

 From: Oliver Deakin [mailto:[EMAIL PROTECTED] 
 
 Geir Magnusson Jr wrote:
  Oliver Deakin wrote:

  The example returns once they have fixed it. If you look 
 at the example
  just before the Why Runtime.exec() hangs heading 
 (BadExecJava2.java)
  you will see a situation that is almost exactly the same 
 as in the test
  case.
  i.e. an exec followed by a waitFor(), without any reading 
 of streams.
  In this case the exec never returns.
 
  The later example is how to fix it.
  
 
  I don't think so.
 
  When they are saying the exec never returns, they are meaning that
  from the POV of the programmer, the spawned thing never returns.
 
  That's why you can do
 
  exec()
  do IO
  waitFor()
  done
 
  However, in our case, when I say exec never returns I 
 mean exec()
  never returns.
 
  so you'd never actually get to do IO above, because you 
 are hanging in
  exec().
 
  Big difference, right?

 
 Certainly - do you have a stack trace that gives more info 
 for what each 
 of the threads are
 doing? Could you attach it to the JIRA if you do please - Ive 
 just tried 
 running a cut down
 version of the test on my SLES9 machine and it exited fine, 
 so it would 
 be useful to have
 a trace from your machine to see what's happening.
 

Could you send me the code for Process so I can see what's going on
here? :)


Geir

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]