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

[Bug]: GSlice: assertion failed: sinfo->n_allocated > 0 #38048

Closed
3 tasks done
KillerCodeMonkey opened this issue Apr 20, 2023 · 6 comments
Closed
3 tasks done

[Bug]: GSlice: assertion failed: sinfo->n_allocated > 0 #38048

KillerCodeMonkey opened this issue Apr 20, 2023 · 6 comments
Labels

Comments

@KillerCodeMonkey
Copy link

KillerCodeMonkey commented Apr 20, 2023

Preflight Checklist

Electron Version

24

What operating system are you using?

Ubuntu

Operating System Version

22.04

What arch are you using?

x64

Last Known Working Electron version

23

Expected Behavior

No errors when processing images (in parallel as well) with sharpjs like it is in electron v23

Actual Behavior

i am using sharpjs to transform images, randomly the app crashes with
GSlice: assertion failed: sinfo->n_allocated > 0

Testcase Gist URL

No response

Additional Information

I already asked at the sharp repo:
lovell/sharp#3384 (comment)

There i linked another github project with similar problems and how they solved it:
https://github.com/libvmi/libvmi/pull/927/files

So i do not know if this is a general electron issue or a combination when using both libs.

@VerteDinde VerteDinde added the blocked/need-repro Needs a test case to reproduce the bug label Apr 21, 2023
@github-actions
Copy link
Contributor

Hello @KillerCodeMonkey. Thanks for reporting this and helping to make Electron better!

Would it be possible for you to make a standalone testcase with only the code necessary to reproduce the issue? For example, Electron Fiddle is a great tool for making small test cases and makes it easy to publish your test case to a gist that Electron maintainers can use.

Stand-alone test cases make fixing issues go more smoothly: it ensure everyone's looking at the same issue, it removes all unnecessary variables from the equation, and it can also provide the basis for automated regression tests.

Now adding the blocked/need-repro label for this reason. After you make a test case, please link to it in a followup comment. This issue will be closed in 10 days if the above is not addressed.

@VerteDinde
Copy link
Member

Hey @KillerCodeMonkey, happy to look more into this - if you could attach a repro like the bot mentions above, or link to how you're using sharp in your own codebase, that would be awesome 🙂

@KillerCodeMonkey
Copy link
Author

i will try my best to build an example to reproduce it.

@github-actions github-actions bot removed the blocked/need-repro Needs a test case to reproduce the bug label Apr 23, 2023
@codebytere codebytere added the blocked/need-info ❌ Cannot proceed without more information label Apr 23, 2023
@KillerCodeMonkey
Copy link
Author

heyho, i invested some time and the root cause was the usage of graphql-upload library and not handline the createReadstream() in ALL cases. i had some condition so the graphql resolver so the stream was never read and that seems to lead to open streams until the memory is full.

but strange that this really occurs that fast with electron 24... but in the end. it was my fault :). Thanks

@Sandakan
Copy link

@KillerCodeMonkey How did you fix the crash?

@KillerCodeMonkey
Copy link
Author

KillerCodeMonkey commented Apr 25, 2023

in the graphql part you need to read the readstream as the first thing you do in your resolver.
if you have some error handling before and return without reading the stream it stays open and there and will flood the memory it seems.

See: jaydenseric/graphql-upload#352 (comment)
or: flash-oss/graphql-upload-minimal#37 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Status: Unsorted Items
Development

No branches or pull requests

4 participants