Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

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:


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
Replies are listed 'Best First'.
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
      sub download_pari { my ($srcfile, $force) = (shift, shift); my $host = ''; my $dir = '/pub/pari/unix/'; my($ftp, $ua, $base_url); ...
      There is a windows build at 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?

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2015-11-25 19:13 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (686 votes), past polls