Skip to content
This repository has been archived by the owner on Jun 30, 2021. It is now read-only.

[WIP] Stability: Add stability test example and start multithreaded fixes #53

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

AdrianDC
Copy link
Contributor

Served server generates random segmentation faults (SIGSEGV) upon cleanups,
due to race conditions throughout the Boost ASIO io_service destructors.

The issue can be proven with the new "stability" example sources,
iterating through 1000 creations of served::net::server with explicit stop() calls
and through 1000 creations of served::net::server without calling stop().

 * Test sequence:

   - mkdir ./served.build/
   - cd ./served.build/
   - cmake -DCMAKE_BUILD_TYPE=Debug -DSERVED_BUILD_SHARED=ON -DSERVED_BUILD_STATIC=ON -DSERVED_BUILD_EXAMPLES=ON -DSERVED_BUILD_RPM=ON ../served/
   - make -j8
   - ../served/bin/eg_stability
   - gdb -q --batch -ex 'set print thread-events off' -ex 'run' -ex 'bt' ../served/bin/eg_stability
 * A class destructor is added to properly release the members
 * The threads are joined upon destruction to ensure work is done
 * A 1 millisecond delay is added to avoid multithreading races
 * Threads are create with "bind" references rather than lambdas
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant