Bug 248161 - editors/openoffice-devel: Crash (SIGABRT) on startup due to AmstelvarAlpha-VF font (x11-fonts/google-fonts)
Summary: editors/openoffice-devel: Crash (SIGABRT) on startup due to AmstelvarAlpha-VF...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: FreeBSD Office Team
URL:
Keywords: crash, needs-patch, needs-qa
Depends on:
Blocks:
 
Reported: 2020-07-22 03:00 UTC by Sean Farley
Modified: 2024-02-17 02:39 UTC (History)
4 users (show)

See Also:
bugzilla: maintainer-feedback? (office)
koobs: maintainer-feedback? (dmgk)
koobs: merge-quarterly?


Attachments
Log of deletion; files that were manually removed are listed as missing (33.57 KB, text/plain)
2021-07-14 02:01 UTC, Graham Perrin
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sean Farley freebsd_committer freebsd_triage 2020-07-22 03:00:25 UTC
I have been having trouble running openoffice-devel for awhile now and finally decided to examine what was causing it to crash with a SIGABRT (below).  After a long search for similar issues in OpenOffice, FontConfig and FreeBSD plus some code examination, it turns out that a specific font from the x11-fonts/google-fonts is the trigger:  AmstelvarAlpha-VF.ttf.  Just moving that font outside of /usr/local/share/fonts is enough to prevent the crash.

I am not sure if this is FreeBSD-only.

$ lldb /usr/local/openoffice-4.2.1589199787/openoffice4/program/soffice.bin
(lldb) target create "/usr/local/openoffice-4.2.1589199787/openoffice4/program/soffice.bin"
Current executable set to '/usr/local/openoffice-4.2.1589199787/openoffice4/program/soffice.bin' (x86_64).
(lldb) run
Process 84853 launching
Process 84853 launched: '/usr/local/openoffice-4.2.1589199787/openoffice4/program/soffice.bin' (x86_64)
Process 84853 stopped
* thread #1, name = 'soffice.bin', stop reason = signal SIGABRT
    frame #0: 0x00000008007e0caa libc.so.7`__sys_thr_kill at thr_kill.S:3
   1    #include "compat.h"
   2    #include "SYS.h"
-> 3    RSYSCALL(thr_kill)
   4            .section .note.GNU-stack,"",%progbits
