Skip to content

Large modpacks trigger a SIGABRT #45

@mmtawous

Description

@mmtawous

Currently, large modpacks such as the Versatile v7.5 pack triggers a SIGABRT caused by the following

runtime/cgo: pthread_create failed: Resource temporarily unavailable

This is caused by the value in the --dl-threads flag not being used in the Downloader. Here is a snippet of the relevant code from main.

type Downloader struct {
Downloads []*Download
Threads int // TODO
Retries int
}
func (g *Downloader) Download(baseDir string) {
var wg sync.WaitGroup
for i := range g.Downloads {
wg.Add(1)
dl := g.Downloads[i]
go func() {
defer wg.Done()
absPath, _ := filepath.Abs(filepath.Join(baseDir, dl.Path))
success := false
for _, link := range dl.Urls {
// retry when download failed
for retries := 0; retries < g.Retries; retries++ {
// try download

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions