Ring buffer overflow in fb_sdl

Christian Helmuth christian.helmuth at ...1...
Wed Jan 28 09:31:40 CET 2015


Hello Tomasz,

On Wed, Jan 28, 2015 at 08:15:59AM +0100, Tomasz Gajewski wrote:
> I was playing a little with demo on linux and I was able to crash fb_sdl
> process. I could do it only after suspend/resume of linux host and I
> understand that this process exists more for testing/development purpose
> but I have more general question about this crash.
> 
> Crash was due to unhandled Ring_buffer::Overflow exception in:
> 
>   for (;;)
>     input_session.submit(wait_for_event());
> 
> What is the proper way to handle such situations?
> 
> Should it block on submit call?
> 
> Should submit call be wrapped with try/catch and retried after some
> time?

You are on the right track. We addressed the issue for our general
Input::Session_component, which is also used by fb_sdl. Please have a
look at

  https://github.com/genodelabs/genode/blob/master/repos/os/include/input/component.h#L47

The fix is not part of Genode 14.11 but already in our master branch
since January 9 2015. So you could just 'git cherry-pick 0f18ecc142'
or simply apply the commit as patch to your source tree.

Regards
-- 
Christian Helmuth
Genode Labs

http://www.genode-labs.com/ · http://genode.org/
https://twitter.com/GenodeLabs · /ˈdʒiː.nəʊd/

Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth




More information about the users mailing list