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

Storage Crash when deleting vertex does not exist and vid length more than we define in space. #4397

Closed
Milittle opened this issue Jul 11, 2022 · 3 comments · Fixed by #4406
Labels
severity/major Severity of bug type/bug Type: something is unexpected
Milestone

Comments

@Milittle
Copy link
Contributor

Storage Crash when deleting vertex does not exist and vid length more than we define in space.

How To Reproduce(required)

Steps to reproduce the behavior:

Step 1
Create one space: define vid length is 120.

create tag and create one index.(this bug need indexes in space.)

Step 2
delete vertex 'xxxx'

xxx length need more than vid length defined.

the storage will be dead.

I think we should add one verfication in the follow one line just like the second line:

one line:

batchHolder->remove(NebulaKeyUtils::vertexKey(spaceVidLen_, partId, vertex.getStr()));

second line:

if (!NebulaKeyUtils::isValidVidLen(spaceVidLen_, vid.getStr())) {

@Milittle Milittle added the type/bug Type: something is unexpected label Jul 11, 2022
@Milittle
Copy link
Contributor Author

Storage Crash when deleting vertex does not exist and vid length more than we define in space.

How To Reproduce(required)

Steps to reproduce the behavior:

Step 1 Create one space: define vid length is 120.

create tag and create one index.(this bug need indexes in space.)

Step 2 delete vertex 'xxxx'

xxx length need more than vid length defined.

the storage will be dead.

I think we should add one verfication in the follow one line just like the second line:

one line:

batchHolder->remove(NebulaKeyUtils::vertexKey(spaceVidLen_, partId, vertex.getStr()));

second line:

if (!NebulaKeyUtils::isValidVidLen(spaceVidLen_, vid.getStr())) {

If this worked, can i pull new request for this bug?

@wey-gu
Copy link
Contributor

wey-gu commented Jul 12, 2022

@SuperYoko could you plz take a look at this?

@Sophie-Xie Sophie-Xie added this to the v3.2.0 milestone Jul 12, 2022
@SuperYoko
Copy link
Contributor

Maybe a verify in graph is needed too. Since @Sophie-Xie has add this to v3.2.0, I think it will be fixed soon.

(And we have acctually met some crash with vid len check. : D, thanks for your help~)

Milittle added a commit to Milittle/nebula that referenced this issue Jul 12, 2022
* When our space has tag index or edge index.
* When delete vertex or edge, we specify one vid more than our defined
  in space.
* The sotrage will be crashed.

Solution:
1. Add vid valid verfication.
critical27 pushed a commit that referenced this issue Jul 13, 2022
* When our space has tag index or edge index.
* When delete vertex or edge, we specify one vid more than our defined
  in space.
* The sotrage will be crashed.

Solution:
1. Add vid valid verfication.

Co-authored-by: Sophie <[email protected]>
Sophie-Xie added a commit that referenced this issue Jul 13, 2022
* When our space has tag index or edge index.
* When delete vertex or edge, we specify one vid more than our defined
  in space.
* The sotrage will be crashed.

Solution:
1. Add vid valid verfication.

Co-authored-by: Sophie <[email protected]>
critical27 pushed a commit that referenced this issue Jul 13, 2022
* Fix web service crash(issue:#4398) (#4405)

* when we use flags put interface, but we does not specify the body.
* The service will be crashed.
For example:
curl -X PUT xxx.xxx.xxx.xxxx:19559/flags

* Fix delete vertex or edge, the storage crashed.(#4397) (#4406)

* When our space has tag index or edge index.
* When delete vertex or edge, we specify one vid more than our defined
  in space.
* The sotrage will be crashed.

Solution:
1. Add vid valid verfication.

Co-authored-by: Sophie <[email protected]>

* Release with separate debug info in ELF format (#4400)

Co-authored-by: Milittle <[email protected]>
Co-authored-by: dutor <[email protected]>
@Sophie-Xie Sophie-Xie linked a pull request Jul 13, 2022 that will close this issue
3 tasks
@jinyingsunny jinyingsunny added the severity/major Severity of bug label Nov 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity/major Severity of bug type/bug Type: something is unexpected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants