Skip to content
Tcl Source Code History Of Ticket 894e11d7f7
Login

History Of Ticket 894e11d7f7

Artifacts Associated With Ticket 894e11d7f7

  1. Ticket change [7e0a50f1fb] (rid 218418) by apnadkarni on 2023-09-18 16:41:39:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/x-markdown"
    4. comment initialized to:
      This parallels [b6f7cee65](https://core.tcl-lang.org/tcl/tktview/b6f7cee65c) for Win nmake which has been fixed. Didn't realize Unix has the same issue.
      
      The `make test` target sets TCL_LIBRARY before invoking tcltest even when `--enable-zipfs` has been configured. Consequently it is not actually testing the build configuration and is loading Tcl scripts from the source directory instead of from the embedded zip.
      
      This can be confirmed by adding 
      
      ```
      puts $tcl_library
      puts [zipfs mount]
      ```
      
      to any test script.
      
      Anyone fixing this, please also reword the help message for --enable-zipfs or even change the option name. Both the option and the help imply disabling will remove zipfs support. That is not the case. zipfs support is always included in the build. The option only controls whether the Tcl library is embedded within the executable. Commands like `zipfs mount` etc. will continue to work irrespective of the option setting.
      
    5. foundin initialized to: "8.7"
    6. is_private initialized to: "0"
    7. login: "apnadkarni"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "9546e9877f1a8899e25a89082561ee694e7fb402"
    10. resolution initialized to: "None"
    11. severity initialized to: "Important"
    12. status initialized to: "Open"
    13. submitter initialized to: "apnadkarni"
    14. subsystem initialized to: "- New Builtin Commands"
    15. title initialized to:
      Unix make test does not test embedded zip configuration
      
    16. type initialized to: "Bug"
  2. Ticket change [4197091846] (rid 219246) by apnadkarni on 2023-10-10 15:13:52:

    1. icomment:
      The issue, for both Windows and Unix, turned out to be deeper. The make/nmake test targets do not bind the zipfs to the executable at all so even if TCL_LIBRARY is not defined the init "guesses" tcl_library to be in the source root/library path.
      
      Thus test runs have not really tested whether the created Tcl library archive is in fact usable.
      
      (Note the zipfs.test tests are mostly unaffected as they explicitly load archives. The above refers to Tcl's reading of its script libraries)
      
    2. login: "apnadkarni"
    3. mimetype: "text/x-markdown"
  3. Ticket change [b3c7613fb8] (rid 219247) by apnadkarni on 2023-10-10 15:14:57:

    1. icomment:
      Unix builds fixed in [effd49d19f]. Windows work ongoing.
      
    2. login: "apnadkarni"
    3. mimetype: "text/x-fossil-plain"
  4. Ticket change [399bce4075] (rid 219315) by dgp on 2023-10-11 14:16:18:

    1. icomment:
      
      Checkin [effd49d19f] creates new test failure:
      
      ==== encoding-28.0 all encodings load FAILED
      ==== Contents of test case:
      
              set string hello
              foreach name [encoding names] {
                      if {$name ne "unicode"} {
                          incr count
                      }
                      encoding convertto -profile tcl8 $name $string
      
                      # discard the cached internal representation of Tcl_Encoding
                      # Unfortunately, without this, encoding 2-1 fails.
                      llength $name
              }
              return $count
      
      ---- Test generated error; Return code was: 1
      ---- Return code should have been one of: 0 2
      ---- errorInfo: invalid encoding file "tis-620"
          while executing
      "encoding convertto -profile tcl8 $name $string"
          ("foreach" body line 5)
          invoked from within
      "foreach name [encoding names] {
                      if {$name ne "unicode"} {
                          incr count
                      }
                      encoding convertto -profile tcl8 $name $string
      
                      # discard the cac..."
          ("uplevel" body line 3)
          invoked from within
      "uplevel 1 $script"
      ---- errorCode: TCL LOOKUP ENCODING tis-620
      ==== encoding-28.0 FAILED
      
      Creates several more as well (in cmdAH.test), but I think they are all in common.
      
    2. login: "dgp"
    3. mimetype: "text/plain"
  5. Ticket change [eeb2714e6e] (rid 219316) by dgp on 2023-10-11 14:19:26:

    1. icomment:
      In case it matters, the test failure is with a build configuration
      
      $ ./configure --disable-shared
      ...
      $ make test-tcl TESTFLAGS="-file encoding.test"
      <see last comment>
      
    2. login: "dgp"
    3. mimetype: "text/plain"
  6. Ticket change [104c691a59] (rid 219317) by apnadkarni on 2023-10-11 16:22:40:

    1. icomment:
      I had tested that config before commit. Retried with but not able to reproduce these failures with core-8-branch, trunk or with effd49d19f. See (edited) test logs below. Both encoding and cmdAH tests pass. Last time the difference in our environments was the presence of the threads package. Tested with that as well with no failures (there are no thread constraints in any case).
      
      This was on Ubuntu. If you are on a Mac, it's quite possible there is a bug in there somewhere as is currently ticketed for password based zips on Mac. OTOH, github tests on MacOS pass without issues.
      
      It would be a useful data point if you can manually reproduce the bug with that commit and then try it with the prior commit **ensuring** that the build actually embedded tcl_library within the executable and TCL_LIBRARY was not set. The problem with test runs prior to effd49d19f was that they set TCL_LIBRARY and thus did not actually test whether encoding files were readable from the zip. That commit purportedly fixed that and potentially exposed existing issues. A manual test would help provide some clue.
      
      Anyways, my test runs
      
      ```
      [apn@tcltk build]$ make -s test-tcl TESTFLAGS="-file encoding.test"
      Warning: tclStubInit.c may be out of date.
      Developers may want to run "make genstubs" to regenerate.
      This warning can be safely ignored, do not report as a bug!
      Warning: tclOOScript.h may be out of date.
      Developers may want to run "make genscript" to regenerate.
      This warning can be safely ignored, do not report as a bug!
      creating libtcl.vfs/tcl_library (prepare compression)
      creating libtcl8.7a6.zip from libtcl.vfs/tcl_library
      cd libtcl.vfs && /usr/bin/zip -rq ../libtcl8.7a6.zip *
      Zip entry offsets appear off by 2057920 bytes - correcting...
      Zip entry offsets appear off by 2184472 bytes - correcting...
      Tests running in interp:  /data/home/apn/src/wip/tcl/unix/build/tcltest
      Tests located in:  /data/home/apn/src/wip/tcl/tests
      Tests running in:  /data/home/apn/src/wip/tcl/unix/build
      Temporary files stored in /data/home/apn/src/wip/tcl/unix/build
      Test files run in separate interpreters
      Running tests that match:  *
      Skipping test files that match:  l.*.test
      Only running test files that match:  encoding.test
      Tests began at Wed Oct 11 17:21:28 CEST 2023
      encoding.test
      
      Tests ended at Wed Oct 11 17:21:29 CEST 2023
      all.tcl:        Total   212     Passed  212     Skipped 0       Failed  0
      Sourced 1 Test Files.
      
      [apn@tcltk build]$ ls -l tcltest
      -rwxr-xr-x 1 apn apn 3368234 Oct 11 17:21 tcltest
      
      Tcl 9
      
      [apn@tcltk build]$ make -s test-tcl TESTFLAGS="-file encoding.test"
      Warning: tclStubInit.c may be out of date.
      Developers may want to run "make genstubs" to regenerate.
      This warning can be safely ignored, do not report as a bug!
      Warning: tclOOScript.h may be out of date.
      Developers may want to run "make genscript" to regenerate.
      This warning can be safely ignored, do not report as a bug!
      creating libtcl.vfs/tcl_library (prepare compression)
      creating libtcl9.0a4.zip from libtcl.vfs/tcl_library
      cd libtcl.vfs && /usr/bin/zip -rq ../libtcl9.0a4.zip *
      Zip entry offsets appear off by 2075072 bytes - correcting...
      Zip entry offsets appear off by 2211368 bytes - correcting...
      Tests running in interp:  /data/home/apn/src/wip/tcl/unix/build/tcltest
      Tests located in:  /data/home/apn/src/wip/tcl/tests
      Tests running in:  /data/home/apn/src/wip/tcl/unix/build
      Temporary files stored in /data/home/apn/src/wip/tcl/unix/build
      Test files run in separate interpreters
      Running tests that match:  *
      Skipping test files that match:  l.*.test
      Only running test files that match:  encoding.test
      Tests began at Wed Oct 11 18:03:26 CEST 2023
      encoding.test
      
      Tests ended at Wed Oct 11 18:03:27 CEST 2023
      all.tcl:        Total   216     Passed  212     Skipped 4       Failed  0
      Sourced 1 Test Files.
      Number of tests skipped for each constraint:
              4       perf
      [apn@tcltk build]$ ls -l tcltest
      -rwxr-xr-x 1 apn apn 3390738 Oct 11 18:03 tcltest
      
      [apn@tcltk build]$ ls -l tcltest
      -rwxr-xr-x 1 apn apn 3390738 Oct 11 18:03 tcltest
      [apn@tcltk build]$ make -s test-tcl TESTFLAGS="-file cmdAH.test"
      Warning: tclStubInit.c may be out of date.
      Developers may want to run "make genstubs" to regenerate.
      This warning can be safely ignored, do not report as a bug!
      Warning: tclOOScript.h may be out of date.
      Developers may want to run "make genscript" to regenerate.
      This warning can be safely ignored, do not report as a bug!
      Tests running in interp:  /data/home/apn/src/wip/tcl/unix/build/tcltest
      Tests located in:  /data/home/apn/src/wip/tcl/tests
      Tests running in:  /data/home/apn/src/wip/tcl/unix/build
      Temporary files stored in /data/home/apn/src/wip/tcl/unix/build
      Test files run in separate interpreters
      Running tests that match:  *
      Skipping test files that match:  l.*.test
      Only running test files that match:  cmdAH.test
      Tests began at Wed Oct 11 18:05:24 CEST 2023
      cmdAH.test
      
      Tests ended at Wed Oct 11 18:05:30 CEST 2023
      all.tcl:        Total   16617   Passed  16587   Skipped 30      Failed  0
      Sourced 1 Test Files.
      Number of tests skipped for each constraint:
              1       knownBug
              8       nonPortable
              21      win
      
      [apn@tcltk build]$ fossil checkout effd49d19f
      [apn@tcltk build]$ make -s test-tcl TESTFLAGS="-file encoding.test"
      Warning: tclStubInit.c may be out of date.
      Developers may want to run "make genstubs" to regenerate.
      This warning can be safely ignored, do not report as a bug!
      Warning: tclOOScript.h may be out of date.
      Developers may want to run "make genscript" to regenerate.
      This warning can be safely ignored, do not report as a bug!
      creating libtcl.vfs/tcl_library (prepare compression)
      creating libtcl8.7a6.zip from libtcl.vfs/tcl_library
      cd libtcl.vfs && /usr/bin/zip -rq ../libtcl8.7a6.zip *
      Zip entry offsets appear off by 2057960 bytes - correcting...
      Zip entry offsets appear off by 2184512 bytes - correcting...
      Tests running in interp:  /data/home/apn/src/wip/tcl/unix/build/tcltest
      Tests located in:  /data/home/apn/src/wip/tcl/tests
      Tests running in:  /data/home/apn/src/wip/tcl/unix/build
      Temporary files stored in /data/home/apn/src/wip/tcl/unix/build
      Test files run in separate interpreters
      Running tests that match:  *
      Skipping test files that match:  l.*.test
      Only running test files that match:  encoding.test
      Tests began at Wed Oct 11 18:09:29 CEST 2023
      encoding.test
      
      Tests ended at Wed Oct 11 18:09:30 CEST 2023
      all.tcl:        Total   212     Passed  212     Skipped 0       Failed  0
      
      [apn@tcltk build]$ make -s test-tcl TESTFLAGS="-file cmdAH.test"
      Warning: tclStubInit.c may be out of date.
      Developers may want to run "make genstubs" to regenerate.
      This warning can be safely ignored, do not report as a bug!
      Warning: tclOOScript.h may be out of date.
      Developers may want to run "make genscript" to regenerate.
      This warning can be safely ignored, do not report as a bug!
      Tests running in interp:  /data/home/apn/src/wip/tcl/unix/build/tcltest
      Tests located in:  /data/home/apn/src/wip/tcl/tests
      Tests running in:  /data/home/apn/src/wip/tcl/unix/build
      Temporary files stored in /data/home/apn/src/wip/tcl/unix/build
      Test files run in separate interpreters
      Running tests that match:  *
      Skipping test files that match:  l.*.test
      Only running test files that match:  cmdAH.test
      Tests began at Wed Oct 11 18:10:51 CEST 2023
      cmdAH.test
      
      Tests ended at Wed Oct 11 18:10:58 CEST 2023
      all.tcl:        Total   16746   Passed  16715   Skipped 31      Failed  0
      Sourced 1 Test Files.
      Number of tests skipped for each constraint:
              1       knownBug
              8       nonPortable
              22      win
      ```
      
    2. login: "apnadkarni"
    3. mimetype: "text/x-markdown"
  7. Ticket change [4c838358b6] (rid 219318) by dgp on 2023-10-11 17:01:39:

    1. icomment:
      
      I am on a CentOS 7 system and my compiler is gcc 4.8.5
      
      Every variant I try on what executable to run and how to launch it shows the same failures.
      
      I notice that the purportedly failing encoding file is tis-620.enc .  Can you confirm your testing is including it?
      
    2. login: "dgp"
    3. mimetype: "text/plain"
  8. Ticket change [047e2e9643] (rid 219319) by dgp on 2023-10-11 17:16:50:

    1. icomment:
      
      A simple start at some debugging reveals that the failure comes
      in LoadTableEncoding() where Tcl_ReadChars() reports that 1042
      chars were read, while LoadTableEncoding() has calculated that
      it expects to see 1043.
      
      There are other singlebyte table encoding files apparently working fine.
      
    2. login: "dgp"
    3. mimetype: "text/plain"
  9. Ticket change [2282352d51] (rid 219325) by dgp on 2023-10-11 18:44:43:

    1. icomment:
      
      The final trailing newline is not appearing in the channel
      input buffers.  I'm guessing the trouble must be somewhere
      in the zipfs drivers.  Slow going.
      
    2. login: "dgp"
    3. mimetype: "text/plain"
  10. Ticket change [6b94f15985] (rid 219327) by apnadkarni on 2023-10-12 03:10:12:

    1. icomment:
      Thanks, that at least gives me some direction to look at. I checked I have tis-620, both by printing in the test case as well as manually executing encoding convert{to,from}. 
      
      I presume doing 
      
      ```
      encoding convertto [encoding convertfrom tis-620 \xA1]
      ```
      
      in tclsh also fails for you?
      
      I see the following data if I read the file. Could you verify you see the same?
      
      ```
      % file size //zipfs:/app/tcl_library/encoding/tis-620.enc
      1092
      % set tis //zipfs:/app/tcl_library/encoding/tis-620.enc
      //zipfs:/app/tcl_library/encoding/tis-620.enc
      % set fd [ open $tis rb]; set data [read $fd]; close $fd; string length $data
      1092
      % puts $data
      # Encoding file: tis-620, single-byte
      S
      003F 0 1
      00
      0000000100020003000400050006000700080009000A000B000C000D000E000F
      0010001100120013001400150016001700180019001A001B001C001D001E001F
      0020002100220023002400250026002700280029002A002B002C002D002E002F
      0030003100320033003400350036003700380039003A003B003C003D003E003F
      0040004100420043004400450046004700480049004A004B004C004D004E004F
      0050005100520053005400550056005700580059005A005B005C005D005E005F
      0060006100620063006400650066006700680069006A006B006C006D006E006F
      0070007100720073007400750076007700780079007A007B007C007D007E007F
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      00000E010E020E030E040E050E060E070E080E090E0A0E0B0E0C0E0D0E0E0E0F
      0E100E110E120E130E140E150E160E170E180E190E1A0E1B0E1C0E1D0E1E0E1F
      0E200E210E220E230E240E250E260E270E280E290E2A0E2B0E2C0E2D0E2E0E2F
      0E300E310E320E330E340E350E360E370E380E390E3A00000000000000000E3F
      0E400E410E420E430E440E450E460E470E480E490E4A0E4B0E4C0E4D0E4E0E4F
      0E500E510E520E530E540E550E560E570E580E590E5A0E5B0000000000000000
      
      %
      ```
      
      (Note the blank line at the end)
      
      I will dig in more later today
      
    2. login: "apnadkarni"
    3. mimetype: "text/x-markdown"
  11. Ticket change [4a034267df] (rid 219328) by apnadkarni on 2023-10-12 03:15:34:

    1. icomment:
      Also, are you working with current core-8-branch or the original commit? Some bugs are likely to have been fixed since then though probably not related. Just to make sure not chasing down fixed issues.
      
    2. login: "apnadkarni"
    3. mimetype: "text/plain"
  12. Ticket change [d562ba21e3] (rid 219329) by apnadkarni on 2023-10-12 06:42:49:

    1. icomment:
      I have traced through and do not see anything suspicious about the read data or counts. **After tclsh is at the command prompt**, set a break point at ZipChannelOpen and ZipChannelRead. Then ran the command
      
      ```
      encoding convertfrom tis-620 \xa1
      ```
      
      * ZipChannel{Open,Read} called multiple times for different files (tclIndex etc.). 
      
      * Eventually invoked for tis-620.enc, the read request (ZipChannelRead.toRead) is for 4096 bytes. ZipChannelRead then returns the entire 1092 bytes of the file.
      
      * After processing the header lines, LoadTableEncoding calls Tcl_Read(toRead=1043)->DoReadChars(toRead=1043)->ReadChars. This returns 1043 bytes as expected.
      
      The first thing then is if to check if `file size //zipfs:/app/tcl_library/encoding/tis-620.enc` returns 1092 or not. If not, that would point to either the zipping or unzipping code. If it does return the correct size, then the channel related code needs to be looked at.
      
      Also, since I cannot reproduce the failure, I suggest you upload your libtcl*.zip file somewhere that I can download (let me know which branch or commit). Just in case, I'll be able to reproduce the failure with that.
      
    2. login: "apnadkarni"
    3. mimetype: "text/x-markdown"
  13. Ticket change [8605ec995f] (rid 219330) by jan.nijtmans on 2023-10-12 07:48:15:

    1. icomment:
      Does CentOS 7 have a smaller buffer-size? Like 512 or 1024 in stead of 4096. That would explain why the data is not read in one go.
      
    2. login: "jan.nijtmans"
    3. mimetype: "text/x-fossil-wiki"
  14. Ticket change [6c4cfb161a] (rid 219332) by apnadkarni on 2023-10-12 10:59:16:

    1. icomment:
      I don't **think** it is a OS issue. The 4096 comes from `CHANNELBUFFER_DEFAULT_SIZE`; it's the buffer size at the Tcl Channel API level.
      
    2. login: "apnadkarni"
    3. mimetype: "text/x-markdown"
  15. Ticket change [e0680458eb] (rid 219479) by dgp on 2023-10-16 17:25:29:

    1. icomment:
      
      This may be a false alarm.
      
      % encoding dirs
      /home/dgp/x86_64/linuxoldld/lib/tcl8.7/encoding //zipfs:/app/tcl_library/encoding
      
      Whether or not that should be the search path for encodings
      in this build configuration might still be an open question.
      
      But.... accepting that search path, there was a tis-620.enc file
      there in the installed area, and I don't know when or how or why
      or why it's never caused trouble before the recent checkin.....
      
      ...but that file was indeed missing its final newline.
      
    2. login: "dgp"
    3. mimetype: "text/plain"
  16. Ticket change [1c8beaa30e] (rid 219480) by dgp on 2023-10-16 17:27:40:

    1. icomment:
      As a lesson from this experience, let me suggest that
      the error message
      
      invalid encoding file "tis-620"
      
      ought to report the full path of the invalid file.
      
    2. login: "dgp"
    3. mimetype: "text/plain"
  17. Ticket change [af758ea4a4] (rid 219481) by dgp on 2023-10-16 17:33:59:

    1. icomment:
      
      After repairing the corrupt installed tis-620.enc file, the
      test file encoding.test is now reporting no failures.
      
      The cmdAH.test failures are still present.  I imagine they
      are due to one of the other installed files being out of date.
      Exploring now.
      
    2. login: "dgp"
    3. mimetype: "text/plain"
  18. Ticket change [9713f7fb43] (rid 219482) by dgp on 2023-10-16 17:46:23:

    1. icomment:
      
      Twenty-nine of the installed *.enc files are different from
      the corresponding files on the core-8-branch.
      
      A 'make install' apparently no longer installs *.enc files 
      (because they're in the zipfs!) so the outdated broken files
      never get overwritten and live forever.
      
      Until recently, `make test` used a TCL_LIBRARY to force use
      of the *.enc files from the sandbox, so the broken files were
      never detected.
      
      So this is a scenario where installers of old 8.7 alphas might
      have the problem.
      
      My local fix is to remove the directory full of outdated files.
      
    2. login: "dgp"
    3. mimetype: "text/plain"
  19. Ticket change [f7e6ba5edb] (rid 219492) by dgp on 2023-10-16 20:59:57:

    1. icomment:
      
      After preventing the use of broken, outdated *.enc files, I get
      a clean `make test-tcl` result on core-8-branch.
      
      When I then try `make test-tcl TESTFLAGS='-singleproc 1'`
      I get a huge number of errors and failures.  This also seems
      to be peculiar to my system.  Working on locating the problem(s).
      
    2. login: "dgp"
    3. mimetype: "text/plain"
  20. Ticket change [c8b817c5ee] (rid 219680) by apnadkarni on 2023-10-21 15:13:06:

    1. closedate changed to: "2460239.13409817"
    2. closer changed to: "apnadkarni"
    3. icomment:
      Closing as fixed. The request to include full path in error message not done as it will take refactoring that I'm loath to do at this point. (Only the encoding name is available at the point the error is detected.)
      
    4. login: "apnadkarni"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"