bugGNU Octave - Bugs: bug #34750, Plotting Hangs on OpenBSD

 
 

bug #34750: Plotting Hangs on OpenBSD

Submitter:  Edd Barrett <vext01>
Submitted:  Sat 05 Nov 2011 01:39:15 AM UTC
   
 
Category:  Plotting with gnuplot Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 3.4.3 Operating System:  * BSD
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Thu 08 Aug 2013 03:17:41 AM UTC, comment #13: 

I am able to plot normally with gnuplot with the current development version of Octave on OpenBSD 5.3. Whatever was the problem with 3.4.x and 3.6.x has apparently been fixed.

Mike Miller <mtmiller>
Group Member
Wed 22 Feb 2012 05:00:16 PM UTC, comment #12: 

Ok. This looks like it is a problem with the i/o pipe between Octave and Gnuplot.

The pipe is being opened in .../scripts/plot/private/__gnuplot_get_var__.m

This calls Octave's builtin popen2() which is part of .../src/syscalls.cc

I recommend you start a thread on the octave help mail-list.

https://mailman.cae.wisc.edu/listinfo/help-octave


Ben Abbott <bpabbott>
Group Member
Wed 22 Feb 2012 04:00:36 PM UTC, comment #11: 

Ah -- sorry.

I know gnuplot works fine, I use it all the time from maxima.


gnuplot> print GPVAL_TERM
x11



Edd Barrett <vext01>
Wed 22 Feb 2012 02:50:24 PM UTC, comment #10: 

Please try that from gnuplot not from Octave.


Ben Abbott <bpabbott>
Group Member
Wed 22 Feb 2012 02:47:51 PM UTC, comment #9: 

hrm...


octave:1> print GPVAL_TERM
warning: print.m: epstool binary is not available.
Some output formats are not available.
warning: print.m: pstoedit binary is not available.
Some output formats are not available.
error: print: no figure to print
error: called from:
error:   /usr/ports/pobj/octave-3.6.1-rc0/octave-3.6.1-rc0/scripts/plot/print.m at line 269, column 5


Are these tools required for x11 rendering?

Edd Barrett <vext01>
Wed 22 Feb 2012 02:37:37 PM UTC, comment #8: 

From your earlier comment the hang is occurring when Octave waits for gnuplot to respond to "print GPVAL_TERM"

Please run gnuplot and type "print GPVAL_TERM". What is the result ?

On MacOS I see the result below.


gnuplot> print GPVAL_TERM
aqua


Since you are running OpenBSD, I expect you'll see "x11" instead of "aqua". Perhaps you'll get some thing else?


Ben Abbott <bpabbott>
Group Member
Wed 22 Feb 2012 11:24:43 AM UTC, comment #7: 

This is still an issue with 3.6.1rc0 using gnuplot-4.4.3.

octave:1> plot([1 2 3])
<hangs...>

Edd Barrett <vext01>
Wed 23 Nov 2011 01:00:08 AM UTC, comment #6: 

I've changed the category to gnuplot.

Edd, What version of gnuplot do you have installed?

Have you looked at _gnuplot_get_var_.m to attempt to debug the problem?


Ben Abbott <bpabbott>
Group Member
Wed 09 Nov 2011 04:06:19 PM UTC, comment #5: 

Further findings:

Having found the octave debugger, i can tell you that the hang I am experiencing is reported to be:


octave:2> sombrero
^C
stopped in /usr/ports/pobj/octave-3.4.3/octave-3.4.3/scripts/plot/__gnuplot_get_var__.m at line 108
108:         if (isnumeric (str{end}) && (str{end} == -1))
debug> dbstack
stopped in:

  --> __gnuplot_get_var__ at line 108 [/usr/ports/pobj/octave-3.4.3/octave-3.4.3/scripts/plot/__gnuplot_get_var__.m]
         __go_draw_axes__ at line 40 [/usr/ports/pobj/octave-3.4.3/octave-3.4.3/scripts/plot/__go_draw_axes__.m]
       __go_draw_figure__ at line 173 [/usr/ports/pobj/octave-3.4.3/octave-3.4.3/scripts/plot/__go_draw_figure__.m]
      __gnuplot_drawnow__ at line 93 [/usr/ports/pobj/octave-3.4.3/octave-3.4.3/scripts/plot/__gnuplot_drawnow__.m]


