Skip to content

Update Windows CI to build with vs17 #14919

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

Closed
wants to merge 4 commits into from
Closed

Conversation

cmb69
Copy link
Member

@cmb69 cmb69 commented Jul 11, 2024

PHP 8.4 is supposed to be built with vs17 (aka. Visual Studio 2022)[1], so we also do this for CI.

[1] https://windows.php.net/

@cmb69
Copy link
Member Author

cmb69 commented Jul 11, 2024

I wonder if this is a flaky test, or if there are issues with VS17 here (is it a segfault?)

@Girgias
Copy link
Member

Girgias commented Jul 12, 2024

Huuum, maybe @arnaud-lb has an idea as this is related to the shutdown sequence?

@cmb69
Copy link
Member Author

cmb69 commented Jul 12, 2024

Ah, sorry, maybe I should have noted that I've re-run that build in the meantime, and now got 42 test failures which are apparently crypto/certificate related, but that other test succeeded. I'll keep an eye on that issue.

@cmb69
Copy link
Member Author

cmb69 commented Jul 30, 2024

I'll keep an eye on that issue.

Oops.

Anyhow, I can reproduce the test failure locally, but only when I build with VS17, have ZTS enabled, and tracing JIT is enabled when running the test (and of course, debug mode must not be enabled). I'm getting a 0xC0000028 (STATUS_BAD_STACK) with the following backtrace (60afeb5)

>	php8ts.dll!_zend_bailout(const char * filename, unsigned int lineno) Zeile 1243	C
 	php8ts.dll!php_error_cb(int orig_type, _zend_string * error_filename, const unsigned int error_lineno, _zend_string * message) Zeile 1431	C
 	php_soap.dll!soap_error_handler(int error_num, _zend_string * error_filename, const unsigned int error_lineno, _zend_string * message) Zeile 1906	C
 	php8ts.dll!zend_error_zstr_at(int orig_type, _zend_string * error_filename, unsigned int error_lineno, _zend_string * message) Zeile 1557	C
 	php8ts.dll!zend_error_va_list(int orig_type, _zend_string * error_filename, unsigned int error_lineno, const char * format, char * args) Zeile 1576	C
 	php8ts.dll!zend_error_noreturn(int type, const char * format, ...) Zeile 1684	C
 	php8ts.dll!zend_emit_return_type_check(_znode * expr, _zend_arg_info * return_info, bool implicit) Zeile 2632	C
 	php8ts.dll!zend_compile_return(_zend_ast * ast) Zeile 5684	C
 	php8ts.dll!zend_compile_stmt(_zend_ast * ast) Zeile 11292	C
 	[Inlineframe] php8ts.dll!zend_compile_stmt_list(_zend_ast *) Zeile 6890	C
 	php8ts.dll!zend_compile_stmt(_zend_ast * ast) Zeile 11279	C
 	php8ts.dll!zend_compile_func_decl_ex(_znode * result, _zend_ast * ast, bool toplevel, const _zend_property_info * property_info, zend_property_hook_kind hook_kind) Zeile 8323	C
 	[Inlineframe] php8ts.dll!zend_compile_func_decl(_znode *) Zeile 8362	C
 	php8ts.dll!zend_compile_top_stmt(_zend_ast * ast) Zeile 11251	C
 	php8ts.dll!zend_compile_top_stmt(_zend_ast * ast) Zeile 11243	C
 	php8ts.dll!zend_compile(int type) Zeile 620	C
 	php8ts.dll!compile_string(_zend_string * source_string, const char * filename, _zend_compile_position position) Zeile 817	C
 	php8ts.dll!zend_include_or_eval(_zval_struct * inc_filename_zv, int type) Zeile 5113	C
 	php8ts.dll!ZEND_INCLUDE_OR_EVAL_SPEC_CONST_HANDLER(_zend_execute_data * execute_data) Zeile 5258	C
 	[Externer Code]	
 	php_opcache.dll!zend_jit_trace_hot_root(_zend_execute_data * execute_data, const _zend_op * opline) Zeile 7944	C

I won't be able to fix this, but I can run tests or provide further information on request. Maybe the following build and test instructions are also helpful:

