Artifacts Associated With Ticket 710642ffffffffff
Ticket change [8a66cdb9fb] (rid 127387) by vasiljevic on 2003-03-27 10:27:22:
- assignee initialized to: "vincentdarley"
- cmimetype initialized to: "text/plain"
- comment initialized to:
The new pluggable filesystem code located in generic/tclIOUtils.c naively plays with global Tcl_Obj*, passing them between threads per-reference and neglecting the proper locks for all except write operations. The spot in question is the global Tcl_Obj *cwdPathPtr. The net-effect is that paths passed to the OS-calls gets garbled, memory is being trashed leading to process exitus and whole bunch of other ugly things is happening. I think this has to be entirely revised, as one can not simply share Tcl_Objs between threads. One has to always make a deep-copy (w/o internal references) of the object before passing it to some other thread. I have some ideas on how to solve this, but it is really not that straight-forward, since few of design issues have to be modified. This bug is really a show-stopper for MT-apps therefore the highest priority.
- foundin initialized to: "obsolete: 8.4.2"
- priority initialized to: "9 Immediate"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "vasiljevic"
- subsystem initialized to: "36. Pathname Management"
- title initialized to: "Thread-unsafe handling of cwdPathPtr"
- type initialized to: "Bug"
Add attachment "tclIOUtil.c" [7c5c55acf1] (rid 97067) by vasiljevic on 2003-03-28 23:28:02.
Ticket change [3980bdaf41] (rid 112401) by vasiljevic on 2003-03-28 23:28:02:
- icomment:
File Added - 46156: tclIOUtil.c Logged In: YES user_id=95086 Here is my reworked version which uses char* to hold the cwd. I know it is not 100% good because a path may contain NULL chars. We might improve this and store char* and its length. The Tcl_Obj is really not usable in MT-environments since it can't be deep-copied with the current duplicate function (i mean path objects). Anyways, the entire file is attached.
- login: "vasiljevic"
- mimetype: "text/plain"
- username: "vasiljevic"
- icomment:
Ticket change [952c42b5c0] (rid 106115) by vincentdarley on 2003-04-01 00:35:41:
- icomment:
Logged In: YES user_id=32170 Can you provide a unified diff (diff -u) for easier analysis, please?
- login: "vincentdarley"
- mimetype: "text/plain"
- username: "vincentdarley"
- icomment:
Ticket change [439520c971] (rid 116583) by vasiljevic on 2003-04-02 16:10:51:
- icomment:
Logged In: YES user_id=95086 Sure. It is attached. I did the diff against the 8.4.2 version. Note that I've used some pretty conservative locks in Tcl_FSGetCwd and Tcl_FSChdir. This may be relaxed eventually.
- login: "vasiljevic"
- mimetype: "text/plain"
- username: "vasiljevic"
- icomment:
Add attachment "tclIOUtil.c.diff" [3a34eee33f] (rid 112524) by vasiljevic on 2003-04-02 16:11:44.
Ticket change [0d358f57d5] (rid 114319) by vasiljevic on 2003-04-02 16:11:44:
- icomment:
File Added - 46565: tclIOUtil.c.diff
- login: "vasiljevic"
- mimetype: "text/plain"
- username: "vasiljevic"
- icomment:
Ticket change [b60afc9803] (rid 125357) by vincentdarley on 2003-04-11 23:35:49:
- icomment:
Logged In: YES user_id=32170 I'll be looking into this soon, now I've resolved the various other bugs I was working on. Your code looks like a good template, but I'd like to remove the need for 'inner' functions.
- login: "vincentdarley"
- mimetype: "text/plain"
- username: "vincentdarley"
- icomment:
Add attachment "tclIOUtil.c.patch.710642" [f9d3346acf] (rid 91762) by hobbs on 2003-05-11 08:23:25.
Ticket change [529a0edd5c] (rid 126338) by hobbs on 2003-05-11 08:23:25:
- icomment:
File Added - 50090: tclIOUtil.c.patch.710642 Logged In: YES user_id=72656 I've attached Zoran's latest version (with one minor change to init char *str) and commited that to core-8-4-branch. We need a version for the HEAD. It would also be nice to have some sort of tests that exercise this (if possible).
- login: "hobbs"
- mimetype: "text/plain"
- priority changed to: "8"
- resolution changed to: "Remind"
- username: "hobbs"
- icomment:
Ticket change [bd195821e8] (rid 101852) by vincentdarley on 2003-05-13 21:24:48:
- assignee changed to: "hobbs"
- foundin changed to: "obsolete: 8.5a0"
- icomment:
Logged In: YES user_id=32170 Zoran says this should also apply to cvs head.
- login: "vincentdarley"
- mimetype: "text/plain"
- username: "vincentdarley"
Ticket change [5427546c70] (rid 93890) by hobbs on 2003-05-14 06:00:25:
- closedate changed to: "2003-05-13T23:00:25"
- closer changed to: "hobbs"
- icomment:
Logged In: YES user_id=72656 Applied to head with offsets.
- login: "hobbs"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "hobbs"