Skip Menu |

This queue is for tickets about the indirect CPAN distribution.

Report information
The Basics
Id: 102321
Status: open
Priority: 0/
Queue: indirect

People
Owner: Nobody in particular
Requestors: MITHALDU [...] cpan.org
Cc:
AdminCc:

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



Subject: random crashes on newer strawberry perls
Moving discussion to ticket: Le 23/02/2015 18:43, Christian Walde a écrit : Show quoted text
> We've recently been puzzling over perl crashes on windows, that might > have to do with indirect.pm. They can sometimes be reproduced (at least > under Win7-64) with this package: > > http://strawberryperl.com/package/kmx/tmp-for-mithaldu/ (includes the > appropiate gdb and other pieces) > > By running the portable batch, and doing these steps: > > run portableshell.bat > cd Microidium > set PERL_STRICTURES_EXTRA=1 > perl bin\microidium_server > > Note that this is a heisenbug in the purest sense. Sometimes it occurs, > sometimes it doesn't, and so far trying to observe the bug more directly > i.e. by adding print statements or running the code with gdb seems to > make the crashes go away. > > The only decisive difference we've been able to identify so far is that > these crashes happen on Strawberry 5.18+, which has a different gcc than > its predecessors.
I've also got to add that a different, more reliable way of reproducing is to replae the last step above with: cpan shell test Moo Vincent's first reply was: Show quoted text
> Try to replace the two occurrences of SvPV_const() in indirect_find() by > SvPV_force(). This may cause some const related compiler warnings, > ignore them.
I tried that, and it resulted in the tests falling over completely with lots of errors like this: Modification of a read-only value attempted at (eval 8) line 3. https://gist.github.com/wchristian/0f18887135396ae71558
Show quoted text
> Vincent's first reply was: >
> > Try to replace the two occurrences of SvPV_const() in indirect_find() > > by > > SvPV_force(). This may cause some const related compiler warnings, > > ignore them.
> > I tried that, and it resulted in the tests falling over completely > with lots of errors like this: > > Modification of a read-only value attempted at (eval 8) line 3. > > https://gist.github.com/wchristian/0f18887135396ae71558
Ok, then what happens if you just change the first one to SvPV_force? Patch attached (against git HEAD, but it should apply to the latest release as well).
Subject: indirect-force.patch
--- a/indirect.xs +++ b/indirect.xs @@ -572,7 +572,7 @@ STATIC int indirect_find(pTHX_ SV *name_sv, const char *line_bufptr, STRLEN *nam const char *line, *line_end; const char *p; - line = SvPV_const(PL_linestr, line_len); + line = SvPV_force(PL_linestr, line_len); line_end = line + line_len; name = SvPV_const(name_sv, name_len);
Applying only that patch makes the indirect.pm tests pass, and makes it installable, however test Moo still crashes on random tests.
Le Jeu 26 Fév 2015 09:14:01, MITHALDU a écrit : Show quoted text
> Applying only that patch makes the indirect.pm tests pass, and makes > it installable, however test Moo still crashes on random tests.
Then I don't know. Unless you provide me with a reduced test case and/or access to a problematic platform, I'm afraid I cannot do much about it. Vincent
Reduced test case is very difficult, since any attempt to reduce the complexity makes the problem appear less often. I'd be fine with giving you VNC or RDP access to my Win7 laptop in Hannover. Would that be good for you? We could coordinate via Skype or IRC on that.
On my side indirect and Moo installed without issues, but using indirect produce random crashes in different places. Windows 8.1 x64, strawberry perl 5.20.2 x64.
On Thu Apr 02 17:05:03 2015, ZDM wrote: Show quoted text
> On my side indirect and Moo installed without issues, but using > indirect produce random crashes in different places. > > Windows 8.1 x64, strawberry perl 5.20.2 x64.
And under strawberry perl 5.20.2 32 bit too.
Show quoted text
> On my side indirect and Moo installed without issues,
Did you install indirect first and then test Moo with the environment variable PERL_EXTRA_STRICTURES set? Show quoted text
> but using indirect produce random crashes in different places.
Could you please be a little more specific? How are you using indirect? Which places are you talking about? For the record, I can reproduce the issue (Moo tests failing when PERL_EXTRA_STRICTURES=1) but only when under Test::Harness. As soon as the tests are run manually, they no longer crash. Vincent