(lldb) bt
* thread #1, name = 'soffice.bin', stop reason = signal SIGABRT
  * frame #0: 0x00000008007e0caa libc.so.7`__sys_thr_kill at thr_kill.S:3
    frame #1: 0x00000008007df114 libc.so.7`__raise(s=6) at raise.c:52:10
    frame #2: 0x00000008007553c9 libc.so.7`abort at abort.c:67:8
    frame #3: 0x00000008061b8c63 libfontconfig.so.1`___lldb_unnamed_symbol160$$libfontconfig.so.1 + 67
    frame #4: 0x00000008061b6ed2 libfontconfig.so.1`___lldb_unnamed_symbol151$$libfontconfig.so.1 + 258
    frame #5: 0x00000008061b8490 libfontconfig.so.1`___lldb_unnamed_symbol153$$libfontconfig.so.1 + 336
    frame #6: 0x00000008061b7326 libfontconfig.so.1`___lldb_unnamed_symbol152$$libfontconfig.so.1 + 406
    frame #7: 0x00000008061b7985 libfontconfig.so.1`FcFontMatch + 133
    frame #8: 0x0000000801fd6c5c libvcl.so`___lldb_unnamed_symbol224$$libvcl.so + 228
    frame #9: 0x0000000801fd6ced libvcl.so`___lldb_unnamed_symbol225$$libvcl.so + 33
    frame #10: 0x0000000801fd72e1 libvcl.so`psp::PrintFontManager::countFontconfigFonts(std::hash_map<rtl::OString, int, rtl::OStringHash, std::__1::equal_to<rtl::OString> >&) + 63
    frame #11: 0x0000000801fddaf3 libvcl.so`psp::PrintFontManager::initialize() + 573
    frame #12: 0x0000000801fdc7f9 libvcl.so`psp::PrintFontManager::get() + 55
    frame #13: 0x000000080564150d libvclplug_gtk.so`___lldb_unnamed_symbol443$$libvclplug_gtk.so + 2335
    frame #14: 0x00000008022121e5 libvcl.so`___lldb_unnamed_symbol5347$$libvcl.so + 131
    frame #15: 0x0000000802213ebd libvcl.so`___lldb_unnamed_symbol5353$$libvcl.so + 2805
    frame #16: 0x00000008021b1787 libvcl.so`___lldb_unnamed_symbol4342$$libvcl.so + 245
    frame #17: 0x00000008021b1933 libvcl.so`___lldb_unnamed_symbol4344$$libvcl.so + 69
    frame #18: 0x000000080222f4ed libvcl.so`___lldb_unnamed_symbol5556$$libvcl.so + 71
    frame #19: 0x000000080222f7fe libvcl.so`WorkWindow::WorkWindow(Window*, long) + 82
    frame #20: 0x0000000801c72fd9 libootk.so`___lldb_unnamed_symbol2126$$libootk.so + 3691
    frame #21: 0x0000000801c71bcb libootk.so`___lldb_unnamed_symbol2120$$libootk.so + 247
    frame #22: 0x0000000801c71ac2 libootk.so`___lldb_unnamed_symbol2119$$libootk.so + 16
    frame #23: 0x0000000801c71f0c libootk.so`___lldb_unnamed_symbol2121$$libootk.so + 18
    frame #24: 0x0000000803a9610c libfwk.so`___lldb_unnamed_symbol4769$$libfwk.so + 644
    frame #25: 0x0000000803a95a97 libfwk.so`___lldb_unnamed_symbol4766$$libfwk.so + 549
    frame #26: 0x0000000803a96ee2 libfwk.so`___lldb_unnamed_symbol4775$$libfwk.so + 18
    frame #27: 0x00000008039da639 libfwk.so`___lldb_unnamed_symbol777$$libfwk.so + 2011
    frame #28: 0x0000000803a6e278 libfwk.so`___lldb_unnamed_symbol3954$$libfwk.so + 674
    frame #29: 0x0000000803a6e6d8 libfwk.so`___lldb_unnamed_symbol3955$$libfwk.so + 18
    frame #30: 0x000000080047a6b1 libsofficeapp.so`___lldb_unnamed_symbol32$$libsofficeapp.so + 7585
    frame #31: 0x00000008020199af libvcl.so`___lldb_unnamed_symbol890$$libvcl.so + 70
    frame #32: 0x000000080201a4b7 libvcl.so`SVMain() + 31
    frame #33: 0x000000080049f4a8 libsofficeapp.so`soffice_main + 136
    frame #34: 0x0000000000202450 soffice.bin`main + 16
    frame #35: 0x0000000000202250 soffice.bin`_start + 256
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2020-07-22 03:33:07 UTC
^Triage: Request feedback from x11-fonts/google-fonts maintainer

If the google-fonts dependency is enabled by default, please change Severity to "Affects many people". If it is otherwise conditional, not by default, or depends on another variable/conditional, set to 'Affects Some People'
Comment 2 Don Lewis freebsd_committer freebsd_triage 2020-07-23 01:39:14 UTC
The abort is happening in libfontconfig, cc: desktop@FreeBSD.org
Comment 3 Don Lewis freebsd_committer freebsd_triage 2020-07-23 01:46:16 UTC
The only explicitly listed font dependencies listed are:
  x11-fonts/crosextrafonts-caladea-ttf
  ttf:x11-fonts/crosextrafonts-carlito-ttf
  x11-fonts/croscorefonts-fonts-ttf
fonts brought in by dependencies are:
  x11-fonts/dejavu
  x11-fonts/xorg-fonts-truetype
  x11-fonts/font-bh-ttf
  x11-fonts/font-misc-meltho
  x11-fonts/font-misc-ethiopic
