Threading issues with the design of file and leveldb services.

3 views
Skip to first unread message

Marijn Kruisselbrink

unread,
Jan 25, 2017, 8:11:41 PM1/25/17
to chromium-mojo, stora...@chromium.org, e...@chromium.org

So I'm working on mojo-ifying local storage, which makes me the first user of the LevelDB and File services, and I ran into several threading issues where I'm not sure how to best deal with these. In particular I'm encountering deadlocks because leveldb assumes it can do file operations from any thread, but with file operations being abstracted away behind mojo interfaces it's hard to actually enable that (and the current attempt to simulate that causes deadlocks). See the below document for more details on the issues I'm encountering:

John Abd-El-Malek

unread,
Jan 26, 2017, 4:13:03 PM1/26/17
to Marijn Kruisselbrink, chromium-mojo, stora...@chromium.org, Elliot Glaysher (Chromium)
(for posterity)

Marijn and I VCd about this to discuss this in detail. Since this is not for common operations, we'll continue to use layered mojo services (i.e. by continuing to use FS service). To fix the deadlock, LevelDBProxy will run on the FILE thread.

On Wed, Jan 25, 2017 at 5:11 PM, Marijn Kruisselbrink <m...@chromium.org> wrote:

So I'm working on mojo-ifying local storage, which makes me the first user of the LevelDB and File services, and I ran into several threading issues where I'm not sure how to best deal with these. In particular I'm encountering deadlocks because leveldb assumes it can do file operations from any thread, but with file operations being abstracted away behind mojo interfaces it's hard to actually enable that (and the current attempt to simulate that causes deadlocks). See the below document for more details on the issues I'm encountering:

--
You received this message because you are subscribed to the Google Groups "chromium-mojo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-mojo+unsubscribe@chromium.org.
To post to this group, send email to chromi...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-mojo/CA%2BOSsVYwZQmd_tRsQ5NYJaehuzPMPMRW6dkvS_6ZRCZwjhBFTQ%40mail.gmail.com.

Reply all
Reply to author
Forward
0 new messages