[SERVER-2600] Interrupted system call error in MessagingPort::recv() not propagated to the user code Created: 21/Feb/11 Updated: 24/Feb/17 Resolved: 24/Feb/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Client |
| Affects Version/s: | 1.6.5, 1.7.6 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Eugene Skepner | Assignee: | Unassigned |
| Resolution: | Incomplete | Votes: | 0 |
| Labels: | cxxcopy | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
MacOS X 10.6.6 (appears to be on any unix platform) |
||
| Operating System: | ALL |
| Participants: |
| Description |
|
My program consists of short-live multiple processes, parent processes are often receive SIGCHLD, it sometimes happen during mongodb query execution or data retrieval via cursor. When signal is received, MessagingPort::recv( char * buf , int len ) throws SocketException (message.cpp:653 in 1.7.6 sources), that exception is then caught in MessagingPort::recv(Message& m) (message.cpp:477 in 1.7.6 sources) and false is returned. Returned value is ignored by DBClientConnection::recv( Message &m ) (dbclient.cpp:892) and my program does not receive any information about that exception, it just looks like query found no results (while matching documents are in the database). Would be good to just allow user code to receive SocketException or DBException, then user code could repeat the query. Thanks. |
| Comments |
| Comment by Eric Milkie [ 24/Feb/17 ] |
|
The legacy C++ driver has been deprecated; the new C++ driver does not suffer from this issue. |
| Comment by Eugene Skepner [ 21/Feb/11 ] |
|
MessagingPort::recv returns false, but DBClientConnection::recv that calls MessagingPort::recv is void and ignores value returned by MessagingPort::recv. It leads to a problem of not providing important information to user code at all. |
| Comment by Eliot Horowitz (Inactive) [ 21/Feb/11 ] |
|
Note: if it returns false, that means there as a network error, not no results |