[SERVER-5449] Assertion failure writing to journal file Created: 29/Mar/12  Updated: 11/Jul/16  Resolved: 30/Mar/12

Status: Closed
Project: Core Server
Component/s: Stability, Storage
Affects Version/s: 2.0.2, 2.0.4, 2.1.0, 2.1.1
Fix Version/s: 2.0.5, 2.1.1

Type: Bug Priority: Critical - P2
Reporter: Jeffrey Yemin Assignee: Andy Schwerin
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

EC2, EBS


Issue Links:
Related
related to SERVER-13326 groupCommitLL dbexception causes imme... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 Description   

Thu Mar 29 17:45:51 [journal] write fails written:8192 len:16384 buf:ยช$ errno:0 Success
Thu Mar 29 17:45:51 [journal] error exception in dur::journal error appending to file 5 errno:0 Success
Thu Mar 29 17:45:51 [journal] dbexception in groupCommitLL causing immediate shutdown: 13515 error appending to file 5 errno:0 Success
Thu Mar 29 17:45:51 dur1
Thu Mar 29 17:45:51 Got signal: 6 (Aborted).

Thu Mar 29 17:45:51 Backtrace:
0xa8d669 0x7fbb99d58900 0x7fbb99d58885 0x7fbb99d5a065 0x881427 0x7616bb 0x76192d 0x7620bb 0xaa80b0 0x7fbb9a86e7f1 0x7fbb99e0b92d
mongod(_ZN5mongo10abruptQuitEi+0x399) [0xa8d669]
/lib64/libc.so.6(+0x32900) [0x7fbb99d58900]
/lib64/libc.so.6(gsignal+0x35) [0x7fbb99d58885]
/lib64/libc.so.6(abort+0x175) [0x7fbb99d5a065]
mongod(_ZN5mongo10mongoAbortEPKc+0x47) [0x881427]
mongod(_ZN5mongo3dur27groupCommitWithLimitedLocksEv+0xcb) [0x7616bb]
mongod() [0x76192d]
mongod(_ZN5mongo3dur9durThreadEv+0x10b) [0x7620bb]
mongod(thread_proxy+0x80) [0xaa80b0]
/lib64/libpthread.so.0(+0x77f1) [0x7fbb9a86e7f1]
/lib64/libc.so.6(clone+0x6d) [0x7fbb99e0b92d]

Logstream::get called in uninitialized state
Thu Mar 29 17:45:51 ERROR: Client::shutdown not called: journal



 Comments   
Comment by auto [ 17/Apr/12 ]

Author:

{u'login': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@10gen.com'}

Message: SERVER-5449: It's not an error for the write() syscall to return a non-negative value less than len.

Instead of treating it as an error for write() to return a non-negative value less than len,
keep writing in a loop until the entire buffer has been written to the log file.
Branch: v2.0
https://github.com/mongodb/mongo/commit/23a1c8019a8f25dab89a55a5f7c84dd19720adff

Comment by auto [ 30/Mar/12 ]

Author:

{u'login': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@10gen.com'}

Message: SERVER-5449: It's not an error for the write() syscall to return a non-negative value less than len.

Instead of treating it as an error for write() to return a non-negative value less than len,
keep writing in a loop until the entire buffer has been written to the log file.
Branch: master
https://github.com/mongodb/mongo/commit/7d069f92855e6a401cfac0efbacad6dd083c2356

Comment by Andy Schwerin [ 29/Mar/12 ]

the write() in LogFile::synchronousAppend() needs to be done in a loop, in case a slow write gets interrupted part-way through.

Generated at Thu Feb 08 03:08:56 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.