Issue 8492 - autopilot crashes
Summary: autopilot crashes
Status: CLOSED IRREPRODUCIBLE
Alias: None
Product: Writer
Classification: Application
Component: code (show other issues)
Version: OOo 1.1 Beta2
Hardware: PC All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: darkmagess
QA Contact: issues@sw
URL:
Keywords: crash, oooqa
Depends on:
Blocks:
 
Reported: 2002-10-18 21:33 UTC by darkmagess
Modified: 2013-08-07 14:41 UTC (History)
3 users (show)

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


Attachments
Crash of very fresh OOo1.1beta2 install on RH9 under Valgrind trying to use autopilot (7.13 KB, text/plain)
2003-07-06 07:06 UTC, dankegel
no flags Details
Stack traces (with symbols) for invalid writes flagged by Valgrind (5.42 KB, text/plain)
2003-07-29 23:02 UTC, Unknown
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description darkmagess 2002-10-18 21:34:00 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.
Comment 1 Rainer Bielefeld 2003-05-20 13:02:25 UTC
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
Comment 2 dankegel 2003-07-06 06:35:52 UTC
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.
Comment 3 dankegel 2003-07-06 07:05:26 UTC
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.
Comment 4 dankegel 2003-07-06 07:06:32 UTC
Created attachment 7437 [details]
Crash of very fresh OOo1.1beta2 install on RH9 under Valgrind trying to use autopilot
Comment 5 dankegel 2003-07-06 07:07:17 UTC
adding myself to cc list
Comment 6 prgmgr 2003-07-10 17:16:37 UTC
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.
Comment 7 dankegel 2003-07-10 17:29:12 UTC
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.
Comment 8 stefan.baltzer 2003-07-14 10:38:08 UTC
Reassigned to Hasan.
Comment 9 h.ilter 2003-07-14 13:14:48 UTC
HI->OS: Please take a look of the comments from Dan Kegel.
Comment 10 Oliver Specht 2003-07-14 13:46:14 UTC
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?
Comment 11 dankegel 2003-07-14 17:17:17 UTC
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*.
Comment 12 dankegel 2003-07-22 16:28:12 UTC
Adding keyword 'valgrind'.
Comment 13 dankegel 2003-07-24 06:38:34 UTC
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)
Comment 14 Rainer Bielefeld 2003-07-25 04:51:47 UTC
Removing myself from CC

Rainer 
Comment 15 kai.sommerfeld 2003-07-29 09:52:00 UTC
Dan, would it be possible to provide a call stack with symbols for
libucb1.so and libucphier1.so? This would be really helpful.
Comment 16 dankegel 2003-07-29 17:17:46 UTC
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 :-)
Comment 17 Unknown 2003-07-29 22:59:27 UTC
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.
Comment 18 Unknown 2003-07-29 23:02:58 UTC
Created attachment 8130 [details]
Stack traces (with symbols) for invalid writes flagged by Valgrind
Comment 19 kai.sommerfeld 2003-07-30 08:22:28 UTC
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.
Comment 20 darkmagess 2003-07-30 08:38:10 UTC
I just tried the autopilot and it worked.  I was able to make a form
letter.
Comment 21 Unknown 2003-07-30 08:41:02 UTC
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. 
Comment 22 kai.sommerfeld 2003-07-30 09:28:16 UTC
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.
Comment 23 kai.sommerfeld 2003-07-30 09:41:20 UTC
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.
Comment 24 Unknown 2003-07-30 10:12:06 UTC
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). 
 
Comment 25 dankegel 2003-07-30 15:27:30 UTC
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?
Comment 26 kai.sommerfeld 2003-07-31 16:25:47 UTC
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.

Comment 27 darkmagess 2003-07-31 16:34:27 UTC
I'm bad, I upgrade instead of doing fresh installs each time.
Comment 28 dankegel 2003-07-31 16:39:59 UTC
Hi Lora,
ok, but did the problem happen the first time you
used the autopilot after an upgrade?
Comment 29 kai.sommerfeld 2003-07-31 17:08:46 UTC
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.
Comment 30 dankegel 2003-07-31 17:13:36 UTC
OK Kai, I created issue 17725 for you with just
the mutex problem.  The ball is in your court.
Comment 31 darkmagess 2003-07-31 17:16:43 UTC
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.
Comment 32 dankegel 2003-07-31 18:00:55 UTC
Created issue 17727 just for the illegal write as requested by Kai.

Comment 33 kai.sommerfeld 2003-08-01 07:57:17 UTC
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.
Comment 34 kai.sommerfeld 2003-08-01 07:58:54 UTC
.
Comment 35 darkmagess 2003-08-10 16:04:47 UTC
.
Comment 36 foskey 2004-12-06 16:34:35 UTC
Closing.
Comment 37 hans_werner67 2006-08-08 10:50:30 UTC
remove keyword 'valgrind'