#Bun (v1.2.16) is still throwing error for RST_Stream code 3 on google's vision SDK

1 messages · Page 1 of 1 (latest)

cinder geode
#

One of my prod-service is throwing the same RST_Stream error that's mentioned in this github issue:
https://github.com/oven-sh/bun/issues/18573

Our code is taking images and sending them via google's vision sdk. They are under 500kb. We are trying to send 10 images (testing) and the failing images are random.

GitHub

What version of Bun is running? 1.2.7+5c0fa6dc2 What platform is your computer? Linux 6.12.5-linuxkit aarch64 unknown (docker node:22 image) What steps can reproduce the bug? #17821 look like that ...

#

Bun (v1.2.16) is still throwing error for RST_Stream code 3 on google's vision SDK

shell pebble
#

cc @vagrant oak

vagrant oak
full depot
#

If you guys need detailed logs or something, do let us know. We tried the same workload on our local machine and it worked fine. I don't know what's the issue tho. The server has the same linux as our local machine along with bun and sdk's version (and images dataset)

#

This issue is popping up in one of our prod microservice which we need to deploy before the end of this month. Any kind of help on this would be really appreciated.

vagrant oak
#

any logs would be helpful you can DM me

#

is the server and client using bun?

#

in the current version this would only happens if the server or client receive more data than the windowSize allows

#

more likely a misbehaving client

#

checking bun --revision in both (client and server) would also help

cinder geode
# vagrant oak is the server and client using bun?

Sorry but I don't know what you are talking about (client and server). We are using google's vision SDK - https://www.npmjs.com/package/@google-cloud/vision

Our service on the prod-server is using bun - 1.2.16+631e67484
We tried using the same service on local machine with the same bun - 1.2.16+631e67484 version but it worked fine. Maybe something's wrong with networking?

#

The code is very simple

const client = new ImageAnnotatorClient({
  credentials: {
    client_email: CREDENTIALS.client_email,
    private_key: CREDENTIALS.private_key,
  },
  projectId: CREDENTIALS.project_id,
  type: "DOCUMENT_TEXT_DETECTION",
});

//! The crash happens here
const [result] = await client.textDetection(fileName);
cinder geode
cinder geode
# vagrant oak any logs would be helpful you can DM me

We tried wrapping that in try..catch, but it prints the same logs as the comment that I've left on that github issue - https://github.com/oven-sh/bun/issues/18573#issuecomment-2862713516

If you guys need something specific, do let me know. I don't know much about internal logging, so probably need some help to get them.

GitHub

What version of Bun is running? 1.2.7+5c0fa6dc2 What platform is your computer? Linux 6.12.5-linuxkit aarch64 unknown (docker node:22 image) What steps can reproduce the bug? #17821 look like that ...

cinder geode
#

I think there might be something related to bun's server. We tried doing the same as this comment suggest:
https://github.com/oven-sh/bun/issues/18573#issuecomment-2982271711

We tried sending the same request second time after starting the server and it worked fine.

GitHub

What version of Bun is running? 1.2.7+5c0fa6dc2 What platform is your computer? Linux 6.12.5-linuxkit aarch64 unknown (docker node:22 image) What steps can reproduce the bug? #17821 look like that ...

#
const client = new ImageAnnotatorClient({
  credentials: {
    client_email: CREDENTIALS.client_email,
    private_key: CREDENTIALS.private_key,
  },
  projectId: CREDENTIALS.project_id,
  type: "DOCUMENT_TEXT_DETECTION",
});

//! The crash happens here
const [result] = await client.textDetection(fileName);

await sleep(5000);

//! This works fine, even with the same file
const [result] = await client.textDetection(fileName);
cinder geode
#

@shell pebble @vagrant oak For now, we are currently moving to node (as hotfix) for the part of code that's calling the google's sdk. If you guys have any kind of fix for this, let us know, will try our best to debug with canary build or something.

vagrant oak
#

@cinder geode maybe setting initialWindowSize to a bigger number (default is 65535) helps will see if I can get a fix asap

cinder geode
vagrant oak
#

still working in a fix will have a PR today/tomorrow

vagrant oak
full depot
vagrant oak
#

@full depot @cinder geode can you tell me the version of grpc-js that you are using?

full depot
# vagrant oak <@419425750962405396> <@1136246633466691604> can you tell me the version of grpc...

We are using google's vision sdk (latest v5.2.0), I don't know the version that their sdk is using tho. Gonna check that
https://www.npmjs.com/package/@google-cloud/vision

#

We are not using this as client-server, more like just client to send request to Google's Vision SDK for text detection and extraction.

vagrant oak
#

@full depot @cinder geode can you confirming that you are running using 1.2.17/1.2.16?

#

using 1.2.17 and @google-cloud/vision 5.2.0 images ranging from 100KB to 5MB working fine still investigating what could cause the error of flow control to happen (RST 3) in the current version of bun

#

since we are using the client, this would indicate that bun client is sending more data than its allowed, but using node http2 server + bun client works well and vice versa

cinder geode
cinder geode
#

Initial tests on my local machine seems working with the latest bun's version 1.2.17. Need to run the full test on the dev-server to tho. Will report back on this in couple of hours.

vagrant oak
#

Thank you please double check the bun version in the running machines if I got a repro will fix ASAP

cinder geode
cinder geode
#

We tried the bun's debugger, but its not working I guess. We tried the same code as the docs said but nothing shows up on the debugger site.

vagrant oak
#

can you send me exception and error you are receiving in the server? can you say a little more about what type of server is? OS, processor etc

cinder geode
vagrant oak
#

made a fix using tonic rust grpc server as a repro case, next release the fix will be present

#

should be available in canary in 2h

cinder geode