[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #59310] Calling java from octave: Unreasonable
From: |
anonymous |
Subject: |
[Octave-bug-tracker] [bug #59310] Calling java from octave: Unreasonable resource exhaustion |
Date: |
Tue, 20 Oct 2020 03:07:06 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:81.0) Gecko/20100101 Firefox/81.0 |
URL:
<https://savannah.gnu.org/bugs/?59310>
Summary: Calling java from octave: Unreasonable resource
exhaustion
Project: GNU Octave
Submitted by: None
Submitted on: Tue 20 Oct 2020 07:07:04 AM UTC
Category: Interpreter
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Regression
Status: None
Assigned to: None
Originator Name: T Herzke
Originator Email:
Open/Closed: Open
Release: 5.2.0
Discussion Lock: Any
Operating System: GNU/Linux
_______________________________________________________
Details:
This was working fine in octave 4.2.2 with openjdk 11 (default versions on
ubuntu 18.04).
It fails with octave 5.2.0 with openjdk 11 (default versions on ubuntu 20.04).
It also fails when replacing openjdk 11 with openjdk 8.
All tests were performed with standard ubuntu packages for octave and
default-jre-headless on the respective releases 18.04 and 20.04.
Steps to reproduce with a simpe example:
* In ubuntu 20.04, install octave and java:
apt install octave default-jre-headless
* Start octave, enter these three commands:
javaruntime = javaMethod('getRuntime','java.lang.Runtime');
command = 'touch /tmp/testfile1';
process = javaruntime.exec(command)
Expected results:
1. A file /tmp/testfile1 should have been created.
2. Variable "process" should now reference a java object of type
java.lang.ProcessImpl.
3. No error occurs.
Actual results:
1. A file /tmp/testfile1 has actually been created as expected. The child
process has successfully executed.
2. Variable "process" does not exist because javaruntime.exec() was terminated
with an error.
3. First a warning occurs, then an error occurs. Warning and error messages:
[0.063s][warning][os,thread] Failed to start thread - pthread_create failed
(EINVAL) for attributes: stacksize: 136k, guardsize: 0k, detached.
error: [java] java.lang.OutOfMemoryError: unable to create native thread:
possibly out of memory or process/resource limits reached
I have tried this on multiple systems running ubuntu focal, including fresh
installations, therefore this is not caused by some system with quirky thread
creation limits.
When running this example in octave with strace
strace -f --trace=clone octave --eval example
(where example.m contains the three lines from above),
I can see that the child process is created successfully and exits with exit
code 0 before the warning about thread creation is printed.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?59310>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #59310] Calling java from octave: Unreasonable resource exhaustion,
anonymous <=