-
Notifications
You must be signed in to change notification settings - Fork 12
Closed
Description
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.
mrpack-install/web/download/multi.go
Lines 20 to 38 in 91991df
| 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
Labels
No labels