bugGNU Octave - Bugs: bug #56900, Octave hang in "linux on...

 
 

bug #56900: Octave hang in "linux on dex" on samsung tablet

Submitter:  None
Submitted:  Mon 16 Sep 2019 12:14:15 AM UTC
   
 
Category:  Configuration and Build System Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Unexpected Error or Warning
Status:  Invalid / Not an Octave Bug Assigned to:  None
Originator Name:  eric m Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 5.1.0
Operating System:  * GNU/Linux Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Tue 17 Sep 2019 04:51:08 PM UTC, comment #6: 

Thanks for reporting back, I'm closing this bug report. Do feel free to write this up somewhere, on a blog or on the Octave wiki, so that others can benefit from your experimentation.

Mike Miller <mtmiller>
Group Member
Tue 17 Sep 2019 12:56:28 AM UTC, comment #5: 

It works by setting the environment variable, so

export GNUTERM=x11
or if in octave issuing "setenv GNUTERM x11"

Since this works I will not pursue the android-shmem route. Although I did clone the archive and it builds easily, in case anyone else wants to try it so they can use the Qt graphics.



Anonymous
Tue 17 Sep 2019 12:28:34 AM UTC, comment #4: 

Thank you for you help. If I figure out the last part I will post the solution here and also the wiki.

Anonymous
Mon 16 Sep 2019 11:07:46 PM UTC, comment #3: 

I think you are running into what looks to be a fairly common and well known problem (that I just found with a few minutes of googling), Android does not support System V shared memory, such as shmget, shmat, etc.

Qt image functions seem to require System V shared memory when running on X11.

You can try preloading a library that provides these functions, for example https://github.com/pelya/android-shmem or https://github.com/termux/libandroid-shmem.

You can also try gnuplot with a different terminal, for example "setenv GNUTERM x11".

However you decide to proceed to get graphics working on your system, you're basically heading into uncharted waters, so good luck. You might want to consider writing up a set of build and configuration notes on the Octave wiki specific to this system.

Mike Miller <mtmiller>
Group Member
Mon 16 Sep 2019 10:19:37 PM UTC, comment #2: 

Thank you for the quick reply! You are correct, it was openblas.
"version -blas" returned openblas. After removing openblas from the system it returned ATLAS (which I also have installed). After that the matrix functions work.

One down, one to go!

The plotting routine still hangs, but this time it gives me an error. So, using "gnuplot" as the graphics_toolkit it, and calling "plot" it opens up a plot window but doesn't draw anything in it. The error message from octave is:

QxcbShmImage: shmget() failed (38) for size 1096416 (564x486)

If it helps here is some extra info...

Here is the output from top:
top - 17:15:48 up 14 days,  1:00,  0 users,  load average: 0.00, 0.00, 0.00
Tasks:  39 total,   1 running,  35 sleeping,   0 stopped,   3 zombie
%Cpu(s): 12.4 us,  5.7 sy,  0.0 ni, 80.4 id,  0.0 wa,  1.1 hi,  0.5 si,  0.0 st
KiB Mem :  5784956 total,   398960 free,  2612468 used,  2773528 buff/cache
KiB Swap:  2097148 total,  1322796 free,   774352 used.  2688184 avail Mem

There is also a shared memory directory mounted:
tmpfs on /devro/shm type tmpfs (rw,nosuid,nodev,seclabel,uid=1638400000,gid=1638400000)




Anonymous
Mon 16 Sep 2019 07:57:46 PM UTC, comment #1: 

Thank you for your bug report and for trying to provide as many details as you can. If both issues hang in the same way, then I would say it's possible that it's the same underlying issue. The plot routines are probably also performing matrix operations, so possibly also hanging on a BLAS or LAPACK routine. Can you confirm with gdb or possibly ltrace that the hang is in one of the numerical libraries in both cases?

If this system is an apt-based distribution, it's possible that you are linking against OpenBLAS even when you think you are linking against the reference BLAS library due to the alternatives system. You can try running "version -blas" in Octave to see what it detects. You can also try completely removing all traces of OpenBLAS libraries using apt or dnf or whatever your package manager is. I think your intuition different BLAS and LAPACK is a good start, but it's not clear that you aren't building with OpenBLAS every time.

Mike Miller <mtmiller>
Group Member
Mon 16 Sep 2019 12:14:15 AM UTC, original submission:  

I have successfully compiled Octave 5.1.0 on "Linux on Dex" (LoD), the linux environment available on android on some samsung phones and tablets. I have the tab s5e. So the build is for arm processor.

So far there are two issues. Before I get into those... the gui starts up just fine, and octave also starts just fine. The editor works, etc. All seems well. But then...
 
1. I can do simple things like add 1+1, so octave is up and running. I can input a matrix and take its transpose. However if I try to invert the matrix, octave hangs. So I recompiled with different BLAS and LAPACK libraries available (openblas, blas, etc.) but no matter which blas and lapack libraries I link to it still hangs.

2. Graphics. I tried both qt, and gnuplot for plotting, but it fails to produce a plot when compiling with or without opengl. I don't even know if this is where I should be looking for that issue. This produces the same kind of hang.

Both hangs go to "defunct" when looking at "ps aux | grep octave".

I tried looking at the output of strace, but I didn't see anything that stuck out. Perhaps someone else might have some ideas. Anything else I should try or log files I should send?

Here is my configure command:
  $ ../configure --prefix=/home/dextop/packages/SOURCE/octave-5.1.0/ehm_build --with-lapack=/usr/lib/liblapack.so --with-blas=/usr/lib/libblas.so --without-opengl

Thanks for any info!





Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-09-17 mtmiller StatusNeed Info Invalid / Not an Octave Bug
        Open/ClosedOpen Closed
    2019-09-16 mtmiller StatusNone Need Info

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code