Skip to content

Crash in logger during shutdown. #247

@linas

Description

@linas

When the CogServer is shut down, there is a shared-library dtor race condition, where the cogutil logger threads are still running, even though the shared library is now gone. This looks like a crash, but the crash occurs only after the cogserver has exited (and after all unit tests have passed.) This makes test passes look like failures.

This only happens once out of every ten runs.

I first spotted this many years ago, and have repeatedly spent a lot of time trying to fix it, by adding more locks, a few sleep()s here and there, and any other trick I could think of, including not calling delete and making class dtors into no-ops. Despite great effort, I've been unable to find a fix. It seems appropriate to report this as a formal bug.

This is most easily demonstrated with the unit tests in https://github.com/opencog/atomspace-cog/ which "always" consistently pass... and then commonly crash during the shared library unload when the cogserver is stopped. This is ugly and undesired. (Out of 24 unit tests, it is likely that at least one will crash due to this bug.)

Metadata

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