Bug 54385 - [REGRESSION] Command line --help and --version causing segmentation fault
Summary: [REGRESSION] Command line --help and --version causing segmentation fault
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
3.6.1.2 release
Hardware: Other Linux (All)
: medium normal
Assignee: Stephan Bergmann
URL:
Whiteboard: BSA target:3.7.0 target:3.6.2
Keywords:
: 54294 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-09-02 11:09 UTC by Ondrej Machulda
Modified: 2012-12-01 12:07 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
backtrace gdb.log (3.19 KB, text/plain)
2012-09-02 11:09 UTC, Ondrej Machulda
Details
bt with symbols on 3.6 (2.60 KB, text/plain)
2012-09-04 20:43 UTC, Julien Nabet
Details
differences between 3.5 and 3.6 (5.84 KB, text/plain)
2012-09-22 17:20 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ondrej Machulda 2012-09-02 11:09:35 UTC
Created attachment 66489 [details]
backtrace gdb.log

Problem description: When using command line interface (CLI), the --help is causing immediate crash.

Steps to reproduce:
1. Open commandline, eg. bash
2. cd where LO binaries are installed, in my case /usr/lib/libreoffice/program/
2. run ./soffice.bin --help

Current behavior:
> Segmentation fault.

Expected behavior: CLI help is shown

Platform (if different from the browser): 
Gentoo Linux i686
Comment 1 Mirosław Zalewski 2012-09-04 18:09:55 UTC
I can confirm this on LibreOffice 3.6.1 on Debian testing, amd64.
I could not reproduce it with LO 3.5.6 on Arch Linux, i686, therefore I add regression tag to title.

This applies to both --help and --version command line switches. It does not apply to other CLI switches, like --headless or -env.

There has been also another report on LO users mailing list, but reporter settings are unknown:
http://nabble.documentfoundation.org/Minor-bug-in-3-6-1-td4005490.html

Possibly EasyHack?

Best regards
Mirosław Zalewski
Comment 2 Julien Nabet 2012-09-04 20:43:10 UTC
Created attachment 66637 [details]
bt with symbols on 3.6

On pc Debian x86-64 with 3.6 sources updated today, I reproduced the problem.

gdb ./soffice.bin
(gdb) run --help
Comment 3 Egor Y. Egorov 2012-09-12 13:54:28 UTC
Same on Gentoo
https://bugs.gentoo.org/show_bug.cgi?id=434680
Comment 4 Simon 2012-09-22 11:13:25 UTC
Same error on Ubuntu 12.04 64 bits:

$ gdb /opt/libreoffice3.6/program/soffice.bin
GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2) 7.4-2012.04
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Para las instrucciones de informe de errores, vea:
<http://bugs.launchpad.net/gdb-linaro/>...
Leyendo símbolos desde /opt/libreoffice3.6/program/soffice.bin...(no se encontraron símbolos de depuración)hecho.
(gdb) run --help
Starting program: /opt/libreoffice3.6/program/soffice.bin --help
[Depuración de hilo usando libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Nuevo Thread 0x7fffecda0700 (LWP 24849)]

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff66488e7 in ?? () from /opt/libreoffice3.6/program/../ure-link/lib/libuno_cppu.so.3
Comment 5 Julien Nabet 2012-09-22 17:20:04 UTC
Created attachment 67551 [details]
differences between 3.5 and 3.6

On pc Debian x86-64, I reproduce the problem with master sources and 3.6 both updated today. I don't reproduce the problem with 3.5 updated today.

From bt retrieved with 3.6, I tried to pinpoint the diff by putting a break in gdb
in cppu/source/uno/any.cxx line 48 and runned the 2 processes in parallel.

I noticed this:
3.5
/home/julien/compile-libreoffice/libo_3_5/cppu/source/uno/copy.hxx
(gdb) p pType->eTypeClass
$2 = typelib_TypeClass_INTERFACE

3.6
/home/julien/compile-libreoffice/libo_3_6/cppu/source/uno/copy.hxx
(gdb) p pType->eTypeClass
$2 = typelib_TypeClass_STRUCT

I attached the differences in bt from this location.
Comment 6 Julien Nabet 2012-09-22 17:26:20 UTC
Stephan: one for you?
Comment 7 Not Assigned 2012-09-24 15:48:02 UTC
Stephan Bergmann committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=2f14e2e67c58fe6948501d57a38cd0d2ad84dfff

fdo#54385: Displaying help/version early on UNX requires service manager



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 8 Stephan Bergmann 2012-09-24 16:33:11 UTC
requested backports to libreoffice-3-6 (<https://gerrit.libreoffice.org/#/c/694/>) and libreoffice-3-6-2 (<https://gerrit.libreoffice.org/#/c/695/>)
Comment 9 Not Assigned 2012-09-25 07:07:28 UTC
Stephan Bergmann committed a patch related to this issue.
It has been pushed to "libreoffice-3-6-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=b9825c0841dd7ef79c6615f35c33b04bc9d1ef29&g=libreoffice-3-6-2

fdo#54385: Displaying help/version early on UNX requires service manager


It will be available already in LibreOffice 3.6.2.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 10 Not Assigned 2012-09-25 07:55:06 UTC
Stephan Bergmann committed a patch related to this issue.
It has been pushed to "libreoffice-3-6":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=3223ae5224ee17a501f251ba88ea3e4debb18e07&g=libreoffice-3-6

fdo#54385: Displaying help/version early on UNX requires service manager


It will be available in LibreOffice 3.6.3.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 11 Mirosław Zalewski 2012-12-01 12:07:53 UTC
*** Bug 54294 has been marked as a duplicate of this bug. ***