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

fix nil pointer in jobCache.update #2420

Merged

Conversation

Akiqqqqqqq
Copy link

Signed-off-by: Qiuyu Wu qiuyu.wu@shopee.com

fix: #2417

@volcano-sh-bot volcano-sh-bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Aug 9, 2022
Signed-off-by: Qiuyu Wu <qiuyu.wu@shopee.com>
@Akiqqqqqqq Akiqqqqqqq force-pushed the bugfix-controller-nil-pointer branch from 488c7b0 to f16976d Compare August 9, 2022 10:54
@volcano-sh-bot volcano-sh-bot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Aug 9, 2022
if oldResourceversion, err = strconv.ParseUint(job.Job.ResourceVersion, 10, 64); err != nil {
return fmt.Errorf("failed to parase job <%v> resource version <%s>", key, job.Job.ResourceVersion)
}
if job.Job != nil {
Copy link
Collaborator

Choose a reason for hiding this comment

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

When does job.Job=nil in update, i can see we set job.Job in Add callback

Copy link
Author

Choose a reason for hiding this comment

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

as I mentioned in #2417, when we delete vj, it triggers deleteJob() in informer of volcano-job-controller, deleteJob() calls cc.cache.Delete(job) which set jobInfo.Job = nil in L182 pkg/controllers/cache/cache.go

@volcano-sh-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hzxuzhonghu, Thor-wl

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@volcano-sh-bot volcano-sh-bot merged commit 76dac4c into volcano-sh:master Aug 10, 2022
@Thor-wl
Copy link
Member

Thor-wl commented Aug 10, 2022

@Akiqqqqqqq Thanks for the fix. Can you also submit the fix to branch release-1.6 release-1.5 and release-1.4?

@Akiqqqqqqq
Copy link
Author

@Akiqqqqqqq Thanks for the fix. Can you also submit the fix to branch release-1.6 release-1.5 and release-1.4?

sure~

@Akiqqqqqqq
Copy link
Author

@Akiqqqqqqq Thanks for the fix. Can you also submit the fix to branch release-1.6 release-1.5 and release-1.4?

there is no such issue in 1.5 and 1.4, so I only submit the fix to 1.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Job controller: "invalid memory address or nil pointer dereference" in killJob()
4 participants