Bug 2272 - libreoffice crash (due to libhunspell)
Summary: libreoffice crash (due to libhunspell)
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 1
Hardware: All Linux
Priority: Normal critical
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL:
Whiteboard:
Keywords: validated_update
Depends on:
Blocks: 2010
  Show dependency treegraph
 
Reported: 2011-07-25 16:37 CEST by José Jorge
Modified: 2011-11-22 10:22 CET (History)
8 users (show)

See Also:
Source RPM: hunspell-1.2.12-3.mga1.src.rpm
CVE:
Status comment:


Attachments
Gdb backtrace (5.63 KB, text/plain)
2011-08-02 11:25 CEST, José Jorge
Details
gdb output (39.53 KB, text/plain)
2011-10-13 13:19 CEST, John Balcaen
Details

Description José Jorge 2011-07-25 16:37:38 CEST
Description of problem:
I have the same problem of #1239 with i586 on MGA1. Even with 3.3.3 of updates-testing it crashes :

swriter.bin[9847]: segfault at 33 ip a670d594 sp bfbf5e10 error 4 in libhunspell-1.2.so.0.0.0[a66fd000+52000]

As 3.4.1 solved the problem in Cauldron (see #1239), can it be provided in 1/updates_testing ?


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

How reproducible:
- always with a test file I have (but it cannot be attached to a public bugzilla)
Ahmad Samir 2011-07-25 16:40:22 CEST

Assignee: bugsquad => dmorganec

Comment 1 José Jorge 2011-07-25 17:10:11 CEST
I forgot to mention that my testfile does not crash on i586 cauldron.
Comment 2 Samuel Verschelde 2011-07-25 17:10:46 CEST
Shouldn't you mention this bug also in bug #2010 ?

CC: (none) => stormi
Blocks: (none) => 2010

Comment 3 José Jorge 2011-07-25 17:13:40 CEST
(In reply to comment #2)
> Shouldn't you mention this bug also in bug #2010 ?
Done.
Comment 4 D Morgan 2011-07-25 17:53:25 CEST
providing LO 3.4 in mageia 1 is a "no way" answer.


Can you report the bug on LO bugzilla ?
Comment 5 José Jorge 2011-07-25 21:08:22 CEST
Well, I can report, but if it is fixed in 3.4.x, and I am not using their RPMS, I know it won't get much love.

Still, I feel this bug is so big for a daily tool that we should consider 3.4 again : on their website they say :

"Safely for production need by most users - LibreOffice 3.4.2, available at the end of July, will target enterprise deployments."
Comment 6 Samuel Verschelde 2011-07-25 21:25:47 CEST
Does it crash with L.O 3.3.2.2 ?
Comment 7 José Jorge 2011-07-25 22:15:43 CEST
Yes, it also crashes with L.O 3.3.2.2 .
Comment 8 Samuel Verschelde 2011-07-25 22:31:34 CEST
ok, that's interesting to know because it means that the update to 3.3.3.1 brought no regression, so I think this should not prevent to issue the update.

Now, the best thing to do would be try to backport the fix from libreoffice 3.4.x, so first isolate it (by searching for closed bugs in libreoffice history for example, or asking to a LO dev)

Is that file something you could send directly by mail to a developer ?
Comment 9 José Jorge 2011-07-25 22:57:44 CEST
I tested with several configurations :
- Cauldron 3.4.1 : NO CRASH
- MGA1 3.3.2.2 : CRASH
- MGA1 3.3.3 : CRASH
- MGA1 with 3.3.3 rpms from LO upstream : NO CRASH.

So it is not an upstream bug, maybe a CPU optimisation we do?
The segfault is in libhunspell, RPMS from upstream don't use it I suppose.
Comment 10 José Jorge 2011-07-25 23:00:34 CEST
Yes I can send the file to a developer. Still, this is not a bug fixed by 3.4.x, since 3.3.3 rpms from libreoffice do not crash. It should be in a difference between Cauldron and MGA1 builds. I can see that LO is built against libhunspell-1.3.so in Cauldron, while it is libhunspell-1.2.so in MGA1.
Comment 11 Samuel Verschelde 2011-07-25 23:01:15 CEST
could you run LO in gdb, see it crash, install the missing debug packages that
gdb will want, then start again and give us a backtrace ?
Comment 12 Samuel Verschelde 2011-07-25 23:02:43 CEST
you can try also to build LO locally against libhunspell-1.3.so and see if it solves the problem (hours of building fun !)
Comment 13 D Morgan 2011-07-25 23:07:00 CEST
(In reply to comment #9)
> I tested with several configurations :
> - Cauldron 3.4.1 : NO CRASH
> - MGA1 3.3.2.2 : CRASH
> - MGA1 3.3.3 : CRASH
> - MGA1 with 3.3.3 rpms from LO upstream : NO CRASH.
> 
> So it is not an upstream bug, maybe a CPU optimisation we do?
> The segfault is in libhunspell, RPMS from upstream don't use it I suppose.

This is interesting. maybe you can link LO with gdb to provide a good backtrace that could help to indentify the crash.


Can you provide a test file ?  i have a mageia 1 to do tests
Comment 14 José Jorge 2011-07-26 10:11:53 CEST
(In reply to comment #13)
> (In reply to comment #9)
> > I tested with several configurations :
> > - Cauldron 3.4.1 : NO CRASH
> > - MGA1 3.3.2.2 : CRASH
> > - MGA1 3.3.3 : CRASH
> > - MGA1 with 3.3.3 rpms from LO upstream : NO CRASH.
> > 
> > So it is not an upstream bug, maybe a CPU optimisation we do?
> > The segfault is in libhunspell, RPMS from upstream don't use it I suppose.
> 
> This is interesting. maybe you can link LO with gdb to provide a good backtrace
> that could help to indentify the crash.
> 
> 
> Can you provide a test file ?  i have a mageia 1 to do tests

File sent to D Morgan privately.
While trying, I found out only a i586 system that does not crash with it, over 5 different. It was migrated from MDV with urpmi, while all others were installed from Live USB, and has a Pentium IV, while others are more recent (Pentium M / Arrandale).
Comment 15 D Morgan 2011-07-26 10:17:21 CEST
tks i received your file and i will look if i can reproduce and find a "solution"
Comment 16 Serge Moreau 2011-07-27 15:34:41 CEST
I observed similar crashes, see my recent post :

https://forums.mageia.org/en/viewtopic.php?f=8&t=851

the log i got :
27/07/2011 05:50:29    localhost    kernel    scalc.bin[3390]: segfault at 95
ip 00007ffb28a88d23 sp 00007fff27f07300 error 4 in
libhunspell-1.2.so.0.0.0[7ffb28a77000+50000]

See also bug 1239

CC: (none) => serge.moreau

Comment 17 José Jorge 2011-08-01 15:27:12 CEST
(In reply to comment #15)
> tks i received your file and i will look if i can reproduce and find a
> "solution"

Sorry to be always there, but any news?
Comment 18 D Morgan 2011-08-01 15:29:47 CEST
i can't reproduce here.

i really need you start libreoffice ( scalc.bin ) in gdb and to provide me a backtrace .
Comment 19 José Jorge 2011-08-02 11:25:51 CEST
Created attachment 703 [details]
Gdb backtrace

Maybe you could not reproduce because you opened the file after lanching LO. I found out that this way it does not crash. So :

gdb /usr/lib/libreoffice/program/swriter.bin then open the file does not crash

gdb --args /usr/lib/libreoffice/program/swriter.bin doc.rtf crashes - trace attached.

A silly workaround for this bug is to have already an opened LO when clicking on the file manager ;-)
Samuel Verschelde 2011-10-01 11:29:28 CEST

Attachment 703 mime type: application/octet-stream => text/plain

Comment 20 Samuel Verschelde 2011-10-01 11:33:51 CEST
The backtrace clearly shows that the problem is in hunspell. As the same version of libreoffice crashes in Mageia 1 and not in cauldron, this is where we must investigate.

André, as you are potentially interested in maintaining hunspell, could you compare the versions in cauldron and Mageia 1, look at the upstream changelogs and see if you find anything ? 

It would be good also to rebuild the cauldron hunspell on mageia 1 and see if LO still crashes (you can ask José for a crash-prone file). If it still crashes, try rebuilding LO against the rebuilt hunspell. If it still crashes, then hunspell is not a culprit but maybe one of its deps.

I'm not a debugging expert, so please correct me if I said nonsense :)

CC: (none) => andre999

andré blais 2011-10-09 07:27:16 CEST

CC: andre999 => andre999mga

Comment 21 John Balcaen 2011-10-13 13:19:27 CEST
Created attachment 955 [details]
gdb output

Ok i'm also affected by a crash related to hunspell on mageia 1 i586.
There's also some related crash found on debian ( http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg948367.html )
Comment 22 John Balcaen 2011-10-13 13:57:35 CEST
According to http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=644506, it supposed to be fixed in 1.3.2 version of libhunspell (however there's an abi change in it) so we should check the libhunspell svn to see if we can narrow the fix.

CC: (none) => balcaen.john

Samuel Verschelde 2011-10-13 14:07:25 CEST

Summary: libreoffice crash (with a possible solution) => libreoffice crash (due to libhunspell)

Comment 23 andré blais 2011-10-13 14:15:33 CEST
Samuel, I just noticed your message after getting Mikala's comment.
(I corrected all my wrong adresses in Bugzilla.)

I'll take a look at it.
I'm not a debugging expert either, but that approach makes sense to me.
Comment 24 John Balcaen 2011-10-13 14:27:30 CEST
@jose
i'm going to build the 1.2.15 to see if it's fixing the problem here (since there's no ABI change in this version & according the changelog it's just bug fixes)
 if it's working for me will you test it  ? (& then could you specify your arch ? )
Comment 25 José Jorge 2011-10-13 16:08:37 CEST
(In reply to comment #24)
> @jose
> i'm going to build the 1.2.15 to see if it's fixing the problem here (since
> there's no ABI change in this version & according the changelog it's just bug
> fixes)
>  if it's working for me will you test it  ? (& then could you specify your arch
> ? )

Of course. For the arch, please note that this bug is against i586 only : this crash does not happen on x86_64...
Comment 26 Serge Moreau 2011-10-13 16:44:00 CEST
(In reply to comment #25)
> (In reply to comment #24)
> > @jose
> > i'm going to build the 1.2.15 to see if it's fixing the problem here (since
> > there's no ABI change in this version & according the changelog it's just bug
> > fixes)
> >  if it's working for me will you test it  ? (& then could you specify your arch
> > ? )
> 
> Of course. For the arch, please note that this bug is against i586 only : this
> crash does not happen on x86_64...

Sorry but for me it also occurs on x86-64, see my comment 16.

SM
Comment 27 José Jorge 2011-10-13 17:52:53 CEST
(In reply to comment #26)
> Sorry but for me it also occurs on x86-64, see my comment 16.
> 
Well, I must be missing something, as I cannot find x86_64 in the comment 16 and it's links...
Comment 28 Serge Moreau 2011-10-13 21:10:13 CEST
 
> Well, I must be missing something, as I cannot find x86_64 in the comment 16
> and it's links...

OK your are right, i did not mentioned that, but its really the case, my machine run on mageia 1 x86-64

SM
Comment 29 andré blais 2011-10-13 22:55:29 CEST
Comparing the spec files for versions 1.3.2-2 (cauldron) and 1.2.13-3 (mga1), the only potentially problematic change is in the devel package.
There is no version dependance in any of the requires except for the contained hunspell packages.

So could affected users try the hunspell and libhunspell versions from cauldron in Mageia 1, and see if that solves their problems ?

@mikala, stormi
The change in the development version is that

%{_libdir}/libhunspell-%{version}.a
and
%{_libdir}/libhunspell-%{version}.la

are dropped.  (The latter explicitly erased as well.)
I don't remember from the discussions if that could be a problem.

If it is, and 1.3.2 solves this issue (without introducing anything new),
we will have to modify the devel part for mga1.

If not, we couldn't we just change the mga2 in the cauldron package to mga1 to make an update for mga1 ?
Comment 30 andré blais 2011-10-13 23:48:37 CEST
I meant just resubmit the same .src.rpm in cauldron as an update to mga1, which would just change the mga2 to mga1.

Note that libreoffice doesn't specify a version of hunspell.
Comment 31 John Balcaen 2011-10-14 14:39:24 CEST
(In reply to comment #29)
> Comparing the spec files for versions 1.3.2-2 (cauldron) and 1.2.13-3 (mga1),
> the only potentially problematic change is in the devel package.
No.
The big change is the API version changes between 1.3.2 & 1.2.13 (you can check the hunspell changelog for this).
Since there's an API change you can't submit it as an update for mageia1 since it's going to require (due to the API change) a rebuild of all packages linked to the hunspell library.


> There is no version dependance in any of the requires except for the contained
> hunspell packages.
> 
> So could affected users try the hunspell and libhunspell versions from cauldron
> in Mageia 1, and see if that solves their problems ?

It won't fix anything until a rebuild as say before.

> @mikala, stormi
> The change in the development version is that
> 
> %{_libdir}/libhunspell-%{version}.a
> and
> %{_libdir}/libhunspell-%{version}.la
> 
> are dropped.  (The latter explicitly erased as well.)
> I don't remember from the discussions if that could be a problem.
> 
> If it is, and 1.3.2 solves this issue (without introducing anything new),
> we will have to modify the devel part for mga1.
You might notice that -devel is not installed by default & of course are not used by runtime application, it was useful only for building packages against hunspell.
In the cauldron package we simply dropped thoses statics devel files



> If not, we couldn't we just change the mga2 in the cauldron package to mga1 to
> make an update for mga1 ?
As explained above it won't work.


Jose & Serge >
Could you test thoses packages ( http://blog.littleboboy.net/~mikala/hunspell/ )
both arch are available i586 & x86_64
Here it seems to work correctly on my netbook.
I did not push on updates_testing because i also want to test « older » versions such as 1.2.13 & 1.2.14 to see if i can narrow the « version » which includes the fix & then eventually only « extract » the correct patch to apply on our 1.2.12.

Hardware: i586 => All
Source RPM: libreoffice => hunspell-1.2.12-3.mga1.src.rpm

Comment 32 Serge Moreau 2011-10-14 19:33:01 CEST
OK, you are on the right way. It works on both arch.The unstable calc file seems to be usable again. I will check further by introducing new data.

SM
Comment 33 andré blais 2011-10-15 16:39:15 CEST
(In reply to comment #31)
> (In reply to comment #29)
> > Comparing the spec files for versions 1.3.2-2 (cauldron) and 1.2.13-3 (mga1),
> > the only potentially problematic change is in the devel package.
> No.
> The big change is the API version changes between 1.3.2 & 1.2.13 (you can check
> the hunspell changelog for this).
> Since there's an API change you can't submit it as an update for mageia1 since
> it's going to require (due to the API change) a rebuild of all packages linked
> to the hunspell library.

I had checked everything _except_ the 100+ hunspell localisation packages -- but looking at the de, en, es, fr localisations, they don't have any reference to the hunspell version.
Since there seems to be no version reference with respect to hunspell, why would we have to rebuilt anything other than the hunspell package alone ?
(The api is hunspell-specific, and virtually no hunspell localisation uses the same major/minor versions.)

After sending comments 29/30, I searched the dev list for the .la question, and I understand more or less how that works now.

Thanks for the feedback.
Comment 34 John Balcaen 2011-10-29 13:52:26 CEST
(In reply to comment #33)
> (In reply to comment #31)
> > (In reply to comment #29)
> > > Comparing the spec files for versions 1.3.2-2 (cauldron) and 1.2.13-3 (mga1),
> > > the only potentially problematic change is in the devel package.
> > No.
> > The big change is the API version changes between 1.3.2 & 1.2.13 (you can check
> > the hunspell changelog for this).
> > Since there's an API change you can't submit it as an update for mageia1 since
> > it's going to require (due to the API change) a rebuild of all packages linked
> > to the hunspell library.
> 
> I had checked everything _except_ the 100+ hunspell localisation packages --
> but looking at the de, en, es, fr localisations, they don't have any reference
> to the hunspell version.
> Since there seems to be no version reference with respect to hunspell, why
> would we have to rebuilt anything other than the hunspell package alone ?
> (The api is hunspell-specific, and virtually no hunspell localisation uses the
> same major/minor versions.)
i was not talking about hunspell localisation packages but others package relying on libhunspell like for example libreoffice see :
urpmq --requires libreoffice-core --use-distrib /Public/pub/linux/Mageia/distrib/1/x86_64/ |grep hunspell
--requires behaviour changed, use --requires-recursive to get the old behaviour                                                                                                                                
libreoffice-core: hunspell
libreoffice-core: libhunspell-1.2.so.0()(64bit)
libreoffice-core: hunspell
libreoffice-core: libhunspell-1.2.so.0()(64bit)

if you want to upgrade to hunspell 1.3.2 you'll need to rebuild *at* least libreoffice-core,lokalize (kdesdk), xulrunner, mozilla-thunderbird, enchant & iceape.
Comment 35 andré blais 2011-10-29 14:51:01 CEST
Sorry, I didn't think of looking at libhunspell.
Thanks for pointing that out.

In that case, it would have helped (at least me) if the version were in the hunspell require as well.  Since they are built from the same srpm.
In any case, I'm learning ;)
Comment 36 José Jorge 2011-11-18 08:52:19 CET
(In reply to comment #31)
> Jose & Serge >
> Could you test thoses packages ( http://blog.littleboboy.net/~mikala/hunspell/
> )
> both arch are available i586 & x86_64
> Here it seems to work correctly on my netbook.

I have no access to the hardware where it crashes. But if Serge said it works, I think we should go with it, as this is a huge problem. Yesterday, a friend had just the same problem in Mageia 1 i586. This is very bad to Mageia image, as Libreoffice is very used.
Comment 37 Serge Moreau 2011-11-18 10:40:01 CET
I can confirm that i have been using the hunspell pacakages for a month now, and that i did not observed any problems.

SM
Comment 38 John Balcaen 2011-11-18 18:59:09 CET
Ok.
I'm pushing the packages on updates /testing

For QA :
This new hunspell fix a crash of libreoffice.
The problem is to be able to reproduce it since it's not always trivial to trigger it (it was happening everytime on my i586 but with the same odt it was not on x86_64 however some users have the same crash on x86_64).
You need at least to have hunspell enable in libreoffice.

We should also check that nothing worse happens in others applications using hunspell after the update.
According to the changelog there's also others crash fixed (some of them related to firefox) but i was not able to narrow the correct fix to provide only it to mageia 1.
It was also tested without problem since one month by me & at least Serge Moreau.




Advisory :

________________________________________________________________________

 Mageia Bug Fix Advisory                                  

 Distribution: Mageia 1
 Package: hunspell
________________________________________________________________________

This update fix a crash of libreoffice due to hunspell (mga #2272)
________________________________________________________________________

Updated packages: hunspell-1.2.15-1.1.mga1.src.rpm

Mageia 1, i586:
   hunspell-1.2.15-1.1.mga1.i586.rpm
   hunspell-debug-1.2.15-1.1.mga1.i586.rpm
   lib64hunspell1.2_0-1.2.15-1.1.mga1.i586.rpm
   lib64hunspell-devel-1.2.15-1.1.mga1.i586.rpm

Mageia 1, x86_64:
   hunspell-1.2.15-1.1.mga1.x86_64.rpm
   hunspell-debug-1.2.15-1.1.mga1.x86_64.rpm
   lib64hunspell1.2_0-1.2.15-1.1.mga1.x86_64.rpm
   lib64hunspell-devel-1.2.15-1.1.mga1.x86_64.rpm

Assignee: dmorganec => qa-bugs

Comment 39 Dave Hodgins 2011-11-18 20:59:50 CET
I've tried to recreate the crash using the Core Release version of
hunspell, and the files/command from
http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg948367.html
but it doesn't crash.  Also tried various mis-spellings and right clicking
on the mis-spelt word in libreoffice.

Does anyone have a file/method that consistently crashes?

CC: (none) => davidwhodgins

Comment 41 John Balcaen 2011-11-19 12:26:37 CET
(In reply to comment #40)
> The updates have not shown up in
They should be available soon (or already now).
Comment 42 Dave Hodgins 2011-11-19 21:12:34 CET
Testing complete on i586 for the srpm
hunspell-1.2.15-1.1.mga1.src.rpm

As I could not recreate the error, and
"urpmq --whatrequires-recursive hunspell" only shows
libreoffice as a package requiring hunspell, I've only
checked that spell checking is working in libreoffice
writer.
Comment 43 Bertrand Marne 2011-11-20 23:34:14 CET
Hi everyone,

I bumped into this bug some weeks ago, but I had no time (and not enough urge) to try to solve it. But as one of my file to deliver for yesterday was concerned, I tried to dig deeper and found this topic.

I'm using a Mageia 1 on x86_64, and I encountered the same bug every time I loaded a calc test file in LO. The general protection fault was also due to hunspell.

And good new: after installing the update testing rpm of hunspell everything seems to work fine. No crash for the moment.

I hope this is rock solid! Thank you very much!

CC: (none) => mageia

Comment 44 Dave Hodgins 2011-11-21 01:26:30 CET
Validating the update.

Could someone from the sysadmin team push the srpm
hunspell-1.2.15-1.1.mga1.src.rpm
from Core Updates Testing to Core Updates.

Advisory: This update fixes a segfault when using libreoffice caused
by hunspell.

https://bugs.mageia.org/show_bug.cgi?id=2272

Keywords: (none) => validated_update
CC: (none) => sysadmin-bugs

Comment 45 Thomas Backlund 2011-11-22 10:22:53 CET
Update pushed.

Status: NEW => RESOLVED
CC: (none) => tmb
Resolution: (none) => FIXED


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