Bug 104434 - Dump and slow saving of specific XLSX
Summary: Dump and slow saving of specific XLSX
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.3.0.0.beta1
Hardware: All All
: medium normal
Assignee: Eike Rathke
URL:
Whiteboard: target:5.4.0 target:5.3.0.1
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-06 13:01 UTC by Timur
Modified: 2023-06-19 10:02 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
test case doc as saved by 5-3 (7.15 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2016-12-06 17:08 UTC, Eike Rathke
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Timur 2016-12-06 13:01:58 UTC
Description:
Dump and slow saving of specific XLSX when tested with master 5.4+

Steps to Reproduce:
1. Open XLSX attachment 122902 [details] from Bug 98106
2. Save as XLSX
3. (optionally) use path-to\SYSINTERNALSSUITE\procdump.exe soffice.bin -h   path-to\soffice.bin.dmp

Actual Results:  
Unusually slow saving and dump. Tested in Windows 7.

Expected Results:
Normal save like with previous versions. 


Reproducible: Always

User Profile Reset: 

Additional Info:
0:000> !analyze -v
*******************************************************************************
*                                                                             *
*                        Exception Analysis                                   *
*                                                                             *
*******************************************************************************

*** ERROR: Symbol file could not be found.  Defaulted to export symbols for soffice.bin - 
GetUrlPageData2 (WinHttp) failed: 12029.

FAULTING_IP: 
+1e5b6cc071980000
00000000 ??              ???

EXCEPTION_RECORD:  ffffffff -- (.exr 0xffffffffffffffff)
ExceptionAddress: 00000000
   ExceptionCode: 80000003 (Break instruction exception)
  ExceptionFlags: 00000000
NumberParameters: 0

CONTEXT:  00000000 -- (.cxr 0x0;r)
eax=00000000 ebx=00000000 ecx=20551c80 edx=20551c08 esi=20551c84 edi=00000000
eip=51a02220 esp=00ddb9fc ebp=00ddba14 iopl=0         nv up ei pl zr na pe nc
cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00000246
scfiltlo!std::_Tree_val<std::_Tree_simple_types<std::pair<unsigned long const ,std::shared_ptr<XclExpRow> > > >::_Parent:
51a02220 55              push    ebp

FAULTING_THREAD:  000015c4

DEFAULT_BUCKET_ID:  STATUS_BREAKPOINT

PROCESS_NAME:  soffice.bin

ERROR_CODE: (NTSTATUS) 0x80000003 - {EXCEPTION}  Breakpoint  A breakpoint has been reached.

EXCEPTION_CODE: (HRESULT) 0x80000003 (2147483651) - One or more arguments are invalid

NTGLOBALFLAG:  400

APPLICATION_VERIFIER_FLAGS:  0

APP:  soffice.bin

ANALYSIS_VERSION: 6.3.9600.16384 (debuggers(dbg).130821-1623) x86fre

PRIMARY_PROBLEM_CLASS:  STATUS_BREAKPOINT

BUGCHECK_STR:  APPLICATION_FAULT_STATUS_BREAKPOINT

LAST_CONTROL_TRANSFER:  from 519e0180 to 51a02220

STACK_TEXT:  
00ddb9f8 519e0180 20551c80 57c29c70 20551c80 scfiltlo!std::_Tree_val<std::_Tree_simple_types<std::pair<unsigned long const ,std::shared_ptr<XclExpRow> > > >::_Parent
00ddba14 519e426a 00ddba40 00000000 20551c08 scfiltlo!std::_Tree<std::_Tmap_traits<unsigned long,std::shared_ptr<XclExpRow>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,std::shared_ptr<XclExpRow> > >,0> >::_Insert_at<std::pair<unsigned long const ,std::shared_ptr<XclExpRow> >,std::_Nil>+0x2f0
00ddbad8 51a091aa 00ddbb18 00000000 00ddbb0c scfiltlo!std::_Tree<std::_Tmap_traits<unsigned long,std::shared_ptr<XclExpRow>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,std::shared_ptr<XclExpRow> > >,0> >::_Insert_nohint<std::pair<unsigned long const ,std::shared_ptr<XclExpRow> >,std::_Nil>+0x2ea
00ddbaf4 519f7649 00ddbb18 00ddbb0c de5306bd scfiltlo!std::_Tree<std::_Tmap_traits<unsigned long,std::shared_ptr<XclExpRow>,std::less<unsigned long>,std::allocator<std::pair<unsigned long const ,std::shared_ptr<XclExpRow> > >,0> >::insert+0x2a
00ddbb6c 519f4965 00059e81 00000000 00ddbe10 scfiltlo!XclExpRowBuffer::GetOrCreateRow+0x219
00ddbb88 519ee528 00ddbe10 00000000 de530385 scfiltlo!XclExpRowBuffer::AppendCell+0x65
00ddbe54 5187c8c6 0e3b5f1c de530205 77ace172 scfiltlo!XclExpCellTable::XclExpCellTable+0xcc8
00ddbfd4 5187d6bc de537d95 00000000 04e92394 scfiltlo!ExcTable::FillAsTableXml+0x116
00ddc044 519b5bd1 de537ea1 51d98240 00ddc130 scfiltlo!ExcDocument::ReadDoc+0x19c
00ddc370 531cda99 de6c6a36 00000000 00000000 scfiltlo!XclExpXmlStream::exportDocument+0x6a1
00ddc3c4 51bae328 09cb165c 00ddc5b0 de5379dd ooxlo!oox::core::FilterBase::filter+0x279
00ddc40c 57281b94 0458c47c 00ddc5b0 d8f86d1b scfiltlo!oox::xls::ExcelFilter::filter+0x168
00ddc5c8 572885df 069635b8 d8f878db 00000000 sfxlo!SfxObjectShell::ExportTo+0xa74
00ddd008 57284e17 069635b8 00000000 d8f8783b sfxlo!SfxObjectShell::SaveTo_Impl+0x217f
00ddd0e8 5727c8f3 00ddd2bc 00ddd468 0e287c78 sfxlo!SfxObjectShell::PreDoSaveAs_Impl+0x457
00ddd388 5727422e 00ddd3a0 00ddd468 0e287c78 sfxlo!SfxObjectShell::CommonSaveAs_Impl+0x893
00ddd480 572c8c49 00dddc30 0e287c78 d8f87f47 sfxlo!SfxObjectShell::APISaveAs_Impl+0x30e
00ddd794 572ce6d4 00dddc30 00dde51c 00000000 sfxlo!SfxBaseModel::impl_store+0xc79
00ddd7e4 57257e79 06de4590 00dddc30 00dde51c sfxlo!SfxBaseModel::storeAsURL+0xf4
00ddded8 57275bde 00dde3f0 00dde3e8 00dde51c sfxlo!SfxStoringHelper::GUIStoreModel+0x2119
00dde578 572792da 00dde844 00dde598 570cd812 sfxlo!SfxObjectShell::ExecFile_Impl+0x13fe
00dde584 570cd812 0ded90f8 00dde844 0ded90f8 sfxlo!SfxStubSfxObjectShellExecFile_Impl+0x1a
00dde598 570ed633 572792c0 00dde844 572792c0 sfxlo!SfxShell::CallExec+0x12
00dde5b8 52a89bf4 00dde844 04c0f840 00dde5d8 sfxlo!SfxShell::ExecuteSlot+0xc3
00dde5dc 52a7b83a 00dde844 00dde5fc 570cd812 sclo!ScTabViewShell::ExecuteSave+0xd4
00dde5e8 570cd812 06b3cb08 00dde844 06b3cb08 sclo!SfxStubScTabViewShellExecuteSave+0x1a
00dde5fc 570cda91 52a7b820 00dde844 d8f84ebb sfxlo!SfxShell::CallExec+0x12
00dde668 570cfbc2 06b3cb08 530bd4a8 00dde844 sfxlo!SfxDispatcher::Call_Impl+0x271
00dde6b8 570b51de 06b3cb08 530bd4a8 00dde844 sfxlo!SfxDispatcher::Execute_+0x282
00dde770 5711f13e 00dde844 530bd4a8 06b3cb08 sfxlo!SfxBindings::Execute_Impl+0x55e
00dde934 5711f50c 0e2e1308 00dde984 00ddea28 sfxlo!SfxDispatchController_Impl::dispatch+0x8ae
00dde96c 55447895 0559cd84 00dde984 00ddea28 sfxlo!SfxOfficeDispatch::dispatch+0x7c
00ddea50 55445e9f 067ad6f0 00ddea74 576d7b79 fwklo!framework::MenuBarManager::Select+0x445
00ddea5c 576d7b79 0514dab0 067ad6f0 067ad724 fwklo!framework::MenuBarManager::LinkStubSelect+0xf
00ddea74 576e03ee 067ad6f0 d8f843fe 00000000 vcllo!Link<Menu *,bool>::Call+0x29
00ddeaa0 576dad9e 067ad6f0 00ddeab8 576dff3f vcllo!Menu::Select+0x7e
00ddeaac 576dff3f 00000000 00ddeacc 57785c93 vcllo!Menu::ImplCallSelect+0x1e
00ddeab8 57785c93 067ad6f0 00000000 067d9944 vcllo!Menu::LinkStubImplCallSelect+0xf
00ddeacc 5778bec8 00000000 04be3ffc 00ddeae8 vcllo!Link<void *,void>::Call+0x23
00ddeae4 5778c6d2 067d9940 d8f84596 57c29c70 vcllo!ImplHandleUserEvent+0x28
00ddecc8 57c1f9de 04be3eb8 00000013 067d9940 vcllo!ImplWindowFrameProc+0x692
00ddece4 57c25efc 00000013 067d9940 04be4250 vcllo!SalFrame::CallCallback+0x2e
00ddecf8 57c29517 002605b2 067d9940 d8f8471e vcllo!ImplHandleUserEvent+0x2c
00ddee40 57c29cd1 002605b2 00000482 00000000 vcllo!SalFrameWndProc+0x797
00ddee90 770f62fa 002605b2 00000482 00000000 vcllo!SalFrameWndProcW+0x61
00ddeebc 770f6d3a 57c29c70 002605b2 00000482 user32!InternalCallWinProc+0x23
00ddef34 770f77d3 00000000 57c29c70 002605b2 user32!UserCallWinProcCheckWow+0x109
00ddef98 770f789a 57c29c70 00000000 00ddefbc user32!DispatchMessageWorker+0x3cb
00ddefa8 57bcfb66 00ddefc8 00000000 0101eb88 user32!DispatchMessageW+0xf
00ddefbc 57bcfc55 00ddefc8 002605b2 00000482 vcllo!ImplSalDispatchMessage+0x36
00ddeff4 57bcfa21 00000000 00000000 0101eb88 vcllo!ImplSalYield+0x55
00ddf028 57aade0a 00000000 00000000 00000000 vcllo!WinSalInstance::DoYield+0x101
00ddf274 57ab006e 00000000 00000000 00000000 vcllo!ImplYield+0x27a
00ddf288 57aabeb6 d8f85b8e 00ddf2ac 04b9de10 vcllo!Application::Yield+0xe
00ddf2d0 65b7ee69 00ddf9e0 65b83c4d d8f85179 vcllo!Application::Execute+0x1b6
00ddf2d8 65b83c4d d8f85179 00000000 00f342fe sofficeapp!desktop::Desktop::DoExecute+0x9
00ddf9e0 57ab6387 d8f853f2 00000001 00000000 sofficeapp!desktop::Desktop::Main+0x1acd
00ddfaac 57ab682f 00000000 00ddfb2c 65bbbc14 vcllo!ImplSVMain+0x147
00ddfab8 65bbbc14 d8f853b5 65c3b44c 00000000 vcllo!SVMain+0x2f
00ddfb2c 0138100a d82583a4 00ddfb44 0138103a sofficeapp!soffice_main+0x74
WARNING: Stack unwind information not available. Following frames may be wrong.
00ddfb38 0138103a 00f95cd8 00ddfb5c 01381078 soffice+0x100a
00ddfb44 01381078 00000002 00f95cd8 00000002 soffice!main+0x1a
00ddfb5c 013812ce 01380000 00000000 00f342fe soffice!main+0x58
00ddfba8 76fe338a 7efde000 00ddfbf4 77ad9902 soffice!main+0x2ae
00ddfbb4 77ad9902 7efde000 767af13c 00000000 kernel32!BaseThreadInitThunk+0xe
00ddfbf4 77ad98d5 0138119f 7efde000 00000000 ntdll!__RtlUserThreadStart+0x70
00ddfc0c 00000000 0138119f 7efde000 00000000 ntdll!_RtlUserThreadStart+0x1b


FOLLOWUP_IP: 
scfiltlo!std::_Tree_val<std::_Tree_simple_types<std::pair<unsigned long const ,std::shared_ptr<XclExpRow> > > >::_Parent+0 [c:\program files (x86)\microsoft visual studio 12.0\vc\include\xtree @ 593]
51a02220 55              push    ebp

FAULTING_SOURCE_LINE:  c:\program files (x86)\microsoft visual studio 12.0\vc\include\xtree

FAULTING_SOURCE_FILE:  c:\program files (x86)\microsoft visual studio 12.0\vc\include\xtree

FAULTING_SOURCE_LINE_NUMBER:  593

FAULTING_SOURCE_CODE:  
No source found for 'c:\program files (x86)\microsoft visual studio 12.0\vc\include\xtree'


SYMBOL_STACK_INDEX:  0

SYMBOL_NAME:  scfiltlo!std::_Tree_val<std::_Tree_simple_types<std::pair<unsigned long const ,std::shared_ptr<XclExpRow> > > >::_Parent+ddb9f8

FOLLOWUP_NAME:  MachineOwner

MODULE_NAME: scfiltlo

IMAGE_NAME:  scfiltlo.dll

DEBUG_FLR_IMAGE_TIMESTAMP:  58370312

STACK_COMMAND:  dt ntdll!LdrpLastDllInitializer BaseDllName ; dt ntdll!LdrpFailureData ; ~0s; .ecxr ; kb

FAILURE_BUCKET_ID:  STATUS_BREAKPOINT_80000003_scfiltlo.dll!std::_Tree_val_std::_Tree_simple_types_std::pair_unsigned_long_const_,std::shared_ptr_XclExpRow_______::_Parent

BUCKET_ID:  APPLICATION_FAULT_STATUS_BREAKPOINT_scfiltlo!std::_Tree_val_std::_Tree_simple_types_std::pair_unsigned_long_const_,std::shared_ptr_XclExpRow_______::_Parent+ddb9f8

ANALYSIS_SOURCE:  UM

FAILURE_ID_HASH_STRING:  um:status_breakpoint_80000003_scfiltlo.dll!std::_tree_val_std::_tree_simple_types_std::pair_unsigned_long_const_,std::shared_ptr_xclexprow_______::_parent

FAILURE_ID_HASH:  {4c6cf4a3-3744-3258-e510-c668badda153}

Followup: MachineOwner
---------



User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0
Comment 1 Eike Rathke 2016-12-06 16:30:13 UTC
Oh great, a document that has formatting applied across the entire sheet.

I don't get a crash (or what was referred with dump?) but a sluggish save, also on 5-3 branch.
Comment 2 Bartosz 2016-12-06 16:48:30 UTC
Could you please attach mentioned .xlsx file which was resaved with LO 5.3?
Comment 3 Eike Rathke 2016-12-06 17:08:28 UTC
Created attachment 129354 [details]
test case doc as saved by 5-3

I don't know why, it can be easily generated, but here it is..
Comment 4 Bartosz 2016-12-06 22:33:21 UTC
I think bug 104451 could be related to that issue.
The file which is causing problems is attachment 129319 [details]
Comment 5 Eike Rathke 2016-12-07 16:23:50 UTC
@Bartosz: makes sense, too many rows are looped through here, which likely is directly related to https://cgit.freedesktop.org/libreoffice/core/commit/?id=5239cefff56875c7bb45c046977f1724aace0cfb and I don't get the slow down on current 5-2 branch which has most xlsx-fixes applied but not that one.
As I said already on IRC that change probably is wrong anyway.
Comment 6 Commit Notification 2016-12-07 17:06:46 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=00afb44987ccd10bce740aef53861ec53c75c95f

tdf#104434 tdf#104451 Revert "tdf#46738 Fix exporting .xlsx of coloured em"...

It will be available in 5.4.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 7 Commit Notification 2016-12-07 20:36:23 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-5-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=50d746b78f5600a94830143b1bd5facab4d60c25&h=libreoffice-5-3

tdf#104434 tdf#104451 Revert "tdf#46738 Fix exporting .xlsx of coloured em"...

It will be available in 5.3.0.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Timur 2016-12-09 13:35:23 UTC
(In reply to Eike Rathke from comment #1)
> I don't get a crash (or what was referred with dump?) but a sluggish save,
> also on 5-3 branch.

I use "Dump" as a result of procdump in Windows which I then submit to WinDbg.
Crashes are not always fatal, like this one, and LO process is recoverable then.
But it means something is wrong, I used to submit a couple of them, like Bug 103533. 
I don't know what's the exact Linux counterpart. 
 
ProcDump is a command-line utility whose primary purpose is monitoring an application for CPU spikes and generating crash dumps during a spike that an administrator or developer can use to determine the cause of the spike. ProcDump also includes hung window monitoring (using the same definition of a window hang that Windows and Task Manager use), unhandled exception monitoring and can generate dumps based on the values of system performance counters. It also can serve as a general process dump utility that you can embed in other scripts.