Skip to content

Race condition in Urbi (release build) #126

@Werkov

Description

@Werkov

Release build of Urbi nondeterministically fails due to SIGSEGV (caused by double free).

This behavior can be observed when XCS is running on top of the affected version and @dodo_manual@ graph is created and started.
As Dodo produces data sooner or later the Urbi runtime is killed by SIGSEGV (it can be accelerated by also pressing keyboard keys to send data to onboard).

I traced the bug down to function @call_apply_urbi@ in @src/eval/call.hxx@. I tried using VLA (variable length array) allocation instead of using @malloc/new@,
however that also caused nondeterministic fails (once in a new operator, once in @Uvalue::~Uvalue@).

The main observed difference between Debug and Release version in the context of abovementioned functions is that they are inlined in Release mode.

I also tried enclosing socket operations in a mutex (@urbiscript/onboard/inc/adapter.u@), however, without success.
Reporter: Michal Koutný
Begin: 2014-11-03
Completed: 0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions