diff options
author | shess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-29 13:43:06 +0000 |
---|---|---|
committer | shess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-29 13:43:06 +0000 |
commit | e214769f645d2fcd9ada50be6b08f6273d73eb66 (patch) | |
tree | b280859dfa7193641366b75dc67a17da4d1e280d /third_party | |
parent | e1c19e3b4ceee5dc7256c3ee00a9e33c87115e64 (diff) | |
download | chromium_src-e214769f645d2fcd9ada50be6b08f6273d73eb66.zip chromium_src-e214769f645d2fcd9ada50be6b08f6273d73eb66.tar.gz chromium_src-e214769f645d2fcd9ada50be6b08f6273d73eb66.tar.bz2 |
SQLite: logging to track down SQLITE_IOERR_WRITE on waterfall.
Will remove once it is determined what is happening, or if the fail
still happens but this logging doesn't fire.
BUG=56427
TEST=none
Review URL: http://codereview.chromium.org/3473026
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60938 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party')
-rw-r--r-- | third_party/sqlite/src/src/os_unix.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/third_party/sqlite/src/src/os_unix.c b/third_party/sqlite/src/src/os_unix.c index ef04a72..5bc6955 100644 --- a/third_party/sqlite/src/src/os_unix.c +++ b/third_party/sqlite/src/src/os_unix.c @@ -2829,8 +2829,15 @@ static int seekAndWrite(unixFile *id, i64 offset, const void *pBuf, int cnt){ #else newOffset = lseek(id->h, offset, SEEK_SET); if( newOffset!=offset ){ + int capturedErrno = errno; /* Capture errno before fprintf(). */ + /* TODO(shess): Tracking a SQLITE_IOERR_WRITE being seen on the + * waterfall. http://crbug.com/56427 */ + fprintf(stderr, "SQLite lseek error in seekAndWrite, " + "offset == %d, rc == %d, errno == %d\n", + (int)offset, (int)newOffset, capturedErrno); + fflush(stderr); if( newOffset == -1 ){ - ((unixFile*)id)->lastErrno = errno; + ((unixFile*)id)->lastErrno = capturedErrno; }else{ ((unixFile*)id)->lastErrno = 0; } @@ -2840,7 +2847,14 @@ static int seekAndWrite(unixFile *id, i64 offset, const void *pBuf, int cnt){ #endif TIMER_END; if( got<0 ){ - ((unixFile*)id)->lastErrno = errno; + int capturedErrno = errno; /* Capture errno before fprintf(). */ + /* TODO(shess): Tracking a SQLITE_IOERR_WRITE being seen on the + * waterfall. http://crbug.com/56427 */ + fprintf(stderr, "SQLite write error in seekAndWrite, " + "cnt == %d, rc == %d, errno == %d\n", + cnt, got, capturedErrno); + fflush(stderr); + ((unixFile*)id)->lastErrno = capturedErrno; } OSTRACE5("WRITE %-3d %5d %7lld %llu\n", id->h, got, offset, TIMER_ELAPSED); |