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

Bridge crash on Assertion `val->IsArrayBufferView()' failed #1444

Closed
silkeh opened this issue Aug 2, 2021 · 5 comments
Closed

Bridge crash on Assertion `val->IsArrayBufferView()' failed #1444

silkeh opened this issue Aug 2, 2021 · 5 comments
Labels
X-External-Issue Something upstream of the bridge (library, homeserver, ircd) has caused an issue.

Comments

@silkeh
Copy link
Contributor

silkeh commented Aug 2, 2021

Describe the bug
The bridge crashes with the following error:

Aug 02 20:07:26 matrix-irc matrix-appservice-irc[31051]: node[31051]: ../src/node_buffer.cc:220:char* node::Buffer::Data(v8::Local<v8::Value>): Assertion `val->IsArrayBufferView()' failed.
Aug 02 20:07:26 matrix-irc matrix-appservice-irc[31051]:  1: 0xa1a640 node::Abort() [node]
Aug 02 20:07:26 matrix-irc matrix-appservice-irc[31051]:  2: 0xa1a6be  [node]
Aug 02 20:07:26 matrix-irc matrix-appservice-irc[31051]:  3: 0x9f94a2  [node]
Aug 02 20:07:26 matrix-irc matrix-appservice-irc[31051]:  4: 0x9eeede napi_get_buffer_info [node]
Aug 02 20:07:26 matrix-irc matrix-appservice-irc[31051]:  5: 0x7f261c00d9d2 IsValidUTF8 [/usr/local/share/.config/yarn/global/node_modules/utf-8-validate/prebuilds/linux-x64/node.napi.node]
Aug 02 20:07:26 matrix-irc matrix-appservice-irc[31051]:  6: 0x9d1e05  [node]
Aug 02 20:07:26 matrix-irc matrix-appservice-irc[31051]:  7: 0xc06599  [node]
Aug 02 20:07:26 matrix-irc matrix-appservice-irc[31051]:  8: 0xc08387 v8::internal::Builtin_HandleApiCall(int, unsigned long*, v8::internal::Isolate*) [node]
Aug 02 20:07:26 matrix-irc matrix-appservice-irc[31051]:  9: 0x140dd19  [node]
Aug 02 20:07:26 matrix-irc systemd[1]: matrix-appservice-irc@ircnet.service: Main process exited, code=killed, status=6/ABRT
Aug 02 20:07:26 matrix-irc systemd[1]: matrix-appservice-irc@ircnet.service: Failed with result 'signal'.

To Reproduce
Steps to reproduce the behavior:

  1. Start bridge
  2. Wait a bit
  3. See error

Expected behavior
Bridge does not crash

Screenshots
n/a

Server (please complete the following information):

  • OS: Debian Buster
  • Bridge version: 0.29.0
  • NodeJS version: v12.22.4

Additional context
This bridge is used by Finnish people, who use ungodly amounts of Latin-9

@Half-Shot
Copy link
Contributor

This bridge is used by Finnish people, who use ungodly amounts of Latin-9

Ahhhhh.

Thanks, I think this looks like a bug in utf-8-validate

@Half-Shot Half-Shot added X-External-Issue Something upstream of the bridge (library, homeserver, ircd) has caused an issue. bug labels Aug 3, 2021
@Half-Shot
Copy link
Contributor

@Half-Shot
Copy link
Contributor

@silkeh This feels like messages on IRC with some funky encoding (latin-9?) are causing us to crash, do you have some example known-broken strings the team can look at?

@silkeh
Copy link
Contributor Author

silkeh commented Aug 18, 2021

@Half-Shot: I tried reproducing it today in a test environment to grab some logs, and I found out that just setting encodingFallback: "ISO-8859-15" causes this crash. The log below is from a bridge (without an existing database) connecting to a fresh homeserver.

Edit: the bridge connects to an Oragono server I had lying around.

debug.log

@silkeh
Copy link
Contributor Author

silkeh commented Aug 21, 2021

Can confirm this is fixed with the latest release. Thanks!

@silkeh silkeh closed this as completed Aug 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
X-External-Issue Something upstream of the bridge (library, homeserver, ircd) has caused an issue.
Projects
None yet
Development

No branches or pull requests

2 participants