Issue 100159 - unexpected exception from oooimprovement during shut down
Summary: unexpected exception from oooimprovement during shut down
Status: CLOSED FIXED
Alias: None
Product: General
Classification: Code
Component: code (show other issues)
Version: DEV300m42
Hardware: All All
: P2 Trivial (vote)
Target Milestone: 3.4.0
Assignee: Stephan Bergmann
QA Contact: issues@framework
URL:
Keywords: usagetracking
: 113145 (view as issue list)
Depends on:
Blocks:
 
Reported: 2009-03-12 17:28 UTC by Stephan Bergmann
Modified: 2010-09-22 09:29 UTC (History)
1 user (show)

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


Attachments
proposed patch vs. DEV300_m84 (3.15 KB, patch)
2010-07-16 15:21 UTC, bjoern.michaelsen
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description Stephan Bergmann 2009-03-12 17:28:55 UTC
Observed with a (CWS sb107 based-on) DEV300m42 unxlngi6.pro OOo:  Starting and
just terminating again (Ctrl-Q) soffice -swriter with soffice.bin under
callgrind (valgrind-3.4.0-Debian) control sometimes causes soffice.bin to crash
during shut down with an unexpected exception, either like this:

---8<---
terminate called after throwing an instance of
'com::sun::star::lang::DisposedException'
Fatal exception: Signal 6
Stack:
/sb-treof/ooo-sb107/openoffice.org3/program/../basis-link/ure-link/lib/libuno_sal.so.3[0x40405c6]
/sb-treof/ooo-sb107/openoffice.org3/program/../basis-link/ure-link/lib/libuno_sal.so.3[0x40406f0]
/sb-treof/ooo-sb107/openoffice.org3/program/../basis-link/ure-link/lib/libuno_sal.so.3[0x404079d]
/lib/i686/cmov/libpthread.so.0[0x43795b8]
/lib/i686/cmov/libc.so.6(abort+0x188)[0x4583018]
/sb-treof/ooo-sb107/openoffice.org3/program/../basis-link/ure-link/lib/libstdc++.so.6(_ZN9__gnu_cxx27__verbose_terminate_handlerEv+0x101)[0x44faad1]
/sb-treof/ooo-sb107/openoffice.org3/program/../basis-link/ure-link/lib/libstdc++.so.6[0x44f8505]
/sb-treof/ooo-sb107/openoffice.org3/program/../basis-link/ure-link/lib/libstdc++.so.6[0x44f8542]
/sb-treof/ooo-sb107/openoffice.org3/program/../basis-link/ure-link/lib/libstdc++.so.6[0x44f86d2]
/sb-treof/ooo-sb107/openoffice.org/ure/lib/bootstrap.uno.so[0x7c6a585]
/sb-treof/ooo-sb107/openoffice.org/ure/lib/bootstrap.uno.so[0x7c5eb55]
/sb-treof/ooo-sb107/openoffice.org/ure/lib/bootstrap.uno.so[0x7c5e263]
/sb-treof/ooo-sb107/openoffice.org3/program/../basis-link/program/liboooimprovementli.so[0xb641120]
/sb-treof/ooo-sb107/openoffice.org3/program/../basis-link/program/liboooimprovementli.so[0xb641d44]
/sb-treof/ooo-sb107/openoffice.org3/program/../basis-link/program/liboooimprovementli.so[0xb642729]
/sb-treof/ooo-sb107/openoffice.org3/program/../basis-link/program/liboooimprovementli.so[0xb649cc2]
/sb-treof/ooo-sb107/openoffice.org3/program/../basis-link/program/liboooimprovementli.so[0xb64a517]
/sb-treof/ooo-sb107/openoffice.org3/program/../basis-link/ure-link/lib/libuno_sal.so.3[0x40392a9]
/lib/i686/cmov/libpthread.so.0[0x43714c0]
/lib/i686/cmov/libc.so.6(clone+0x5e)[0x46366de]
---8<---

or like this (however, due to the missing stack, it is unclear whether this
indeed has the same cause):

