Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aptly snapshot pull more than 128 pkgs: "panic: runtime error: makeslice: cap out of range" #53

Closed
dupuy opened this issue May 15, 2014 · 2 comments
Labels
Milestone

Comments

@dupuy
Copy link

dupuy commented May 15, 2014

I started getting this error (with aptly 0.5.1) after adding a few more repositories to my (rather lengthy) pull list. The problem occurs whenever there are more than 128 packages in the pull list (not dependent on the packages themselves). I'm guessing you hard-coded this limit somewhere, thinking "nobody could ever possibly want to pull more than 128 packages."

My work-around for this bug is to chain multiple pulls of 128 packages or less, using split -l 128 $PKGLISTFILE

$ aptly snapshot pull empty-snapshot updates selected $(<$PKGLISTFILE)
Dependencies would be pulled into snapshot:
    [empty-snapshot]: Created as empty
from snapshot:
    [updates]: Snapshot from mirror [ubuntu-12.04-updates-main]: http://de.archive.ubuntu.com/ubuntu/ precise-updates
and result would be saved as new snapshot selected.
Loading packages (5378)...
Building indexes...
panic: runtime error: makeslice: cap out of range [recovered]
    panic: runtime error: makeslice: cap out of range

goroutine 1 [running]:
runtime.panic(0x83cb400, 0x88da31c)
    /home/smira/.gvm/gos/go1.2.1/src/pkg/runtime/panic.c:266 +0xac
main.func·001()
    /home/smira/.gvm/pkgsets/go1.2.1/global/src/github.com/smira/aptly/main.go:14 +0x7b
runtime.panic(0x83cb400, 0x88da31c)
    /home/smira/.gvm/gos/go1.2.1/src/pkg/runtime/panic.c:248 +0xef
github.com/smira/aptly/cmd.aptlySnapshotPull(0x18c7d630, 0x18c81010, 0x88, 0x88, 0xb75c7d28, ...)
    /home/smira/.gvm/pkgsets/go1.2.1/global/src/github.com/smira/aptly/cmd/snapshot_pull.go:89 +0xd74
github.com/smira/commander.(*Command).Dispatch(0x18c7d630, 0x18c81010, 0x88, 0x88, 0x1, ...)
    /home/smira/.gvm/pkgsets/go1.2.1/global/src/github.com/smira/aptly/_vendor/src/github.com/smira/commander/commands.go:299 +0x37a
github.com/smira/commander.(*Command).Dispatch(0x18c7d870, 0x18c81008, 0x89, 0x89, 0x1, ...)
    /home/smira/.gvm/pkgsets/go1.2.1/global/src/github.com/smira/aptly/_vendor/src/github.com/smira/commander/commands.go:277 +0x12c
github.com/smira/commander.(*Command).Dispatch(0x18c7dd80, 0x18c81000, 0x8a, 0x8a, 0x18c7ce40, ...)
    /home/smira/.gvm/pkgsets/go1.2.1/global/src/github.com/smira/aptly/_vendor/src/github.com/smira/commander/commands.go:277 +0x12c
main.main()
    /home/smira/.gvm/pkgsets/go1.2.1/global/src/github.com/smira/aptly/main.go:34 +0x112

goroutine 9 [sleep]:
time.Sleep(0xbebc200, 0x0)
    /home/smira/.gvm/gos/go1.2.1/src/pkg/runtime/time.goc:31 +0x3c
github.com/cheggaaa/pb.(*ProgressBar).writer(0x18c9a690)
    /home/smira/.gvm/pkgsets/go1.2.1/global/src/github.com/smira/aptly/_vendor/src/github.com/cheggaaa/pb/pb.go:263 +0xa4
created by github.com/cheggaaa/pb.(*ProgressBar).Start
    /home/smira/.gvm/pkgsets/go1.2.1/global/src/github.com/smira/aptly/_vendor/src/github.com/cheggaaa/pb/pb.go:85 +0x7a
@AlekSi
Copy link
Contributor

AlekSi commented May 15, 2014

@smira smira added the bug label May 15, 2014
@smira smira added this to the v0.6 milestone May 15, 2014
@smira
Copy link
Contributor

smira commented May 15, 2014

Should be fixed in master. Thanks @dupuy and @AlekSi!

@smira smira closed this as completed May 15, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants