Apache OpenOffice (AOO) Bugzilla – Issue 8492
autopilot crashes
Last modified: 2013-08-07 14:41:36 UTC
I haven't tried to use autopilot in awhile, but I just attempted to use it to make a business letter. I choose business letter, modern. No logo. Entered my address. I don't understand how the address database thing works, so I entered the whole TO address in the field. Made a few more selections and hit Create. The program then throws up an error in soffice.exe. Runtime Error! abnormal application termination. And then the whole thing closes. The only thing I can think that I've changed is the default template. I changed the font and one of the styles.
No reporter-activity for 7 month no votes No other one who confirmed the problem I sometimes have OOo-crashes, too, but as far as I see that are "not enough ressources - errors". I think we should close that issue, if someone still sees the problem, the issue can be reopened Rainer
I'm getting an error as soon as the document is created: Error loading BASIC of document file:///home/dank/OpenOffice.org1.1beta2/user/basic/dialog.xlc/: General Error. General input/output error. This didn't trigger anything in gdb or valgrind, so it was purely a file i/o error. Now, dialog.xlc seems to live in /opt/OpenOffice1.1beta2. As recently as 1.1beta1, though, I did see it in the user's directory; has it moved? I think I got something different first time I tried following his instructions... it let me get as far as saving, then gave me some similar error. Couldn't open /opt/... for writing, I imagine. So even though this isn't *quite* the bug Stefan saw, it's close enough for government work, and it makes the autopilot pretty useless. Tsk, tsk, tsk.
Trying to reproduce the first error I saw, I wiped my local OpenOffice directory, reinstalled, and this time ran under valgrind on an utterly fresh install, following Lora's instructions. When I clicked 'create', a message window came up, informing me "Initializing templates for first time use" (approximate wording). About the same time, Valgrind reported a nasty "pthraed_mutex_destroy: mutex is still in use" error in osl_destroyMutex. 2nd one I've gotten tonight, must be karma. Anyway, this could explain Lora's crash, I think. No idea why my script.xlc file was missing; maybe that's a side-effect of not catching this problem and continuing to run. I'll attach the stack dump anon.
Created attachment 7437 [details] Crash of very fresh OOo1.1beta2 install on RH9 under Valgrind trying to use autopilot
adding myself to cc list
Dan, could you please clear, step by step instructions on how to reproduce the error? The original report is too vague to clearly isolate the problem. It works for me in 1.1 Beta 2.
0. Find a Red Hat 8.0 x86 system (others may do, but that's what I used) 1. Install valgrind 1.9.6. 2. Delete the ~/OpenOffice1.1 directory. 3. Do a net install into your ~/OpenOffice1.1 directory 4. Run OpenOffice under Valgrind (see http://kegel.com/openoffice/#valgrind) 5. Create a template. The dialog box "Initializing templates for first time use" should pop up, and the stack traceback of the problem should appear in the valgrind log.
Reassigned to Hasan.
HI->OS: Please take a look of the comments from Dan Kegel.
As far as I understand the initial problem doesn't occur anymore. That's a good reason to change the target and Prio. The mutex - error doesn't have anything to do with the AutoPilot. It's simply triggered due to the first use of templates. OS->KSO: Do you have an idea regarding the "pthraed_mutex_destroy: mutex is still in use" error?
Once you violate mutex usage rules, all bets are off. Please fix the mutex error! We have not heard from the reporter, so we don't know at all whether he's still seeing the problem, but we do have a serious programming error staring us in the face, and it *must be fixed before release*.
Adding keyword 'valgrind'.
Sorry for mangling the error message. Here it is in case, so this issue will pop up if someone searches for it without my misspelling: pthread_mutex_destroy: mutex is still in use at 0x41384C9D: pthread_error (vg_libpthread.c:292) by 0x41385B49: __pthread_mutex_destroy (vg_libpthread.c:1002) by 0x40979D4F: osl_destroyMutex (in /opt/OpenOffice.org1.1beta2/program/libsal.so.3.1.0)
Removing myself from CC Rainer
Dan, would it be possible to provide a call stack with symbols for libucb1.so and libucphier1.so? This would be really helpful.
Sure, but it'll take me a day or so to find the disk space to unpack the debug build of OOo1.1rc1 Julian Seward sent me(!). It might be faster if you ran valgrind on a debug build yourself on a fresh install of OOo for x86 Linux. Have you tried that yet? It's well worth the effort... see http://kegel.com/openoffice/#valgrind for details. I'm cc'ing Julian on this issue since he's currently in "help the OpenOffice team learn to trust and love Valgrind" mode :-)
Valgrind showed a couple of invalid writes on this one, which may have trashed the heap. These happen soon after the "Initializing templates for first time use" box comes up. These writes happen at inivctl1.cxx:4192, which is EntryList_Impl::~EntryList_Impl() { _pOwner->pHead = 0; // line 4192 } This is for OOo 1.1RC2. FWIW valgrind shows very few invalid writes in OOo, so this might be worth looking into.
Created attachment 8130 [details] Stack traces (with symbols) for invalid writes flagged by Valgrind
Lora, *, does OO 1.1RC2 still crash when using the Autopilot like described by this issue? I'm unable to reproduce the crash. If nobody can reproduce the crash anymore I will resend this issue to Lora for closing. Dan, to avoid mixing things up, could you please file a new issue for the "mutex is still in use" problem in case it still exists in RC2. Although it is not yet clear who is actually responsible for fixing the problem I volunteer to be the initial owner.
I just tried the autopilot and it worked. I was able to make a form letter.
The invalid writes nevertheless suggest something is wrong and needs looking into. This "sometimes it works, sometimes it fails" phenomenon is symptomatic of obscure memory management bugs and is really what valgrind is designed to uncover.
Julian, yes, you're right, we should investigate into the "invalid writes" problem, too. I suggest that you submit another IssueZilla task especially for this. BTW: The stacks you provided seem to be slightly incorrect. Class GroupData_Impl has a member of type EntryField_Impl, which is defined in sfx/source/doc/doctemplates.cxx. According to your stacks an instance of class EntryField_Impl defined in svtools/source/cntnr/imivctl1.cxx gets called from GroupData_Impl dtor. This does not make sense.
Some more information: I'm able to reproduce the "mutex in use" issue (tried OO1.1beta2 and OO 1.1rc2, both suffer from the problem). Unable I'm NOT able to reproduce the "invalid writes" problem. Julian, could you please give step-by-step instruections what to do to reproduce the problem.
Build 1.1rc2 with -g and (importantly) alloc.c (somewhere in sal/) with -DFORCE_SYSALLOC=1 (check in alloc.c for the exact spelling of this macro name). Build valgrind-20030725. Do whatever you have to do so that when OOo is started and you go to the autopilot, you will get the 'Initializing templates for first time use" box. Start oo like this (or equivalent, this is what I do) valgrind -v --trace-children=yes --num-callers=20 --freelist-vol=20000000 /path/to/soffice. I usually use /usr/bin/script to capture the huge amount of text V spews out. Do stuff with OOo so said dialog box appears. After it appears, cancel and exit OOo. Somewhere amongst the huge number of complaints about uninitialised value use, you should find two errors of the form "Invalid write of size 4". (Search for the text "Invalid"). This is what you are after. (The uninit stuff should be fixed too, at some stage).
Hi Lora, the bug I've been looking at only happens the first time you use the autopilot after installing OpenOffice. Can you remember whether the problem you ran into was after a fresh install or upgrade?
Dan, could you please file an IssueZilla task for the "mutex still in use" problem. Julian, could you please file an IssueZilla task for the "invalid write" problem. Otherwise I cannot send this task back to Lora for closing.
I'm bad, I upgrade instead of doing fresh installs each time.
Hi Lora, ok, but did the problem happen the first time you used the autopilot after an upgrade?
Hi all, there might be no need to reinstall OO in order to try to reproduce the bug. You can force template reinitialization by simply doing a 'rm <offiinst>/user/registry/data/org/openoffice/ucb/*' before starting OO. I did so and was able to reproduce the mutex-still-in-use problem savely all the times. BTW: I know about that details here because I implemented the persistence stuff that is used by the template management code.
OK Kai, I created issue 17725 for you with just the mutex problem. The ball is in your court.
I honestly don't remember when after an upgrade it was. It happened every time though. It doesn't happen in the newest build I got, and that was an upgrade as well.
Created issue 17727 just for the illegal write as requested by Kai.
As it seems that the initial problem does no longer occure and now that we have written issues for the other problems discovered during working on this task I send it back to Lora for closing.
.
Closing.
remove keyword 'valgrind'