Skip to content
Tcl Source Code History Of Ticket ce32712f83
Login

History Of Ticket ce32712f83

Artifacts Associated With Ticket ce32712f83

  1. Ticket change [3406a407fe] (rid 246319) by apnadkarni on 2025-10-03 10:04:51:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/x-markdown"
    4. comment initialized to:
      Both the following sequences are seen in tclZipFs.c
      
      ```
          ReadLock();
          if (!ZipFS.initialized) {
      	ZipfsSetup();
          }
      ```
      
      and
      
      ```
          WriteLock();
          if (!ZipFS.initialized) {
      	ZipfsSetup();
          }
      ```
      
      - Why is ZipfsSetup under a read lock in some cases and write locks in others? Does not seem to make sense.
      - How is a read lock sufficient given that ZipfsSetup modifies the internal structures?
      
      I had added a TODO comment questioning this when fixing zipfs bugs during the 9.0 beta but forgot to revisit and just saw it today :-(
      
    5. foundin initialized to: "9.0.2"
    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: "Minor"
    12. status initialized to: "Open"
    13. submitter initialized to: "apnadkarni"
    14. subsystem initialized to: "- New Builtin Commands"
    15. title initialized to: "Inconsistent locking during zipfs initialization"
    16. type initialized to: "Bug"
  2. Ticket change [4acad39310] (rid 246904) by dkf on 2025-10-07 14:11:25:

    1. icomment:
      Since it's a once-per-process setup, the flag is likely set to true before the process launches any more threads (that read the vfs). The different locks may be for the code that follows.
      
      If my thoughts are correct, moving the call to `ZipfsSetup()` outside the lock (and having it recheck the flag inside the call as well as using its own lock, for double-checked locking) is likely to be the optimal approach; the case when two threads vie of the new lock is expected to be very rare.
      
      The memory barrier due to the function call is probably enough.
      
    2. login: "dkf"
    3. mimetype: "text/x-markdown"
  3. Ticket change [f11ddc6ff0] (rid 249354) by jan.nijtmans on 2025-12-09 09:01:27:

    1. icomment: "Ping? What's the status of this?"
    2. login: "jan.nijtmans"
    3. mimetype: "text/x-fossil-wiki"