[CDRIVER-1556] driver aborts after "mongoc_stream_writev(): precondition failed: stream" Created: 22/Sep/16 Updated: 01/Jul/19 Resolved: 23/Sep/16 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | Bulk API, libmongoc |
| Affects Version/s: | 1.4.0 |
| Fix Version/s: | 1.5.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Christoph Schwarz | Assignee: | Hannes Magnusson |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Debian 8 (Jessie) 64 bit |
||
| Issue Links: |
|
||||||||
| Description |
|
Driver aborted during execution of a bulk operation, which consists of a large number of upserts. Console output:
GDB backtrace:
Note that we did not encounter any problem with this kind of operation and the driver has executed thousands of such operations successfully before the crash. We noted a connectivity problem around the time the crash happened. A different thread that is monitoring database connectivity logged:
However, that thread did not crash the application and it does not perform bulk upserts but rather a simple finds. |
| Comments |
| Comment by Githook User [ 23/Sep/16 ] | |
|
Author: {u'username': u'bjori', u'name': u'Hannes Magnusson', u'email': u'bjori@php.net'}Message: | |
| Comment by Hannes Magnusson [ 22/Sep/16 ] | |
|
Could be. From the driver eyes, a database response over our sockettimeout is the same as network failure (black hole in a firewall for example). I think I have a fix by now, just trying to repro this scenario in unit test | |
| Comment by Christoph Schwarz [ 22/Sep/16 ] | |
|
This is the last log message on the database:
Maybe there was no connectivity issue. Rather than that the database took longer than 5 minutes to process a batch of 1000 upserts. | |
| Comment by Christoph Schwarz [ 22/Sep/16 ] | |
|
Yes, the writes are unordered and there are 50,000 upsert operations in this particular batch. | |
| Comment by Hannes Magnusson [ 22/Sep/16 ] | |
|
Are you doing unordered writes? | |
| Comment by Hannes Magnusson [ 22/Sep/16 ] | |
|
Interesting. When you say "large number of upserts", I suspect that means over a 1000? |