Skip to content

unit tests pass but have unclean cogserver shutdown. #2

Open
@linas

Description

Really annoying pseudo-problem: unit tests, after passing, sometimes fault during cog-server shutdown, typically with the error message corrupted size vs. prev_size but sometimes others.

The root cause of this is that different shared-lib dtors are racing with each other; one of them is the dtor for the cogutils logger. If it waits too long, it ends up trying to free memory after malloc() and free() have been destroyed. Thus the corrupted size error.

This is super-annoying. I spent a day trying to find a solution for this but could not. Placing sleeps in various places did not work. The bug is not really here, its in the cog-utils Logger but it manifests here and a few other places, sometimes. I don't know what to do ....

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions