Closed Bug 783398 Opened 12 years ago Closed 12 years ago

DeviceStorage makes calls to nsVolumeService from the IOThread

Categories

(Firefox OS Graveyard :: General, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(blocking-basecamp:+)

RESOLVED FIXED
blocking-basecamp +

People

(Reporter: dhylands, Assigned: dougt)

Details

Attachments

(1 file)

The function GetSDCardStatus calls nsVolumeService functions, and GetSDCardStatus is called from the IOThread.

Backtrace:

#0  0x40cbeec2 in mozilla::system::nsVolumeService::FindVolumeByName (this=0xa910e0, aName=...) at /home/work/B2G-otoro/gecko-git/dom/system/gonk/nsVolumeService.cpp:112
#1  0x40cbef80 in mozilla::system::nsVolumeService::GetVolumeByName (this=0xa910e0, aVolName=..., aResult=0x46410d30) at /home/work/B2G-otoro/gecko-git/dom/system/gonk/nsVolumeService.cpp:59
#2  0x40b4cb04 in GetSDCardStatus (aState=...) at /home/work/B2G-otoro/gecko-git/dom/devicestorage/nsDeviceStorage.cpp:357
#3  0x40b4f596 in mozilla::dom::devicestorage::DeviceStorageRequestParent::StatFileEvent::CancelableRun (this=0xb09648)
    at /home/work/B2G-otoro/gecko-git/dom/devicestorage/DeviceStorageRequestParent.cpp:323
#4  0x40b5015e in mozilla::dom::devicestorage::DeviceStorageRequestParent::CancelableRunnable::Run (this=0xb09648) at /home/work/B2G-otoro/gecko-git/dom/devicestorage/DeviceStorageRequestParent.h:51
#5  0x4125eb20 in nsThreadPool::Run (this=0xca3228) at /home/work/B2G-otoro/gecko-git/xpcom/threads/nsThreadPool.cpp:187
#6  0x4125c502 in nsThread::ProcessNextEvent (this=0xca38e8, mayWait=<value optimized out>, result=0x46410e8f) at /home/work/B2G-otoro/gecko-git/xpcom/threads/nsThread.cpp:624
#7  0x41225b70 in NS_ProcessNextEvent_P (thread=0x7f, mayWait=true) at /home/work/B2G-otoro/objdir-gecko-debug-git/xpcom/build/nsThreadUtils.cpp:220
#8  0x4125cb2c in nsThread::ThreadFunc (arg=<value optimized out>) at /home/work/B2G-otoro/gecko-git/xpcom/threads/nsThread.cpp:257
#9  0x4022b644 in _pt_root (arg=<value optimized out>) at /home/work/B2G-otoro/gecko-git/nsprpub/pr/src/pthreads/ptthread.c:156
#10 0x400cf0d8 in __thread_entry (func=0x4022b5dd <_pt_root>, arg=0xca3b20, tls=<value optimized out>) at bionic/libc/bionic/pthread.c:217
#11 0x400cec2c in pthread_create (thread_out=<value optimized out>, attr=0xbec25b94, start_routine=0x4022b5dd <_pt_root>, arg=0xca3b20) at bionic/libc/bionic/pthread.c:357
Presumably GetSDCardStatus is called from the main thread, so since you're on the IOThread, you could call VolumeManager::FindVolumeByName which is callable from the IOThread
Attached patch patch v.1Splinter Review
Attachment #652598 - Flags: review?(dhylands)
Comment on attachment 652598 [details] [diff] [review]
patch v.1

Review of attachment 652598 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good to me (and it works too!)
Attachment #652598 - Flags: review?(dhylands) → review+
https://hg.mozilla.org/mozilla-central/rev/2d036225c7ba
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
blocking-basecamp: ? → +
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: