Skip to content

Conversation

@jjlilley
Copy link

@jjlilley jjlilley commented Nov 20, 2019

Stack from ghstack:

RRefContext is a conventional singleton, used by rref.cpp. At module teardown
time, it's not defined whether rref_context.cpp or rref.cpp will be destroyed first.

We were observing a SIGSEGV because RRefContext is destroyed before a dangling
~UserRRef() call is able to execute. Particularly, the underlying
ctx.agent()->getWorkerInfo(ownerId_) call failed.

This change just avoids the SIGSEGV by forcing an intentional leak, though we still
need to deal with why there's a dangling UserRref at module destruction time.

Differential Revision: D18620786

… order race.

RRefContext is a conventional singleton, used by rref.cpp. At module teardown
time, it's not defined whether rref_context.cpp or rref.cpp will be destroyed first.

We were observing a SIGSEGV because RRefContext is destroyed before a dangling
~UserRRef() call is able to execute. Particularly, the underlying
ctx.agent()->getWorkerInfo(ownerId_) call failed.

This change just avoids the SIGSEGV by forcing an intentional leak, though we still
need to deal with why there's a dangling UserRref at module destruction time.

Differential Revision: [D18620786](https://our.internmc.facebook.com/intern/diff/D18620786/)

[ghstack-poisoned]
jjlilley pushed a commit that referenced this pull request Nov 20, 2019
… order race.

RRefContext is a conventional singleton, used by rref.cpp. At module teardown
time, it's not defined whether rref_context.cpp or rref.cpp will be destroyed first.

We were observing a SIGSEGV because RRefContext is destroyed before a dangling
~UserRRef() call is able to execute. Particularly, the underlying
ctx.agent()->getWorkerInfo(ownerId_) call failed.

This change just avoids the SIGSEGV by forcing an intentional leak, though we still
need to deal with why there's a dangling UserRref at module destruction time.

Differential Revision: [D18620786](https://our.internmc.facebook.com/intern/diff/D18620786/)

ghstack-source-id: 94287441
Pull Request resolved: #30172
@zhaojuanmao
Copy link
Contributor

please still wait for tests to finish before landing

@jjlilley
Copy link
Author

Thanks. The other, broader singleton change is having a harder time passing tests, so I wanted to try to just land the minimal version.

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.

3 participants