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.
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.