I obtained this by pressing ctrl+c with debug_on_interrupt set. I did this a number of times (3 times, rebooting inbetween), incase this code is looping.

If I issue a 'dbcont' after interrupting, everything continues fine and the plot is drawn just fine.

The code of interest here is:

      ## Now read from fifo.
      reading = true;
      str = {};
      while (reading)
        str{end+1} = fgets (gpin);
        if (isnumeric (str{end}) && (str{end} == -1))
          reading = false;
          str = str(1:(end-1));
        endif
      endwhile


I actually believe that octave is stuck on the previous line:

        str{end+1} = fgets (gpin);


As an fgets would explain the read() we see in the ktrace output.

Looking at the code for fgets:

{
  static std::string who = "fgets";

  octave_value_list retval;

  retval(1) = 0.0;
  retval(0) = -1.0;

  int nargin = args.length ();

  if (nargin == 1 || nargin == 2)
    {
      octave_stream os = octave_stream_list::lookup (args(0), who);

      if (! error_state)
        {
          octave_value len_arg = (nargin == 2) ? args(1) : octave_value ();

          bool err = false;

          std::string tmp = os.gets (len_arg, err, who);

          if (! (error_state || err))
            {
              retval(1) = tmp.length ();
              retval(0) = tmp;
            }
        }
    }
  else
    print_usage ();

  return retval;
}


I was interested in seeing if the call to os.gets() ever returns. However, putting a 'std::cout()' either side of it seems to "fix" the issue altogether(!?*) but why? -- I will not settle with that as a fix; I still think this code is racing.

I was hoping the octave community would have commented by now. Can someone please lend a hand here?

Edd Barrett <vext01>
Wed 09 Nov 2011 09:51:47 AM UTC, comment #4: 

Further findings:

I have built the entirety of octave-3.4.3 with -O0 and the hang still happens, however, I notice only the first plot hangs; you can hit ctrl+c and try again and it will work; as will subsequent plots.

I think we have a race condition on our hands and building with -O0 has changed the timings of things. After you have hit ctrl+c on the first plot, the only way to reproduce the plot hang is to reboot (weird, yes). This is why I think it is a race condition.

Further inspection with ktrace (like strace) shows differing behavior with regards to a fifo in /tmp.

