Artifacts Associated With Ticket 1354540
Ticket change [9b3bb72b83] (rid 111095) by msofer on 2005-11-11 22:18:00:
- assignee initialized to: "dkf"
- cmimetype initialized to: "text/plain"
- comment initialized to:
What should be the correct result of test namespace-51.13? The test file suggests 2 {} {2 3 2 1} or 2 {} {2 3 1 1} HEAD as patched today returns 2 {unknown namespace "::test_ns_3" in namespace delete command} {2 3 2 3 1} (which is almost certainly wrong). What is the correct value??? Reasoning (namespace names abbreviated) - the first [foo] sets ::result to 2 - deleting ::ns2 causes a call to ::ns3::foo * lappends 3 to ::result (now {2 3} * deletes ::ns3 * calls ::ns4::bar At this point, thing get nasty: - namespace ::ns2 is in the process of dying (a delete trace is running): should it be found as part of the path? - command ::ns2::foo is in the process of being deleted (delete trace is running): even if ::ns2 is in the path, should this command be found? - ::ns3 is in the process of dying, but not yet dead as a reference to it remains in the CallFrame stack (marked NS_DYING), as ::ns3::foo is still running. Should it be found in the path? The suggestions in the test are: find ::ns2, or find ::ns1. Not sure what HEAD is doing ... - foundin initialized to: "None"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "msofer"
- subsystem initialized to: "21. [namespace]"
- title initialized to: "visibility of dying NS in path"
- type initialized to: "Bug"
Ticket change [6d01cb3014] (rid 128623) by msofer on 2005-11-12 19:40:26:
- icomment:
Logged In: YES user_id=148712 Donal explains in the chat: - I don't know the exact point at which delete traces are called - If they are called when the command is still resolvable, the result should be 2 {} {2 3 2 1} - If they are called when the command is NOT resolvable, the result should be 2 {} {2 3 1 1} - Want an explanation? - First 2 coes from the leading [foo] call - Then we go into the complicated bit - We start deleting the namespace which means deleting the command which triggers the call of ::test_ns_3::foo - that appends the 3, nukes itself (no traces) and calls bar - bar *should* now be in a namespace where the path is effectively {::test_ns_2 ::test_ns_1} - (I think, depending on when path invalidation happends w.r.t. namespace becoming unresolvable) - the first foo in bar should then be resolved to 2::foo or 1::foo (this is the bit I'm not sure about; it's a timing issue) - then the [namespace delete] should *fail* with an error - after all, that namespace has already been deleted - and that should bounce us back out to the trace which throws away the error - finally, the last foo in bar gets run, and that should resolve to 1::foo - login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Ticket change [d539e60a5a] (rid 123585) by msofer on 2005-11-12 19:44:21:
- icomment:
Logged In: YES user_id=148712 Posting the code in the test namespace-51.13, to make this report more self-contained (and future-proof): set ::result {} namespace eval ::test_ns_1 { proc foo {} {lappend ::result 1} } namespace eval ::test_ns_2 { proc foo {} {lappend ::result 2} trace add command foo delete {namespace eval ::test_ns_3 foo;#} } namespace eval ::test_ns_3 { proc foo {} { lappend ::result 3 namespace delete [namespace current] ::test_ns_4::bar } } namespace eval ::test_ns_4 { namespace path {::test_ns_2 ::test_ns_3 ::test_ns_1} proc bar {} { list [foo] [namespace delete ::test_ns_2] [foo] } bar } - login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Ticket change [afd13abfa1] (rid 97879) by msofer on 2005-11-14 07:46:27:
- closedate changed to: "2005-11-14T00:46:27"
- closer changed to: "msofer"
- icomment:
Logged In: YES user_id=148712 Resolved by modifications in the fix for #1355942
- login: "msofer"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "msofer"