On Fri, Oct 26, 2012 at 12:33 PM, Pavel Panchekha <[email protected]> wrote: > I have a Sage package/module that does parallelism by forking and > communicating over pipes. This of course forks the whole Sage executable. > > This seems to sometimes (but rarely) result in any of a large number of > problems: double-frees, corrupted internal glibc structures, hangs, null > pointers in absurd places, and so on. > > Is this a known bug? Is this something that should work? Is forking Sage > just impossible to support?
I'd love to see an example of any of the above, since I've caused Sage to fork millions of times in various situations (even in the last 24 hours!) and never seen these problems. There are caveats though, e.g., make sure that all pseudotty interfaces are closed after forking -- there are @parallel and @fork decorators that do this. Also, I think I've maybe seen situations where causing errors in maxima via libecl leads to corruption of Maxima for the parent process (though maybe I was just confused and this really involved pseudotty's). Another possibility is that all of your problems: double frees, corrupted internal glibc structures, etc., are the results of bugs in code, and by running code in parallel you're exercising it a lot more. -- William > > -- > You received this message because you are subscribed to the Google Groups > "sage-devel" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > Visit this group at http://groups.google.com/group/sage-devel?hl=en. > > -- William Stein Professor of Mathematics University of Washington http://wstein.org -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sage-devel?hl=en.
