bugGNU Octave - Bugs: bug #49859, Octave 4.2.0 faults when...

 
 

bug #49859: Octave 4.2.0 faults when encountering undefined variables

Submitter:  Paul Irofti <bulibuta>
Submitted:  Fri 16 Dec 2016 07:41:07 AM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Segfault, Bus Error, etc.
Status:  Invalid / Not an Octave Bug Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 4.2.0 Operating System:  * BSD
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 21 Dec 2016 12:12:31 PM UTC, comment #4: 

It is now clear that this is an OpenBSD specific issue (two distinct stdc++ libraries are stepping on each other creating the fault). Please close the bug and excuse the noise.

Paul Irofti <bulibuta>
Tue 20 Dec 2016 10:29:15 AM UTC, comment #3: 

Indeed it happens on all errors. I will look into in from the OpenBSD side and get back with more info. Thank you for looking into this!

Paul Irofti <bulibuta>
Fri 16 Dec 2016 07:21:52 PM UTC, comment #2: 

Do all errors cause a segfault, or just undefined variables?  What does


error ("foobar!")


do?  If it is all errors, then there is something wrong with exception handling.  If it is just undefined variables, then I don't know.

But since the crash is happening inside "_Unwind_Resume", I'm guessing some exception handling issue on OpenBSD?

John W. Eaton <jwe>
Group administrator
Fri 16 Dec 2016 06:34:05 PM UTC, comment #1: 

I recompiled with debug symbols. Here is a stack trace when running the command from my initial post:


(gdb) bt
#0  0x00001dc96edd664a in thrkill () at <stdin>:2
#1  0x00001dc96ee36ab9 in *_libc_abort ()
    at /usr/src/lib/libc/stdlib/abort.c:52
#2  0x00001dc8b21f22a5 in _Unwind_Resume (exc=exc@entry=0x1dc8bf9e6b60)
    at /usr/src/gnu/usr.bin/cc/libgcc/../../../gcc/gcc/unwind.inc:238
#3  0x00001dc91ff72de7 in tree_identifier::rvalue (this=<optimized out>,
    nargout=<optimized out>, lvalue_list=<optimized out>)
    at /usr/ports/pobj/octave-4.2.0/octave-4.2.0/libinterp/octave-value/ovl.h:73
#4  0x00001dc91ff6f9e7 in tree_identifier::rvalue (nargout=0,
    this=0x1dc92b35a480)
    at /usr/ports/pobj/octave-4.2.0/octave-4.2.0/libinterp/parse-tree/pt-id.h:111
#5  tree_identifier::rvalue1 (this=0x1dc92b35a480, nargout=0)
    at /usr/ports/pobj/octave-4.2.0/octave-4.2.0/libinterp/parse-tree/pt-id.cc:116
#6  0x00001dc91ff63336 in octave::tree_evaluator::visit_statement (
    this=<optimized out>, stmt=...)
    at /usr/ports/pobj/octave-4.2.0/octave-4.2.0/libinterp/parse-tree/pt-eval.cc:691
#7  0x00001dc91ff629a9 in octave::tree_evaluator::visit_statement_list (
    this=0x1dc8f7ab4c80, lst=...)
    at /usr/ports/pobj/octave-4.2.0/octave-4.2.0/libinterp/parse-tree/pt-eval.cc:733
#8  0x00001dc9202f2480 in octave::interpreter::main_loop (
    this=this@entry=0x1dc913e19840)
    at /usr/ports/pobj/octave-4.2.0/octave-4.2.0/libinterp/corefcn/interpreter.cc:889
#9  0x00001dc9202f3008 in octave::interpreter::execute (this=0x1dc913e19840)
    at /usr/ports/pobj/octave-4.2.0/octave-4.2.0/libinterp/corefcn/interpreter.cc:756
#10 0x00001dc692a007c2 in ?? ()
#11 0x00001dc692a00512 in ?? ()
#12 0x0000000000000000 in ?? ()
(gdb) info thr
  Id   Target Id         Frame
