| Summary: | acl ptest timeout due to perl update | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [QA/Testing] Package Testing (ptest) | Reporter: | Richard Purdie <richard.purdie> | ||||||
| Component: | ptest | Assignee: | Alexander Kanavin <alex.kanavin> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | High | CC: | alex.kanavin, randy.macleod, sharmasudhir | ||||||
| Version: | unspecified | ||||||||
| Target Milestone: | 2.8 M2 | ||||||||
| Hardware: | x86 | ||||||||
| OS: | Multiple | ||||||||
| Whiteboard: | |||||||||
| OS type for building Yocto: | --- | Type of Regression: | --- | ||||||
| Verified: | Documentation change: | No (bug/feature does not impact docs) | |||||||
| Attachments: |
|
||||||||
|
Description
Richard Purdie
2019-06-11 12:52:29 UTC
I tracked this down to being caused by the perl upgrade from 5.28 to 5.30. In 5.30, the $) = "2 2" assignment in ptest/test/run (a perl script) doesn't work and isn't able to change egid. Not sure why at this point but reverting to 5.28 does allow the tests to complete (and not hang). Test script to reproduce the problem: #!/usr/bin/env perl $) = "2 2"; print $!; Result from perl 5.28 setgroups(1, [2]) = 0 setresgid(-1, 2, -1) = 0 Result from perl 5.30 setgroups(1, [-1]) = -1 EINVAL (Invalid argument) setresgid(-1, 2, -1) = 0 Looking like it may be caused by this change: https://perl5.git.perl.org/perl.git/commitdiff/5d4a52b5c68a11bfc97c2e24806993b84a61eade Created attachment 4526 [details]
Sledghammer which fixes the problem
Confirmed its that change upstream and that reverting to the previous function does fix the issue (sledgehammer approach). Now we need a correct fix. *** Bug 13395 has been marked as a duplicate of this bug. *** This is unbelievably bad, if I am reading the code correctly. They have an argument to the string-to-number conversion function that a) in the old version was used to simply return the position where the lookup ended; b) in the new version is used to both provide a point where lookup should stop, and return the actual stopping point. When the string is a space separated list of numbers, the argument gets rewritten to point to the end of the first number, then provided as "point where to stop", so the second number is never read. Did I get this right? Created attachment 4527 [details]
Simpler patch to fix the problem
(In reply to comment #7) > This is unbelievably bad, if I am reading the code correctly. > > They have an argument to the string-to-number conversion function that > a) in the old version was used to simply return the position where the > lookup ended; > b) in the new version is used to both provide a point where lookup should > stop, and return the actual stopping point. > > When the string is a space separated list of numbers, the argument gets > rewritten to point to the end of the first number, then provided as "point > where to stop", so the second number is never read. > > Did I get this right? I think so. I have a patch which appears to fix it yet I'm still not quite sure I understand/believe it. As I understand it this is a genuine bug in perl but we have to submit it with perlbug. I wonder if we've ever tried that before... Submitted upstream: https://rt.perl.org/Public/Bug/Display.html?id=134195 Patch landed in master: http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=5d8c4e3f47acd1b181760274a39d6707abd976b8 Thanks for taking care of this! *** Bug 13395 has been marked as a duplicate of this bug. *** |