Giter Club home page Giter Club logo

Comments (11)

No9 avatar No9 commented on May 31, 2024

Thanks for the report @timbuchwaldt
Is this something you plan to PR?

from core-dump-handler.

No9 avatar No9 commented on May 31, 2024

Thinking about this a little further: putting a timer around this is fairly involved as it will need to setup a separate thread to execute the tasks on and if they don't complete then time out.

from core-dump-handler.

timbuchwaldt avatar timbuchwaldt commented on May 31, 2024

Hey @No9 - I'd look into working on that change, yep.

I see the complexity of this change, but from what I gathered during our outage I would say this is warranted. A system meant to help debugging problems should not cause/amplify them in any way.

from core-dump-handler.

No9 avatar No9 commented on May 31, 2024

Totally agree it's required - Just wanted to let you know what you're taking on.
I'll commit to providing a review and getting it published ASAP.

from core-dump-handler.

timbuchwaldt avatar timbuchwaldt commented on May 31, 2024

I have looked a bit into this, not super happy with what I found so far. Rust discourages timeouting on threads and I don't see another nice super generic way. GNU Coretuils might come in handy though: The timeout command can wrap any binary and implement timeouting on it. I think technically it should work to switch the core_pattern to |timeout 5 $cdc-stuff in order t ogive it a 5s timeout, what do you think?

from core-dump-handler.

No9 avatar No9 commented on May 31, 2024

Not 100% on using timeout as it may not be available on the all the xKS platforms which means we will end up distributing it similar to the crio exe.
Do you have any links to the conversations on timing out threads?

from core-dump-handler.

timbuchwaldt avatar timbuchwaldt commented on May 31, 2024

Ah mhm good point, yeah.

https://stackoverflow.com/questions/36181719/what-is-the-correct-way-in-rust-to-create-a-timeout-for-a-thread-or-a-function
https://www.reddit.com/r/rust/comments/eit5oo/any_way_to_set_a_timeout_on_a_background_thread/

from core-dump-handler.

No9 avatar No9 commented on May 31, 2024

OK - the reddit thread is talking about managing Rhai which is a script execution engine and much bigger beast than what we have.
While I agree we don't want to hand craft this the first link mentions recv_timeout
Have you looked at that as an option?

The other option is to provide what would really be our own timeout implementation the calls the cdc but which we can distribute consistently. Bit of a lift with this as well but managing at the process level is a clean approach.

from core-dump-handler.

timbuchwaldt avatar timbuchwaldt commented on May 31, 2024

RE Reddit: True.

I implemented the recv_timeout based function. I think this might benefit from a test - but that's a task for ... not tonight.

from core-dump-handler.

timbuchwaldt avatar timbuchwaldt commented on May 31, 2024

Hey @No9 - can I poke you on this? :D

from core-dump-handler.

No9 avatar No9 commented on May 31, 2024

Yup - thanks for the reminder. Been at some confs but should be able to look at this tomorrow.

from core-dump-handler.

Related Issues (20)

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.