I apologize in advance if this ends up on the mailing list twice but..it's been over 12 hours now and my e-mail, as my previous (but now unimportant one) still didn't make it so I am going to try to resend this. =)
Allright, I've got the bug nailed to the wall with all of its 6 legs.
What I don't know though is what to do about it. Still trying to find the right sledgehammer to squash it with....
Problem boils down to this:
Supreme Commander has a .cab file that is just under 6 gigs in size.
0x178d42fce bytes to be exact
Now here are the last 5 file seek positions in order from first to last:
0x0ff697fb4 0x0ff69800b 0x0ffebc19a 0x0ffebc1f0
All those succeed fine. But #5 ... 0x1007bc160 results in NTSTATUS c000000d, Invalid Parameter.
That address is well within the range of the file though.
The status occurs when lseek is called in this part of NtSetInformation, don't mind my added debug fixme's =)
case FilePositionInformation: if (len >= sizeof(FILE_POSITION_INFORMATION)) { const FILE_POSITION_INFORMATION *info = ptr; unsigned int* iptr = (unsigned int*)&info->CurrentByteOffset.QuadPart;
FIXME( "%i, 0x%08x%08x\n", fd, *(iptr+1), *iptr);
if (lseek( fd, info->CurrentByteOffset.QuadPart, SEEK_SET ) == (off_t)-1) { FIXME("Bad result from lseek"); // Above fixme triggered past 4gb io->u.Status = FILE_GetNtStatus(); } } else io->u.Status = STATUS_INVALID_PARAMETER_3; break;
I checked sizeof(off_t) and it correctly reports as 8-bytes, so I am not sure what the problem is and why this is happening. I know my system can handle files > 4 gigs....wine dumped 9 gigs of relay output onto my hard drive the first time I played with that debug channel =P
Any ideas?
On a bright note...I almost have my Supreme Commander CD Key memorized now...how many people can say that!!! ;)
Thanks,
Stephan
On Tuesday 20 March 2007, Stephan Rose wrote:
I checked sizeof(off_t) and it correctly reports as 8-bytes, so I am not sure what the problem is and why this is happening. I know my system can handle files > 4 gigs....wine dumped 9 gigs of relay output onto my hard drive the first time I played with that debug channel =P
What is your system? What is the value of errno after the lseek call? Does calling lseek64 instead make any difference?
-Hans
The system is a 2.4GHz Core Duo.
lseek64 makes no difference, that was among the first things I tried. I didn't think to check errno yet though but I will do so when I get home from the office.
Stephan
-----Original Message----- From: Hans Leidekker [mailto:hans@it.vu.nl] Sent: Tuesday, March 20, 2007 11:11 To: Stephan Rose Cc: wine-devel@winehq.org Subject: Re: Accessing File > 4gb problem (was: Debugging Supreme Commander)
On Tuesday 20 March 2007, Stephan Rose wrote:
I checked sizeof(off_t) and it correctly reports as 8-bytes, so I am not sure what the problem is and why this is happening. I know my system can handle files > 4 gigs....wine dumped 9 gigs of relay output onto my hard drive the first time I played with that debug channel =P
What is your system? What is the value of errno after the lseek call? Does calling lseek64 instead make any difference?
-Hans
Well I checked errno and it is 22 (EINVAL)
So I then had a suspicion...
I wrote a short native test case that would open the file on the cdrom, and just lseek to various offsets. Even running natively lseek fails past 4gb.
So then, I copied the file to the hard drive. Tried it again... lseek succeeds past 4gb.
So apparently the issue comes down the lseek failing with > 4 gig files only on cd-rom drives and ends up not being a wine bug after all as far as I can tell. I will try to install it from the hard drive in a little bit and see if it succeeds then. I didn't have enough time during lunch to actually let the install run from the HD.
If that does work, I will at least make a note in the AppDB for supreme commander on that particular problem and see if I can submit a bug report to ubuntu for the lseek problem.
Unless someone has an idea how this might be fixable via wine? If so, I'd be happy to give it a try. =)
Thanks all,
Stephan
-----Original Message----- From: Hans Leidekker [mailto:hans@it.vu.nl] Sent: Tuesday, March 20, 2007 11:11 To: Stephan Rose Cc: wine-devel@winehq.org Subject: Re: Accessing File > 4gb problem (was: Debugging Supreme Commander)
On Tuesday 20 March 2007, Stephan Rose wrote:
I checked sizeof(off_t) and it correctly reports as 8-bytes, so I am not sure what the problem is and why this is happening. I know my system can handle files > 4 gigs....wine dumped 9 gigs of relay output onto my hard drive the first time I played with that debug channel =P
What is your system? What is the value of errno after the lseek call? Does calling lseek64 instead make any difference?
-Hans
On 20.03.2007 15:08, Stephan Rose wrote:
So apparently the issue comes down the lseek failing with > 4 gig files only on cd-rom drives and ends up not being a wine bug after all as far as I can tell. I will try to install it from the hard drive in a little bit and see if it succeeds then. I didn't have enough time during lunch to actually let the install run from the HD.
AFAIK Linux didn't support files with multiple extents on ISO9660 filesystems in the past, at least when Joliet is used. I'm not sure about the current status. http://en.wikipedia.org/wiki/ISO_9660#The_4_GB_file_size_limit
Regards, Carl-Daniel