Skip to content

Potential autoGen.mk "tee" hang if testcase file directs not closed or background processes do not complete #6752

@andrew-m-leonard

Description

@andrew-m-leonard

Symptom:
Testcase appears to complete, and Teardown message appears, but "hang" occurs until Jenkins aborts stage with timeout:

17:32:21  TEST TEARDOWN:
17:32:21  Nothing to be done for teardown.
.... HANG ....
02:25:58  Cancelling nested steps due to timeout
02:25:58  Sending interrupt signal to process
02:26:11  Terminated
02:26:11  make[4]: *** [autoGen.mk:33: awt_custom_0] Error 143
02:26:11  make[4]: Leaving directory '/home/jenkins/workspace/Test_openjdk11_xxx_x86-64_linux/aqa-tests/xxx/interactives'
02:26:11  make[3]: *** [/home/jenkins/workspace/Test_openjdk11_xxx_x86-64_linux/aqa-tests/TKG/../TKG/settings.mk:362: awt_custom_0-interactives] Error 2
02:26:11  make[3]: Leaving directory '/home/jenkins/workspace/Test_openjdk11_xxx_x86-64_linux/aqa-tests/xxx'
02:26:11  make[2]: *** [/home/jenkins/workspace/Test_openjdk11_xxx_x86-64_linux/aqa-tests/TKG/../TKG/settings.mk:362: awt_custom_0-xxx] Error 2
02:26:11  make[2]: Leaving directory '/home/jenkins/workspace/Test_openjdk11_xxx_x86-64_linux/aqa-tests'
02:26:11  make[1]: *** [settings.mk:362: awt_custom_0-..] Error 2
02:26:11  make[1]: Leaving directory '/home/jenkins/workspace/Test_openjdk11_xxx_x86-64_linux/aqa-tests/TKG'
02:26:11  make: *** [makefile:62: _awt_custom_0] Error 2
02:26:11  script returned exit code 2

The use of "tee" in autoGen.mk can have consequences when testcase sub/background processes perhaps do not close all files or handles:

	echo "";	echo "TEST TEARDOWN:"; \
	$(TEST_TEARDOWN); \
	 } 2>&1 | tee -a $(Q)$(TESTOUTPUT)$(D)TestTargetResult$(Q);

Possible solution/workaround maybe use process redirect rather than pipe.
Essentially hang is instigated by a miss-behaving testcase leaving file handle or background process dangling. I believe in the above example it was possibly an Arctic sub-process or handle.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions