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
Test failures on windows: #8
Comments
As of 0.61, test 26fork is failing on all Win32, and only on Win32. The error is "Inline::Config" related. The code that gives such an error is in Inline.pm (not in Inline::C) at line 706:
I've improved that error message and we'll see what the next release brings in terms of errors! |
With new message, the error is now: " As of Inline v0.30, use of the Inline::Config module is no longer supported (Module was loaded from )" Cheers, |
The last bit " )" means %INC didn't have an Inline/Config.pm loaded. Could you do a quick search in your perl libdirs just to confirm that? Reasoning: there are two places where the relevant error message (M14_usage_Config) is triggered, and one of them prepends "check_config_file". The lack of "check_config_file:" implies it was the other place, in create_config_file, and it actually did find an Inline/Config.pm and warned about it. |
Definitely no Inline::Config in @inc - unless it's being momentarily created in '.' during the running of 'make test'. Like I said before, this test script originally worked for me. What has changed ? I can recall testing it - and it was I who put the Win32-specific conditional into it ... but I'm damned if I can find just where I tested this script (and excactly what it contained) when it passed. Cheers, |
Results are all over the place. I amended a portion of the script: my $pid = fork; The output then becomes 4620: Got to P It looks like the child's Inline->bind is being hampered by the parent's Inline->bind. With Inline-0.56, same perl, same machine, same (altered) script, it just hangs - no output at all. And then, when we get to the more recent Inline::C versions, the error changes again (as already reported). At other times with Inline-C-0.60 I saw evidence of a race condition - I forget which perl versions they were, but sometimes the script would pass, other times not. I think it's safe to say we're trying to do something that Windows doesn't accommodate reliably. |
It's the DID locking mechanism that's the "issue". On Unix, that's done by opening-for-writing a lockfile and then using perl flock to acquire an exclusive lock on it, which blocks if something else already did so. It seems that Windows prevents the second lock-acquire-attempt by failing the open-for-write. I will explore an alternative. |
On my Windows 7 Perl, open and flock work as they do on Unix. perl -V:
And this code:
Works as you'd think (when run in 2 different command prompt windows). Could you try this code in two windows on your box and see what happens? |
It will help to sort this issue out if you could let me know what this does? |
First one to get run prints "lock" immediately. Second one doesn't print "lock" until first one exits. I've just TODO'd and pushed to git the failing tests (Windows only) on t/26fork.t. (Revert if you wish.) By "succeeds", I mean that all tests pass - I still don't know what's needed to get rmtree() to work. I keep thinking the problem must be in Inline.pm, but the different behaviour of 5.12.0 is a puzzle. |
Thanks for the lock test, shows the locking actually works on your Windows like it does on mine! That's reassuring, at least. I agree this issue is a bit mysterious. I've released a new Inline, with a Data::Dumper of %Inline::Config for that error. I'll take a look at Inline::C tomorrow and make it depend on the latest Inline for a new dev release, and see how that behaves. |
The Inline::Config issue I've dealt with for Inline v0.66 - it was a false positive (obviously) and now it uses $Inline::Config::VERSION as the check. Hopefully that's that one dealt with! |
I claim this particular issue was related to Inline::Config detection, which is now resolved. We aren't out of the woods yet with Windows, but those more specific issues have GH issues open. I am therefore closing this one. |
See: http://www.cpantesters.org/cpan/report/76766494-6bf4-1014-9611-eb0e74c2f572
The text was updated successfully, but these errors were encountered: