Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Including Chart::GGPlot conflicts with Parallel::ForkManager #29

Open
ryan-preble opened this issue Feb 10, 2023 · 1 comment
Open

Including Chart::GGPlot conflicts with Parallel::ForkManager #29

ryan-preble opened this issue Feb 10, 2023 · 1 comment

Comments

@ryan-preble
Copy link

I am currently running Strawberry Perl 5.32.1 on Windows 11 22H2. I am writing scripts to do some bulk data processing which necessitates parallelism. I have discovered that including Chart::GGPlot and any module in Parallel causes failures in forking. The issue is simple to replicate. The following code fails to run:

`use Parallel::ForkManager;
use Chart::GGPlot;
use Autoloader;

my $pm = Parallel::ForkManager->new(3);

$pm->run_on_finish(
sub {
my ($pid, $exit_code, $ident, $exit_signal, $core_dump, $return_ref) = @_;
my $returned = ${$return_ref};
print "Child with ", $returned->{"filename"}, " finished.\n";
}
);

LOOP:
foreach my $file (@argv) {
my $pid = $pm->start and next LOOP;
print "Starting with $file \n";
my $return_data = {};
$return_data->{"filename"} = $file;
$pm->finish(0, $return_data);
}
$pm->wait_all_children;

print "Is this gonna work???\n";`

Note that no error is immediately thrown, and the code simply terminates early. However, commenting out the usage of Chart::GGPlot allows the code to execute to completion. I can also try to fish out error messages if that would be helpful.
Thank you!

@iynehz
Copy link
Owner

iynehz commented May 15, 2023

I've narrowed it down to autobox which is used by Data::Frame. Raised chocolateboy/autobox#16 and dluxhu/perl-parallel-forkmanager#38

Also confirmed it's good on Linux.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants