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

Cherry-pick b341c44: Fix ETW trace logging crash in multithreading situations #21602

Closed
wants to merge 8 commits into from

Conversation

smk2007
Copy link
Member

@smk2007 smk2007 commented Aug 2, 2024

Description

Cherry-pick: #21566

YUNQIUGUO and others added 8 commits January 18, 2024 13:44
…ine (#19187)" (#19194)

### Description

Cherry-pick "Fix buildJava from Zip-Nuget-Java-Nodejs Packaging Pipeline
(#19187)"
Fix SecureKernel break on Session Creation

The SecureKernel crashes on session creation due to TraceLoggingOptions.
Disable the logging call for now to unblock payload.

Co-authored-by: Sheil Kumar <[email protected]>
#19547

### Description
Fixes cmake function definition in winml.cmake to copy link flags.

### Motivation and Context
XFGCheck errors in WindowsAI because this function does not transfer
linker flags
### Description
Fix WAI build by only conditionally copying linker flags



### Motivation and Context
I broke the WAI build that contains ORT on ARM64
### Description
<!-- Describe your changes. -->



### Motivation and Context
<!-- - Why is this change required? What problem does it solve?
- If it fixes an open issue, please link to the issue here. -->

---------

Co-authored-by: Adrian Lizarraga <[email protected]>
Co-authored-by: Rachel Guo <[email protected]>
Co-authored-by: wejoncy <[email protected]>
Co-authored-by: Xavier Dupré <[email protected]>
Co-authored-by: Yulong Wang <[email protected]>
Co-authored-by: Hector Li <[email protected]>
Co-authored-by: luoyu-intel <[email protected]>
Co-authored-by: kunal-vaishnavi <[email protected]>
Co-authored-by: Chi Lo <[email protected]>
Co-authored-by: Ye Wang <[email protected]>
Co-authored-by: snadampal <[email protected]>
Co-authored-by: Tianlei Wu <[email protected]>
Co-authored-by: Heflin Stephen Raj <[email protected]>
Co-authored-by: Yifan Li <[email protected]>
Co-authored-by: Yufeng Li <[email protected]>
Co-authored-by: Changming Sun <[email protected]>
Co-authored-by: rachguo <[email protected]>
Co-authored-by: Edward Chen <[email protected]>
Co-authored-by: aciddelgado <[email protected]>
Co-authored-by: petermcaughan <[email protected]>
Co-authored-by: Peter McAughan <[email protected]>
Co-authored-by: Patrice Vignola <[email protected]>
Co-authored-by: ivberg <[email protected]>
Co-authored-by: Baiju Meswani <[email protected]>
Co-authored-by: Preetha Veeramalai <[email protected]>
Co-authored-by: fxmarty <[email protected]>
Co-authored-by: Sheil Kumar <[email protected]>
Co-authored-by: Sheil Kumar <[email protected]>
Co-authored-by: Prathik Rao <[email protected]>
Co-authored-by: Shubham Bhokare <[email protected]>
Co-authored-by: Jian Chen <[email protected]>
Co-authored-by: satyajandhyala <[email protected]>
Co-authored-by: rachguo <[email protected]>
### Description
<!-- Describe your changes. -->



### Motivation and Context
<!-- - Why is this change required? What problem does it solve?
- If it fixes an open issue, please link to the issue here. -->

---------

Co-authored-by: Sheil Kumar <[email protected]>
Co-authored-by: Sheil Kumar <[email protected]>
Co-authored-by: Yufeng Li <[email protected]>
### Description
<!-- Describe your changes. -->
Windows memory map casts mapped_offset to DWORD directly. It will be
truncated if it is larger than 2^32-1. We need to set high
dwFileOffsetHigh for this case.


### Motivation and Context
<!-- - Why is this change required? What problem does it solve?
- If it fixes an open issue, please link to the issue here. -->

The bug was found from #19450

### Description
<!-- Describe your changes. -->



### Motivation and Context
<!-- - Why is this change required? What problem does it solve?
- If it fixes an open issue, please link to the issue here. -->

Co-authored-by: Yufeng Li <[email protected]>
ETW trace logger is fakely registered as initialized_ is marked as true
before the registration is done, causing crashing issue for Lenovo
camera application.

A prior attempt to address was made here:
#21226
It was reverted here:
#21360

The problem is that during initialization of TraceLoggingRegisterEx, it
will reinvoke the callback and attempt reinitialization, which is not
allowed. TraceLoggingRegisterEx however can be initialized concurrently
when initialization happens on multiple threads. For these reasons it
needs to be protected by a lock, but the lock cannot naively block
because the callback's reinvocation will cause a deadlock.

To solve this problem another tracking variable is added :
"initializing" which protects against reinitialization during the first
initialization.

---------

Co-authored-by: Sheil Kumar <[email protected]>
@smk2007 smk2007 requested review from a team as code owners August 2, 2024 21:31
@smk2007 smk2007 closed this Aug 2, 2024
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