Skip to content

Conversation

@alban
Copy link
Contributor

@alban alban commented Jul 20, 2018

When config.json does not have a "process" section at all, runc paniced
with this error:

panic: runtime error: invalid memory address or nil pointer dereference

According to the spec, "process" is optional:
https://github.com/opencontainers/runtime-spec/blob/master/config.md#process

process (object, OPTIONAL) specifies the container process. This property is REQUIRED when start is called.

So the desired behaviour is:

  • "runc create": succeed without error
  • "runc start": return a proper error without panic

This patch fixes the panic in "runc create". Further work is needed to
allow create but not start.

Signed-off-by: Alban Crequy [email protected]

When config.json does not have a "process" section at all, runc paniced
with this error:
> panic: runtime error: invalid memory address or nil pointer dereference

According to the spec, "process" is optional:
https://github.com/opencontainers/runtime-spec/blob/master/config.md#process
> process (object, OPTIONAL) specifies the container process. This property is REQUIRED when start is called.

So the desired behaviour is:
- "runc create": succeed without error
- "runc start": return a proper error without panic

This patch fixes the panic in "runc create". Further work is needed to
allow create but not start.

Signed-off-by: Alban Crequy <[email protected]>
@wking
Copy link
Contributor

wking commented Jul 20, 2018

I think this, like #1826, is a dup of #1726.

@AkihiroSuda
Copy link
Member

should have been covered in 16d55f1

Feel free to reopen if not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants