Git Product home page Git Product logo

Comments (6)

joshblum avatar joshblum commented on July 19, 2024 1

@vladionescu thanks for the report, we have a ticket internally to investigate this

from go-keybase-chat-bot.

joshblum avatar joshblum commented on July 19, 2024 1

@vladionescu #57 should address the memory leak, let's open a new issue for running on google cloud

from go-keybase-chat-bot.

vladionescu avatar vladionescu commented on July 19, 2024

Adding time keybase status to the entrypoint shell script right before my bot gets executed shows that it returns kinda slowly but still faster than 5 seconds. The 'failed to auth' error persists. Why this is happening is likely a separate issue but I wanted to have this context here.

2020-02-21T01:59:47.814485Z real	0m1.311s A 
2020-02-21T01:59:47.814497Z user	0m0.150s A 
2020-02-21T01:59:47.814509Z sys	0m0.080s A 

from go-keybase-chat-bot.

vladionescu avatar vladionescu commented on July 19, 2024

@malware-unicorn fixed the OOM by adding a <-doneCh in the timeout case:
https://github.com/malware-unicorn/go-keybase-chat-bot/blob/master/kbchat/kbchat.go#L64

from go-keybase-chat-bot.

vladionescu avatar vladionescu commented on July 19, 2024

On another note, I suspect the reason Command("status") fails on Cloud Run is because Cloud Run captures STDOUT and STDERR for logging.

https://cloud.google.com/run/docs/logging#container-logs

They probably neglected to duplicate those file descriptors. @malware-unicorn doesn't see this fmt.Errorf() printed, so something's going on with process output.

https://github.com/malware-unicorn/go-keybase-chat-bot/blob/master/kbchat/kbchat.go#L65

If that's the case, then p.StdoutPipe() wouldn't be getting the expected output from status.

The fix for this is either

  1. Send Command() output to an FD we control, and read from that.
  2. Use an API instead of shelling out to the keybase binary.

from go-keybase-chat-bot.

vladionescu avatar vladionescu commented on July 19, 2024

Opened #58 for the Cloud Run shenanigans.

from go-keybase-chat-bot.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.