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