bugGNU Octave - Bugs: bug #48911, octave hangs built by mxe-octave...

 
 

bug #48911: octave hangs built by mxe-octave on linux using gcc 5

Submitter:  Tatsuro MATSUOKA <tmacchant>
Submitted:  Fri 26 Aug 2016 06:13:13 AM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Segfault, Bus Error, etc.
Status:  Fixed Assigned to:  lostbard
Originator Name:  Tatsuro MATSUOKA Open/Closed:  * Closed
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Tue 13 Sep 2016 05:27:24 AM UTC, comment #7: 

I have confirmed that changeset makes octave worked.
Thanks!

Tatsuro MATSUOKA <tmacchant>
Mon 12 Sep 2016 01:06:36 PM UTC, comment #6: 

As a side note, on a fedora VM, with GCC 6.1.1, my native mxe-octave builds octave was also crashing frequency when typing in the cli or gui.

With the 6.0 update it (so far) has not crashed.

John Donoghue <lostbard>
Group Member
Mon 12 Sep 2016 01:03:36 PM UTC, comment #5: 
John Donoghue <lostbard>
Group Member
Mon 12 Sep 2016 09:37:15 AM UTC, comment #4: 

John Donoghue
If you have time, please consider to apply the patch.
The patch is effective Ubunutu 16.04 (64bit) and 14.04 (32bit).

Tatsuro MATSUOKA <tmacchant>
Sat 27 Aug 2016 08:54:14 AM UTC, comment #3: 

Oops! octave for windows does not use ncurses.(termcap is used instead.)
Therefore version up of ncurses to 6.0 does not affect build for windows.

I attached a patch.

(file #38372)

Tatsuro MATSUOKA <tmacchant>
Sat 27 Aug 2016 06:40:31 AM UTC, comment #2: 

I tried to build ncurses-6.0 by mxe-octave using gcc-5.4.0.
This time octave does not crash.

I have to check whether change of ncurses version affects windows build.

Tatsuro MATSUOKA <tmacchant>
Sat 27 Aug 2016 06:10:04 AM UTC, comment #1: 

From the gdb information on the previous post, the crash seems to be related to libcursus built by mxe-octave using gcc-5.

At usr/bin directory on mxe-otave on linux using gcc-5,
I have executed:


LD_PRELOAD=/home/tatsu/work/octave/mxe-octave/mxe-octave-linux-dev-gcc493/usr/lib/libncurses.so ./octave-cli



GNU Octave, version 4.1.0+
Copyright (C) 2016 John W. Eaton and others.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  For details, type 'warranty'.

Octave was configured for "x86_64-pc-linux-gnu".


Octave started up without crash.

/home/tatsu/work/octave/mxe-octave/mxe-octave-linux-dev-gcc493/usr/lib/libncurses.so

is libncurses.so built by mxe-octave using gcc-4.9.3.

Thus libncurses built by mxe-octave using gcc-5 is buggy.

In the src directory "ncurses-1-gcc-5-fix.patch" exists.
The patch seem to be well known for nurcus-5.9 :

https://github.com/cloudius-systems/osv/blob/master/modules/ncurses/ncurses-5.9-gcc-5.patch

I do not know the hang that I have met related to the patch.

Tatsuro MATSUOKA <tmacchant>
Fri 26 Aug 2016 06:13:13 AM UTC, original submission:  

Operating system GNU/Linux
Distribution Ubuntu  14.04 and 16.04
Octave version 4.0 and dev
gcc version 5

Using gcc 4.9.3, octave build by mxe octave works.

run gdb


(gdb) run
Starting program: /home/tatsu/work/octave/mxe-octave/mxe-octave-linux-dev/usr/bin/octave-cli
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffe9f9d700 (LWP 15712)]
[New Thread 0x7fffe979c700 (LWP 15713)]
[New Thread 0x7fffe4f9b700 (LWP 15714)]

Thread 1 "octave-cli" received signal SIGSEGV, Segmentation fault.
0x00007fffead31e79 in tputs_sp ()
   from /home/tatsu/work/octave/mxe-octave/mxe-octave-linux-dev/usr/lib/libncurses.so.5


Back trace

(gdb) bt
#0  0x00007fffead31e79 in tputs_sp ()
   from /home/tatsu/work/octave/mxe-octave/mxe-octave-linux-dev/usr/lib/libncurses.so.5
#1  0x00007fffead32346 in tputs ()
   from /home/tatsu/work/octave/mxe-octave/mxe-octave-linux-dev/usr/lib/libncurses.so.5
#2  0x00007fffef31a234 in _rl_enable_meta_key () at ../terminal.c:691
#3  0x00007fffef305c8a in readline_initialize_everything ()
    at ../readline.c:1101
#4  rl_initialize () at ../readline.c:968
#5  0x00007ffff66beb35 in octave_rl_initialize ()
    at /home/tatsu/work/octave/mxe-octave/mxe-octave-linux-dev/tmp-default-octave/octave-4.1.0+/liboctave/util/oct-rl-edit.c:447
#6  0x00007ffff668866d in octave::gnu_readline::gnu_readline (this=0x73fd60)
    at /home/tatsu/work/octave/mxe-octave/mxe-octave-linux-dev/tmp-default-octave/octave-4.1.0+/liboctave/util/cmd-edit.cc:254
#7  0x00007ffff668878b in octave::command_editor::make_command_editor ()
    at /home/tatsu/work/octave/mxe-octave/mxe-octave-linux-dev/tmp-default-octave/octave-4.1.0+/liboctave/util/cmd-edit.cc:1081
#8  0x00007ffff6689695 in octave::command_editor::instance_ok ()
    at /home/tatsu/work/octave/mxe-octave/mxe-octave-linux-dev/tmp-default-octave/octave-4.1.0+/liboctave/util/cmd-edit.cc:1064
#9  0x00007ffff6689759 in octave::command_editor::set_name (n="Octave")
---Type <return> to continue, or q <return> to quit---
    at /home/tatsu/work/octave/mxe-octave/mxe-octave-linux-dev/tmp-default-octave/octave-4.1.0+/liboctave/util/cmd-edit.cc:1158
#10 0x00007ffff7701bc0 in initialize_command_input ()
    at /home/tatsu/work/octave/mxe-octave/mxe-octave-linux-dev/tmp-default-octave/octave-4.1.0+/libinterp/corefcn/input.cc:557
#11 0x00007ffff770e2f9 in octave::interpreter::interpreter (this=0x642080,
    app_context=0x7fffffffde60, embedded=<optimized out>)
    at /home/tatsu/work/octave/mxe-octave/mxe-octave-linux-dev/tmp-default-octave/octave-4.1.0+/libinterp/corefcn/interpreter.cc:629
#12 0x00007ffff6e1d9a3 in octave::application::create_interpreter (
    this=0x7fffffffde60)
    at /home/tatsu/work/octave/mxe-octave/mxe-octave-linux-dev/tmp-default-octave/octave-4.1.0+/libinterp/octave.cc:377
#13 0x00007ffff6e1d8ea in octave::cli_application::execute (
    this=0x7fffffffde60)
    at /home/tatsu/work/octave/mxe-octave/mxe-octave-linux-dev/tmp-default-octave/octave-4.1.0+/libinterp/octave.cc:424
#14 0x0000000000401127 in main (argc=1, argv=0x7fffffffe0d8)
    at /home/tatsu/work/octave/mxe-octave/mxe-octave-linux-dev/tmp-default-octave/octave-4.1.0+/src/main-cli.cc:90



Tatsuro MATSUOKA <tmacchant>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #38372:  ncurces_update.patch added by tmacchant (829B - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by lostbard (Posted a comment)
  • -email is unavailable- added by tmacchant
  • -email is unavailable- added by tmacchant
  • -email is unavailable- added by tmacchant (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 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-09-13 lostbard StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2016-09-12 lostbard StatusNone Ready For Test
        Assigned toNone lostbard
    2016-09-12 tmacchant Carbon-Copy- Added john donoghue <john.david.donoghue@gmail.com>
    2016-08-27 tmacchant Attached File- Added ncurces_update.patch, #38372
        Carbon-Copy- Added johnd <john.david.donoghue@gmail.com>

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code