@pabloyoyoista
Copy link

pabloyoyoista commented Mar 11, 2022

I have a testing setup for generating the appstream data using appstream-generator in alpine and I am seeing some crashes during parallel operations. These errors happen seldomly and I don't really have a good reproducer or have a clear idea of the packages that were being processed by the generator when this happened. I know that opening issues of the kind "this isn't working!" are really not good, so my goal is more to ask how could I debug this, or what would be needed to trim the error down. I am also happy to help debugging any way possible.

Error output look like this:

core.exception.RangeError@../src/asgen/engine.d(532): Range violation
----------------
??:? onRangeError [0x7fa7dcd9cc90]
??:? _d_arraybounds [0x7fa7dcd9d370]
??:? /usr/bin/appstream-generator [0x55e77d5783e0]
??:? void std.parallelism.ParallelForeach!(asgen.backends.interfaces.Package[]).ParallelForeach.opApply(scope int delegate(ref asgen.backends.interfaces.Package)).doIt() [0x55e77d57ed30]
??:? void std.parallelism.TaskPool.executeWorkLoop() [0x7fa7dd0bcbd0]
??:? thread_entryPoint [0x7fa7dcdc2d60]

edit, there seems to be another variation of the crash. Unfortunately still didn't manage to get a core dump:

core.exception.RangeError@../src/asgen/engine.d(532): Range violation
----------------
??:? onRangeError [0x7f5709254c90]
??:? _d_arraybounds [0x7f5709255370]
??:? /usr/bin/appstream-generator [0x55e16500a3f0]
??:? void std.parallelism.ParallelForeach!(asgen.backends.interfaces.Package[]).ParallelForeach.opApply(scope int delegate(ref asgen.backends.interfaces.Package)).doIt() [0x55e165010d40]
??:? void std.parallelism.submitAndExecute(std.parallelism.TaskPool, void delegate()) [0x7f5709575ea0]
??:? int std.parallelism.ParallelForeach!(asgen.backends.interfaces.Package[]).ParallelForeach.opApply(scope int delegate(ref asgen.backends.interfaces.Package)) [0x55e165008d60]
??:? void asgen.engine.Engine.exportIconTarballs(asgen.config.Suite, immutable(char)[], asgen.backends.interfaces.Package[]) [0x55e165009ea0]
??:? bool asgen.engine.Engine.processSuiteSection(asgen.config.Suite, const(immutable(char)[]), asgen.reportgenerator.ReportGenerator) [0x55e16500b1c0]
??:? void asgen.engine.Engine.run(immutable(char)[]) [0x55e16500c360]
??:? _Dmain [0x55e164fbee00]