---8<---
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
---8<---
Comment 1 bjoern.michaelsen 2009-03-13 17:07:07 UTC
Looks like a race condition related to shutdown of UNO services. Since this
probably isnt easily reproducable, could you try to create a stack trace with
module extensions build with debug=true (for liboooimprovement)? I already have
an idea what this is about, but as shutdown is fragile stuff, I want to be sure
to turn the right screws.
Comment 2 Stephan Bergmann 2009-03-16 12:08:41 UTC
@b_michaelsen:  debug=true would not lead to better stack traces.  I can only
reproduce this when running under valgrind, so the only stack trace available is
the one printed by valgrind.  And all the libraries in the used OOo installation
are already unstripped, but valgrind apparently chooses not to display symbol
information here anyway.
Comment 3 Stephan Bergmann 2010-04-26 12:46:46 UTC
Observed what is probably the same problem on DEV300_m77 based CWS sb120,
unxmacxi non-pro, when executing configmgr/qa/unoapi:  Stdout/err output
mentions "terminate called after throwing an instance of
com::sun::star::uno::RuntimeException'" and stack trace is

(gdb) where
#0  0x96ef862e in __ovfl_delete ()
#1  0x96ef868a in abort ()
#2  0x92ee5005 in _CUICopyIconURL ()
#3  0x92ee310c in _CUICopyIconURL ()
#4  0x92ee314b in _CUICopyIconURL ()
#5  0x92ee3261 in _CUICopyIconURL ()
#6  0x019799e3 in ucbhelper::getContentBroker ()
#7  0x0197a12b in ucbhelper::Content::Content ()
#8  0x18d794f3 in io_FileAccess::OFileAccess::getFolderContents ()
#9  0x18a2b1f9 in (anonymous namespace)::getLogStoragefiles ()
#10 0x18a2b750 in oooimprovement::LogStorage::clear ()
#11 0x18a2bfd1 in (anonymous namespace)::OnLogRotateThread::run ()
#12 0x18a333ba in threadFunc ()
#13 0x001fd5b7 in osl_thread_start_Impl ()
#14 0x96e3d155 in _pthread_start ()
#15 0x96e3d012 in thread_start ()

where the _CUICopyIconURL frames are inside libstdc++ (so this is probably
throwing the "No Content Broker!" exception from
ucbhelper/source/client/content.cxx leading to terminate/abort), and the main
thread is already in DestroyApplicationServiceManager within DeInitVCL.
Comment 4 Stephan Bergmann 2010-04-27 15:02:21 UTC
Observed what is probably the same problem on DEV300_m77 based CWS sb120,
unxsols4.pro, when executing ucb/qa/unoapi:  "Fatal exception: Signal 6" during
termination, with stack

(dbx) where -h
current thread: t@6
=>[1] __lwp_kill(0x0, 0x6, 0x0, 0x6, 0xffbffeff, 0x0), at 0xff2caa58
  [2] raise(0x6, 0x0, 0xff342f18, 0xff2aa378, 0xffffffff, 0x6), at 0xff265a5c
  [3] abort(0x6, 0x1, 0xff069e30, 0xfcb78, 0xff3413d8, 0x0), at 0xff24194c
  [4] CallSystemHandler(0x6, 0x2, 0xff069dd4, 0x274c, 0xff06c524, 0x2400), at
0xff023e14
  [5] SignalHandlerFunction(0x6, 0x7, 0xff023e28, 0x2, 0xa4, 0x0), at 0xff023f64
  [6] __sighndlr(0x6, 0x0, 0xf2bfb640, 0xff023e6c, 0x0, 0x0), at 0xff2c6e78
  ---- called from signal handler with signal 6 (SIGABRT) ------
  [7] __lwp_kill(0x0, 0x6, 0xd5748, 0xff2b89b8, 0xff347390, 0x0), at 0xff2caa58
  [8] raise(0x6, 0x6, 0x5, 0x6, 0x82bf8, 0x0), at 0xff265a5c
  [9] abort(0xf2bfb9b8, 0xf2fa13c8, 0xff37cb68, 0xfcb78, 0x17248, 0xff381458),
at 0xff24190c
  [10] __Cimpl::default_terminate(0xff381458, 0xff343800, 0xff3813f8,
0xff37c9f8, 0x17248, 0xff3653ec), at 0xff3653f0
  [11] __Cimpl::ex_terminate(0xff37d3c0, 0x0, 0x0, 0xff37d3c0, 0xff37c9f8, 0x1),
