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

 
 

bug #41619: parcellfun can cause octave to hang indefinitely

Submitted by:  None
Submitted on:  Mon 17 Feb 2014 08:30:26 AM UTC  
 
Category: Octave Forge PackageSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Segfault, Bus Error, etc.
Status: FixedAssigned to: None
Originator Name: Florian KühnlenzOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 3.6.4
Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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>
Project 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 File(s):
   
   
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
  • -unavailable- added by mtmiller (Updated the item)
  • -unavailable- added by i7tiol (Posted a comment)
  • -unavailable- added by josombio (Posted a comment)
  • -unavailable- added by huntj
  • -unavailable- added by None (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 28 Mar 2016 10:22:52 PM UTCmtmillerStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Sat 01 Mar 2014 10:56:45 PM UTChuntjCarbon-Copy-=>Added huntj
    Mon 17 Feb 2014 08:30:26 AM UTCNoneAttached File-=>Added parcellfun.m, #30585

    Back to the top


    Powered by Savane 3.1-cleanup1