Comment 4 Sean Farley freebsd_committer freebsd_triage 2020-08-15 16:36:07 UTC
I confirm that x11-fonts/google-fonts is not installed by default.

After the update to google-fonts-0.0.0.20200729, the list of fonts from the package that crashes OpenOffice has expanded to the following:

AmstelvarAlpha-VF.ttf
Fraunces-Italic[SOFT,WONK,opsz,wght].ttf
Fraunces[SOFT,WONK,opsz,wght].ttf
Literata-Italic[opsz,wght].ttf
Literata[opsz,wght].ttf
Newsreader-Italic[opsz,wght].ttf
Newsreader[opsz,wght].ttf
Comment 5 Claudio Eichenberger 2021-01-02 18:48:00 UTC
Despite not using the above mentioned fonts, openoffice crashes during startup with:

* thread #1, name = 'soffice.bin', stop reason = signal SIGABRT
Comment 6 Graham Perrin freebsd_committer freebsd_triage 2021-07-14 02:01:23 UTC
Created attachment 226438 [details]
Log of deletion; files that were manually removed are listed as missing

(In reply to Sean Farley from comment #4)

I removed related files, soffice.bin continued to crash at startup. 

% uname -KrU
14.0-CURRENT 1400025 1400025
% pkg rquery -r FreeBSD '%o %v %R' openoffice-devel
% pkg rquery -r FreeBSD '%o %v %R' apache-openoffice-devel
editors/openoffice-devel 4.2.1619649022_5,4 FreeBSD
% pkg info -x google-fonts
google-fonts-0.0.0.20210120
% 

After forcing removal of google-fonts alone (leaving eighteen automatic font packages): no crash.
Comment 7 Claudio Eichenberger 2021-10-22 09:18:30 UTC
Doing a pkg update this morning reinstalled many font packages and the problem is solved without eliminating any of the installed fonts.
Comment 8 Graham Perrin freebsd_committer freebsd_triage 2022-10-17 00:27:46 UTC
scf@ (reporter): is this still an issue for you?
Comment 9 Sean Farley freebsd_committer freebsd_triage 2022-11-05 18:42:12 UTC
It has been a long time since I last tested this.  However, I have had to start using LibreOffice due to being unable to build OpenOffice so am unable to confirm if the issue has been fixed or not.

Once OpenOffice can build, I can test again.

On a related note, the font does not cause LibreOffice to crash.
Comment 10 Don Lewis freebsd_committer freebsd_triage 2023-03-08 20:40:00 UTC
OpenOffice should build now.
Comment 11 Don Lewis freebsd_committer freebsd_triage 2023-03-11 00:13:17 UTC
I can't trivially reproduce this.

%uname -a
FreeBSD zipper.catspoiler.org 14.0-CURRENT FreeBSD 14.0-CURRENT #103 n261308-7fc82fd1f82e: Fri Mar  3 18:08:05 PST 2023     dl@zipper.catspoiler.org:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64

%pkg info -a | egrep 'google-fonts|fontconfig|openoffice'
apache-openoffice-devel-4.2.1678061694,4 Integrated wordprocessor/dbase/spreadsheet/drawing/chart/browser (developer version)
fontconfig-2.14.2,1            XML-based font configuration API for X Windows
google-fonts-0.0.0.20210120_1  Collection of freely redistributable TrueType fonts from Google

I have not made the x.org config changes for the fonts.  I'm running openoffice remotely with X11 forwarding over ssh.
Comment 12 Arrigo Marchiori 2024-01-15 07:46:04 UTC
Hello,

we (upstream) should have fixed this issue.
Please see: https://bz.apache.org/ooo/show_bug.cgi?id=128583

If you find similar issues, in the future, please report them to dev@openoffice.apache.org 
You will probably get a much quicker reaction than this ;-)
Comment 13 Arrigo Marchiori 2024-01-15 08:24:58 UTC
Hello All,

I just noticed that my message could sound like like "the FreeBSD maintainer of OpenOffice is not good at maintaining it, so just call us upstream".

