Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Window + fork + Math::Pari = pain

by bsb (Priest)
on Mar 06, 2007 at 23:00 UTC ( #603528=perlquestion: print w/ replies, xml ) Need Help??
bsb has asked for the wisdom of the Perl Monks concerning the following question:

Hello,

I've reported a bug in RT with Crypt::Random but since perl is aborting, maybe I should report it somewhere else. RT#25309

What do you think?

update: Math::Pari seems to be the problem:

perl -MMath::Pari -e "fork"
Old title: Window + fork + Crypt::Random = pain

Comment on Window + fork + Math::Pari = pain
Download Code
Re: Window + fork + Crypt::Random = pain
by ikegami (Pope) on Mar 07, 2007 at 01:45 UTC

    fork doesn't really have anything to do with it. It's about threading. Keep in mind that fork creates a new *thread* in Windows, not a new *process*. The problem can be triggered more directly using:

    perl -MMath::Pari -Mthreads -e "threads->create(sub{})->join();"

    It appears that Math::Pari is not thread-safe.

      I'm using the Math::Pari ppm but it's build process seems to only use the unix source PariBuild.pm
      sub download_pari { my ($srcfile, $force) = (shift, shift); my $host = 'megrez.math.u-bordeaux.fr'; my $dir = '/pub/pari/unix/'; my($ftp, $ua, $base_url); ...
      There is a windows build at ftp://megrez.math.u-bordeaux.fr/pub/pari/windows/ which may avoid the problem although I haven't yet tried to use it.

      Thanks for your reply

        If the module isn't thread safe, a special windows build wouldn't avoid the problem.
      That also segfaults in linux.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://603528]
Approved by GrandFather
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (6)
As of 2014-07-12 05:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (238 votes), past polls