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

Revoking a blob url twice causes an internal error and crashes node #42206

Closed
Jamesernator opened this issue Mar 3, 2022 · 1 comment · Fixed by #42212
Closed

Revoking a blob url twice causes an internal error and crashes node #42206

Jamesernator opened this issue Mar 3, 2022 · 1 comment · Fixed by #42212
Labels
buffer Issues and PRs related to the buffer subsystem. confirmed-bug Issues with confirmed bugs.

Comments

@Jamesernator
Copy link

Version

v17.6.0

Platform

Linux the-mistery-machine 5.13.0-30-generic #33~20.04.1-Ubuntu SMP Mon Feb 7 14:25:10 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

Subsystem

No response

What steps will reproduce the bug?

The following code will cause Node to crash:

import { Blob } from "node:buffer";

const url = URL.createObjectURL(new Blob([]));

URL.revokeObjectURL(url);
URL.revokeObjectURL(url);

How often does it reproduce? Is there a required condition?

It happens consistently.

What is the expected behavior?

The second URL.revokeObjectURL should just be a no-op, this is consistent with web behaviour.

What do you see instead?

It produces the following crash:

node[1082797]: ../src/node_blob.cc:447:void node::BlobBindingData::revoke_data_object(const string&): Assertion `(data_objects_.find(uuid)) != (data_objects_.end())' failed.
 1: 0xb2e180 node::Abort() [node]
 2: 0xb2e1fe  [node]
 3: 0xb01e7a node::BlobBindingData::revoke_data_object(std::string const&) [node]
 4: 0xb02157 node::Blob::RevokeDataObject(v8::FunctionCallbackInfo<v8::Value> const&) [node]
 5: 0xd7c07e  [node]
 6: 0xd7d49f v8::internal::Builtin_HandleApiCall(int, unsigned long*, v8::internal::Isolate*) [node]
 7: 0x1632979  [node]
zsh: abort (core dumped)  node --input-type=module < test.js

Additional information

No response

@Trott
Copy link
Member

Trott commented Mar 4, 2022

@nodejs/url @nodejs/buffer

@meixg meixg added the buffer Issues and PRs related to the buffer subsystem. label Mar 4, 2022
@aduh95 aduh95 added the confirmed-bug Issues with confirmed bugs. label Mar 4, 2022
nodejs-github-bot pushed a commit that referenced this issue Mar 6, 2022
Fix: #42206

PR-URL: #42212
Fixes: #42206
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
sxa pushed a commit to sxa/node that referenced this issue Mar 7, 2022
Fix: nodejs#42206

PR-URL: nodejs#42212
Fixes: nodejs#42206
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
danielleadams pushed a commit to danielleadams/node that referenced this issue Apr 21, 2022
Fix: nodejs#42206

PR-URL: nodejs#42212
Fixes: nodejs#42206
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
danielleadams pushed a commit that referenced this issue Apr 24, 2022
Fix: #42206

PR-URL: #42212
Fixes: #42206
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
danielleadams pushed a commit that referenced this issue Apr 24, 2022
Fix: #42206

PR-URL: #42212
Fixes: #42206
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
danielleadams pushed a commit that referenced this issue Apr 24, 2022
Fix: #42206

PR-URL: #42212
Fixes: #42206
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
xtx1130 pushed a commit to xtx1130/node that referenced this issue Apr 25, 2022
Fix: nodejs#42206

PR-URL: nodejs#42212
Fixes: nodejs#42206
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
buffer Issues and PRs related to the buffer subsystem. confirmed-bug Issues with confirmed bugs.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants