Issue 50186 - API: deadlock while try to get property "Title" from frame
Summary: API: deadlock while try to get property "Title" from frame
Status: CLOSED FIXED
Alias: None
Product: App Dev
Classification: Unclassified
Component: api (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: All All
: P2 Trivial
Target Milestone: ---
Assignee: chne
QA Contact: issues@api
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-01 15:01 UTC by chne
Modified: 2013-02-24 21:08 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description chne 2005-06-01 15:01:17 UTC
Mastertask. Please see subtasks.

Stack:
Switching to thread 2 (Thread 1196329904 (LWP 1540))]#0  0x419fc8f9 in
__lll_mutex_lock_wait ()
   from /lib/tls/libpthread.so.0
(gdb) where
#0  0x419fc8f9 in __lll_mutex_lock_wait () from /lib/tls/libpthread.so.0
#1  0x419f98e9 in _L_mutex_lock_89 () from /lib/tls/libpthread.so.0
#2  0x419f9b70 in pthread_mutex_unlock () from /lib/tls/libpthread.so.0
#3  0x40c6c645 in osl_acquireMutex () from
/local/dev/office/unxlngi/src680_m106/program/libuno_sal.so.3
#4  0x409a7440 in vos::OMutex::acquire () from
/local/dev/office/unxlngi/src680_m106/program/libvos3gcc3.so
#5  0x42ee2099 in SalYieldMutex::acquire ()
   from /local/dev/office/unxlngi/src680_m106/program/libvclplug_gen680li.so
#6  0x42d7b2df in framework::LockHelper::acquireReadAccess (this=0x41a00ff4)
    at
/net/jumbo.germany/sol1/SRC680/src/framework/source/threadhelp/lockhelper.cxx:308
#7  0x44be4f30 in framework::ReadGuard::lock (this=0x474e85c0) at readguard.hxx:189
#8  0x44be4f0b in ReadGuard (this=0x474e85c0, rLock=@0x4948d188) at
readguard.hxx:155
#9  0x44c0e247 in framework::Frame::implts_getTitleFromWindow (this=0x4948d150)
    at /local/dev/cws/m106/SRC680/framework/source/services/frame.cxx:3035
#10 0x44c0d4ba in framework::Frame::getFastPropertyValue (this=0x4948d150,
aValue=@0x474e8700, nHandle=3)
    at /local/dev/cws/m106/SRC680/framework/source/services/frame.cxx:2758
#11 0x409d2218 in cppu::OPropertySetHelper::getFastPropertyValue ()
   from /local/dev/office/unxlngi/src680_m106/program/libuno_cppuhelpergcc3.so.3
#12 0x409d1c1a in cppu::OPropertySetHelper::getPropertyValue ()
   from /local/dev/office/unxlngi/src680_m106/program/libuno_cppuhelpergcc3.so.3
#13 0x44e5a260 in ?? () from
/local/dev/office/unxlngi/src680_m106/program/libgcc3_uno.so
#14 0x44e5a5b2 in ?? () from
/local/dev/office/unxlngi/src680_m106/program/libgcc3_uno.so
#15 0x44e5a951 in ?? () from
/local/dev/office/unxlngi/src680_m106/program/libgcc3_uno.so
#16 0x472df657 in component_canUnload () from
/local/dev/office/unxlngi/src680_m106/program/liburp_uno.so
#17 0x472d06a1 in component_canUnload () from
/local/dev/office/unxlngi/src680_m106/program/liburp_uno.so
#18 0x472d0bc9 in component_canUnload () from
/local/dev/office/unxlngi/src680_m106/program/liburp_uno.so
#19 0x40a2e67c in uno_threadpool_destroy ()

cd: Problem: The property helper implementation locks an internal mutex when
someone accesses a property. The code tries to access toolkit/vcl code while
holding the property mutex, which violates the golden rule: Don't hold a mutex
when you call external code!
Comment 1 carsten.driesner 2005-06-01 16:01:34 UTC
cd->as: Please have a look. Your code in Frame::getFastPropertyValue directly
calls implts_getTitleFromWindow() which locks the solar mutex! So it's not LO
code to blame, but yours!
Comment 2 chne 2005-06-10 11:08:16 UTC
To reproduce this behavior just start your office with parameter

"-accept=socket,host=0,port=8100;urp;" 

Then create a scenario file "test.sce" whith the following content:

-o fwl.TypeDetection
-o fwk.Frame::com::sun::star::frame::Frame

and call inside a solar shell:

checkapi -sce test.sce
Comment 3 andreas.schluens 2005-06-13 09:37:23 UTC
Now the frame uses an own helper implementation for XPropertySet, which lock's 
the same mutex the the frame it does. So the chance for a deadlock was 
decreased.
Comment 4 Mathias_Bauer 2005-06-28 07:54:05 UTC
Retargetted due to the importance of the issue
Comment 5 Mathias_Bauer 2005-06-28 07:54:50 UTC
Retargetted due to the importance of the issue
Comment 6 andreas.schluens 2005-07-06 12:43:12 UTC
AS->CN: Please verify this task on the cws fwk16. THX.

re-open issue and reassign to cn@openoffice.org
Comment 7 andreas.schluens 2005-07-06 12:43:16 UTC
reassign to cn@openoffice.org
Comment 8 andreas.schluens 2005-07-06 12:43:20 UTC
reset resolution to FIXED
Comment 9 chne 2005-07-08 11:10:54 UTC
verified in fwk16
Comment 10 chne 2005-07-22 15:18:54 UTC
no deadlock in src680_m119 => zu