From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa528,7e15c77af742f25d X-Google-Attributes: gidfa528,public X-Google-ArrivalTime: 2001-06-17 09:28:17 PST Path: archiver1.google.com!newsfeed.google.com!sn-xit-03!supernews.com!nntp.cs.ubc.ca!newsfeed.stanford.edu!paloalto-snf1.gtei.net!news.gtei.net!news.compaq.com!news.cpqcorp.net!harris Subject: Re: Disk write error when processing more than 1 GB From: Bob Harris Newsgroups: comp.unix.tru64 Posted-And-Mailed: yes Message-ID: <170620011222246003%harris@zk3.dec.com> References: <9gd5dp$mdb$1@muguet.sncf.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: 8bit User-Agent: YA-NewsWatcher/5.0.1 Date: Sun, 17 Jun 2001 12:22:24 -0400 NNTP-Posting-Host: 16.140.32.194 X-Complaints-To: abuse@Compaq.com X-Trace: news.cpqcorp.net 992794943 16.140.32.194 (Sun, 17 Jun 2001 09:22:23 PDT) NNTP-Posting-Date: Sun, 17 Jun 2001 09:22:23 PDT Organization: Compaq Computer Corporation Xref: archiver1.google.com comp.unix.tru64:2541 [[ 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 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