Skip to content

Conversation

@ambarve
Copy link
Contributor

@ambarve ambarve commented Apr 21, 2021

The change to collect shim panic logs during shim delete command does not work in cases
when the delete command itself runs into some error. To avoid losing shim panic logs in
such cases we log the shim panic logs (if found) as first thing in the delete command.

CreateTask function had wcl mutex lock that wasn't really being used anywhere, this
change removes that. We also don't add a nil entry for a new task in the workloadTasks
map anymore to avoid the shim panic in some cases where a GetTask function might
be called while we are still in the process of creating the task and haven't updated the
nil entry with the actual task struct reference.

@ambarve ambarve requested a review from a team as a code owner April 21, 2021 23:57
The change to collect shim panic logs during shim delete command does not work in cases
when the delete command itself runs into some error. To avoid losing shim panic logs in
such cases we log the shim panic logs (if found) as first thing in the delete command.

CreateTask function had `wcl` mutex lock that wasn't really being used anywhere, this
change removes that. We also don't add a `nil` entry for a new task in the `workloadTasks`
map anymore to avoid the shim panic in some cases where a `GetTask` function might
be called while we are still in the process of creating the task and haven't updated the
nil entry with the actual task struct reference.
@ambarve ambarve force-pushed the shim_panic_create_pod_fixes branch from 07d6812 to fec8e08 Compare April 22, 2021 00:00
@ambarve
Copy link
Contributor Author

ambarve commented Apr 22, 2021

I am still not sure if this change will cover all the cases in which we are currently not logging shim panic logs but even after trying out a couple of random panics I am not able to repro a case where shim panics but we don't log it.

@dcantah
Copy link
Contributor

dcantah commented Apr 22, 2021

I am still not sure if this change will cover all the cases in which we are currently not logging shim panic logs but even after trying out a couple of random panics I am not able to repro a case where shim panics but we don't log it.

Yea I'm not sure I was running into the "Delete failed and then we don't log the panics" bucket for the one I encountered as it was just during ReleaseResources that the panic occurred 😢 I'll try and repro this again

Copy link

@katiewasnothere katiewasnothere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

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