-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Fixing runc panic during hugetlb pages #1116
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: rajasec <rajasec79@gmail.com> Fixing runc panic during hugetlb pages Signed-off-by: rajasec <rajasec79@gmail.com>
cyphar
reviewed
Oct 15, 2016
Pagesize: *l.Pagesize, | ||
Limit: *l.Limit, | ||
}) | ||
if l.Pagesize != nil && l.Limit != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like "hugepage_limits": [{}]
should be an error, not just ignored. But I'm not really sure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe just error out when only one of l.Pagesize
and l.Limit
is defined.
rajasec
force-pushed
the
hugetlb-panic
branch
from
October 16, 2016 14:05
2d0ccc6
to
4b263c9
Compare
1 similar comment
This was referenced Jan 6, 2017
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When hugetlb ( either pageSize or limit) configs were missing, runc panics. Added nil check to fix.
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x56b09c]
goroutine 1 [running]:
panic(0x7ca4e0, 0xc8200100e0)
/home/raj/go/src/runtime/panic.go:481 +0x3e6
github.com/urfave/cli.HandleAction.func1(0xc8200a72f8)
/home/raj/go/pkg/src/github.com/opencontainers/runc/Godeps/_workspace/src/github.com/urfave/cli/app.go:478 +0x38e
panic(0x7ca4e0, 0xc8200100e0)
/home/raj/go/src/runtime/panic.go:443 +0x4e9
github.com/opencontainers/runc/libcontainer/specconv.createCgroupConfig(0x7ffea64bc585, 0x2, 0x0, 0xc8200c8000, 0xc8200c4860, 0x0, 0x0)
/home/raj/go/pkg/src/github.com/opencontainers/runc/Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/specconv/spec_linux.go:443 +0x15ec
github.com/opencontainers/runc/libcontainer/specconv.CreateLibcontainerConfig(0xc8200a6b88, 0x855bc0, 0x0, 0x0)
/home/raj/go/pkg/src/github.com/opencontainers/runc/Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/specconv/spec_linux.go:208 +0x10a0
main.createContainer(0xc820088a00, 0x7ffea64bc585, 0x2, 0xc8200c8000, 0x0, 0x0, 0x0, 0x0)
/home/raj/go/pkg/src/github.com/opencontainers/runc/utils_linux.go:177 +0x144
main.startContainer(0xc820088a00, 0xc8200c8000, 0x0, 0x0, 0x0, 0x0)
/home/raj/go/pkg/src/github.com/opencontainers/runc/utils_linux.go:294 +0x189
main.glob.func13(0xc820088a00, 0x0, 0x0)
/home/raj/go/pkg/src/github.com/opencontainers/runc/run.go:66 +0x77
reflect.Value.call(0x74cc40, 0x8fdc08, 0x13, 0x8446b0, 0x4, 0xc8200a7278, 0x1, 0x1, 0x0, 0x0, ...)
/home/raj/go/src/reflect/value.go:435 +0x120d
reflect.Value.Call(0x74cc40, 0x8fdc08, 0x13, 0xc8200a7278, 0x1, 0x1, 0x0, 0x0, 0x0)
/home/raj/go/src/reflect/value.go:303 +0xb1
github.com/urfave/cli.HandleAction(0x74cc40, 0x8fdc08, 0xc820088a00, 0x0, 0x0)
/home/raj/go/pkg/src/github.com/opencontainers/runc/Godeps/_workspace/src/github.com/urfave/cli/app.go:487 +0x2ee
github.com/urfave/cli.Command.Run(0x848538, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x89c7e0, 0x1a, 0x0, ...)
/home/raj/go/pkg/src/github.com/opencontainers/runc/Godeps/_workspace/src/github.com/urfave/cli/command.go:191 +0xfec
github.com/urfave/cli.(*App).Run(0xc820001800, 0xc82000a180, 0x3, 0x3, 0x0, 0x0)
/home/raj/go/pkg/src/github.com/opencontainers/runc/Godeps/_workspace/src/github.com/urfave/cli/app.go:240 +0xaa4
main.main()
/home/raj/go/pkg/src/github.com/opencontainers/runc/main.go:137 +0xe24
Signed-off-by: rajasec rajasec79@gmail.com