Bug#677601: libreoffice-core: Libreoffice crashes on start-up

2012-10-23 Thread Cosmin ANDREI
Hi,

This fix/workaround should be OK. However it seems to only treat the
specific cause. Perhaps when permission denied is returned on
non-critical checks (ure or anything else) a crash should be avoided and
treated differently by libreoffice. Similar to how no such file is
treated.

Thanks for your prompt action.
Regards,

Cosmin 

On 10/22/2012 08:51 PM, Rene Engelhard wrote:
 tag 677601 + pending
 thanks

 Hi,

 On Mon, Oct 22, 2012 at 06:57:32PM +0200, Rene Engelhard wrote:
 On Mon, Oct 22, 2012 at 05:21:21PM +0200, Rene Engelhard wrote:
 So I quickly pointed upstream to your comment:

 17:09 @_rene_ sberg: FYI: 
 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=677601#34
 17:11 @sberg _rene_, that should ultimately become a non-issue with 
 http://wiki.documentfoundation.org/Development/LibreOffice4#UNO_related_changes's
  drop support for /etc/opt/ure and ~/.ure, cf. ure/source/README
 17:12 @_rene_ ah, nice.
 17:12 @_rene_ have a patch for that already? (I'd then just backport it.)
 17:12 -!- ricotz [~rico@ubuntu/member/ricotz] has joined #libreoffice-dev
 17:13  * _rene_ knows Debian will never have a ure in /etc/opt/ure :)
 17:13 @sberg _rene_, no, but it shouldn't be too difficult to grep for 
 the 
relevant place(s)
 17:13 @_rene_ yeah, will do.
 17:13 @sberg _rene_, IIRC, its just mentioned in some .ini/rc files

 So fixing it in the same way even before LO4 (as we *do* know that we'll 
 never
 have a /etc/opt/ure in Debian) by removing it now would also fix this..
 $ grep -r etc\/opt /usr/lib/libreoffice/*
 /usr/lib/libreoffice/ure-link/lib/jvmfwk3rc:UNO_JAVA_JFW_SHARED_DATA=${URE_OVERRIDE_JAVA_JFW_SHARED_DATA}
  file:///etc/opt/ure/javasettings_${_OS}_${_ARCH}.xml
 /usr/lib/libreoffice/ure-link/lib/unorc:UNO_TYPES=${ORIGIN}/../share/misc/types.rdb
  ?file:///etc/opt/ure/types.rdb ?${SYSUSERHOME}/.ure/types.rdb 
 ${URE_MORE_TYPES}
 /usr/lib/libreoffice/ure-link/lib/unorc:UNO_SERVICES=${ORIGIN}/../share/misc/services.rdb
  ?file:///etc/opt/ure/services.rdb ?${SYSUSERHOME}/.ure/services.rdb 
 ${URE_MORE_SERVICES}
 Added as such to the tree. Will be in next upload.

 Regards,
   
 Rene


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#677601: libreoffice-core: Libreoffice crashes on start-up

2012-10-22 Thread Cosmin ANDREI
I also had a similar issue.

Note that it does not seem to be related to the ~/.config/libreoffice
permissions. That was another bug.

Error:
$ libreoffice
terminate called after throwing an instance of
'com::sun::star::uno::RuntimeException'

Analysis:
strace -f -v -o stracelibre.txt libreoffice
check the problem; solve it.
In my case this was non root permissions for /etc/opt/

Solution:
chown root:root /etc/opt/
the following may also be required:
chmod o+r /etc/opt/

A bit of history:
1) OS
This was a Debian stable Squeeze  and then upgraded to Weezy.
Right now:

cat /etc/debian_version
wheezy/sid

uname -a
Linux cosmin 3.2.0-3-686-pae #1 SMP Mon Jul 23 03:50:34 UTC 2012 i686
GNU/Linux

2) Info on libreoffice:

ii  libreoffice  1:3.5.4+dfsg-2
  i386 office productivity suite


3) I also reinstalled all java components and libreoffice after the upgrade.

Reproduction steps:
- removed all ~/.config/libreoffice/ for account and for root

For root user run it works, for non sudo user it fails.

SOLUTION and ISSUE:

After debugging and looking at a lot of DEV bull on existing bugs the
strace was obvious.

Sorry for libreoffice, but this needs to be fixed.

So, because another program created /etc/opt/ with permissions other
than root:root (will bring that up where needed) and no read flag for
others, the strace showed:

4351  lstat64(/etc/opt/ure, 0xbf8ac678) = -1 EACCES (Permission denied)
4351  access(/etc/opt/ure/types.rdb, F_OK) = -1 EACCES (Permission denied)
4351  open(/etc/opt/ure/types.rdb, O_RDONLY|O_LARGEFILE) = -1 EACCES
(Permission denied)
4351  open(/etc/opt/ure/types.rdb, O_RDONLY|O_LARGEFILE) = -1 EACCES
(Permission denied)
4351  futex(0xb752ab18, FUTEX_WAKE_PRIVATE, 2147483647) = 0
4351  munmap(0xb2cd7000, 1176064)   = 0
4351  gettimeofday({1350912298, 273638}, NULL) = 0
4351  write(2, terminate called after throwing ..., 48) = 48
4351  write(2, com::sun::star::uno::RuntimeExce..., 37) = 37
4351  write(2, '\n, 2)= 2
4351  rt_sigprocmask(SIG_UNBLOCK, [ABRT], NULL, 8) = 0
4351  tgkill(4351, 4351, SIGABRT)   = 0
4351  --- SIGABRT (Aborted) @ 0 (0) ---
4352  +++ killed by SIGABRT +++
4350  ... waitpid resumed [{WIFSIGNALED(s)  WTERMSIG(s) ==
SIGABRT}], 0) = 4351
4350  --- SIGCHLD (Child exited) @ 0 (0) ---
4350  futex(0x9692fec, FUTEX_CMP_REQUEUE_PRIVATE, 1, 2147483647,
0x9693018, 2) = 1
4350  madvise(0xb610, 8372224, MADV_DONTNEED) = 0
4350  _exit(0)  = ?
4334  ... futex resumed ) = 0
4334  futex(0x9693018, FUTEX_WAKE_PRIVATE, 1) = 0
4334  close(5)  = 0
4334  futex(0xb7654be4, FUTEX_WAKE_OP_PRIVATE, 1, 1, 0xb7654be0,
{FUTEX_OP_SET, 0, FUTEX_OP_CMP_GT, 1} unfinished ...
4346  ... restart_syscall resumed )   = 0
4346  futex(0xb7654a80, FUTEX_WAIT_PRIVATE, 2, NULL unfinished ...
4334  ... futex resumed ) = 1
4334  futex(0xb7654a80, FUTEX_WAKE_PRIVATE, 1 unfinished ...
4346  ... futex resumed ) = 0
4346  futex(0xb7654a80, FUTEX_WAKE_PRIVATE, 1) = 0
4346  madvise(0xb695d000, 8372224, MADV_DONTNEED) = 0
4346  _exit(0)  = ?
4334  ... futex resumed ) = 1
4334  munmap(0xb694d000, 65536) = 0
4334  munmap(0xb715e000, 65536) = 0
4334  exit_group(134)   = ?

Even with the read flag added for others, this did not work as ls also
complained:
ls -la /etc/opt
ls: cannot access /etc/opt/cisco-vpnclient: Permission denied
ls: cannot access /etc/opt/..: Permission denied
ls: cannot access /etc/opt/.: Permission denied
total 0
d? ? ? ? ?? ./
d? ? ? ? ?? ../
d? ? ? ? ?? cisco-vpnclient/

Changing the permissions to root:root SOLVED the issue.

Be this as it may, you should make sure that libreoffice does not crash
when permission denied is encountered on /etc/opt/ as the ure data was
not there anyway so no critical files missing, just some failed check.

Regards,

-- 
Cosmin


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org