RafaGago / mini-async-log-c

Mini async log C port. Now with C++ wrappers.
BSD 3-Clause "New" or "Revised" License
70 stars 7 forks source link

stress test: Missing messages for small message counts. #1

Closed RafaGago closed 6 years ago

RafaGago commented 6 years ago

Steps to reproduce:

Modify the stress test utility to use a thread only (to reproduce it faster) and use a very high number of iterations of only one message with TLS.

What has been discovered so far:

-It seems to only happen for small message counts, it points to be an initialization/shutdown problem only. -It seems to happen when running only producer thread. -Fortunately it's reproductible on Debug mode. -If malc.c is modified to keep track of the messages that it gets (on static variables properly initialized each time) and trigger assertions there, it shows that when the error is triggered there isn't a single message coming to the queue (the message itself + the TLS buffer init/deinit command messages). -The TLS creation functions are reporting no errors.

Platform:

-Linux (Ubuntu 16-04 x64).

To check:

-If it happens when using the heap -> TLS issue.

RafaGago commented 6 years ago

Solved with d7759e536d764bf3969874e34f04bb1a36737bc5 and 5ac73a6fcaa00190b9f3b7e4f6ceaec0b5569ef3