classes.tst hangs octave

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|

classes.tst hangs octave

Dmitri A. Sergatskov
At least on Fedora
classes.tst hangs with octave running with 100% cpu
see


This is after

Change #3691

Category None
Changed by Rik <[hidden email]>
Changed at Mon 30 Oct 2017 00:33:41
Repository http://hg.savannah.gnu.org/hgweb/octave
Project octave
Branch default
Revision 068556c5167e9bca5173154c8ba93fe73f3c41f7

Comments

Add BIST test for clear() function (bug #35881).

* test/bug-35881/bug-35881.tst: New tests for clear() function which verify
that current function is unaffected.

* test/bug-35881/bug35881.m: New test code.

* test/bug-35881/module.mk: Add test files to build system.

* __run_test_suite__.m: Replace global variables with function variables.  Use
nested functions to access parent's copy of function variable.  Modify function
to accept two additional inputs: topsrcdir and topbuilddir.

* test/fntests.m: Call __run_test_suite__ with topsrcdir and topbuilddir inputs.

* test/module.mk: Add bug-35881 files to build system.

Changed files

  • scripts/testfun/__run_test_suite__.m
  • test/bug-35881/bug-35881.tst
  • test/bug-35881/bug35881.m
  • test/bug-35881/module.mk
  • test/fntests.m
  • test/module.mk
Reply | Threaded
Open this post in threaded view
|

Re: classes.tst hangs octave

Dmitri A. Sergatskov


On Sun, Oct 29, 2017 at 8:49 PM, Dmitri A. Sergatskov <[hidden email]> wrote:
At least on Fedora
classes.tst hangs with octave running with 100% cpu
see


This is after




​If I do interactively at octave prompt

>> test ../test/classes/classes.tst
***** test snk = Snork ();
 assert (isequal (gick (snk), 1));
 assert (isequal (snk.gick, 1));
 assert (isequal (snk(2), 1));
 assert (isequal (snk{end}, 3));
!!!!! test failed
'Snork' undefined near line 2 column 8
shared variables   scalar structure containing the fields:

    snk = [](0x0)
    snk1 = [](0x0)
    snk2 = [](0x0)
​>>

​but  "make check" hangs​

​Dmitri.
--


Reply | Threaded
Open this post in threaded view
|

Re: classes.tst hangs octave

Rik-4
On 10/29/2017 07:31 PM, Dmitri A. Sergatskov wrote:


On Sun, Oct 29, 2017 at 8:49 PM, Dmitri A. Sergatskov <[hidden email]> wrote:
At least on Fedora
classes.tst hangs with octave running with 100% cpu
see


This is after




​If I do interactively at octave prompt

>> test ../test/classes/classes.tst
***** test snk = Snork ();
 assert (isequal (gick (snk), 1));
 assert (isequal (snk.gick, 1));
 assert (isequal (snk(2), 1));
 assert (isequal (snk{end}, 3));
!!!!! test failed
'Snork' undefined near line 2 column 8
shared variables   scalar structure containing the fields:

    snk = [](0x0)
    snk1 = [](0x0)
    snk2 = [](0x0)
​>>

​but  "make check" hangs​


Maybe try

run-octave -f
cd ../test/classes
test classes.tst


to make sure it isn't something about being located in a particular directory.

As for why 'make check' would be hanging, I'm not sure.  I ran 'make check', and also ran 'make install' and then used __run_test_suite__ and both passed.  I was concerned that this cset might have side effects so maybe we'll see if other installations are affected.

--Rik
Reply | Threaded
Open this post in threaded view
|

Re: classes.tst hangs octave

Dmitri A. Sergatskov

On Sun, Oct 29, 2017 at 10:38 PM, Rik <[hidden email]> wrote:

Maybe try

run-octave -f
cd ../test/classes
test classes.tst

​That works

​PASSES 141 out of 152 tests (11 known bugs)

make check hangs on buildbot computer (FC26 I did manual clone/config/make make check as a normal user)
​and the same on my workstation (FC27beta).​

 


to make sure it isn't something about being located in a particular directory.

As for why 'make check' would be hanging, I'm not sure.  I ran 'make check', and also ran 'make install' and then used __run_test_suite__ and both passed.  I was concerned that this cset might have side effects so maybe we'll see if other installations are affected.

--Rik

​Dmitri.
--

Reply | Threaded
Open this post in threaded view
|

Re: classes.tst hangs octave

Michael Godfrey
In reply to this post by Rik-4
Works for me on Fedora 26:


On 10/30/2017 03:38 AM, Rik wrote:
cd ../test/classes
test classes.tst

Reply | Threaded
Open this post in threaded view
|

Re: classes.tst hangs octave

Dmitri A. Sergatskov


On Mon, Oct 30, 2017 at 6:17 AM, Michael D Godfrey <[hidden email]> wrote:
Works for me on Fedora 26:


On 10/30/2017 03:38 AM, Rik wrote:
cd ../test/classes
test classes.tst



​Michael,

What does work for you on Fedora 26? The individual test, or "make check"? or both?

Dmitri​.
--



Reply | Threaded
Open this post in threaded view
|

Re: classes.tst hangs octave

Dmitri A. Sergatskov
In reply to this post by Rik-4
​Is there a way i could enable echo for this test ?
(I assume, by modifying classes.tst)

​Dmitri.
--

Reply | Threaded
Open this post in threaded view
|

Re: classes.tst hangs octave

Michael Godfrey
In reply to this post by Dmitri A. Sergatskov
I just did the individual test (cd test/classes)
The plain make check (./run-octave --no-gui; make check) runs as before.

On 10/30/2017 01:18 PM, Dmitri A. Sergatskov wrote:

On Mon, Oct 30, 2017 at 6:17 AM, Michael D Godfrey <[hidden email]> wrote:
Works for me on Fedora 26:


On 10/30/2017 03:38 AM, Rik wrote:
cd ../test/classes
test classes.tst



​Michael,

What does work for you on Fedora 26? The individual test, or "make check"? or both?

Dmitri​.
--




Reply | Threaded
Open this post in threaded view
|

Re: classes.tst hangs octave

John W. Eaton
Administrator
In reply to this post by Dmitri A. Sergatskov
On 10/30/2017 11:58 AM, Dmitri A. Sergatskov wrote:
 > ​Is there a way i could enable echo for this test ?
 > (I assume, by modifying classes.tst)

Yes, you should be able to set echo on in the test.

If it is hanging, then you could also try to attach to the octave-gui
process with "gdb -p PID", interrupt the process, and then get a stack
trace to see where it is looping.  Or, maybe it has crashed with a
segfault?  I think that currently appears to hang Octave because the
wrapper process for octave-gui is not exiting properly when octave-gui
segfaults.

jwe

Reply | Threaded
Open this post in threaded view
|

Re: classes.tst hangs octave

Dmitri A. Sergatskov


On Mon, Oct 30, 2017 at 11:45 AM, John W. Eaton <[hidden email]> wrote:
On 10/30/2017 11:58 AM, Dmitri A. Sergatskov wrote:
> ​Is there a way i could enable echo for this test ?
> (I assume, by modifying classes.tst)

Yes, you should be able to set echo on in the test.

If it is hanging, then you could also try to attach to the octave-gui process with "gdb -p PID", interrupt the process, and then get a stack trace to see where it is looping.  Or, maybe it has crashed with a segfault?  I think that currently appears to hang Octave because the wrapper process for octave-gui is not exiting properly when octave-gui segfaults.


​It is hanging with octave process running at 100% cpu load.
Ctrl-C kills the make (and octave process)

I just tried on (slightly modified -- has newe libtools) RH 7 and it hangs there as well.

jwe

​Dmitri.
--

Reply | Threaded
Open this post in threaded view
|

Re: classes.tst hangs octave

Dmitri A. Sergatskov
In reply to this post by Michael Godfrey


On Mon, Oct 30, 2017 at 11:15 AM, Michael D Godfrey <[hidden email]> wrote:
I just did the individual test (cd test/classes)
The plain make check (./run-octave --no-gui; make check) runs as before.


​Michael,

What is your "hg id"?

Dmitri.

Reply | Threaded
Open this post in threaded view
|

Re: classes.tst hangs octave

Michael Godfrey
 __octave_config_info__ ("hg_id")
ans = 422814bf8b41
octave:2>


On 10/30/2017 05:11 PM, Dmitri A. Sergatskov wrote:


On Mon, Oct 30, 2017 at 11:15 AM, Michael D Godfrey <[hidden email]> wrote:
I just did the individual test (cd test/classes)
The plain make check (./run-octave --no-gui; make check) runs as before.


​Michael,

What is your "hg id"?

Dmitri.

Reply | Threaded
Open this post in threaded view
|

Re: classes.tst hangs octave

Dmitri A. Sergatskov
In reply to this post by John W. Eaton
On Mon, Oct 30, 2017 at 11:45 AM, John W. Eaton <[hidden email]> wrote:


If it is hanging, then you could also try to attach to the octave-gui process with "gdb -p PID", interrupt the process, and then get a stack trace to see where it is looping. 

​The backtrace is attached (this version compiled w/o Qt, otherwise i endup in some Qt thread).


jwe

​Dmitri.
--


backtrace.txt (25K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: classes.tst hangs octave

John W. Eaton
Administrator
On 10/30/2017 05:16 PM, Dmitri A. Sergatskov wrote:

> On Mon, Oct 30, 2017 at 11:45 AM, John W. Eaton <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>
>
>     If it is hanging, then you could also try to attach to the
>     octave-gui process with "gdb -p PID", interrupt the process, and
>     then get a stack trace to see where it is looping.
>
>
> ​The backtrace is attached (this version compiled w/o Qt, otherwise i
> endup in some Qt thread).

In that case, you can try

   thread apply all where

to see the stack traces for all threads.

 > (gdb) bt
 > #0  0x00007f67a678830c in dgemm_ () from /lib64/libopenblas.so.0
 > #1  0x00007f67ad0d1836 in xgemm (a=..., b=...,
transa=transa@entry=blas_no_trans, transb=transb@entry=blas_no_trans) at
../liboctave/array/dMatrix.cc:3008
 > #2  0x00007f67ad0d1e24 in operator* (a=..., b=...) at
../liboctave/array/dMatrix.cc:3023
 > #3  0x00007f67ae32230b in oct_binop_mul (a1=..., a2=...) at
../libinterp/operators/op-m-m.cc:63


So it is hanging in dgemm from openblas?  Hmm.  I tried installing
openblas on my Debian system but it is still not hanging for me.

Can you try with reference blas and see whether that changes the result
for you?

At this point, I'd try to figure out what code Octave is executing.  You
could try

   call show_octave_backtrace()

from the (gdb) prompt to maybe narrow it down a bit.  But you may want
to insert some print statements in the tests to really find out what's
happening and what values are being multiplied here.

jwe

Reply | Threaded
Open this post in threaded view
|

Re: classes.tst hangs octave

Dmitri A. Sergatskov


On Mon, Oct 30, 2017 at 7:20 PM, John W. Eaton <[hidden email]> wrote:

So it is hanging in dgemm from openblas?  Hmm.  I tried installing openblas on my Debian system but it is still not hanging for me.


​Yes, it looks like RH/Fedora's openblas has a problem. Either atlas or ref blas seems to work fine.
I removed openblas from the buildbot for now. Default configure would pick up the reference blas.
To get atlas you would need to add to configure option "--with-blas="-L/usr/lib64/atlas -ltatlas"
(libtatals is threaded atlas and libsatlas is a single thread atlas). ​

 
jwe

​Dmitri.
--

Reply | Threaded
Open this post in threaded view
|

Re: classes.tst hangs octave

Dmitri A. Sergatskov


On Mon, Oct 30, 2017 at 10:04 PM, Dmitri A. Sergatskov <[hidden email]> wrote:


On Mon, Oct 30, 2017 at 7:20 PM, John W. Eaton <[hidden email]> wrote:

So it is hanging in dgemm from openblas?  Hmm.  I tried installing openblas on my Debian system but it is still not hanging for me.


​Yes, it looks like RH/Fedora's openblas has a problem. Either atlas or ref blas seems to work fine.
I removed openblas from the buildbot for now. Default configure would pick up the reference blas.

​I just put a self-compiled (from the upstream's tarball) library back in (and it works fine).
So everything should be back to normal. ​

​Dmitri.
--