Skip Menu |
 

This queue is for tickets about the Perl-Dist-Strawberry CPAN distribution.

Report information
The Basics
Id: 117774
Status: open
Priority: 0/
Queue: Perl-Dist-Strawberry

People
Owner: Nobody in particular
Requestors: bots [...] cryptoguru.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Crashes - probably because of Parallel::ForkManager
Date: Sun, 11 Sep 2016 10:42:55 +0200
To: bug-Perl-Dist-Strawberry [...] rt.cpan.org
From: Rico <bots [...] cryptoguru.org>
Download (untitled) / with headers
text/plain 781b
Hi, I have a small project to find Bitcoin collisions -> http://lbc.cryptoguru.org:5000/ Because - unfortunately - there are Windows users, I decided to offer a Windows client too: http://lbc.cryptoguru.org:5000/download In the readme I suggest people install Strawberry Perl. Unfortunately, the Windows clients are unstable as hell. I get reports about "Free to wrong pool xxxxx not yyyyy during global destruction." The errors occur not deterministic, not always, but way too often. A typical screenshot: http://62.146.128.45/download/lbc_error_win.jpg Of course, the linux clients work like a charm. Maybe it's not a bug in Strawberry, but in Parallel::ForkManager, but in my windows client it seems to get triggered easily in the Strawberry environment. -- Rico
Subject: Re: [rt.cpan.org #117774] Crashes - probably because of Parallel::ForkManager
Date: Sun, 18 Sep 2016 16:29:25 +0200
To: bug-Perl-Dist-Strawberry [...] rt.cpan.org
From: kmx <kmx [...] volny.cz>
Download (untitled) / with headers
text/plain 2.6k
On 11.09.2016 10:43, bots@cryptoguru.org via RT wrote: Show quoted text
> Hi, > > I have a small project to find Bitcoin collisions -> > http://lbc.cryptoguru.org:5000/ > Because - unfortunately - there are Windows users, I decided to offer a > Windows > client too: http://lbc.cryptoguru.org:5000/download > > In the readme I suggest people install Strawberry Perl. Unfortunately, > the Windows > clients are unstable as hell. I get reports about > > "Free to wrong pool xxxxx not yyyyy during global destruction." > > The errors occur not deterministic, not always, but way too often. > > A typical screenshot: > http://62.146.128.45/download/lbc_error_win.jpg > > > Of course, the linux clients work like a charm. Maybe it's not a bug in > Strawberry, but in Parallel::ForkManager, but in my windows client it > seems to get triggered easily in the Strawberry environment.
Hello, TL;DR I am afraid we cannot fix your troubles on strawberry perl side I have not investigated your actual package but "fork" is known troublemaker on MS Windows. You maybe know that MS Windows has no fork() syscall (or even anything close to that). The perl decided to handle this by implementing so called "fork-emulation" on MS Windows. See http://perldoc.perl.org/functions/fork.html - quote: On some platforms such as Windows, where the fork(2) system call is not available, Perl can be built to emulate fork in the Perl interpreter. The emulation is designed, at the level of the Perl program, to be as compatible as possible with the "Unix" fork(2). However it has limitations that have to be considered in code intended to be portable. See perlfork for more details. For perlfork see http://perldoc.perl.org/perlfork.html Which means that perl's fork() function does exist on MS Windows but is not a real fork as you know it from UNIX world. In fact it is a emulation via threads. In practice perl's implementation of emulated fork works in simple scenarios, however, your use case seems to no be the case. If you experience a crash with emulated fork (which technically means Perl's threads) it is very likely that you are using some of the module which is not thread-safe (or you are not using it in thread-safe manners). There might be also other gotchas like signals which are also emulated on MS Windows, but in this case it is mostly not about crashing but hanging up. As I have mentioned earlier I am afraid I cannot help you from strawberry perl point of view. You can either: 1/ try to use perl's fork() in as simple way as possible and hope you will not hit MS Win fork-emulation limits or: 2/ consider using https://metacpan.org/pod/threads -- kmx
Subject: Re: [rt.cpan.org #117774] Crashes - probably because of Parallel::ForkManager
Date: Sun, 18 Sep 2016 18:18:15 +0200
To: bug-Perl-Dist-Strawberry [...] rt.cpan.org
From: Rico <bots [...] cryptoguru.org>
Download (untitled) / with headers
text/plain 389b
Show quoted text
> > I have not investigated your actual package but "fork" is known > troublemaker on MS Windows.
I was able to solve the problem. In my case, the real culprit was Term::ReadKey, which is not thread-safe. So on Windows, in combination with Parallel::ForkManager (or any fork - I guess). T::R crashes badly. Solution was to remove Term::ReadKeys from the code when on Win32 -- Rico
Subject: Re: [rt.cpan.org #117774] Crashes - probably because of Parallel::ForkManager
Date: Sun, 18 Sep 2016 19:57:27 +0200
To: bug-Perl-Dist-Strawberry [...] rt.cpan.org
From: kmx <kmx [...] volny.cz>
Download (untitled) / with headers
text/plain 467b
On 18.09.2016 18:18, bots@cryptoguru.org via RT wrote: Show quoted text
>
>> I have not investigated your actual package but "fork" is known >> troublemaker on MS Windows.
> I was able to solve the problem. In my case, the real culprit was > Term::ReadKey, which is not thread-safe. > > So on Windows, in combination with Parallel::ForkManager (or any fork > - I guess). T::R crashes badly. > > Solution was to remove Term::ReadKeys from the code when on Win32
That's great! -- kmx


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.