C:\php-sdk\phpdev\vs17\x64\php-src
$ git clean -fdx && buildconf && configure --with-php-build=..\deps --enable-snapshot-build --enable-native-intrinsics=avx2 && nmake
C:\php-sdk\phpdev\vs17\x64\php-src
$ nmake test TESTS="-d opcache.enable=1 -d opcache.enable_cli=1 -d opcache.protect_memory=1 -d opcache.jit_buffer_size=64M -d opcache.jit=tracing Zend\tests\gh8841.phpt"

I'll push a commit with a dynamic xfail soonish, so we can merge this. I'd rather see VS17 issues in CI than having these reported by users.

PS: apparently with the same configuration and run-tests parameters, the test does not fail on x86.
PPS: given that there is the soap_error_handler involved in the backtrace, I've tried without loading php_soap, but get basically the same error:

details
>	php8ts.dll!_zend_bailout(const char * filename, unsigned int lineno) Zeile 1243	C
 	php8ts.dll!php_error_cb(int orig_type, _zend_string * error_filename, const unsigned int error_lineno, _zend_string * message) Zeile 1431	C
 	php8ts.dll!zend_error_zstr_at(int orig_type, _zend_string * error_filename, unsigned int error_lineno, _zend_string * message) Zeile 1557	C
 	php8ts.dll!zend_error_va_list(int orig_type, _zend_string * error_filename, unsigned int error_lineno, const char * format, char * args) Zeile 1576	C
 	php8ts.dll!zend_error_noreturn(int type, const char * format, ...) Zeile 1684	C
 	php8ts.dll!zend_emit_return_type_check(_znode * expr, _zend_arg_info * return_info, bool implicit) Zeile 2632	C
 	php8ts.dll!zend_compile_return(_zend_ast * ast) Zeile 5684	C
 	php8ts.dll!zend_compile_stmt(_zend_ast * ast) Zeile 11292	C
 	[Inlineframe] php8ts.dll!zend_compile_stmt_list(_zend_ast *) Zeile 6890	C
 	php8ts.dll!zend_compile_stmt(_zend_ast * ast) Zeile 11279	C
 	php8ts.dll!zend_compile_func_decl_ex(_znode * result, _zend_ast * ast, bool toplevel, const _zend_property_info * property_info, zend_property_hook_kind hook_kind) Zeile 8323	C
 	[Inlineframe] php8ts.dll!zend_compile_func_decl(_znode *) Zeile 8362	C
 	php8ts.dll!zend_compile_top_stmt(_zend_ast * ast) Zeile 11251	C
 	php8ts.dll!zend_compile_top_stmt(_zend_ast * ast) Zeile 11243	C
 	php8ts.dll!zend_compile(int type) Zeile 620	C
 	php8ts.dll!compile_string(_zend_string * source_string, const char * filename, _zend_compile_position position) Zeile 817	C
 	php8ts.dll!zend_include_or_eval(_zval_struct * inc_filename_zv, int type) Zeile 5113	C
 	php8ts.dll!ZEND_INCLUDE_OR_EVAL_SPEC_CONST_HANDLER(_zend_execute_data * execute_data) Zeile 5258	C
 	[Externer Code]	
 	php_opcache.dll!zend_jit_trace_hot_root(_zend_execute_data * execute_data, const _zend_op * opline) Zeile 7944	C

cmb69 added 2 commits July 30, 2024 21:53
PHP 8.4 is supposed to be built with vs17 (aka. Visual Studio 2022)[1],
so we also do this for CI.

[1] <https://windows.php.net/>
cmb69 added 2 commits July 30, 2024 23:24
The documentation of `opcache_get_configuration()` is meager.
@cmb69 cmb69 marked this pull request as ready for review July 31, 2024 10:04
@cmb69 cmb69 requested review from iluuu1994 and TimWolla as code owners July 31, 2024 10:04
@cmb69
Copy link
Member Author

cmb69 commented Aug 6, 2024

Closed via af8ef4c.

@cmb69 cmb69 closed this Aug 6, 2024
@cmb69 cmb69 deleted the cmb/ci-vs17 branch August 6, 2024 15:20
@iluuu1994
Copy link
Member

@cmb69 I think this broke the nightly build. https://github.com/php/php-src/actions/runs/10276548306/job/28437229029 runs-on: windows-2022 should likely be conditional, based on the branch.

@cmb69
Copy link
Member Author

cmb69 commented Aug 7, 2024

Ah, thanks for the ping. I'll check that right away.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants