Ticket #1423 (closed defect: fixed)
Linux std::string not thread safe
| Reported by: | trevorwekel | Owned by: | trevorwekel |
|---|---|---|---|
| Priority: | high | Milestone: | 2.2 |
| Component: | Server | Version: | 2.2.0 |
| Severity: | blocker | Keywords: | |
| Cc: | brucedechant | External ID: |
Description
The std::string implementation on Linux uses a refcounted copy of the string data. Under certain circumstances, the implementation in not thread safe which causes "double free" errors and MapGuide server crashes under heavy load on Linux.
The MapGuide logs (access, error, etc) are especially susceptible to string thread safety because strings are queued to seperate thread before they are written to disk.
An effective way to test thread safety for std::string is to run a load test of 200+ concurrent users executing Http GETTILEIMAGE. This Http operation is very fast (<10 ms) and puts huge stress on the basic request processing and logging infrastructure. For maximum effectiveness, this test should be run on an 8 way box.

