Trying to understand why LO seems freezed for some seconds when a module is started

julien2412 serval2412 at yahoo.fr
Sat Feb 11 10:24:53 PST 2012


Hello,

On master branch (not on 3.5 branch), each time I start a module Calc,
Writer or Impress (I didn't test on others), when I begin to type something,
it seems to freeze for some seconds (about 10 secs) then everything seems
ok.
So I runned valgrind by using this :
valgrind --tool=memcheck --num-callers=50 --trace-children=yes ./soffice.bin
2>&1 | tee /tmp/valgrind.log

With this, I can't start LO at all because there are too much errors. By
taking a look, 98% of them are like this :
==4110== Invalid write of size 4
==4110==    at 0x2E7BE641: ???
==4110==    by 0x2E7AF437: ???
==4110==    by 0x2DA518CE: JavaCalls::call_helper(JavaValue*, methodHandle*,
JavaCallArguments*, Thread*) (in
/usr/lib/jvm/java-6-openjdk-amd64/jre/lib/amd64/server/libjvm.so)
==4110==    by 0x2DA50D04: JavaCalls::call(JavaValue*, methodHandle,
JavaCallArguments*, Thread*) (in
/usr/lib/jvm/java-6-openjdk-amd64/jre/lib/amd64/server/libjvm.so)
==4110==    by 0x2DA1EBC9:
instanceKlass::call_class_initializer_impl(instanceKlassHandle, Thread*) (in
/usr/lib/jvm/java-6-openjdk-amd64/jre/lib/amd64/server/libjvm.so)
==4110==    by 0x2DA1EC04: instanceKlass::call_class_initializer(Thread*)
(in /usr/lib/jvm/java-6-openjdk-amd64/jre/lib/amd64/server/libjvm.so)
==4110==    by 0x2DA1ED96:
instanceKlass::initialize_impl(instanceKlassHandle, Thread*) (in
/usr/lib/jvm/java-6-openjdk-amd64/jre/lib/amd64/server/libjvm.so)
==4110==    by 0x2DA1F218: instanceKlass::initialize(Thread*) (in
/usr/lib/jvm/java-6-openjdk-amd64/jre/lib/amd64/server/libjvm.so)
==4110==    by 0x2DA1F062:
instanceKlass::initialize_impl(instanceKlassHandle, Thread*) (in
/usr/lib/jvm/java-6-openjdk-amd64/jre/lib/amd64/server/libjvm.so)
==4110==    by 0x2DA1F218: instanceKlass::initialize(Thread*) (in
/usr/lib/jvm/java-6-openjdk-amd64/jre/lib/amd64/server/libjvm.so)
==4110==    by 0x2DCEB655: Threads::create_vm(JavaVMInitArgs*, bool*) (in
/usr/lib/jvm/java-6-openjdk-amd64/jre/lib/amd64/server/libjvm.so)
==4110==    by 0x2DA6F920: JNI_CreateJavaVM (in
/usr/lib/jvm/java-6-openjdk-amd64/jre/lib/amd64/server/libjvm.so)
==4110==    by 0x2D376369: jfw_plugin_startJavaVirtualMachine
(sunjavaplugin.cxx:725)
==4110==    by 0xC934F16: jfw_startVM (framework.cxx:404)
==4110==    by 0x2D139F7E:
stoc_javavm::JavaVirtualMachine::getJavaVM(com::sun::star::uno::Sequence<signed
char> const&) (javavm.cxx:786)
==4110==    by 0x2CF19F24:
stoc_javaloader::JavaComponentLoader::getJavaLoader() (javaloader.cxx:179)
==4110==    by 0x2CF1B6C8:
stoc_javaloader::JavaComponentLoader::activate(rtl::OUString const&,
rtl::OUString const&, rtl::OUString const&,
com::sun::star::uno::Reference<com::sun::star::registry::XRegistryKey>
const&) (javaloader.cxx:378)
==4110==    by 0x6AC06B2:
cppu::ORegistryFactoryHelper::createModuleFactory() (factory.cxx:886)
==4110==    by 0x6ABFA0F:
cppu::ORegistryFactoryHelper::createInstanceEveryTime(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext>
const&) (factory.cxx:736)
==4110==    by 0x6ABE5B0:
cppu::OSingleFactoryHelper::createInstanceWithContext(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext>
const&) (factory.cxx:213)
==4110==    by 0x6ABEF3C:
cppu::OFactoryComponentHelper::createInstanceWithContext(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext>
const&) (factory.cxx:489)
==4110==    by 0x1150FF70:
stoc_smgr::OServiceManager::createInstanceWithContext(rtl::OUString const&,
com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext>
const&) (servicemanager.cxx:1191)
==4110==    by 0x115106E2:
stoc_smgr::OServiceManager::createInstance(rtl::OUString const&)
(servicemanager.cxx:1301)
==4110==    by 0x20EF8E72:
framework::DispatchProvider::implts_searchProtocolHandler(com::sun::star::util::URL
const&) (dispatchprovider.cxx:546)
==4110==    by 0x20EF856F:
framework::DispatchProvider::implts_queryFrameDispatch(com::sun::star::uno::Reference<com::sun::star::frame::XFrame>,
com::sun::star::util::URL const&, rtl::OUString const&, int)
(dispatchprovider.cxx:449)
==4110==    by 0x20EF6B7B:
framework::DispatchProvider::queryDispatch(com::sun::star::util::URL const&,
rtl::OUString const&, int) (dispatchprovider.cxx:149)
==4110==    by 0x2578FCF9:
SwXDispatchProviderInterceptor::queryDispatch(com::sun::star::util::URL
const&, rtl::OUString const&, int) (unodispatch.cxx:98)
==4110==    by 0x20EFA975:
framework::InterceptionHelper::queryDispatch(com::sun::star::util::URL
const&, rtl::OUString const&, int) (interceptionhelper.cxx:129)
==4110==    by 0x20FC546A:
framework::Frame::queryDispatch(com::sun::star::util::URL const&,
rtl::OUString const&, int) (frame.cxx:2068)
==4110==    by 0x85A2038: svt::ToolboxController::bindListener()
(toolboxcontroller.cxx:567)
==4110==    by 0x85A0797: svt::ToolboxController::update()
(toolboxcontroller.cxx:270)
==4110==    by 0x2103AC80:
framework::AddonsToolBarManager::FillToolbar(com::sun::star::uno::Sequence<com::sun::star::uno::Sequence&lt;com::sun::star::beans::PropertyValue>
> const&) (addonstoolbarmanager.cxx:408)
==4110==    by 0x2103F8DD:
framework::AddonsToolBarWrapper::initialize(com::sun::star::uno::Sequence<com::sun::star::uno::Any>
const&) (addonstoolbarwrapper.cxx:156)
==4110==    by 0x210A25A3:
framework::AddonsToolBoxFactory::createUIElement(rtl::OUString const&,
com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&)
(addonstoolboxfactory.cxx:209)
==4110==    by 0x210ADBB1:
framework::UIElementFactoryManager::createUIElement(rtl::OUString const&,
com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&)
(uielementfactorymanager.cxx:461)
==4110==    by 0x20F517AD:
framework::ToolbarLayoutManager::implts_createAddonsToolBars()
(toolbarlayoutmanager.cxx:1006)
==4110==    by 0x20F4E3B3:
framework::ToolbarLayoutManager::createStaticToolbars()
(toolbarlayoutmanager.cxx:406)
==4110==    by 0x20F3A880: framework::LayoutManager::implts_reset(unsigned
char) (layoutmanager.cxx:432)
==4110==    by 0x20F46B05:
framework::LayoutManager::frameAction(com::sun::star::frame::FrameActionEvent
const&) (layoutmanager.cxx:2845)
==4110==    by 0x20FC788A:
framework::Frame::implts_sendFrameActionEvent(com::sun::star::frame::FrameAction
const&) (frame.cxx:2757)
==4110==    by 0x20FC34DD:
framework::Frame::setComponent(com::sun::star::uno::Reference<com::sun::star::awt::XWindow>
const&, com::sun::star::uno::Reference<com::sun::star::frame::XController>
const&) (frame.cxx:1438)
==4110==    by 0x76F8051:
SfxFrameLoader_Impl::impl_createDocumentView(com::sun::star::uno::Reference<com::sun::star::frame::XModel2>
const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame>
const&, comphelper::NamedValueCollection const&, rtl::OUString const&)
(frmload.cxx:513)
==4110==    by 0x76F8BDC:
SfxFrameLoader_Impl::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>
const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame>
const&) (frmload.cxx:633)
==4110==    by 0x20F7E266: framework::LoadEnv::impl_loadContent()
(loadenv.cxx:1158)
==4110==    by 0x20F7AC98: framework::LoadEnv::startLoading()
(loadenv.cxx:420)
==4110==    by 0x20F02017:
framework::LoadDispatcher::impl_dispatch(com::sun::star::util::URL const&,
com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&,
com::sun::star::uno::Reference<com::sun::star::frame::XDispatchResultListener>
const&) (loaddispatcher.cxx:168)
==4110==    by 0x20F01D01:
framework::LoadDispatcher::dispatchWithReturnValue(com::sun::star::util::URL
const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>
const&) (loaddispatcher.cxx:105)
==4110==    by 0x64CBCD1:
comphelper::SynchronousDispatch::dispatch(com::sun::star::uno::Reference<com::sun::star::uno::XInterface>
const&, rtl::OUString const&, rtl::OUString const&, int,
com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&)
(synchronousdispatch.cxx:84)
==4110==    by 0x514909B:
desktop::DispatchWatcher::executeDispatchRequests(std::__debug::vector<desktop::DispatchWatcher::DispatchRequest,
std::allocator&lt;desktop::DispatchWatcher::DispatchRequest> > const&, bool)
(dispatchwatcher.cxx:396)
==4110==    by 0x5159255:
desktop::OfficeIPCThread::ExecuteCmdLineRequests(desktop::ProcessDocumentsRequest&)
(officeipcthread.cxx:1019)
==4110==  Address 0x7feff8540 is not stack'd, malloc'd or (recently) free'd

So I took a look at jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx but
that's far beyond my feeble C++ skills to understand what could be the
problem.

Now perhaps someone may have an idea.

I noticed these lines too :
   700 #ifdef MACOSX
    701     vm_args.version= JNI_VERSION_1_4; // issue 88987
    702 #else
    703     vm_args.version= JNI_VERSION_1_2;
    704 #endif
If we support jdk 1.4 min, we could use JNI version 1.4 according to this
http://docs.oracle.com/javase/1.4.2/docs/guide/jni/jni-14.html, no ? (or
perhaps it would need lots of changes to use it except for MacOS where it's
already used)

Julien.

--
View this message in context: http://nabble.documentfoundation.org/Trying-to-understand-why-LO-seems-freezed-for-some-seconds-when-a-module-is-started-tp3735600p3735600.html
Sent from the Dev mailing list archive at Nabble.com.


More information about the LibreOffice mailing list