Skip to content

oiiotool protect against OpenEXR thread deadlock on Windows #3582

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

Merged
merged 1 commit into from
Oct 5, 2022

Conversation

lgritz
Copy link
Collaborator

@lgritz lgritz commented Oct 4, 2022

Suggested by SideFX: explicitly shut down the OpenEXR thread pool before exiting oiiotool, because sometimes on Windows it seems to hang otherwise. A better solution is probably possible on the OpenEXR side, but I don't know what it would be. (And in any case, we'd still need to do this be be well behaved when using OpenEXR versions earlier than where a fix might land.)

Solution tracked down by Edward Lam.

Suggested by SideFX: explicitly shut down the OpenEXR thread pool
before exiting oiiotool, because sometimes on Windows it seems to hang
otherwise. A better solution is probably possible on the OpenEXR side,
but I don't know what it would be. (And in any case, we'd still need
to do this be be well behaved when using OpenEXR versions earlier than
where a fix might land.)

Solution tracked down by Edward Lam.
@EvanAW
Copy link

EvanAW commented Oct 5, 2022

Upon seeing this, my first thought was "Didn't @debaetsd commit some fixes that touched this about a year are so ago when working on Windows CI fixes?"

There were other fixes (and #2038 even earlier), but it turns out #2797 and AcademySoftwareFoundation/openexr#890 are still open.

A better solution is probably possible on the OpenEXR side, but I don't know what it would be.

Perhaps its time to take a second at the proposed solution in that OpenEXR thread?

@lgritz lgritz merged commit fe48013 into AcademySoftwareFoundation:master Oct 5, 2022
@lgritz lgritz deleted the lg-exrthreads branch October 6, 2022 04:09
lgritz added a commit to lgritz/OpenImageIO that referenced this pull request Oct 6, 2022
…oftwareFoundation#3582)

Suggested by SideFX: explicitly shut down the OpenEXR thread pool
before exiting oiiotool, because sometimes on Windows it seems to hang
otherwise. A better solution is probably possible on the OpenEXR side,
but I don't know what it would be. (And in any case, we'd still need
to do this be be well behaved when using OpenEXR versions earlier than
where a fix might land.)

Solution tracked down by Edward Lam.
lgritz added a commit to lgritz/OpenImageIO that referenced this pull request Oct 6, 2022
…oftwareFoundation#3582)

Suggested by SideFX: explicitly shut down the OpenEXR thread pool
before exiting oiiotool, because sometimes on Windows it seems to hang
otherwise. A better solution is probably possible on the OpenEXR side,
but I don't know what it would be. (And in any case, we'd still need
to do this be be well behaved when using OpenEXR versions earlier than
where a fix might land.)

Solution tracked down by Edward Lam.
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.

2 participants