I absolutely did not mean this, and I apologize if I lead anyone to think this.

I just wanted to invite more people to our development mailing list.
Comment 14 Sean Farley freebsd_committer freebsd_triage 2024-01-15 19:29:11 UTC
I finally got around to testing this again.  With FreeBSD 14-STABLE, apache-openoffice-devel-4.2.1678061694_6,4 and google-fonts-0.0.0.20210120_3, I can no longer reproduce the issue even if I specifically use those specified fonts.

I am going to close this as it appears fixed.  Thank you, upstream.  :)
Comment 15 Don Lewis freebsd_committer freebsd_triage 2024-02-15 09:54:59 UTC
(In reply to Sean Farley from comment #14)
I don't know why it was working for you.

It wasn't until yesterday that I committed an update on the main branch for openoffice-devel to build with a new-enough snapshot to have the upstream fix.
I plan to commit to the quarterly branch tomorrow after my build tests are complete.

Upstream hasn't released a fix for 4.1.x yet.  They plan to include the fix in 4.1.6.  I should be able to include their fix as a local patch to openoffice-4.
Comment 16 Don Lewis freebsd_committer freebsd_triage 2024-02-16 09:11:19 UTC
Fixed in apache-openoffice-devel-4.2.1707679630,4
Comment 17 commit-hook freebsd_committer freebsd_triage 2024-02-16 19:04:53 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=53702f0d70ca6a495f7e8158656bd1aa125d898a

commit 53702f0d70ca6a495f7e8158656bd1aa125d898a
Author:     Arrigo Marchiori <ardovm@yahoo.it>
AuthorDate: 2024-02-15 21:37:13 +0000
Commit:     Don Lewis <truckman@FreeBSD.org>
CommitDate: 2024-02-16 19:02:51 +0000

    editors/openoffice-4: fix crash in fontconfig

    Ensure default substitutions on patterns

    This is requested by the documentation of function FcFontMatch().

    Addresses bug #128583.

    [cherry-picked from upstream 96cc864ad79ef0ed2b9769f074673a55e4056b44]
    [converted to FreeBSD ports patch by Don Lewis <truckman@FreeBSD.org]
    [Skipping PORTREVSION bump, the next commit will be a version upgrade]

    PR:             248161
    MFH:            2024Q1

 .../patch-vcl_unx_generic_fontmanager_fontconfig.cxx (new)     | 10 ++++++++++
 1 file changed, 10 insertions(+)
Comment 18 commit-hook freebsd_committer freebsd_triage 2024-02-17 02:34:38 UTC
A commit in branch 2024Q1 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=82deef105366106b11341cbd8df32372993d0c92

commit 82deef105366106b11341cbd8df32372993d0c92
Author:     Arrigo Marchiori <ardovm@yahoo.it>
AuthorDate: 2024-02-15 21:37:13 +0000
Commit:     Don Lewis <truckman@FreeBSD.org>
CommitDate: 2024-02-17 02:32:15 +0000

    editors/openoffice-4: fix crash in fontconfig

    Ensure default substitutions on patterns

    This is requested by the documentation of function FcFontMatch().

    Addresses bug #128583.

    [cherry-picked from upstream 96cc864ad79ef0ed2b9769f074673a55e4056b44]
    [converted to FreeBSD ports patch by Don Lewis <truckman@FreeBSD.org]
    [Skipping PORTREVSION bump, the next commit will be a version upgrade]

    PR:             248161
    MFH:            2024Q1
    (cherry picked from commit 53702f0d70ca6a495f7e8158656bd1aa125d898a)

 .../patch-vcl_unx_generic_fontmanager_fontconfig.cxx (new)     | 10 ++++++++++
 1 file changed, 10 insertions(+)
Comment 19 Don Lewis freebsd_committer freebsd_triage 2024-02-17 02:39:48 UTC
Also now fixed in apache-openoffice-4.1.15 which has the upstream bugfix cherry-picked and converted to a local patch to the port.