Univention Bugzilla – Full Text Bug Listing |
Summary: | 60_umc-system.22_umc-service-proc-killing.test fails | ||
---|---|---|---|
Product: | UCS Test | Reporter: | Philipp Hahn <hahn> |
Component: | UMC | Assignee: | Dmitry Galkin <galkin> |
Status: | CLOSED FIXED | QA Contact: | Philipp Hahn <hahn> |
Severity: | normal | ||
Priority: | P5 | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Hardware: | Other | ||
OS: | Linux | ||
See Also: |
https://forge.univention.org/bugzilla/show_bug.cgi?id=34593 https://forge.univention.org/bugzilla/show_bug.cgi?id=38738 |
||
What kind of report is it?: | --- | What type of bug is this?: | --- |
Who will be affected by this bug?: | --- | How will those affected feel about the bug?: | --- |
User Pain: | Enterprise Customer affected?: | ||
School Customer affected?: | ISV affected?: | ||
Waiting Support: | Flags outvoted (downgraded) after PO Review: | ||
Ticket number: | Bug group (optional): | ||
Max CVSS v3 score: | |||
Attachments: | Test program for WNOHANG |
Description
Philipp Hahn
2015-03-31 16:08:37 CEST
First change commited: r59520 | Bug #38174 test: Wait for child exit Failed again: <http://jenkins.knut.univention.de:8080/job/UCS-4.0/job/UCS-4.0-1/job/Autotest%20MultiEnv/SambaVersion=s4,Systemrolle=backup/67/testReport/junit/60_umc-system/22_umc-service-proc-killing/test/>: > [ 0.388]Testing UMC process killing with signal 'SIGTERM' > [ 3.810]Testing UMC process killing with signal 'SIGKILL' > [ 5.084]### FAIL ### > [ 5.084]Process exit status is 0x0 instead of SIGKILL(9). > [ 5.084]### ### > [ 5.084]Created process with pid '25411' was not terminated, forcing kill Can you please habe a look? Maybe - compare with "self.Proc.pid" with "child", - print and delay if they are not equal, - only exit the loop if they're equal or the max-count is reached I have the nagging fealing that Python/UMC sometimes forkes a child process and the test then collects that process. (In reply to Philipp Hahn from comment #2) > Failed again: > <http://jenkins.knut.univention.de:8080/job/UCS-4.0/job/UCS-4.0-1/job/ > Autotest%20MultiEnv/SambaVersion=s4,Systemrolle=backup/67/testReport/junit/ > 60_umc-system/22_umc-service-proc-killing/test/>: > > [ 0.388]Testing UMC process killing with signal 'SIGTERM' > > [ 3.810]Testing UMC process killing with signal 'SIGKILL' > > [ 5.084]### FAIL ### > > [ 5.084]Process exit status is 0x0 instead of SIGKILL(9). > > [ 5.084]### ### > > [ 5.084]Created process with pid '25411' was not terminated, forcing kill > > Can you please habe a look? As I understand, this line in 'def test': _pid, exit_status, _res_usage = wait4(pid, WNOHANG) gives us (pid, 0, 0) due to WNOHANG option when "no child process status is available immediately". this is confirmed by the fact, that test fails on comparison with 0 status and total execution time far less than 30 seconds, i.e. that's not the child's 0 exit status, but the result of 'wait4 with WNOHANG'. It happens rarely, I assume sometimes the test executed faster than the UMC terminates the process actually (it however, reports 'success' in response). To confirm: r59928: * 60_umc-system/22_umc-service-proc-killing: wait a bit after UMC request to terminate process was done (Bug #38174). If it will always work from now -> I think we can delete the WNOHANG option from wait4. > Maybe > - compare with "self.Proc.pid" with "child", > - print and delay if they are not equal, > - only exit the loop if they're equal or the max-count is reached As of now, the test won't fail in the 'force_process_kill' function, so this would be executed due to 'finally' statement, but test would still be considered failed. (In reply to Dmitry Galkin from comment #3) > (In reply to Philipp Hahn from comment #2) > > Failed again: > > <http://jenkins.knut.univention.de:8080/job/UCS-4.0/job/UCS-4.0-1/job/ > > Autotest%20MultiEnv/SambaVersion=s4,Systemrolle=backup/67/testReport/junit/ > > 60_umc-system/22_umc-service-proc-killing/test/>: > > > [ 0.388]Testing UMC process killing with signal 'SIGTERM' > > > [ 3.810]Testing UMC process killing with signal 'SIGKILL' > > > [ 5.084]### FAIL ### > > > [ 5.084]Process exit status is 0x0 instead of SIGKILL(9). > > > [ 5.084]### ### > > > [ 5.084]Created process with pid '25411' was not terminated, forcing kill > > > > Can you please habe a look? > > As I understand, this line in 'def test': > _pid, exit_status, _res_usage = wait4(pid, WNOHANG) > > gives us (pid, 0, 0) due to WNOHANG option when "no child process status is > available immediately". > > this is confirmed by the fact, that test fails on comparison with 0 status > and total execution time far less than 30 seconds, i.e. that's not the > child's 0 exit status, but the result of 'wait4 with WNOHANG'. > > It happens rarely, I assume sometimes the test executed faster than the UMC > terminates the process actually (it however, reports 'success' in response). > > To confirm: > r59928: > * 60_umc-system/22_umc-service-proc-killing: wait a bit after UMC request > to terminate process was done (Bug #38174). Please have a look at r59520 and perhaps adapt that change to the 2nd instnce where WNOHANG is used. Bonus points for moving that to a separate method. > If it will always work from now -> I think we can delete the WNOHANG option > from wait4. WONOHANG is used to not wait infinitely if something goes wrong with killing the test process: The test should always terminate after 30s. As discussed: r59977: * 60_umc-system/22_umc-service-proc-killing updated: More debug output; do not wait too much when the process is killed during the clean-up; wait when terminated via UMC (Bug #38174). OK: r59977 OK: ./22_umc-service-proc-killing -vvf |