From: Bob Harris <harris@zk3.dec.com>
Subject: Re: Disk write error when processing more than 1 GB
Date: Sun, 17 Jun 2001 12:22:24 -0400 [thread overview]
Message-ID: <170620011222246003%harris@zk3.dec.com> (raw)
In-Reply-To: 9gd5dp$mdb$1@muguet.sncf.fr
[[ This message was both posted and mailed: see
the "To," "Cc," and "Newsgroups" headers for details. ]]
In article <9gd5dp$mdb$1@muguet.sncf.fr>, Jerome Bellet
<ext.green.bellet@sncf.fr> wrote:
X Hi all!
X
X We use OSF1/AdvFs.
X When our DBMS (Ingres) tries to modify a 1,6 GB table, the following error
X occurs :
X ----------------------------------------------------------------------------
X ---------
X 41 [HOST] ::[1299 , 000000014228d580]: Fri Jun 15 12:51:04
X 2001 E_CL0606_DI_BADWRITE Error writing page to disk
X 42 lseek() failed with operating system error 22 (Invalid argument)
X 43 [HOST] ::[1299 , 000000014228d580]: Fri Jun 15 12:51:04
X 2001 E_DM9006_BAD_FILE_WRITE Disk file write error on
X database:[DATABASE] table:[TABLE]
X pathname:/var/openi/data/[DATABASE]/ingres/data/default/[DATABASE]
X filename:a0aaaat5.m00 page:1048576
X ----------------------------------------------------------------------------
I'm looking at the error:
42 lseek() failed with operating system error 22 (Invalid argument)
AdvFS will _ONLY_ return this error (EINVAL) for 2 reasons. The first
is if the type of lseek operation is neither SEEK_SET, SEEK_CUR, nor
SEEK_END. These are typically hard coded in most lseek calls, so I
rather doubt that it was from this.
The other reason for returning EINVAL from AdvFS lseek() is if the new
offset results in a location before the beginning of the file. This
can happen several ways depending on whether SEEK_SET, SEEK_CUR, or
SEEK_END was specified. For example, is SEEK_SET and a negative offset
is specified. If SEEK_CUR and a negative offset and the current offset
plus the negative offset results in a negative value (1000 + (-2000)).
Or finally, SEEK_END and a negative offset and the size of the file
plus the negative offset result in a negative value (65000 + (-85963)).
Since you say there are gigabyte sized files involved, then it is my
guess that this was a 32 bit signed integer overflow. For example,
1.6GB is about 1,717,986,918 and if 429,496,730 is added to it, the
resulting value is 2,147,483,648 or in hex 0x80000000 which as a signed
integer would actually be a negative number because the most
significent sign bit is set. so any internal math using 32 bit signed
integers could have caused an integer overflow and resulted in a
negative offset to be passed to lseek(fd,offset,SEEK_SET).
That is my guess, but I do not own the db sources, nor the methods you
were using to access the database.
And I could be way off base and just guessing wrong.
Bob Harris
next prev parent reply other threads:[~2001-06-17 16:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-06-15 14:17 Disk write error when processing more than 1 GB Jerome Bellet
2001-06-15 15:30 ` Mark Garrett
2001-06-17 16:22 ` Bob Harris [this message]
2001-06-17 17:26 ` Piotri
2001-06-19 7:46 ` Jerome Bellet
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox