Skip to content
Tcl Source Code History Of Ticket 2898722
Login

History Of Ticket 2898722

Artifacts Associated With Ticket 2898722

  1. Ticket change [a53d5b7274] (rid 110336) by bharder on 2009-11-16 22:24:59:

    1. assignee initialized to: "msofer"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      Interpretter seems "slow" to realize that a [proc] is available in current namespace  that will satisfy a call for that command. Example is attached in test. Bug is manifested as bad/delayed interaction between [namespace path] and definition/call of a proc within a namespace.
      
    4. foundin initialized to: "obsolete: 8.5.7"
    5. is_private initialized to: "0"
    6. priority initialized to: "5 Medium"
    7. resolution initialized to: "None"
    8. status initialized to: "Open"
    9. submitter initialized to: "bharder"
    10. subsystem initialized to: "21. [namespace]"
    11. title initialized to: "[namespace path] + [proc] resolution are "slow""
    12. type initialized to: "Bug"
  2. Ticket change [4881f26f5d] (rid 99896) by bharder on 2009-11-17 05:24:59:

    1. icomment:
      
      
      File Added - 351180: nsbug.tcl
      
      
      
    2. login: "bharder"
    3. mimetype: "text/plain"
    4. username: "bharder"
  3. Add attachment "nsbug.tcl" [8b5658e7e4] (rid 127548) by bharder on 2009-11-17 05:24:59.

  4. Ticket change [c2d40293cd] (rid 111545) by dgp on 2009-11-17 05:27:58:

    1. icomment:
      
      Likely an epoch check problem
      within the "cmdName" Tcl_ObjType.
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. subsystem changed to: "10. Objects"
    5. username: "dgp"
  5. Ticket change [18f0c62839] (rid 122741) by mpc_janssen on 2009-11-17 05:47:24:

    1. icomment:
      For completeness (and to not require a tcltest script download)
      Seems likely that something with caching (implies epoch??) is at fault here. The following simple interactive session demonstrates this:
      
       % namespace eval ::fu { proc mycmd {} { puts "mycmd" }}
      % namespace eval ::fu::bar { namespace path ::fu; mycmd }
      mycmd
      % namespace eval ::fu::bar { proc mycmd {} { puts "fubar mycmd"}; mycmd }
      mycmd
      % namespace eval ::fu::bar { mycmd}
      fubar mycmd
      % namespace eval ::fu::bar { proc mycmd {} { puts "fubar mycmd"}; mycmd }
      mycmd
      % namespace eval ::fu::bar { mycmd}
      fubar mycmd
      % namespace eval ::fu::bar { proc mycmd {} { puts "fubar mycmd"}; mycmd }
      mycmd
      
      It seems that calling mycmd when it is still only defined in namespace ::fu is a necessary prerequisite to see this behaviour.
      
      
    2. login: "mpc_janssen"
    3. mimetype: "text/plain"
    4. username: "mpc_janssen"
  6. Ticket change [83f497a86d] (rid 117466) by ferrieux on 2009-11-17 14:28:25:

    1. icomment:
      Renamed. "Slow" means a perf problem -- this is a semantic bug.
      
      
    2. login: "ferrieux"
    3. mimetype: "text/plain"
    4. subsystem changed to: "21. [namespace]"
    5. title changed to:
      [namespace path]  + [proc] resolution inconsistencies
      
    6. username: "ferrieux"
  7. Ticket change [ed482d6818] (rid 103850) by ferrieux on 2009-11-18 05:30:27:

    1. icomment:
      One fascinating thing in this : if you replace
      
      puts "mycmd"
      
      with
      
      puts "abcdef"
      
      or even
      
      puts "mycmd " ;# <- note the extra space
      
      then the effect disappears. So I suspect this is all related to shimmering of the mycmd literal between a cmdName and a String (when output to stdout with some nontrivial encoding). The shimmering explains why *after* executing the ::fu variant, the ::fu::bar gets activated. It doesn't explain though why the ::fu is called instead of the ::fu::bar after redefinition. To be continued.
      
      
      
    2. login: "ferrieux"
    3. mimetype: "text/plain"
    4. username: "ferrieux"
  8. Ticket change [90bc725dc2] (rid 120500) by ferrieux on 2009-11-18 05:57:28:

    1. icomment:
      Closing in. It appears TclResetShadowedCmdRefs doesn't take into account the relatively new [namespace path].
      
      
    2. login: "ferrieux"
    3. mimetype: "text/plain"
    4. username: "ferrieux"
  9. Ticket change [c9990c5d70] (rid 122314) by ferrieux on 2009-11-18 07:27:21:

    1. icomment:
      For the record, a summary of a chat with Miguel:
      
      Mig first dichotomizes into two strategies:
       (a) on first alert, nuke all refs
       (b) look more closely and nuke only those that deserve it
      Then he argues that (a) is probably faster+better, since [proc]/[rename] are not done at time-critical runtime; (b) is costlier.
      
      However, as an afterthought to this discussion, I wonder about the feasibility of (a) short of nuking _all_ refs in the interp. Indeed, the concerned refs are not isolated by namespace, they can come from many namespaces (all those who have the current one in their path, plus extra ones with fully qualified procnames aiming directly at us). So unless we nuke all refs in the interp, (a) is identical to (b).
      
      Another approach would be to keep an interpreter-wide hashtable of refs; keyed on the tail of the procname (baz in ::foo::bar::baz). In that case, TclResetShadowed simplifies enormously. However I'm a bit uneasy about what happens to method creation/destruction in TclOO, where the rate of degeneracy on the key (name tail) is high...
      
      
    2. login: "ferrieux"
    3. mimetype: "text/plain"
    4. username: "ferrieux"
  10. Ticket change [60694e1531] (rid 115991) by dgp on 2009-12-10 02:50:03:

    1. priority changed to: "9 Immediate"
  11. Ticket change [8a89e0dadd] (rid 127407) by msofer on 2009-12-11 07:05:52:

    1. icomment:
      alex - can you take this one over? You seem to be way ahead of me :P
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. username: "msofer"
  12. Ticket change [3b38ca769b] (rid 112700) by msofer on 2009-12-11 07:05:53:

    1. assignee changed to: "ferrieux"
  13. Ticket change [0053b046a3] (rid 119301) by ferrieux on 2010-01-09 05:45:01:

    1. assignee changed to: "dkf"
    2. icomment:
      Sorry, assigning to me is an exaggeration, I'm way above my usual flight level.
      Passing on to oxygen-tank-equipped dkf (see my last comment: statistics in TclOO etc)
      
      
    3. login: "ferrieux"
    4. mimetype: "text/plain"
    5. username: "ferrieux"
  14. Add attachment "nsbug.tcl" [a39c750f11] (rid 110070) by dkf on 2010-01-09 21:25:32.

  15. Ticket change [80b15f82a1] (rid 116914) by dkf on 2010-01-09 21:25:36:

    1. icomment:
      
      
      File Added - 358306: nsbug.tcl
      
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  16. Ticket change [905a28587f] (rid 120436) by dkf on 2010-01-09 22:49:37:

    1. icomment:
      Distilled down to a single test that hits at least one of the bugs in this area, and hits it reliably. (Because the original report looked like it involves literal sharing, it's not entirely trivial to trigger on an entirely predictable basis.)
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  17. Ticket change [91f6c59923] (rid 120708) by ferrieux on 2010-01-09 23:43:20:

    1. icomment:
      Donal, can you comment on the idea of  a hashtable keyed on the procname (tail) ?
      
      
      
    2. login: "ferrieux"
    3. mimetype: "text/plain"
    4. username: "ferrieux"
  18. Ticket change [8b710e9424] (rid 127570) by dkf on 2010-01-10 01:12:32:

    1. icomment:
      I can't see why you're fixated on procedures.
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  19. Ticket change [79a131f178] (rid 90163) by ferrieux on 2010-01-10 19:16:11:

    1. icomment:
      Sorry, "command name", not "procname".
      Mea maxima culpa, beat me up until dawn, but please please answer...
      
      
    2. login: "ferrieux"
    3. mimetype: "text/plain"
    4. username: "ferrieux"
  20. Ticket change [0597bc2ee5] (rid 89091) by dkf on 2010-01-10 20:26:37:

    1. icomment:
      Every namespace has a hash from (qualifier-free) command name to command implementation. What it doesn't do is have a mapping from everything visible due to the installed resolvers to implementation; that would be moderately expensive to compute and isn't the way that resolvers work anyway. Hash tables are also not very fast (not given that command lookup is a major hotspot in most Tcl code).
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  21. Ticket change [4dd54767f9] (rid 127123) by dkf on 2010-01-10 20:26:40:

    1. title changed to:
      [namespace path] + command resolution inconsistencies
      
  22. Ticket change [2445e7077b] (rid 131084) by dkf on 2010-01-10 23:54:01:

    1. icomment:
      Committed test namespace-51.17 to HEAD which characterizes the issue. Note that it is constrained to not normally execute; it's going to be tricky to fix, so no sense holding a release up for it...
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  23. Ticket change [3771553df1] (rid 107281) by dkf on 2010-01-10 23:54:05:

    1. priority changed to: "8"
  24. Ticket change [1505917dc7] (rid 124495) by dgp on 2011-09-20 21:16:43:

    1. icomment:
      When I force it to run, I see test namespace-51.17
      pass on the current trunk.  Has this bug been fixed?
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  25. Ticket change [606c196351] (rid 116000) by dkf on 2011-09-21 15:00:41:

    1. closedate changed to: "2011-09-21T08:00:41"
    2. closer changed to: "dkf"
    3. icomment:
      I don't know. Maybe. :-)
      Removed the constraint
      
      
    4. login: "dkf"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Pending"
    8. username: "dkf"
  26. Ticket change [64dafc2b64] (rid 134173) by dkf on 2013-09-24 12:04:38:

    1. closedate changed to: "2456560.00322868"
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. severity changed to: "Minor"
    5. status changed to: "Closed"