Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

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

Replies are listed 'Best First'.
Re: Window + fork + Crypt::Random = pain
by ikegami (Patriarch) 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
Domain Nodelet?
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 browsing the Monastery: (3)
As of 2023-06-08 08:43 GMT
Find Nodes?
    Voting Booth?
    How often do you go to conferences?

    Results (29 votes). Check out past polls.