Issue 119263 - Crash while saving writer document with password on OpenSolaris(Sparc)
Summary: Crash while saving writer document with password on OpenSolaris(Sparc)
Status: CLOSED FIXED
Alias: None
Product: Writer
Classification: Application
Component: save-export (show other issues)
Version: version58
Hardware: Sun Solaris
: P3 Critical (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-20 14:59 UTC by Jean-Louis Fuchs
Modified: 2017-05-20 10:32 UTC (History)
1 user (show)

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


Attachments
Stacktrace (4.95 KB, text/plain)
2012-04-20 14:59 UTC, Jean-Louis Fuchs
no flags Details
Reproduce (26.59 KB, image/png)
2012-04-20 14:59 UTC, Jean-Louis Fuchs
no flags Details
ldd in verbose mode (413.64 KB, text/plain)
2012-05-21 13:32 UTC, Nicolas Christener
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Jean-Louis Fuchs 2012-04-20 14:59:00 UTC
Created attachment 77475 [details]
Stacktrace

How to reproduce
-------------------------

1. Open Writer
2. Write something
3. Save as
4. Check save with password
5. Click save
6. Enter password
7. Click ok
--> OpenOffice crashes

Location in source
-------------------------

main/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx

void deleteRootsModule()
{
    SECMODModule *RootsModule = 0;
    SECMODModuleList *list = SECMOD_GetDefaultModuleList();
    SECMODListLock *lock = SECMOD_GetDefaultModuleListLock();
->    SECMOD_GetReadLock(lock);
...

As you see in the stacktrace the variables list and lock are nil.

Mozilla Debug
--------------------

Source code of SECMOD_GetReadLock():

http://212.103.76.7/source/xref/aoo/ext_sources/a169ab152209200a7bad29a275cb0333-seamonkey-1.1.14.source.tar.gz.dir/mozilla/security/nss/lib/pk11wrap/pk11list.c#69

I wanted to build mozilla with debug enabled, I changed the makefile.mk

--- a/main/moz/makefile.mk
+++ b/main/moz/makefile.mk
@@ -125,13 +125,11 @@ MOZILLA_CONFIGURE_FLAGS +=  --disable-tests \
                                --enable-application=suite \
                                --enable-ldap \
                                --enable-crypto \
-                               --enable-optimize \
-                               --enable-strip \
+                               --enable-debug \
                                --disable-profilelocking \
                                --disable-activex \
                                --disable-activex-scripting \
                                --disable-gnomevfs \
-                               --disable-debug \
                                --disable-xprint \
                                --disable-postscript \
                                --without-system-zlib \

but as you see in the stacktrace libmoz* are still in release mode. Any idea how to enable debug mode for mozilla(seamonkey)?

Builds
------

Our release mode build: http://adfinis-sygroup.ch/file-exchange-public/Apache_OpenOffice_incubating_3.4.0_Solaris_Sparc_install-arc_en-US.tar.gz (crash happens too)

More information: http://adfinis-sygroup.ch/aoo-solaris-sparc

In the official build mozilla is disabled so the problem does not occur but saving with password doesn't work.

For access to our development machine please contact: Nicolas Christener <nicolas.christener@adfinis-sygroup.ch>
Comment 1 Jean-Louis Fuchs 2012-04-20 14:59:29 UTC
Created attachment 77476 [details]
Reproduce
Comment 2 Nicolas Christener 2012-05-15 08:34:07 UTC
Maybe this bug is related to https://bugzilla.mozilla.org/show_bug.cgi?id=427715

The patch in the mozilla bug tracker ("v1+v2 merged for 1.8.1") applies fine to Seamonkey 1.1.17 - the existing AOO seamonkey-patches also apply to this version.

What I did now, is adding seamonkey 1.1.17 to my source dir, and then added https://bugzilla.mozilla.org/attachment.cgi?id=391554 to the list of patches which should be applyed befor building seamonkey (the mozilla patch only needs some adjustment for the paths - everything else applies perfectly against 1.1.17).

AOO builds fine whit this setup, however the crash still happens :(

I'm now going to try out seamonkey 1.1.19
Comment 3 Nicolas Christener 2012-05-21 13:31:12 UTC
It seems, that we found the main problem behind this crash.

Running ldd in verbose mode revealed, that a mix of libnss3.so happens (see attachment):

LD_DEBUG=files /path/to/AOO/openoffice.org3/program/soffice.bin 2>  /tmp/ld_load_files.txt

Two different libs are pulled in:
* /usr/lib/mps/libnss3.so
* /opt/ad-sy-release/openoffice.org/basis3.4/program/libnss3.so

The following two possible workarounds help:
* remove /usr/lib/mps/libnss3.so
* LD_LIBRARY_PATH=/opt/ad-sy-release/openoffice.org/basis3.4/program ./swriter

I'm not sure if this is a AOO bug or the system administrator has to pay attention that libnss3.so is not loaded.
The package which provides /usr/lib/mps/libnss3.so is: pkg:/SUNWtls@0.5.11-0.111
(this seems to be an official OpenSolaris package)

Does anyone have an idea how to properly fix this?
Comment 4 Nicolas Christener 2012-05-21 13:32:03 UTC
Created attachment 77573 [details]
ldd in verbose mode
Comment 5 Nicolas Christener 2012-05-21 15:40:02 UTC
We finally also found a real solution :)

What actually happend during linking is this:
* openoffice.org3/program/../basis-link/program/updchk.uno.so loads:
* /usr/lib/libcurl.so.3 loads:
* /usr/lib/libldap.so.5 loads:
* /usr/lib/mps/libnss3.so

(This can be seen in https://issues.apache.org/ooo/attachment.cgi?id=77573)

And the reason why updchk.uno.so uses /usr/lib/libcurl.so.3 in the first place is the configure switch --with-system-curl which we now removed and after a rebuild everything works as expected \o/

Should --with-system-curl with non-system nss/mozilla work?
Comment 6 Jean-Louis Fuchs 2012-12-11 15:18:57 UTC
Tested at Adfinis-SyGroup and our customers.