ITADN

SIGSEGV when using get list with proxy

#580OpenAltayAkkus 创建于 2026-03-20
A
AltayAkkuscommented
## Steps to reproduce 1. Create a *.txt with atleast 1 URL 2. Define a proxy (via yml or CLI) 3. Run `zeno get list urls.txt` ``` 2026-03-20T19:56:55+01:00 DEBUG worker.go:174 | worker stopped component=archiver.worker worker_id=1 2026-03-20T19:56:55+01:00 DEBUG worker.go:174 | worker stopped component=archiver.worker worker_id=0 panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x2 addr=0x8 pc=0x1012cb3e0] goroutine 1 [running]: github.com/internetarchive/Zeno/internal/pkg/archiver.Stop() /Users/altay/Desktop/Development/zeno/internal/pkg/archiver/worker.go:125 +0xa0 github.com/internetarchive/Zeno/internal/pkg/controler.stopPipeline() /Users/altay/Desktop/Development/zeno/internal/pkg/controler/pipeline.go:180 +0xd4 github.com/internetarchive/Zeno/internal/pkg/controler.Stop(...) /Users/altay/Desktop/Development/zeno/internal/pkg/controler/controler.go:13 ``` Fails before properly closing the WARC writer, had to find this bug the hard way 🫣 ## Root cause https://github.com/internetarchive/Zeno/blob/dfedbc768f95d8ceea593f76444de458da0488bb/internal/pkg/archiver/warc.go#L63-L68 ... https://github.com/internetarchive/Zeno/blob/dfedbc768f95d8ceea593f76444de458da0488bb/internal/pkg/archiver/warc.go#L81-L83 If `proxy != ""` a `globalArchiver.ClientWithProxy` will be created, but despite the comment `globalArchiver.Client` will be nil But the `archiver/worker.go` expects the `globalArchiver.Client` to not be nil, causing the crash. https://github.com/internetarchive/Zeno/blob/dfedbc768f95d8ceea593f76444de458da0488bb/internal/pkg/archiver/worker.go#L125-L132
0 条评论