Bug 541876

Summary: Fatal error in "createLocalId" in uno_getIdOfCurrentThread in makepdfs.py
Product: [Fedora] Fedora Reporter: Steve Rogerson <steve.bz>
Component: openoffice.orgAssignee: Caolan McNamara <caolanm>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 12CC: caolanm, dmalcolm, dtardon, ivazqueznet, james.antill, jonathansteffan, katzj, lu9fcx
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: abrt_hash:424e8931657c56b84382ad0df9d53b685566ed07
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-12-07 10:58:32 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
File: backtrace
none
valgrind log
none
this might work, park it here for the day none

Description Steve Rogerson 2009-11-27 11:36:57 UTC
abrt detected a crash.

Comment: convert on oo doc to a pdf
Attached file: backtrace
cmdline: python makepdfs.py source_docs/whAgentLoad.odt
component: python
executable: /usr/bin/python
kernel: 2.6.31.5-127.fc12.x86_64
package: python-2.6.2-2.fc12
rating: 3
reason: Process was terminated by signal 11

Comment 1 Steve Rogerson 2009-11-27 11:37:01 UTC
Created attachment 374200 [details]
File: backtrace

Comment 2 Dave Malcolm 2009-12-01 02:21:57 UTC
Thank you for reporting this bug.

How reproducable is this problem?  If you run the program from a terminal, is an error message printed?

Looking at the backtrace, it looks like the problem occurred in thread #1 in createLocalId from uno_getIdOfCurrentThread

Is this using the openoffice.org python bindings? (I'm not familiar with this code)

What version of openoffice.org do you have installed?

Comment 3 David Tardon 2009-12-01 07:47:32 UTC
dtardon->steve.bz: Is the crash reproducible? If it is, could you give us the conversion script (makepdfs.py), so we can try it for ourselves?

Comment 4 Caolan McNamara 2009-12-01 08:14:25 UTC
*** Bug 542514 has been marked as a duplicate of this bug. ***

Comment 5 Caolan McNamara 2009-12-01 08:18:51 UTC
Given the "rtl_cache_wsupdate_fini" in one of the other threads I bet this happens at shutdown time and there's some thread using stuff that has gone away, something *like* http://qa.openoffice.org/issues/show_bug.cgi?id=97975 but not the same as that one

Comment 6 David Tardon 2009-12-01 08:21:29 UTC
dtardon->caolanm: Maybe related to http://www.openoffice.org/issues/show_bug.cgi?id=100367 ?

Comment 7 Caolan McNamara 2009-12-01 10:18:32 UTC
Something like that maybe, I doubt its the exact same one though, but definitely in that screwed life-cycle category. We'd need someway to reproduce, or semi-reproduce this to be sure.

Comment 8 Steve Rogerson 2009-12-01 10:37:48 UTC
It's pretty reproducible in the sense that the script is run in  "make" to turn a set of odts into pdfs. What happens is that it does about 3-4 files then aborts. Running again picks up where it left off, does about another 4 and then aborts. The program is run from a terminal, the only error that is displayed is "Segmentation Error".


When I start ooffice    we get a (probably) unlrelated error:
ooffice -headless "-accept=socket,host=localhost,port=2002;urp;StarOffice.ServiceManager" &

Gtk-Message: Failed to load module "gnomebreakpad": libgnomebreakpad.so: cannot open shared object file: No such file or directory

OO version 3.11  OOO301m19 (Build:9420)
Ver. 3.1.1-19.14.fc12


I am not happy about putting the script up for view as I didn't write it and am not in a position to get permission from the author, nothing deep, he's on holiday. I am happy about mailing direct though - dtardon ocaolanm?

Comment 9 David Tardon 2009-12-01 10:56:47 UTC
dtardon->steve.bz: that'd be wonderful. Just mail it to caolanm and add me to cc, please.

Comment 10 Caolan McNamara 2009-12-01 20:42:18 UTC
Tried the script, found a pair of (fairly) trivial problems with a set of random .odts which are unrelated to this. Not able to reproduce the reported problem however on i686 or x86_64 with or without valgrind and with or without the headless rpm installed. A tricky one apparently.

Comment 11 Caolan McNamara 2009-12-02 10:00:59 UTC
Created attachment 375386 [details]
valgrind log

*doh*, stupid me. I was valgrind the OOo instance, that's no what's crashing of course :-), its the python script that's dying. Thread exists beyond main.

Comment 12 Caolan McNamara 2009-12-02 14:49:44 UTC
sigh, that thread is only shutdown when "dispose" is called on the "environment". That doesn't happen at the moment unless the CPPU_STATIC_LEAK stuff is commented out. If it is commented out then the thread at least theoretically could be shutdown, but the order of destruction of classes is totally busted up, which is probably why its left to leak at the moment.

Comment 13 Caolan McNamara 2009-12-03 16:40:36 UTC
Created attachment 375829 [details]
this might work, park it here for the day

Comment 14 Caolan McNamara 2009-12-07 10:58:32 UTC
Suggested the patch upstream as http://www.openoffice.org/issues/show_bug.cgi?id=107490

This is a nasty knot of problems. I'm fairly happy with the changes in my patch, but its quite likely that there are a set of *other* bugs which are currently unseen that would be revealed afterwards. The current situation is a crash on shutdown, the risk is a deadlock and hang instead, so I'm reluctant to go-it-alone on this one without some upstream feedback.

If you just want a quick-fix, then simply ignoring the return value of the conversion script in the .sh would do the trick. The crash only takes place after all work has been safely done.

If upstream eventually agrees with the approach I'll backport this in.