Bug 227245 - [a11y] openoffice.org segfaults on exit in at-spi atexit
[a11y] openoffice.org segfaults on exit in at-spi atexit
Product: Fedora
Classification: Fedora
Component: openoffice.org (Show other bugs)
x86_64 Linux
medium Severity medium
: ---
: ---
Assigned To: Caolan McNamara
Depends On:
  Show dependency treegraph
Reported: 2007-02-03 17:12 EST by Michal Jaegermann
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version: 2.2.0-5.2
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-02-06 06:09:02 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
OOo bandaid (1.12 KB, patch)
2007-02-05 07:03 EST, Caolan McNamara
no flags Details | Diff

External Trackers
Tracker ID Priority Status Summary Last Updated
GNOME Desktop 404592 None None None Never

  None (edit)
Description Michal Jaegermann 2007-02-03 17:12:26 EST
Description of problem:

Running in a terminal window one gets:
/usr/lib64/openoffice.org/program/soffice: line 222: 23556 Segmentation fault
which happens every time when program exits.

I did not check what happens if exiting the program exits with anything
but an empty writer window; the above was "open-and-exit".

To see this with more detail one can try:
$ sh -x /usr/lib64/openoffice.org/program/soffice -writer
+ '[' -z ']'
+ export SAL_USE_VCLPLUGIN=gtk
++ uname -s
+ sd_platform=Linux
++ uname -m
+ '[' Linux = Linux -a x86_64 = ppc ']'
++ pwd
+ sd_cwd=/root
+ '[' -h /usr/lib64/openoffice.org/program/soffice ']'
++ dirname /usr/lib64/openoffice.org/program/soffice
+ cd /usr/lib64/openoffice.org/program
++ pwd
+ sd_prog=/usr/lib64/openoffice.org/program
+ cd ..
++ basename /usr/lib64/openoffice.org/program/soffice
+ sd_binary=soffice.bin
++ pwd
+ sd_inst=/usr/lib64/openoffice.org
+ cd /root
+ case $sd_platform in
+ '[' ']'
+ LD_LIBRARY_PATH=/usr/lib64/openoffice.org/program
+ for arg in '$@'
+ case "$arg" in
+ '[' -x /usr/lib64/openoffice.org/program/javaldx ']'
++ /usr/lib64/openoffice.org/program/javaldx
+ java_ld_library_path=
+ '[' '' '!=' '' ']'
+ OPENOFFICE_MOZILLA_FIVE_HOME=/usr/lib64/openoffice.org/program
+ for sd_arg in '${1+"$@"}'
+ case ${sd_arg} in
+ sd_binary=swriter.bin
+ break
+ '['
+ export PATH
+ /usr/lib64/openoffice.org/program/swriter.bin -writer
+ trap 'kill -9 $!' TERM
+ wait 23556
GTK Accessibility Module initialized
libGL warning: 3D driver claims to not support visual 0x4b
GTK Accessibility Module shutdown
/usr/lib64/openoffice.org/program/soffice: line 222: 23556 Segmentation fault  
 "$sd_prog/$sd_binary" "$@"
+ '[' 139 -eq 79 ']'
+ exit

The above does not dump core even if 'ulimit' for the account sets
core size to unlimited.

With a script modified to run binaries under gdb this is not much more

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 46912496327472 (LWP 23841)]
0x00002aaaaaf0225e in main ()
   from /usr/lib64/openoffice.org/program/libvclplug_gtk680lx.so
(gdb) where
#0  0x00002aaaaaf0225e in main ()
   from /usr/lib64/openoffice.org/program/libvclplug_gtk680lx.so
(gdb) c

Program terminated with signal SIGSEGV, Segmentation fault.
The program no longer exists.
(gdb) q

I have no idea of a 32-bit version does the same or not.

Version-Release number of selected component (if applicable):

How reproducible:
Comment 1 Caolan McNamara 2007-02-05 07:01:01 EST
This is triggered by an at-spi change where there are some glib thread stuff is
now called in an atexit function. OOo has overridden the g_thread lock functions
and OOo tried to shutdown a11y before shutting down it's gtk vcl plugin which
destroys stuff which the g_thread_lock overrides requires but OOo can't cancel
the execution of the registered at-spi atexit which will try and use the thread
lockers. I can hack around this in the thread lockers to check to see if their
requirements have disappeared when they get called after the fact in the at-spi
shutdown but it's ugly.

caolanm->mclasen: I suspect you'll begin seeing upstream bugreports about
vanilla OOo crashing against the newer at-spis.
Comment 2 Caolan McNamara 2007-02-05 07:03:27 EST
Created attachment 147348 [details]
OOo bandaid
Comment 3 Matthias Clasen 2007-02-05 08:47:33 EST
the atexit function in atk-bridge/bridge.c has the following comment:

   *  FIXME: this may be incorrect for apps that do their own bonobo
   *  shutdown, until we can explicitly shutdown to get the ordering
   *  right.

So at least there is some awareness of ordering issues. Did you file
an upstream bug for this ?
Comment 4 Caolan McNamara 2007-02-05 09:06:12 EST
logged as http://bugzilla.gnome.org/show_bug.cgi?id=404592
Comment 5 Caolan McNamara 2007-02-06 06:09:02 EST
Should be a non-crasher in openoffice.org-2.2.0-5.2

Note You need to log in before you can comment on or make changes to this bug.