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

[bug] Fix potential bug of lang::Program that could be double finalized #5550

Merged
merged 1 commit into from
Jul 28, 2022

Conversation

PGZXB
Copy link
Contributor

@PGZXB PGZXB commented Jul 27, 2022

Related issue = #4401, #5524

The bug is reflected in:

BUT I DON'T KNOW WHY AND WHEN Program::finalize WILL BE DOUBLE CALLED.

(Only when tests are run on multi-thread (and with offline_cache=True) is the bug triggered.

cc: @k-ye @strongoier @lin-hitonami

@netlify
Copy link

netlify bot commented Jul 27, 2022

Deploy Preview for docsite-preview canceled.

Name Link
🔨 Latest commit edbfcc5
🔍 Latest deploy log https://app.netlify.com/sites/docsite-preview/deploys/62e163057b1cae0009ae71d1

@lin-hitonami
Copy link
Contributor

The program::finalize may be called twice here.

def clear(self):
if self.prog:
self.prog.finalize()
self.prog = None
self._signal_handler_registry = None
self.materialized = False

Copy link
Contributor

@lin-hitonami lin-hitonami left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@PGZXB PGZXB merged commit 0aa0a17 into taichi-dev:master Jul 28, 2022
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.

None yet

2 participants