A failing plot looks like this:

  6129 octave   CALL  stat(0x7f4ae14c,0xcfbcb38c)
  6129 octave   NAMI  "/tmp/oct-lniATRYpU"
  6129 octave   STRU  struct stat {dev=1024, ino=2130838, mode=prw------- , nlink=1, uid=1000, gid=0, rdev=0, atime=1320826993.263457384, stime=1320826993.263457384, ctime=1320826993.263457384, size=0, blocks=0, blksize=16384, flags=0x0, gen=0x0 }
  6129 octave   RET   stat 0
  6129 octave   CALL  open(0x7f4ae14c,0<O_RDONLY>,<unused>0)
  6129 octave   NAMI  "/tmp/oct-lniATRYpU"
  6129 octave   RET   open 6
  6129 octave   CALL  fcntl(0x6,F_GETFL,0)
  6129 octave   RET   fcntl 0
  6129 octave   CALL  fcntl(0x6,F_SETFL,0x4<O_NONBLOCK>)
  6129 octave   RET   fcntl 0
  6129 octave   CALL  sigprocmask(SIG_BLOCK,0xffffffff)
  6129 octave   RET   sigprocmask 0
  6129 octave   CALL  mprotect(0x2853f000,0x19000,0x3<PROT_READ|PROT_WRITE>)
  6129 octave   RET   mprotect 0
  6129 octave   CALL  mprotect(0x2853f000,0x19000,0x1<PROT_READ>)
  6129 octave   RET   mprotect 0
  6129 octave   CALL  sigprocmask(SIG_SETMASK,0)
  6129 octave   RET   sigprocmask -65793/0xfffefeff
  6129 octave   CALL  sigprocmask(SIG_BLOCK,0xffffffff)
  6129 octave   RET   sigprocmask 0
  6129 octave   CALL  mprotect(0x2853f000,0x19000,0x3<PROT_READ|PROT_WRITE>)
  6129 octave   RET   mprotect 0
  6129 octave   CALL  mprotect(0x2853f000,0x19000,0x1<PROT_READ>)
  6129 octave   RET   mprotect 0
  6129 octave   CALL  sigprocmask(SIG_SETMASK,0)
  6129 octave   RET   sigprocmask -65793/0xfffefeff
  6129 octave   CALL  sigprocmask(SIG_BLOCK,0xffffffff)
  6129 octave   RET   sigprocmask 0
  6129 octave   CALL  mprotect(0x2853f000,0x19000,0x3<PROT_READ|PROT_WRITE>)
  6129 octave   RET   mprotect 0
  6129 octave   CALL  mprotect(0x2853f000,0x19000,0x1<PROT_READ>)
  6129 octave   RET   mprotect 0
  6129 octave   CALL  sigprocmask(SIG_SETMASK,0)
  6129 octave   RET   sigprocmask -65793/0xfffefeff
  6129 octave   CALL  sigprocmask(SIG_BLOCK,0xffffffff)
  6129 octave   RET   sigprocmask 0
  6129 octave   CALL  mprotect(0x2853f000,0x19000,0x3<PROT_READ|PROT_WRITE>)
  6129 octave   RET   mprotect 0
  6129 octave   CALL  mprotect(0x2853f000,0x19000,0x1<PROT_READ>)
  6129 octave   RET   mprotect 0
  6129 octave   CALL  sigprocmask(SIG_SETMASK,0)
  6129 octave   RET   sigprocmask -65793/0xfffefeff
  6129 octave   CALL  sigprocmask(SIG_BLOCK,0xffffffff)
  6129 octave   RET   sigprocmask 0
  6129 octave   CALL  mprotect(0x2853f000,0x19000,0x3<PROT_READ|PROT_WRITE>)
  6129 octave   RET   mprotect 0
  6129 octave   CALL  mprotect(0x2853f000,0x19000,0x1<PROT_READ>)
  6129 octave   RET   mprotect 0
  6129 octave   CALL  sigprocmask(SIG_SETMASK,0)
  6129 octave   RET   sigprocmask -65793/0xfffefeff
  6129 octave   CALL  sigprocmask(SIG_BLOCK,0xffffffff)
  6129 octave   RET   sigprocmask 0
  6129 octave   CALL  mprotect(0x2853f000,0x19000,0x3<PROT_READ|PROT_WRITE>)
  6129 octave   RET   mprotect 0
  6129 octave   CALL  mprotect(0x2853f000,0x19000,0x1<PROT_READ>)
  6129 octave   RET   mprotect 0
  6129 octave   CALL  sigprocmask(SIG_SETMASK,0)
  6129 octave   RET   sigprocmask -65793/0xfffefeff
  6129 octave   CALL  sigprocmask(SIG_BLOCK,0xffffffff)
  6129 octave   RET   sigprocmask 0
  6129 octave   CALL  mprotect(0x2853f000,0x19000,0x3<PROT_READ|PROT_WRITE>)
  6129 octave   RET   mprotect 0
  6129 octave   CALL  mprotect(0x2853f000,0x19000,0x1<PROT_READ>)
  6129 octave   RET   mprotect 0
  6129 octave   CALL  sigprocmask(SIG_SETMASK,0)
  6129 octave   RET   sigprocmask -65793/0xfffefeff
  6129 octave   CALL  sigprocmask(SIG_BLOCK,0xffffffff)
  6129 octave   RET   sigprocmask 0
  6129 octave   CALL  mprotect(0x2853f000,0x19000,0x3<PROT_READ|PROT_WRITE>)
  6129 octave   RET   mprotect 0
  6129 octave   CALL  mprotect(0x2853f000,0x19000,0x1<PROT_READ>)
  6129 octave   RET   mprotect 0
  6129 octave   CALL  sigprocmask(SIG_SETMASK,0)
  6129 octave   RET   sigprocmask -65793/0xfffefeff
  6129 octave   CALL  write(0x7,0x8508b000,0x3c)
  6129 octave   GIO   fd 7 wrote 60 bytes
       "
        if (exists("GPVAL_TERM")) print GPVAL_TERM; else print NaN
       "
  6129 octave   RET   write 60/0x3c
  6129 octave   CALL  write(0x7,0x8508b000,0xb)
  6129 octave   GIO   fd 7 wrote 11 bytes
       "set print;
       "
  6129 octave   RET   write 11/0xb
  6129 octave   CALL  mprotect(0x86556000,0x1000,0x3<PROT_READ|PROT_WRITE>)
  6129 octave   RET   mprotect 0
  6129 octave   CALL  mprotect(0x86556000,0x1000,0x1<PROT_READ>)
  6129 octave   RET   mprotect 0
  6129 octave   CALL  sigprocmask(SIG_BLOCK,0xffffffff)
  6129 octave   RET   sigprocmask 0
  6129 octave   CALL  mprotect(0x2853f000,0x19000,0x3<PROT_READ|PROT_WRITE>)
  6129 octave   RET   mprotect 0
  6129 octave   CALL  mprotect(0x2853f000,0x19000,0x1<PROT_READ>)
  6129 octave   RET   mprotect 0
  6129 octave   CALL  sigprocmask(SIG_SETMASK,0)
  6129 octave   RET   sigprocmask -65793/0xfffefeff
  6129 octave   CALL  sigprocmask(SIG_BLOCK,0xffffffff)
  6129 octave   RET   sigprocmask 0
  6129 octave   CALL  mprotect(0x2853f000,0x19000,0x3<PROT_READ|PROT_WRITE>)
  6129 octave   RET   mprotect 0
  6129 octave   CALL  mprotect(0x2853f000,0x19000,0x1<PROT_READ>)
  6129 octave   RET   mprotect 0
  6129 octave   CALL  sigprocmask(SIG_SETMASK,0)
  6129 octave   RET   sigprocmask -65793/0xfffefeff
  6129 octave   CALL  sigprocmask(SIG_BLOCK,0xffffffff)
  6129 octave   RET   sigprocmask 0
  6129 octave   CALL  mprotect(0x2853f000,0x19000,0x3<PROT_READ|PROT_WRITE>)
  6129 octave   RET   mprotect 0
  6129 octave   CALL  mprotect(0x2853f000,0x19000,0x1<PROT_READ>)
  6129 octave   RET   mprotect 0
  6129 octave   CALL  sigprocmask(SIG_SETMASK,0)
  6129 octave   RET   sigprocmask -65793/0xfffefeff
  6129 octave   CALL  sigprocmask(SIG_BLOCK,0xffffffff)
  6129 octave   RET   sigprocmask 0
  6129 octave   CALL  mprotect(0x2853f000,0x19000,0x3<PROT_READ|PROT_WRITE>)
  6129 octave   RET   mprotect 0
  6129 octave   CALL  mprotect(0x2853f000,0x19000,0x1<PROT_READ>)
  6129 octave   RET   mprotect 0
  6129 octave   CALL  sigprocmask(SIG_SETMASK,0)
  6129 octave   RET   sigprocmask -65793/0xfffefeff
  6129 octave   CALL  sigprocmask(SIG_BLOCK,0xffffffff)
  6129 octave   RET   sigprocmask 0
  6129 octave   CALL  mprotect(0x2853f000,0x19000,0x3<PROT_READ|PROT_WRITE>)
  6129 octave   RET   mprotect 0
  6129 octave   CALL  mprotect(0x2853f000,0x19000,0x1<PROT_READ>)
  6129 octave   RET   mprotect 0
  6129 octave   CALL  sigprocmask(SIG_SETMASK,0)
  6129 octave   RET   sigprocmask -65793/0xfffefeff
  6129 octave   CALL  fstat(0x6,0xcfbcb170)
  6129 octave   STRU  struct stat {dev=1024, ino=2130838, mode=prw------- , nlink=1, uid=1000, gid=0, rdev=0, atime=1320826993.263457384, stime=1320826993.263457384, ctime=1320826993.263457384, size=0, blocks=0, blksize=16384, flags=0x0, gen=0x0 }
  6129 octave   RET   fstat 0
  6129 octave   CALL  mprotect(0x88493000,0x1000,0x3<PROT_READ|PROT_WRITE>)
  6129 octave   RET   mprotect 0
  6129 octave   CALL  mprotect(0x88493000,0x1000,0x1<PROT_READ>)
  6129 octave   RET   mprotect 0
  6129 octave   CALL  read(0x6,0x87d51000,0x4000)
  6129 octave   GIO   fd 6 read 4 bytes
       "x11
       "
  6129 octave   RET   read 4
  6129 octave   CALL  read(0x6,0x87d51000,0x4000)
  6129 octave   RET   read -1 errno 35 Resource temporarily unavailable
  6129 octave   CALL  getsockopt(0x6,SOL_SOCKET,SO_RCVTIMEO,0xcfbcb1c0,0xcfbcb1c8)
  6129 octave   RET   getsockopt -1 errno 38 Socket operation on non-socket
  6129 octave   CALL  poll(0x7effd000,0x1,0)
  6129 octave   RET   poll 0
  6129 octave   CALL  poll(0x7effd000,0x2,0xffffffff)