at 0xff365200
  [12] _ex_rethrow_body(0xff37d3c0, 0x0, 0x0, 0x16ae0, 0xbab, 0xff1f35e8), at
0xff365fa8
  [13] __Crun::ex_chk_unexpected(0xff37d1a4, 0x0, 0xff343800, 0x0, 0x166d8,
0x0), at 0xff3663c4
  [14] io_FileAccess::OFileAccess::getFolderContents(0xf2bfbdac, 0xf56066c8,
0xf2bfbd10, 0x0, 0xf882b854, 0xf88c21a8), at 0xf5d56400
  [15] __unnamed_CHEEK16l0LkMc::getAllLogStoragefiles(0xf2bfbdac, 0xf2bfbeac,
0xf56066dc, 0xf5dd8c40, 0xf5dd81c4, 0x11000), at 0xf5dbb788
  [16] __unnamed_CHEEK16l0LkMc::getLogStoragefiles(0xf2bfbe18, 0xf2bfbeac,
0xf5dbb62c, 0xf2bfbdac, 0xf5dd81c4, 0xf5dd8a88), at 0xf5dbb8c0
  [17] oooimprovement::LogStorage::clear(0xf2bfbeac, 0xf5601d4c, 0xfee00d58,
0xf5dd81c4, 0xfffeefb1, 0x11000), at 0xf5dbbf7c
  [18] __unnamed_CHEEK26l0LEOc::OnLogRotateThread::run(0xf2de8a78, 0x1e,
0xf5dd8c88, 0xf5dd81c4, 0xf2de8a80, 0x0), at 0xf5dbd0a4
  [19] threadFunc(0xf2de8a78, 0xf2bfbf90, 0xff343800, 0x0, 0xf5dd8d90,
0xf5dbcfe0), at 0xf5dbdedc
  [20] osl_thread_start_Impl(0x931e20, 0xf5dbded0, 0x16, 0xff01d9e0, 0xff069dd4,
0x931e48), at 0xff01dbd4
Comment 5 Stephan Bergmann 2010-07-14 15:47:27 UTC
*** Issue 113145 has been marked as a duplicate of this issue. ***
Comment 6 Stephan Bergmann 2010-07-14 15:50:36 UTC
quoting issue 113145: "What looks wrong in
extensions/source/oooimprovement/onlogrotate_job.cxx is the unused
OnLogRotateThread::disposing together with the fact that there is no join on the
'new OnLogRotateThread(m_ServiceFactory)'."

raising prio, as this affects build stability (see
<http://tools.openoffice.org/servlets/ReadMsg?list=tinderbox&msgNo=398> for
enabling subsequenttests on buildbots)
Comment 7 bjoern.michaelsen 2010-07-16 15:21:49 UTC
Created attachment 70658 [details]
proposed patch vs. DEV300_m84
Comment 8 bjoern.michaelsen 2010-07-22 21:13:41 UTC
reassign to sb, IIRC patch is integrated in one of your cws?
Comment 9 Stephan Bergmann 2010-07-23 07:50:19 UTC
@b_michaelsen:  I included the patch in my experimental CWS sb127, which however
is only used to experiment with enabling subsequenttests on buildbots, and is
never to be integrated.  It appeared to work there (the sporadically appearing
problem did not appear since, and it had no other negative impact), so please
integrate it yourself via some proper CWS of yours (I have none handy at the
moment).
Comment 10 bjoern.michaelsen 2010-07-26 17:27:48 UTC
added usagetracking keyword
Comment 11 bjoern.michaelsen 2010-08-11 07:32:28 UTC
added fix to cws oooimprovement6 => STARTED
Comment 12 bjoern.michaelsen 2010-08-11 07:33:44 UTC
fixed in cws oooimprovement6 with changeset 7f47dba0c135
Comment 13 bjoern.michaelsen 2010-08-12 10:20:58 UTC
setting release 3.4
Comment 14 bjoern.michaelsen 2010-08-20 11:13:35 UTC
reassigning to sb for verification
Comment 15 Stephan Bergmann 2010-08-20 12:32:33 UTC
verified, see <#desc10>
Comment 16 Stephan Bergmann 2010-09-22 09:29:57 UTC
.