Artifacts Associated With Ticket 2978773fffffffff
Ticket change [d09b29856c] (rid 113213) by sbron on 2010-03-29 19:25:31:
- assignee initialized to: "andreas_kupries"
- cmimetype initialized to: "text/plain"
- comment initialized to:
The attached script causes a segfault, as discussed on the chat with aku and kbk.
- foundin initialized to: "obsolete: 8.5.8"
- is_private initialized to: "0"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "sbron"
- subsystem initialized to: "25. Channel System"
- title initialized to: "Segfault when using a reflected channel"
- type initialized to: "Bug"
Ticket change [ee0dad522f] (rid 104014) by sbron on 2010-03-30 02:25:31:
- icomment:
File Added - 368654: segfault.tcl
- login: "sbron"
- mimetype: "text/plain"
- username: "sbron"
- icomment:
Add attachment "segfault.tcl" [e8d1eefaad] (rid 104710) by sbron on 2010-03-30 02:25:31.
Ticket change [7b682290a6] (rid 90507) by sbron on 2010-03-30 02:27:22:
- icomment:
File Added - 368655: valgrind.out
- login: "sbron"
- mimetype: "text/plain"
- username: "sbron"
- icomment:
Add attachment "valgrind.out" [7c7d05d707] (rid 97088) by sbron on 2010-03-30 03:01:03.
Ticket change [c30b5fafb1] (rid 111589) by sbron on 2010-03-30 03:01:03:
- icomment:
File Deleted - 368655: File Added - 368657: valgrind.out
- login: "sbron"
- mimetype: "text/plain"
- username: "sbron"
- icomment:
Ticket change [e3afecca77] (rid 87835) by andreas_kupries on 2010-03-31 01:41:14:
- icomment:
File Added - 368847: segfault.tcl
- login: "andreas_kupries"
- mimetype: "text/plain"
- username: "andreas_kupries"
- icomment:
Add attachment "segfault.tcl" [cb7cd81b6d] (rid 95529) by andreas_kupries on 2010-03-31 01:41:14.
Ticket change [38922fbe37] (rid 112233) by andreas_kupries on 2010-03-31 01:41:56:
- icomment:
File Added - 368848: segfault-log.txt
- login: "andreas_kupries"
- mimetype: "text/plain"
- username: "andreas_kupries"
- icomment:
Add attachment "segfault-log.txt" [b409587508] (rid 124951) by andreas_kupries on 2010-03-31 01:41:56.
Ticket change [ed8e31d56a] (rid 103907) by andreas_kupries on 2010-03-31 01:47:38:
- icomment:
The problem is equivalent to 2921116, except for reflected channel instead of reflected transform. The crashing script deeply nests through the script handler of the channel, then destroys the channel very deeply in the stack, and during the unwinding process it tries to invoke the script handler at a point where the structure is already destroyed, with bogus interp and other pointers. This can be seen very nicely in the modified segfault.tcl script where I changed the logging to show the nesting structure of Tcl procedures. The nesting does occur because of the immediate posting of events in some places, calling immediately back into the Tcl layer. This is why defering this action via 'after' is a workaround. It prevents the nesting and thus each callback into the channel handler can be sure to have the C structure whole and complete for the lifetime of its operation. Now working on the fix (Tcl_Preserve/Release the C level ReflectedChannel structure to keep it alive while there are references to it in C and Tcl stacks).
- login: "andreas_kupries"
- mimetype: "text/plain"
- username: "andreas_kupries"
- icomment:
Add attachment "patch-85" [f7c7b4971b] (rid 91427) by andreas_kupries on 2010-03-31 02:59:30.
Ticket change [42263743b3] (rid 116313) by andreas_kupries on 2010-03-31 02:59:31:
- icomment:
File Added - 368853: patch-85
- login: "andreas_kupries"
- mimetype: "text/plain"
- username: "andreas_kupries"
- icomment:
Add attachment "patch-86" [96a7df14dd] (rid 106359) by andreas_kupries on 2010-03-31 02:59:53.
Ticket change [85acefd2b3] (rid 131358) by andreas_kupries on 2010-03-31 02:59:53:
- icomment:
File Added - 368854: patch-86
- login: "andreas_kupries"
- mimetype: "text/plain"
- username: "andreas_kupries"
- icomment:
Ticket change [775ece20dc] (rid 89767) by andreas_kupries on 2010-03-31 03:00:54:
- icomment:
The attached fixes (represented by unidiff patches) pass the segfault.tcl. This example does not crash any longer.
- login: "andreas_kupries"
- mimetype: "text/plain"
- username: "andreas_kupries"
- icomment:
Ticket change [dde84f913a] (rid 114762) by andreas_kupries on 2010-03-31 04:18:16:
- closedate changed to: "2010-03-30T21:18:16"
- closer changed to: "andreas_kupries"
- icomment:
allow_comments - 1 Fixes committed to head and 8.5 branch.
- login: "andreas_kupries"
- mimetype: "text/plain"
- priority changed to: "9 Immediate"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "andreas_kupries"