Artifacts Associated With Ticket 40ef293eed
Ticket change [f0cff9e707] (rid 146577) by dgp on 2016-04-26 17:05:04:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
Thanks to Brian Griffin for finding this: % package require trofs 0.4.8 % file mkdir foo % trofs::archive foo archive % trofs::mount archive /mount /mount % cd /mount % glob * Program received signal SIGSEGV, Segmentation fault. It's a very difficult twisted problem to unravel. Will require much time and effort. Until then, recording it here, since it's far from clear whether more blame belongs with trofs, or with the Tcl_Filesystem foundation.
- is_private initialized to: "0"
- login: "dgp"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- severity initialized to: "Important"
- status initialized to: "Open"
- submitter initialized to: "dgp"
- subsystem initialized to: "37. File System"
- title initialized to: "filesystem crash"
- type initialized to: "Bug"
Ticket change [e061c8b21b] (rid 147003) by dah on 2016-06-17 04:33:51:
- icomment:
In trofs.c PathInFilesystem calls FetchDirFromCache -> FetchTrofsPath -> Tcl_FSGetInternalRep. Tcl_FSGetInternalRep is doing a call back to PathInFileSystem because srcFsPathPtr->fsPtr is nil when first looking up /mount, srcFsPathPtr->fsPtr isn't set out until PathInFileSystem returns first, so it winds up in an infinite loop. No idea how it is really supposed to go, just figured this might help someone that knows better :)
- login: "dah"
- mimetype: "text/plain"
- username: "dah"
- icomment:
Ticket change [897e7734da] (rid 147109) by dgp on 2016-06-23 17:20:45:
- assignee changed to: "dgp"
- icomment:
At its root, this is a shimmering problem that trofs code didn't take enough care to handle. Patch to trofs source code that appears to fix it: diff -u -r1.27 trofs.c --- generic/trofs.c 22 Jan 2015 17:07:00 -0000 1.27 +++ generic/trofs.c 23 Jun 2016 17:18:10 -0000 @@ -547,12 +547,22 @@ Tcl_DictObjGet(NULL, dictPtr, pathPtr, &dirPathPtr); if (NULL != dirPathPtr) { - TrofsPath *tpPtr = FetchTrofsPath(dirPathPtr); - if (NULL == tpPtr) { - Tcl_DictObjRemove(NULL, dictPtr, pathPtr); + TrofsPath *tpPtr; + + /* Remove item from cache to prevent endless loops */ + Tcl_IncrRefCount(dirPathPtr); + Tcl_IncrRefCount(pathPtr); + Tcl_DictObjRemove(NULL, dictPtr, pathPtr); + tpPtr = FetchTrofsPath(dirPathPtr); + if (tpPtr) { + *tpPtrPtr = tpPtr; + Tcl_DictObjPut(NULL, dictPtr, pathPtr, dirPathPtr); + } + Tcl_DecrRefCount(pathPtr); + Tcl_DecrRefCount(dirPathPtr); + if (tpPtr == NULL) { return NULL; } - *tpPtrPtr = tpPtr; } return dirPathPtr; } - login: "dgp"
- mimetype: "text/plain"
Ticket change [f86a29a65b] (rid 147110) by dgp on 2016-06-23 17:25:50:
- icomment:
It's possible a case could be made that core Tcl filesystem code is too aggressive in invalidating absolute path internal reps when the current working directory is changed. The place to direct further examination is in the epoch checking done in Tcl_FSConvertToPathType().
- login: "dgp"
- mimetype: "text/plain"
- icomment:
Ticket change [2634e4cb81] (rid 147111) by dgp on 2016-06-23 17:26:42:
- login: "dgp"
- mimetype: "text/plain"
- title changed to:
Path intrep invalidation triggered by [cd] too aggressive?