Artifacts Associated With Ticket 219396ffffffffff
Ticket change [af91b7326e] (rid 97835) by nobody on 2000-10-26 05:12:23:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
OriginalBugID: 6215 Bug Version: 8.3.2 SubmitDate: '2000-09-05' LastModified: '2000-10-25' Severity: MED Status: UnAssn Submitter: techsupp OS: Digital Unix Machine: 64-bit Compaq Alpha FixedDate: '2000-10-25' ClosedDate: '2000-10-25' Name: Robin T. Miller CustomShell: No patches, no customizations. ReproducibleScript: On Tru64 Unix, file offsets are sizeof(long), but the definition of seek limits the file offset to sizeof(int) or 31 bits (must be positive value). I had a simple C function used to determine disk capacity, that I decided to re-write in Tcl, but was disappointed to see that seek has this limitation. Of course to be portable to other platforms, 64-bit file system support is necessary. Here's the simple Tcl code to reproduce this problem: set attempts 0 set bsize 512 set mbyte [expr (1024 * 1024)] set adjust [expr ($mbyte * 250)] set offset $adjust while { 1 } { incr attempts if [catch {seek $chan $offset start} result] { puts stderr "seek failed!\n$result" break } set off [tell $chan] if { $opts(DebugFlag) } { puts [format "offset = %ld, lba = %lu" $off [expr ($off / $bsize)]] } if [catch {read $chan $bsize} result] { puts stderr "read failed!\n$result" break } if [eof $chan] { set adjust [expr ($adjust / 2)] if { ($adjust == 0) } { incr adjust } set offset [expr ($off - $adjust)] } else { incr offset $adjust if { ($adjust == 1) } { break; ;# We have max capacity! } } } puts " Attempts: $attempts" puts " Offset: $offset" puts " Capacity: [expr ($offset / $bsize)]" I consider this a bug rather than a feature enhancement, since Tru64 Unix is naturally a 64-bit system. ObservedBehavior: tru64% getcapacity -device rz2 -debug offset = 262144000, lba = 512000 offset = 524288000, lba = 1024000 offset = 786432000, lba = 1536000 offset = 1048576000, lba = 2048000 offset = 1310720000, lba = 2560000 offset = 1572864000, lba = 3072000 offset = 1835008000, lba = 3584000 offset = 2097152000, lba = 4096000 seek failed! integer value too large to represent as non-long integer Attempts: 9 Offset: 2359296000 Capacity: 4608000 tru64% tclsh % set chan [open /dev/rrz2c r] file5 % seek $chan 2359296000 start integer value too large to represent as non-long integer % close $chan % exit tru64% DesiredBehavior: I expect seek to allow a sizeof(long) offset value. - foundin initialized to: "obsolete: 8.3.2"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "69. Other"
- title initialized to:
seek offset is limited to sizeof(int), where sizeof(long) sh
- type initialized to: "Bug"
Ticket change [1a4dbd452a] (rid 122957) by dkf on 2000-11-15 22:13:10:
- subsystem changed to: "62. (unused)"
Ticket change [b3928050af] (rid 124880) by dkf on 2000-11-28 20:33:06:
- icomment:
Yet another instance of the problems Tcl has with the difference between 32 bits and 64 bits (which also bites in expressions and clock handling; maybe elsewhere too) and which will take a concerted piece of monster effort to fix. I'm not even sure that the underlying API for seeks to non-32bit locations is common across all UNIX platforms; if this is the case, then additional configure tests will be needed too. :^(
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [065cab53f4] (rid 89213) by dgp on 2001-04-03 06:19:31:
- subsystem changed to: "24. Channel Commands"
Ticket change [1692c5058c] (rid 124737) by dkf on 2001-09-20 17:38:06:
- assignee changed to: "dkf"
- icomment:
Logged In: YES user_id=79902 Assigning to myself really just to remind me that this is a sort-of duplicate of another bug I'm thinking of how to fix.
- login: "dkf"
- mimetype: "text/plain"
- resolution changed to: "Duplicate"
- username: "dkf"
Ticket change [c2d4665aa8] (rid 111547) by dkf on 2002-02-15 21:42:25:
- resolution changed to: "Duplicate"
- status changed to: "Open"
Ticket change [b0ac69587c] (rid 98027) by dkf on 2002-02-15 21:42:26:
- status changed to: "Open"
Ticket change [01f2d8cbf6] (rid 119570) by dkf on 2002-02-15 21:42:27:
- resolution changed to: "Duplicate"
Ticket change [6fb305823c] (rid 100356) by dkf on 2002-02-15 21:42:28:
- closedate changed to: "2002-02-15T14:42:28"
- closer changed to: "dkf"
- resolution changed to: "Fixed"
- status changed to: "Closed"