Skip to content

BA-6750: App crashes when attempting to view seller storefront - #15

Open
mekiti wants to merge 1 commit into
masterfrom
BA-6750_App_Crashes_When_Attempting_to_View_Seller_Storefront
Open

BA-6750: App crashes when attempting to view seller storefront#15
mekiti wants to merge 1 commit into
masterfrom
BA-6750_App_Crashes_When_Attempting_to_View_Seller_Storefront

Conversation

@mekiti

@mekiti mekiti commented Aug 5, 2026

Copy link
Copy Markdown

I found a lazy var, which initializes on first access and that initialization is writing to the backing storage. The read path, getCached(), ran inside lock.reading, WrapModelLock.reading is queue.sync on a concurrent dispatch queue with no barrier so multiple threads execute it simultaneously. This seems like one thread tries to read while another tries to write, which leads to memory corruption, which is why crash happens.

What AI says:
Release + real ARM device: optimizer and scheduling widen the window enough to hit it; Debug/simulator timing almost never lined the two accesses up.
Enabling ThreadSanitizer serialized memory accesses enough that the corruption window closed (crash "disappeared"), but TSan still reported the race — which is how we confirmed it: WARNING: ThreadSanitizer: data race … WrapModel.cachedValues.getter, one thread read / one thread write, same address.

@kenworley kenworley left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We might want to keep this change, but it doesn't fix the crash.

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