bugGNU Octave - Bugs: bug #41619, parcellfun can cause octave to...

 
 

bug #41619: parcellfun can cause octave to hang indefinitely

Submitter:  None
Submitted:  Mon 17 Feb 2014 08:30:26 AM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Segfault, Bus Error, etc.
Status:  Fixed Assigned to:  None
Originator Name:  Florian Kühnlenz Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 3.6.4
Operating System:  * GNU/Linux Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 28 Mar 2016 10:21:33 PM UTC, comment #2: 

Sorry. I was not aware of this report until a few days ago. (Maybe I didn't look at older reports when I thought I already searched through them.) I know it's not nice if someone makes an effort to submit a fix and it is never even reviewed.

In the meantime, there was a changeset (41d4abdd1ac9) which addresses (differently than you), among others just the problem you described. I think this is fixed now.

As for the later report, I can't reproduce it, neither with the current parcellfun nor with that from February 2014, neither with 15, nor 32, nor 7 (this is 2 * ncores - 1) processes.

Olaf Till <i7tiol>
Group Member
Thu 15 Jan 2015 07:24:45 PM UTC, comment #1: 

The following code makes my octave-3.8.2 to hang always similarly as you describe:
    octave:2> s=parcellfun(15,@sin,{0,pi,1,NA},"UniformOutput", false)

BTW, I have 8 cores. Putting a larger number in NPROC seems to help to reproduce this issue.

Your version seems to handle this better, but...
    octave:5> s=parcellfun2(15,@sin,{0,pi,1,NA},"UniformOutput",     false);
    parcellfun: 0/4 jobs done
    parcellfun: 11979 ready
    parcellfun: 1/4 jobs done
    parcellfun: 1/4 jobs done
    parcellfun: 1/4 jobs done
    parcellfun: 11979 ready
    parcellfun: send terminate to 11979
    parcellfun: 2/4 jobs done
    parcellfun: 11981 ready
    parcellfun: send terminate to 11981
    parcellfun: 3/4 jobs done
    parcellfun: 11980 ready
    parcellfun: send terminate to 11980
    parcellfun: 4/4 jobs done
    error: fclose: invalid stream number = 40

jose <josombio>
Mon 17 Feb 2014 08:30:26 AM UTC, original submission:  

I had some troubles with octave hanging (never finishing its script) on some occasions. It only occurred on every 1000-5000 start of octave and was not reproducible. It turned out that is was a logic failure in parcellfun.

Sometimes one of the forked processes took so long to start that the first process was handed two jobs and the slow starting process never got any job. This in turn results in the slow starting process never getting send a 0 signal to spin down. Which caused the main thread to hang indefinitely on waitpid.

I will attach my fixed version, but I assume you guys may can come up with a better solution than just adding another array to keep track of the processes that got send a spin down signal.


Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #30585:  parcellfun.m added by None (13KiB - application/octet-stream)

 

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 i7tiol (Posted a comment)
  • -email is unavailable- added by josombio (Posted a comment)
  • -email is unavailable- added by huntj
  • -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 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-03-28 mtmiller StatusNone Fixed
        Open/ClosedOpen Closed
    2014-03-01 huntj Carbon-Copy- Added huntj
    2014-02-17 None Attached File- Added parcellfun.m, #30585

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code