Skip to content

Snapshot panic if numatopology is added and updated in short time before snapshot #4891

@qi-min

Description

@qi-min

Description

cache snapshot may panic if numa resource changed before first snapshot.

RefreshNumaSchedulerInfoByCrd is called in Snapshot() and ni.NumaSchedulerInfo is read. If numatopology is changed before snapshot is called,

  1. numa info is added in addNumaInfo
  2. numa info is updated in addNumaInfo and NumaChgFlag is changed to NumaInfoLessFlag
  3. snapshot is called
  4. NumaSchedulerInfo is nil and program panic
else if ni.NumaChgFlag == NumaInfoLessFlag {
		numaResMap := ni.NumaSchedulerInfo.NumaResMap

Steps to reproduce the issue

Describe the results you received and expected

program is panic in current program.

What version of Volcano are you using?

v1.13

Any other relevant information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions