[SERVER-21297] jstests/slow2/conc_update.js fails on s390x on Redhat Created: 04/Nov/15 Updated: 14/Apr/16 Resolved: 02/Mar/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | WiredTiger |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | William Zhang | Assignee: | Mira Carey |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Operating System: | ALL | ||||||||
| Sprint: | Platforms 10 (02/19/16), Platforms 11 (03/11/16) | ||||||||
| Participants: | |||||||||
| Description |
|
The JavaScript test jstests/slow2/conc_update.js fails on s390x on RHEL7. d20000| 2015-11-04T14:14:54.855-0500 I INDEX [conn1] build index on: concurrency.conc properties: { v: 1, key: { x: 1.0 }, name: "x_1", ns: "concurrency.conc" } The entire log is in the attachment. |
| Comments |
| Comment by Bryan Chan [ 12/Nov/15 ] |
|
redbeard0531, to avoid breaking the semantics of the fields written to the buffer, I believe _repr should be stored with buf.appendNum() instead of buf.appendStruct(). What do you think? |
| Comment by William Zhang [ 12/Nov/15 ] |
|
The issue is in https://github.com/mongodb/mongo/blob/master/src/mongo/db/record_id.h#L111 RecordId._repr, a big endian integer on s390x, is written to buffer while treated as an array of char. This issue have been fixed. Thank you so much, Mathias! |
| Comment by Mathias Stearn [ 05/Nov/15 ] |
|
That means that the RecordId is invalid before it reaches SortKey. If I had to guess, I'd say the issue is likely to be in the BufReader used by the external sorter used for bulk index builds. You can confirm that quickly by changing these lines to use memcpy rather than casts: https://github.com/mongodb/mongo/blob/master/src/mongo/util/bufreader.h#L64 https://github.com/mongodb/mongo/blob/master/src/mongo/util/bufreader.h#L83. We'd probably want to do something cleaner for commit, but this will at least confirm whether this is the problem if it it lies somewhere else. |
| Comment by William Zhang [ 05/Nov/15 ] |
|
Hi Mathias, here is the new output: d20000| 2015-11-05T15:35:39.964-0500 I INDEX [conn1] build index on: concurrency.conc properties: { v: 1, key: { x: 1.0 }, name: "x_1", ns: "concurrency.conc" } |
| Comment by Mathias Stearn [ 05/Nov/15 ] |
|
Could you add the following line at the top of this if block and rerun: https://github.com/mongodb/mongo/blob/master/src/mongo/db/storage/key_string.cpp#L349 log() << "raw: " << raw << " null: " << RecordId().repr() << " min: " RecordId::min().repr() << " max: " << RecordId::max().repr(); |