#9946: Parallel build of Singular 3-1-1-4-package fails in other cases
------------------------+---------------------------------------------------
   Reporter:  mpatel    |       Owner:  tbd     
       Type:  defect    |      Status:  new     
   Priority:  blocker   |   Milestone:  sage-4.6
  Component:  packages  |    Keywords:          
     Author:            |    Upstream:  N/A     
   Reviewer:            |      Merged:          
Work_issues:            |  
------------------------+---------------------------------------------------

Comment(by drkirkby):

 Replying to [comment:5 leif]:
 > Patch again looks reasonable.
 >
 > I only wonder how often we'll again have to create a new Singular spkg
 for almost the "same" reason... ;-)

 Yes, it's a bit worrying.

 > Funny that the new race condition showed up with just ''two'' {{{make}}}
 jobs, after so much excessive testing by Dave and others.

 I expect it depends on very much on the time a compiler takes to compile
 code and for the linker to link it. On any one system, if file {{{foo.c}}}
 takes longer to compile than file {{{foobar.c}}} then that's likely to be
 the same irrespective of the system load.

 I was wondering about the possibility of using a wrapper script for gcc,
 such that there was a random delay between 0 and 50 ms, before gcc
 actually started compiling. The {{{nanosleep}}} function should provide
 that possibility. Then implement something similar for the linker so there
 was a random delay before it started linking. Of course that would slow
 the build process, but would probably have a higher probability of
 inducing build failures.

 One would need to think carefully about how to seed the random number
 generators then. Probably using {{{/dev/random}}} would be best.

 It would be some effort to write the code for this, but once written it
 should make detection of race conditions much easier for any bit of Sage.

 Another idea, which '''may''' help would be to randomly change the number
 of processors online for those of us with multi-processor machines. I'm
 less certain about whether that would be useful, though it be be very much
 easier to implement. Although this machine is only quad core, it's
 hyperthreaded, so I could have from one to eight threads active at any one
 time.

 I suspect a search of Google would find other similar (but hopefully
 better) methods of inducing effects that are likely to uncover race
 conditions.

 Dave

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9946#comment:6>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to