Bug 21207 - appstream-builder segfaults when generating Mageia AppStream metadata multithreaded
Summary: appstream-builder segfaults when generating Mageia AppStream metadata multith...
Status: RESOLVED INVALID
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 6
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Neal Gompa
QA Contact:
URL: https://github.com/hughsie/appstream-...
Whiteboard:
Keywords: UPSTREAM
Depends on:
Blocks:
 
Reported: 2017-07-09 01:35 CEST by Neal Gompa
Modified: 2017-07-10 13:13 CEST (History)
1 user (show)

See Also:
Source RPM: appstream-glib-0.6.13-1.mga6.src.rpm
CVE:
Status comment:


Attachments
From tmb: appstream-builder segfault, can also be reproduced on current cauldron (49.72 KB, text/plain)
2017-07-09 01:41 CEST, Neal Gompa
Details

Description Neal Gompa 2017-07-09 01:35:26 CEST
Description of problem:
Thomas Backlund discovered that appstream-builder crashed while attempting to use more than one thread when trying to generate AppStream metadata for Mageia repositories.

The command he ran was:
> appstream-builder --origin="Mageia.Org" --basename=appstream --cache-dir=/tmp/appstream-cache-cauldron-core-release-x86_64 --enable-hidpi --max-threads=8 --min-icon-size=32 --output-dir=/var/tmp/appstream-md-cauldron-core-release-x86_64 --packages-dir=/distrib/bootstrap/distrib/cauldron/x86_64/media/core/release/ --temp-dir=/tmp/appstream-tempdata-cauldron-core-release-x86_64


Version-Release number of selected component (if applicable):
0.6.13-1.mga6

How reproducible:
Unsure
Comment 1 Neal Gompa 2017-07-09 01:38:40 CEST
(By Thomas Backlund from comment #20 in bug 18669)
> Hm, it seemn to not be thread-safe :/
> 
> dropping down to 2 threads make it not segfault ... but that makes initial
> run take 15 minutes :/

(By Neal Gompa from comment #21 in bug 18669)
> Hmm, interestingly, I can't reproduce on my system with the 8 thread command
> (admittedly, I have only a 4 core system), but I'm going to try to find a
> more powerful machine to see if I can reproduce it.
> 
> I've also filed a bug upstream about it, to notify Richard Hughes about the
> issue.

(By Thomas Backlund from comment #22 in bug 18669)
> Ok, in order to get it done I had to drop down to a single thread :/
> 
> So it took about  ~16 minutes for core/release with its ~28000 rpms...
> 
> Now that is not a problem for a stable release as /release repos only have
> to been generated once, so the time is not an issue.
> 
> And updates trees are way smaller than /release so they will be easier...
> but we do need to figure out why it breaks down so easily...
> 
> Anyway, there is now appstream metadata generated for i586 and x86_64 being
> mirrored out so you can check if it behaves as you want...

CC: (none) => tmb
See Also: (none) => https://github.com/hughsie/appstream-glib/issues/177
URL: (none) => https://github.com/hughsie/appstream-glib/issues/177

Neal Gompa 2017-07-09 01:39:01 CEST

See Also: (none) => https://bugs.mageia.org/show_bug.cgi?id=18669

Neal Gompa 2017-07-09 01:40:41 CEST

Keywords: (none) => UPSTREAM

Comment 2 Neal Gompa 2017-07-09 01:41:38 CEST
Created attachment 9474 [details]
From tmb: appstream-builder segfault, can also be reproduced on current cauldron
Neal Gompa 2017-07-09 01:42:36 CEST

Version: Cauldron => 6

Comment 3 Neal Gompa 2017-07-10 13:13:14 CEST
So, Richard Hughes (upstream developer of appstream-glib) has diagnosed this as a failure in libfontconfig. He has the same issues and runs the extraction in single threaded mode because fontconfig is terrible[1].

So, unfortunately, there's nothing that can be done from appstream-glib's point of view.

[1]: https://github.com/hughsie/appstream-glib/issues/177#issuecomment-314058903

Status: NEW => RESOLVED
Resolution: (none) => INVALID


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