* 1    process 588170    0x00001dc96edd664a in thrkill () at <stdin>:2


Paul Irofti <bulibuta>
Fri 16 Dec 2016 07:41:07 AM UTC, original submission:  

Hi,

I am currently trying to update the OpenBSD port of Octave and, although everything builds and packages just fine, I am seeing faults every time an undefined variable is encountered.

This was not the case with the previous version (4.0.2).

This happens in both the cli and gui versions so I am pretty sure this is an interpreter bug.


octave:1> D
error: 'D' undefined near line 1 column 1
panic: Abort trap -- stopping myself...
attempting to save variables to 'octave-workspace'...
save to 'octave-workspace' complete
Abort trap (core dumped)


Here is the ktrace output. If needed I can also recompile with debug symbols and provide a stack trace.


 61714/282915  octave-gui 0.000008 GIO   fd 2 wrote 44 bytes
   0000:  65 72 72 6f 72 3a 20 27 44 30 27 20 75 6e 64 65  error: 'D0' unde
   0010:  66 69 6e 65 64 20 6e 65 61 72 20 6c 69 6e 65 20  fined near line
   0020:  31 20 63 6f 6c 75 6d 6e 20 31 34 0a              1 column 14.
 61714/282915  octave-gui 0.000002 RET   write 44/0x2c
 61714/178573  octave-gui 0.000004 GIO   fd 9 read 45 bytes
   0000:  65 72 72 6f 72 3a 20 27 44 30 27 20 75 6e 64 65  error: 'D0' unde
   0010:  66 69 6e 65 64 20 6e 65 61 72 20 6c 69 6e 65 20  fined near line
   0020:  31 20 63 6f 6c 75 6d 6e 20 31 34 0d 0a           1 column 14..
 61714/282915  octave-gui 0.000000 CALL  kbind(0x1bfcb57cd6e8,24,0xdceb9ed1f35fb3d8)
 61714/178573  octave-gui 0.000008 RET   read 45/0x2d
 61714/282915  octave-gui 0.000008 RET   kbind 0
 61714/178573  octave-gui 0.000011 CALL  write(4,0x1bfd6fc58a58,0x1)
 61714/282915  octave-gui 0.000002 CALL  kbind(0x1bfcb57cd808,24,0xdceb9ed1f35fb3d8)
 61714/178573  octave-gui 0.000005 GIO   fd 4 wrote 1 bytes
   0000:  01                                               .
 61714/561512  octave-gui 0.000010 STRU  struct pollfd [2] { fd=3, events=0x1<POLLIN>, revents=0x1<POLLIN> } { fd=7, events=0x1<POLLIN>, revents=0<> }
 61714/282915  octave-gui 0.000003 RET   kbind 0
 61714/178573  octave-gui 0.000001 RET   write 1
 61714/561512  octave-gui 0.000001 RET   poll 1
 61714/178573  octave-gui 0.000004 CALL  __thrsleep(0x1bfc9a3a7638,CLOCK_REALTIME,0,0x1bfce0645dc0,0x1bfc9a3a7704)
 61714/561512  octave-gui 0.000002 CALL  read(3,0x7f7ffffc4a10,0x10)
 61714/561512  octave-gui 0.000005 GIO   fd 3 read 1 bytes
   0000:  01                                               .
 61714/561512  octave-gui 0.000002 RET   read 1
 61714/282915  octave-gui 0.000003 CALL  kbind(0x1bfcb57cd808,24,0xdceb9ed1f35fb3d8)
 61714/282915  octave-gui 0.000009 RET   kbind 0
 61714/561512  octave-gui -1.999999 CALL  gettimeofday(0x7f7ffffc4980,0)
 61714/561512  octave-gui 0.000004 STRU  struct timeval { 1481873352<"Dec 16 09:29:12 2016">.020491 }
 61714/561512  octave-gui 0.000001 RET   gettimeofday 0
 61714/561512  octave-gui 0.000006 CALL  recvmsg(7,0x7f7ffffc4890,0)
 61714/282915  octave-gui 0.000000 CALL  kbind(0x1bfcb57cd7e8,24,0xdceb9ed1f35fb3d8)
 61714/282915  octave-gui 0.000013 RET   kbind 0
 61714/561512  octave-gui 0.000001 RET   recvmsg -1 errno 35 Resource temporarily unavailable
 61714/282915  octave-gui 0.000023 CALL  kbind(0x1bfcb57cd258,24,0xdceb9ed1f35fb3d8)
 61714/561512  octave-gui 0.000003 CALL  gettimeofday(0x7f7ffffc41d0,0)
 61714/282915  octave-gui 0.000009 RET   kbind 0
 61714/561512  octave-gui 0.000001 STRU  struct timeval { 1481873352<"Dec 16 09:29:12 2016">.020552 }
 61714/561512  octave-gui 0.000001 RET   gettimeofday 0
 61714/282915  octave-gui 0.000088 CALL  kbind(0x1bfcb57cd1f8,24,0xdceb9ed1f35fb3d8)
 61714/282915  octave-gui 0.000010 RET   kbind 0
 61714/561512  octave-gui -1.999999 CALL  gettimeofday(0x7f7ffffc41e0,0)
 61714/561512  octave-gui 0.000004 STRU  struct timeval { 1481873352<"Dec 16 09:29:12 2016">.020657 }
 61714/561512  octave-gui 0.000001 RET   gettimeofday 0
 61714/282915  octave-gui 0.000015 CALL  kbind(0x1bfcb57cd178,24,0xdceb9ed1f35fb3d8)
 61714/282915  octave-gui 0.000009 RET   kbind 0
 61714/561512  octave-gui 0.000001 CALL  __thrwakeup(0x1bfc9a3a7638,1)
 61714/561512  octave-gui 0.000003 RET   __thrwakeup 0
 61714/178573  octave-gui 0.000003 RET   __thrsleep 0
 61714/282915  octave-gui 0.000001 CALL  kbind(0x1bfcb57cd178,24,0xdceb9ed1f35fb3d8)
 61714/282915  octave-gui 0.000009 RET   kbind 0
 61714/178573  octave-gui -1.999999 CALL  gettimeofday(0x1bfd6fc58c70,0)
 61714/178573  octave-gui 0.000004 STRU  struct timeval { 1481873352<"Dec 16 09:29:12 2016">.020708 }
 61714/178573  octave-gui 0.000001 RET   gettimeofday 0
 61714/561512  octave-gui 0.000004 CALL  gettimeofday(0x7f7ffffc4910,0)
 61714/561512  octave-gui 0.000004 STRU  struct timeval { 1481873352<"Dec 16 09:29:12 2016">.020717 }
 61714/178573  octave-gui -1.999999 CALL  __thrsleep(0x1bfc9a3a7638,CLOCK_REALTIME,0x1bfd6fc58c60,0x1bfce0645740,0x1bfc9a3a7704)
 61714/561512  octave-gui 0.000003 RET   gettimeofday 0
 61714/178573  octave-gui 0.000002 STRU  struct timespec { 1481873352<"Dec 16 09:29:12 2016">.050708000 }
 61714/282915  octave-gui 0.000002 CALL  kbind(0x1bfcb57cd178,24,0xdceb9ed1f35fb3d8)
 61714/561512  octave-gui 0.000001 CALL  recvmsg(7,0x7f7ffffc4870,0)
 61714/282915  octave-gui 0.000010 RET   kbind 0
 61714/561512  octave-gui 0.000002 RET   recvmsg -1 errno 35 Resource temporarily unavailable
 61714/561512  octave-gui 0.000004 CALL  poll(0x1bfcf638ce80,2,9)
 61714/282915  octave-gui 0.000024 CALL  kbind(0x1bfcb57cd038,24,0xdceb9ed1f35fb3d8)
 61714/282915  octave-gui 0.000008 RET   kbind 0
 61714/282915  octave-gui 0.000007 CALL  kbind(0x1bfcb57cd258,24,0xdceb9ed1f35fb3d8)
 61714/282915  octave-gui 0.000007 RET   kbind 0
 61714/282915  octave-gui 0.000012 CALL  kbind(0x1bfcb57cd108,24,0xdceb9ed1f35fb3d8)
 61714/282915  octave-gui 0.000007 RET   kbind 0
 61714/282915  octave-gui 0.000026 CALL  kbind(0x1bfcb57cd308,24,0xdceb9ed1f35fb3d8)
 61714/282915  octave-gui 0.000008 RET   kbind 0
 61714/282915  octave-gui 0.000034 CALL  kbind(0x1bfcb57cd2c8,24,0xdceb9ed1f35fb3d8)
 61714/282915  octave-gui 0.000008 RET   kbind 0
 61714/282915  octave-gui 0.000010 CALL  kbind(0x1bfcb57cd308,24,0xdceb9ed1f35fb3d8)
 61714/282915  octave-gui 0.000007 RET   kbind 0
 61714/282915  octave-gui 0.000069 CALL  kbind(0x1bfcb57cd7e8,24,0xdceb9ed1f35fb3d8)
 61714/282915  octave-gui 0.000008 RET   kbind 0
 61714/282915  octave-gui 0.000009 CALL  kbind(0x1bfcb57cd7e8,24,0xdceb9ed1f35fb3d8)
 61714/282915  octave-gui 0.000007 RET   kbind 0
 61714/282915  octave-gui 0.000009 CALL  kbind(0x1bfcb57cd7c8,24,0xdceb9ed1f35fb3d8)
 61714/282915  octave-gui 0.000007 RET   kbind 0
 61714/282915  octave-gui 0.000009 CALL  kbind(0x1bfcb57cd778,24,0xdceb9ed1f35fb3d8)
 61714/282915  octave-gui 0.000007 RET   kbind 0
 61714/282915  octave-gui 0.000008 CALL  kbind(0x1bfcb57cd778,24,0xdceb9ed1f35fb3d8)
 61714/282915  octave-gui 0.000007 RET   kbind 0
 61714/282915  octave-gui 0.000009 CALL  write(2,0x1bfcb5224ed8,0x30)
 61714/282915  octave-gui 0.000004 GIO   fd 2 wrote 48 bytes
   0000:  74 65 72 6d 69 6e 61 74 65 20 63 61 6c 6c 65 64  terminate called
   0010:  20 61 66 74 65 72 20 74 68 72 6f 77 69 6e 67 20   after throwing
   0020:  61 6e 20 69 6e 73 74 61 6e 63 65 20 6f 66 20 27  an instance of '
 61714/282915  octave-gui 0.000001 RET   write 48/0x30
 61714/282915  octave-gui 0.000009 CALL  kbind(0x1bfcb57cd778,24,0xdceb9ed1f35fb3d8)
 61714/282915  octave-gui 0.000007 RET   kbind 0
 61714/282915  octave-gui 0.000001 CALL  write(2,0x1bfd2a620340,0x1b)
 61714/282915  octave-gui 0.000002 GIO   fd 2 wrote 27 bytes
   0000:  6f 63 74 61 76 65 3a 3a 65 78 65 63 75 74 69 6f  octave::executio
   0010:  6e 5f 65 78 63 65 70 74 69 6f 6e                 n_exception
 61714/282915  octave-gui 0.000001 RET   write 27/0x1b
 61714/282915  octave-gui 0.000001 CALL  write(2,0x1bfcb5224ec7,0x2)
 61714/282915  octave-gui 0.000002 GIO   fd 2 wrote 2 bytes
   0000:  27 0a                                            '.
 61714/282915  octave-gui 0.000001 RET   write 2
 61714/282915  octave-gui 0.000009 CALL  kbind(0x1bfcb57cd778,24,0xdceb9ed1f35fb3d8)
 61714/282915  octave-gui 0.000007 RET   kbind 0
 61714/282915  octave-gui 0.000008 CALL  kbind(0x1bfcb57cd758,24,0xdceb9ed1f35fb3d8)
 61714/282915  octave-gui 0.000007 RET   kbind 0
 61714/282915  octave-gui 0.000006 CALL  kbind(0x1bfcb57cd508,24,0xdceb9ed1f35fb3d8)
 61714/282915  octave-gui 0.000007 RET   kbind 0
 61714/282915  octave-gui 0.000037 CALL  kbind(0x1bfcb57cce78,24,0xdceb9ed1f35fb3d8)
 61714/282915  octave-gui 0.000008 RET   kbind 0
 61714/282915  octave-gui 0.000007 CALL  kbind(0x1bfcb57cce78,24,0xdceb9ed1f35fb3d8)
 61714/282915  octave-gui 0.000007 RET   kbind 0
 61714/282915  octave-gui 0.000009 CALL  kbind(0x1bfcb57cd778,24,0xdceb9ed1f35fb3d8)
 61714/282915  octave-gui 0.000007 RET   kbind 0
 61714/282915  octave-gui 0.000008 CALL  kbind(0x1bfcb57cd758,24,0xdceb9ed1f35fb3d8)
 61714/282915  octave-gui 0.000007 RET   kbind 0
 61714/282915  octave-gui 0.000010 CALL  kbind(0x1bfcb57cd778,24,0xdceb9ed1f35fb3d8)
 61714/282915  octave-gui 0.000007 RET   kbind 0
 61714/282915  octave-gui 0.000002 CALL  sigprocmask(SIG_SETMASK,~0x20<SIGABRT>)
 61714/282915  octave-gui 0.000001 RET   sigprocmask 0<>
 61714/282915  octave-gui 0.000001 CALL  thrkill(0,SIGABRT,0)
 61714/282915  octave-gui 0.000002 PSIG  SIGABRT caught handler=0x1bfca06568d0 mask=~0x10120<SIGABRT|SIGKILL|SIGSTOP>
 61714/282915  octave-gui 0.000002 RET   thrkill 0
 61714/282915  octave-gui 0.000006 CALL  kbind(0x1bfcb57cd278,24,0xdceb9ed1f35fb3d8)
 61714/282915  octave-gui 0.000007 RET   kbind 0
 61714/282915  octave-gui 0.000014 CALL  kbind(0x1bfcb57cd278,24,0xdceb9ed1f35fb3d8)
 61714/282915  octave-gui 0.000008 RET   kbind 0
 61714/282915  octave-gui 0.000003 CALL  write(2,0x1bfca0b6f916,0x7)
 61714/282915  octave-gui 0.000003 GIO   fd 2 wrote 7 bytes
   0000:  70 61 6e 69 63 3a 20                             panic:
 61714/282915  octave-gui 0.000001 RET   write 7
 61714/282915  octave-gui 0.000001 CALL  write(2,0x1bfcdf4be9e0,0xa)
 61714/282915  octave-gui 0.000002 GIO   fd 2 wrote 10 bytes
   0000:  41 62 6f 72 74 20 74 72 61 70                    Abort trap
 61714/282915  octave-gui 0.000001 RET   write 10/0xa
 61714/282915  octave-gui 0.000001 CALL  write(2,0x1bfca0b6f91e,0x16)
 61714/282915  octave-gui 0.000002 GIO   fd 2 wrote 22 bytes
   0000:  20 2d 2d 20 73 74 6f 70 70 69 6e 67 20 6d 79 73   -- stopping mys
   0010:  65 6c 66 2e 2e 2e                                elf...


Paul Irofti <bulibuta>

 

(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 mtmiller (Updated the item)
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by bulibuta (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 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-12-21 mtmiller StatusNone Invalid / Not an Octave Bug
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code