(The poll is the hang, notice the failed read() syscall).

Whereas the same area of execution on a working plot looks like:

 28785 octave   CALL  stat(0x808e3e2c,0xcfbde0cc)
 28785 octave   NAMI  "/tmp/oct-uGOkjVPOj"
 28785 octave   STRU  struct stat {dev=1024, ino=2130838, mode=prw------- , nlink=1, uid=1000, gid=0, rdev=0, atime=1320830033.487728920, stime=1320830033.487728920, ctime=1320830033.487728920, size=0, blocks=0, blksize=16384, flags=0x0, gen=0x0 }
 28785 octave   RET   stat 0
 28785 octave   CALL  open(0x808e3e2c,0<O_RDONLY>,<unused>0)
 28785 octave   NAMI  "/tmp/oct-uGOkjVPOj"
 28785 octave   RET   open 6
 28785 octave   CALL  fcntl(0x6,F_GETFL,0)
 28785 octave   RET   fcntl 0
 28785 octave   CALL  fcntl(0x6,F_SETFL,0x4<O_NONBLOCK>)
 28785 octave   RET   fcntl 0
 28785 octave   CALL  sigprocmask(SIG_BLOCK,0xffffffff)
 28785 octave   RET   sigprocmask 0
 28785 octave   CALL  mprotect(0x2f797000,0x19000,0x3<PROT_READ|PROT_WRITE>)
 28785 octave   RET   mprotect 0
 28785 octave   CALL  mprotect(0x2f797000,0x19000,0x1<PROT_READ>)
 28785 octave   RET   mprotect 0
 28785 octave   CALL  sigprocmask(SIG_SETMASK,0)
 28785 octave   RET   sigprocmask -65793/0xfffefeff
 28785 octave   CALL  sigprocmask(SIG_BLOCK,0xffffffff)
 28785 octave   RET   sigprocmask 0
 28785 octave   CALL  mprotect(0x2f797000,0x19000,0x3<PROT_READ|PROT_WRITE>)
 28785 octave   RET   mprotect 0
 28785 octave   CALL  mprotect(0x2f797000,0x19000,0x1<PROT_READ>)
 28785 octave   RET   mprotect 0
 28785 octave   CALL  sigprocmask(SIG_SETMASK,0)
 28785 octave   RET   sigprocmask -65793/0xfffefeff
 28785 octave   CALL  sigprocmask(SIG_BLOCK,0xffffffff)
 28785 octave   RET   sigprocmask 0
 28785 octave   CALL  mprotect(0x2f797000,0x19000,0x3<PROT_READ|PROT_WRITE>)
 28785 octave   RET   mprotect 0
 28785 octave   CALL  mprotect(0x2f797000,0x19000,0x1<PROT_READ>)
 28785 octave   RET   mprotect 0
 28785 octave   CALL  sigprocmask(SIG_SETMASK,0)
 28785 octave   RET   sigprocmask -65793/0xfffefeff
 28785 octave   CALL  sigprocmask(SIG_BLOCK,0xffffffff)
 28785 octave   RET   sigprocmask 0
 28785 octave   CALL  mprotect(0x2f797000,0x19000,0x3<PROT_READ|PROT_WRITE>)
 28785 octave   RET   mprotect 0
 28785 octave   CALL  mprotect(0x2f797000,0x19000,0x1<PROT_READ>)
 28785 octave   RET   mprotect 0
 28785 octave   CALL  sigprocmask(SIG_SETMASK,0)
 28785 octave   RET   sigprocmask -65793/0xfffefeff
 28785 octave   CALL  sigprocmask(SIG_BLOCK,0xffffffff)
 28785 octave   RET   sigprocmask 0
 28785 octave   CALL  mprotect(0x2f797000,0x19000,0x3<PROT_READ|PROT_WRITE>)
 28785 octave   RET   mprotect 0
 28785 octave   CALL  mprotect(0x2f797000,0x19000,0x1<PROT_READ>)
 28785 octave   RET   mprotect 0
 28785 octave   CALL  sigprocmask(SIG_SETMASK,0)
 28785 octave   RET   sigprocmask -65793/0xfffefeff
 28785 octave   CALL  sigprocmask(SIG_BLOCK,0xffffffff)
 28785 octave   RET   sigprocmask 0
 28785 octave   CALL  mprotect(0x2f797000,0x19000,0x3<PROT_READ|PROT_WRITE>)
 28785 octave   RET   mprotect 0
 28785 octave   CALL  mprotect(0x2f797000,0x19000,0x1<PROT_READ>)
 28785 octave   RET   mprotect 0
 28785 octave   CALL  sigprocmask(SIG_SETMASK,0)
 28785 octave   RET   sigprocmask -65793/0xfffefeff
 28785 octave   CALL  sigprocmask(SIG_BLOCK,0xffffffff)
 28785 octave   RET   sigprocmask 0
 28785 octave   CALL  mprotect(0x2f797000,0x19000,0x3<PROT_READ|PROT_WRITE>)
 28785 octave   RET   mprotect 0
 28785 octave   CALL  mprotect(0x2f797000,0x19000,0x1<PROT_READ>)
 28785 octave   RET   mprotect 0
 28785 octave   CALL  sigprocmask(SIG_SETMASK,0)
 28785 octave   RET   sigprocmask -65793/0xfffefeff
 28785 octave   CALL  sigprocmask(SIG_BLOCK,0xffffffff)
 28785 octave   RET   sigprocmask 0
 28785 octave   CALL  mprotect(0x2f797000,0x19000,0x3<PROT_READ|PROT_WRITE>)
 28785 octave   RET   mprotect 0
 28785 octave   CALL  mprotect(0x2f797000,0x19000,0x1<PROT_READ>)
 28785 octave   RET   mprotect 0
 28785 octave   CALL  sigprocmask(SIG_SETMASK,0)
 28785 octave   RET   sigprocmask -65793/0xfffefeff
 28785 octave   CALL  getpid()
 28785 octave   RET   getpid 28785/0x7071
 28785 octave   CALL  write(0x7,0x86c94000,0x3c)
 28785 octave   GIO   fd 7 wrote 60 bytes
       "
        if (exists("GPVAL_TERM")) print GPVAL_TERM; else print NaN
       "
 28785 octave   RET   write 60/0x3c
 28785 octave   CALL  write(0x7,0x86c94000,0xb)
 28785 octave   GIO   fd 7 wrote 11 bytes
       "set print;
       "
 28785 octave   RET   write 11/0xb
 28785 octave   CALL  mprotect(0x7fcb7000,0x1000,0x3<PROT_READ|PROT_WRITE>)
 28785 octave   RET   mprotect 0
 28785 octave   CALL  mprotect(0x7fcb7000,0x1000,0x1<PROT_READ>)
 28785 octave   RET   mprotect 0
 28785 octave   CALL  sigprocmask(SIG_BLOCK,0xffffffff)
 28785 octave   RET   sigprocmask 0
 28785 octave   CALL  mprotect(0x2f797000,0x19000,0x3<PROT_READ|PROT_WRITE>)
 28785 octave   RET   mprotect 0
 28785 octave   CALL  mprotect(0x2f797000,0x19000,0x1<PROT_READ>)
 28785 octave   RET   mprotect 0
 28785 octave   CALL  sigprocmask(SIG_SETMASK,0)
 28785 octave   RET   sigprocmask -65793/0xfffefeff
 28785 octave   CALL  sigprocmask(SIG_BLOCK,0xffffffff)
 28785 octave   RET   sigprocmask 0
 28785 octave   CALL  mprotect(0x2f797000,0x19000,0x3<PROT_READ|PROT_WRITE>)
 28785 octave   RET   mprotect 0
 28785 octave   CALL  mprotect(0x2f797000,0x19000,0x1<PROT_READ>)
 28785 octave   RET   mprotect 0
 28785 octave   CALL  sigprocmask(SIG_SETMASK,0)
 28785 octave   RET   sigprocmask -65793/0xfffefeff
 28785 octave   CALL  sigprocmask(SIG_BLOCK,0xffffffff)
 28785 octave   RET   sigprocmask 0
 28785 octave   CALL  mprotect(0x2f797000,0x19000,0x3<PROT_READ|PROT_WRITE>)
 28785 octave   RET   mprotect 0
 28785 octave   CALL  mprotect(0x2f797000,0x19000,0x1<PROT_READ>)
 28785 octave   RET   mprotect 0
 28785 octave   CALL  sigprocmask(SIG_SETMASK,0)
 28785 octave   RET   sigprocmask -65793/0xfffefeff
 28785 octave   CALL  sigprocmask(SIG_BLOCK,0xffffffff)
 28785 octave   RET   sigprocmask 0
 28785 octave   CALL  mprotect(0x2f797000,0x19000,0x3<PROT_READ|PROT_WRITE>)
 28785 octave   RET   mprotect 0
 28785 octave   CALL  mprotect(0x2f797000,0x19000,0x1<PROT_READ>)
 28785 octave   RET   mprotect 0
 28785 octave   CALL  sigprocmask(SIG_SETMASK,0)
 28785 octave   RET   sigprocmask -65793/0xfffefeff
 28785 octave   CALL  sigprocmask(SIG_BLOCK,0xffffffff)
 28785 octave   RET   sigprocmask 0
 28785 octave   CALL  mprotect(0x2f797000,0x19000,0x3<PROT_READ|PROT_WRITE>)
 28785 octave   RET   mprotect 0
 28785 octave   CALL  mprotect(0x2f797000,0x19000,0x1<PROT_READ>)
 28785 octave   RET   mprotect 0
 28785 octave   CALL  sigprocmask(SIG_SETMASK,0)
 28785 octave   RET   sigprocmask -65793/0xfffefeff
 28785 octave   CALL  fstat(0x6,0xcfbddeb0)
 28785 octave   STRU  struct stat {dev=1024, ino=2130838, mode=prw------- , nlink=1, uid=1000, gid=0, rdev=0, atime=1320830033.487728920, stime=1320830033.487728920, ctime=1320830033.487728920, size=0, blocks=0, blksize=16384, flags=0x0, gen=0x0 }
 28785 octave   RET   fstat 0
 28785 octave   CALL  mprotect(0x7fef4000,0x1000,0x3<PROT_READ|PROT_WRITE>)
 28785 octave   RET   mprotect 0
 28785 octave   CALL  mprotect(0x7fef4000,0x1000,0x1<PROT_READ>)
 28785 octave   RET   mprotect 0
 28785 octave   CALL  read(0x6,0x86f24000,0x4000)
 28785 octave   GIO   fd 6 read 4 bytes
       "x11
       "
 28785 octave   RET   read 4
 28785 octave   CALL  read(0x6,0x86f24000,0x4000)
 28785 octave   RET   read 0
 28785 octave   CALL  sigprocmask(SIG_BLOCK,0xffffffff)
 28785 octave   RET   sigprocmask 0
 28785 octave   CALL  mprotect(0x2f797000,0x19000,0x3<PROT_READ|PROT_WRITE>)
 28785 octave   RET   mprotect 0


(Notice that read DID NOT fail this time)

I suspscted the gnulib::mkfifo() at first, but if i remove the gnulib prefix, so as to use openbsd's implementation, the same happens.

Looks like a race condition to me (right?)

I am out of time for now, but my question now is, do we know where in the code this fifo is being made? Does gnuplot output to a pipe and octave picks it up? Is it the case that octave is reading from the pipe before gnuplot is done?

Comments and ideas welcome.

Cheers

Edd Barrett <vext01>
Mon 07 Nov 2011 12:04:53 PM UTC, comment #3: 

Hi Ben,

I am an OpenBSD developer attempting to bring our old package up to date.

I tried putting some debug std::couting in the gnuplot class and oddly got the same error as running with gdb. This could be a compiler bug? I will try turning the optimiser off perhaps?

Edd Barrett <vext01>
Sun 06 Nov 2011 01:46:41 AM UTC, comment #2: 

Are you building Octave yourself, or using your package manager?

Ben Abbott <bpabbott>
Group Member
Sat 05 Nov 2011 12:08:37 PM UTC, comment #1: 

Enabling fltk for native graphics does not seem to help either.

Edd Barrett <vext01>
Sat 05 Nov 2011 01:39:15 AM UTC, original submission:  

Hi,

On OpenBSD plotting hangs:


octave:1> a = [ 1 2 3; 4 5 6]
a =

   1   2   3
   4   5   6

octave:2> plot(a)
(nothing, hangs...)


If I set the LD_LIBRARY_PATH manually and use gdb (as opposed to using run_octave), something different happens:


octave:1> a = [1 2 3]
a =

   1   2   3

octave:2> plot(a)
error: feval: function `unimplemented' not found


Not sure how to go about this...

Edd Barrett <vext01>

 

(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 (Posted a comment)
  • -email is unavailable- added by bpabbott (Posted a comment)
  • -email is unavailable- added by vext01 (Submitted the item)
  • -email is unavailable- added by vext01
  •  

    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 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-08-08 mtmiller StatusNone Fixed
        Open/ClosedOpen Closed
    2011-11-23 bpabbott CategoryPlotting Plotting with gnuplot
    2011-11-05 vext01 Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code