[CDRIVER-1413] Segfault on getaddrinfo when client connects on TCP Created: 25/Jul/16 Updated: 03/May/17 Resolved: 26/Jul/16 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | Bulk API |
| Affects Version/s: | 1.3.5 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Thomas Champagne | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Debian Jessie with libc 2.19-18+deb8 |
||
| Description |
|
On a multithread client, I have a segfault with bulk operations.
In the doc, the getaddrinfo is described as "Thread safety". |
| Comments |
| Comment by A. Jesse Jiryu Davis [ 26/Jul/16 ] | |
|
Great, thanks for investigating! | |
| Comment by Thomas Champagne [ 26/Jul/16 ] | |
|
After some investigations, I have found the source of problem. So, the solution is to link the main program with pthread (-lpthread) or define the LD_PRELOAD environment with the pthread library :
So, I think it is not an issue in the mongodb driver but in the libc. | |
| Comment by A. Jesse Jiryu Davis [ 25/Jul/16 ] | |
|
Thanks. Intermittent or every time? Can you send us a complete code example |