bugGNU Octave - Bugs: bug #49748, pkg and edit fail with...

 
 

bug #49748: pkg and edit fail with "unable to start subprocess"

Submitter:  Lachlan Andrew <lachlan>
Submitted:  Fri 02 Dec 2016 04:12:00 AM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Need Info Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 10 Mar 2019 06:45:16 PM UTC, comment #4: 

No response, asumming this has been fixed in the latest release.  Closing report.

Rik <rik5>
Group administrator
Sun 03 Mar 2019 06:49:27 AM UTC, comment #3: 

Please try with the latest stable release which is 5.1.0.  The problem is likely to have been fixed.

Rik <rik5>
Group administrator
Fri 02 Dec 2016 10:14:44 AM UTC, comment #2: 

@Lachlan: Good to see you back on Octave.  It seems like only the last circumstance would be an actual Octave problem to be resolved.  If it was something transient with the OS then there isn't much we can do.

The code in question is in toplev.cc:


// Execute a shell command.

static octave_value_list
run_command_and_return_output (const std::string& cmd_str)
{
  octave_value_list retval;
  octave::unwind_protect frame;

  iprocstream *cmd = new iprocstream (cmd_str.c_str ());

  frame.add_delete (cmd);
  frame.add_fcn (octave::child_list::remove, cmd->pid ());

  if (! *cmd)
    error ("system: unable to start subprocess for '%s'", cmd_str.c_str ());


If you do get it in to an error state it might be useful to see if you can run any sort of shell command.


[a,b] = system ('ls /')



Rik <rik5>
Group administrator
Fri 02 Dec 2016 08:55:08 AM UTC, comment #1: 

This is odd.  Within the same session of Octave, it spontaneously started working.  It may be that (a) the OS was actually stopping the subprocess from starting for some reason (b) some initialisation occurred between the first invocation and the second, or (c) Octave had got into a transient bad state (I had just failed to load a Matlab v7.4 file).


Lachlan Andrew <lachlan>
Fri 02 Dec 2016 04:12:00 AM UTC, original submission:  

With development version 1d242ae72240, I can't install packages or edit core command scripts.  Both complain "unable to start subprocess".

This is on an Ubuntu 16.04 VM on a Windows 10 host.  (This is a new install of Octave, and so may by because I don't have some config info.)


>> pkg install -forge statistics
warning: load_path: scripts: No such file or directory
system: unable to start subprocess for 'gzip -d -c "/media/sf_Lachlan/Dropbox/rsrch/power/UnitedEnergy/code/statistics-1.3.0.tar.gz" | tar xf - 2>&1'
error: called from
    unpack at line 245 column 20
    untar at line 47 column 5
    install at line 81 column 9
    pkg at line 394 column 9
>> which pkg
'pkg' is a function from the file /usr/local/share/octave/4.3.0+/m/pkg/pkg.m
>> edit pkg
error: system: unable to start subprocess for 'cp -r "/usr/local/share/octave/4.3.0+/m/pkg/pkg.m" "/home/lachlan/octave/pkg.m"'
error: called from
    copyfile at line 123 column 14
    edit at line 321 column 23
stopped in /usr/local/share/octave/4.3.0+/m/miscellaneous/copyfile.m at line 123
123:     [err, msg] = system (sprintf ('%s %s"%s"', cmd, p1, p2));


Lachlan Andrew <lachlan>

 

(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 rik5 (Posted a comment)
  • -email is unavailable- added by lachlan (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
    2019-03-10 rik5 Open/ClosedOpen Closed
    2019-03-03 rik5 StatusNone Need Info

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code