-
Notifications
You must be signed in to change notification settings - Fork 169
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
Build stuck on unicode locale Windows #490
Build stuck on unicode locale Windows #490
Conversation
6fa26cf
to
5cde68d
Compare
GIT allows only UNIX format in .patch file. Otherwise, git am or apply will report 'fatal: git apply: bad git-diff - expected /dev/null'. But, PatchCheck blocks non-CRLF changes in commit. It's mutual exclusive. Therefore, skip CRLF check in git .patch files. Signed-off-by: Aiden Park <aiden.park@intel.com>
This issue happens under two conditions 1. Unicode language environment in Windows 2. A python calls 'BaseTools/toolsetup.bat' (In EDKII, edksetup.bat directly in Windows command shell) - 'BuildLoader.py' calls 'BaseTools/toolsetup.bat' in a subprocess - 'BaseTools/toolsetup.bat' calls 'nmake cleanall' - 'cleanall' target runs 'python NmakeSubdirs.py' directly - 'NmakeSubdirs.py' creates multi-threads - The threads create another subprocesses But, one of multi-threads is on deadlock when python handles stdout and stderr in a subprocess pipe only if the output includes unicode chars. Therefore, only stderr will be handled in the pipe same as a single thread call. Signed-off-by: Aiden Park <aiden.park@intel.com>
5cde68d
to
b117fa7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me.
Are the changes for Basetool coming from EDK2 base tool? If not, should we report issue to EDK2 base tool? |
Right, the change has been made in EDK2 BaseTools. I will follow up next step. |
|
This issue happens under two conditions. 1. Unicode language environment in Windows 2. Call 'edksetup.bat forcerebuild' with python subprocess.call() Steps to reproduce C:\edk2>python Python 2.7.12 (v2.7.12:d33e0cf91556, Jun 27 2016, 15:24:40) Type help, copyright, credits or license for more information. >>> import subprocess >>> subprocess.call(['edksetup.bat', 'forcerebuild']) The edksetup.bat stuck at 'nmake cleanall'. One of multi-threads is on deadlock when python handles stdout and stderr in a subprocess pipe only if the outputs include unicode chars. Only stderr will be handled in the pipe same as a single thread call. Reported in Slim Bootloader. slimbootloader/slimbootloader#478 Local fix has been made in Slim Bootloader. slimbootloader/slimbootloader#490 Signed-off-by: Aiden Park <aiden.park@intel.com>
This issue happens under two conditions
(In EDKII, edksetup.bat directly in Windows command shell)
But, one of multi-threads is on deadlock when python handles stdout and
stderr in a subprocess pipe only if the output includes unicode chars.
Therefore, only stderr will be handled in the pipe same as a single
thread call.
Signed-off-by: Aiden Park aiden.park@intel.com