Skip to content
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

CXPlat must initialize all sub-components prior to enabling fault injection #148

Open
shankarseal opened this issue Nov 30, 2023 · 0 comments

Comments

@shankarseal
Copy link

        [2]              : "cxplat_fault_injection_inject_fault + 67 D:\a\ebpf-for-windows\ebpf-for-windows\external\usersim\cxplat\src\cxplat_winuser\fault_injection.cpp 408" [Type: std::basic_string<char,std::char_traits<char>,std::allocator<char> >]
        [3]              : "cxplat_allocate + 111 D:\a\ebpf-for-windows\ebpf-for-windows\external\usersim\cxplat\src\cxplat_winuser\memory_winuser.cpp 89" [Type: std::basic_string<char,std::char_traits<char>,std::allocator<char> >]
        [4]              : "_get_processor_group_info + 174 D:\a\ebpf-for-windows\ebpf-for-windows\external\usersim\cxplat\src\cxplat_winuser\processor_winuser.cpp 29" [Type: std::basic_string<char,std::char_traits<char>,std::allocator<char> >]
        [5]              : "cxplat_winuser_initialize_processor_info + 94 D:\a\ebpf-for-windows\ebpf-for-windows\external\usersim\cxplat\src\cxplat_winuser\processor_winuser.cpp 48" [Type: std::basic_string<char,std::char_traits<char>,std::allocator<char> >]
        [6]              : "cxplat_initialize + 598 D:\a\ebpf-for-windows\ebpf-for-windows\external\usersim\cxplat\src\cxplat_winuser\cxplat_winuser.cpp 162" [Type: std::basic_string<char,std::char_traits<char>,std::allocator<char> >]
        [7]              : "usersim_platform_initiate + 68 D:\a\ebpf-for-windows\ebpf-for-windows\external\usersim\src\platform_user.cpp 56" [Type: std::basic_string<char,std::char_traits<char>,std::allocator<char> >]

The above stack shows how #143 caused a regression. The cxplat_winuser_initialize_processor_info itself is getting fault-injected and cxplat is failing to initialize. It goes to cxplat cleaup path - where it is trying to wait on the rundown_ref object which is not intialized and hence throws an exception.

01 VCRUNTIME140D!_CxxThrowException
02 usersim!_rundown_ref_table::wait_for_rundown_ref
03 usersim!cxplat_wait_for_rundown_protection_release
04 usersim!cxplat_wait_for_preemptible_work_items_complete
05 usersim!usersim_platform_terminate
06 usersim!usersim_platform_initiate
07 usersim!DllMain
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

No branches or pull requests

1 participant