Artifacts Associated With Ticket 3002655fffffffffffffffffffffffffffffffff
Ticket change [3a8b65fcd4] (rid 112576) by jaspertheperson on 2010-05-17 10:59:44:
- assignee initialized to: "dkf"
- cmimetype initialized to: "text/plain"
- comment initialized to:
Started getting occasional segfaults in my app. Narrowed it down to a call to "info level" -- arg around 14. Checked out HEAD and built with debugging symbols enabled (32bit, multithreaded) and still get bug. gdb not very informative: % jaspert@spacehopper:~/Build/tk/unix$ ./wish % info patchlevel 8.6b1.2 % array get tcl_platform osVersion 2.6.32-22-generic pointerSize 4 byteOrder littleEndian threaded 1 machine i686 platform unix pathSeparator : os Linux user jaspert wordSize 4 ... [source app and attach gdb, then cause crash] ... (gdb) c Continuing. [New Thread 0x178bb70 (LWP 24951)] Program received signal SIGSEGV, Segmentation fault. 0x0043ffb5 in NRCommand (data=0x95a1fc8, interp=0x0, result=157867776) at /home/jaspert/Build/tcl/generic/tclBasic.c:4332 4332 ((Interp *)interp)->numLevels--; (gdb) bt #0 0x0043ffb5 in NRCommand (data=0x95a1fc8, interp=0x0, result=157867776) at /home/jaspert/Build/tcl/generic/tclBasic.c:4332 #1 0x0a4738ec in ?? () Backtrace stopped: previous frame inner to this frame (corrupt stack?) (gdb) c Continuing. [Thread 0x178bb70 (LWP 24951) exited] [Thread 0xb77cdb70 (LWP 24908) exited] Program terminated with signal SIGSEGV, Segmentation fault. The program no longer exists. Please feel free to request any further tests - foundin initialized to: "obsolete: 8.6b1.1"
- is_private initialized to: "0"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "jaspertheperson"
- subsystem initialized to: "17. Commands I-L"
- title initialized to: "Semi-repeatable SIGSEGV doing info level"
- type initialized to: "Bug"
Ticket change [0bdae81134] (rid 114070) by jaspertheperson on 2010-05-17 18:08:58:
- icomment:
This may be of some help: I reconfigured my app to do everything in one thread, and the crash appears no longer to happen.
- login: "jaspertheperson"
- mimetype: "text/plain"
- username: "jaspertheperson"
- icomment:
Ticket change [92f4741360] (rid 105732) by dkf on 2010-05-17 19:19:55:
- assignee changed to: "msofer"
- icomment:
I've no idea why interp is NULL there. It shouldn't be.
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
Ticket change [656516eb4c] (rid 102539) by msofer on 2010-05-17 19:37:51:
- icomment:
I read that gdb output a bit diffferently: "corrupt stack?" means "no valid info here, look elsewhere". In order to help please provide more info: 1. is this a pure tcl script, or is there any non-tcl C code involved? Extensions, your own code, ... 2. if you use gdb, you probably can run under valgrind too. Please do (a) make distclean; GCC=-DPURIFY ./configure --disabled-shared --enable-symbols (b) valgrind ./tclsh, source app, crash (c) let's see the full valgrind output
- login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Ticket change [148334ab78] (rid 124407) by jaspertheperson on 2010-05-17 19:44:42:
- icomment:
The app loads some non-Tcl c code, e.g., Tktable, but does not use it; I will try not loading it to see if that makes any difference.
- login: "jaspertheperson"
- mimetype: "text/plain"
- username: "jaspertheperson"
- icomment:
Ticket change [84589a6879] (rid 117541) by jaspertheperson on 2010-05-17 21:19:20:
- icomment:
OK, I am still using tclxml and Trf but apart from that all the c code is tcltk's. Here is what valgrind came up with: ==5303== Memcheck, a memory error detector ==5303== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al. ==5303== Using Valgrind-3.6.0.SVN-Debian and LibVEX; rerun with -h for copyright info ==5303== Command: /home/jaspert/Build/tk/unix/wish /home/jaspert/Build/Simile/Run/simile.tcl ==5303== ==5303== Conditional jump or move depends on uninitialised value(s) ==5303== at 0x815F1C5: TclArgumentBCEnter (tclBasic.c:5636) ==5303== by 0x81D4B91: TclExecuteByteCode (tclExecute.c:2809) ==5303== by 0x815D3F6: NRCallTEBC (tclBasic.c:4389) ==5303== by 0x815D137: TclNRRunCallbacks (tclBasic.c:4313) ==5303== by 0x815F5C4: TclEvalObjEx (tclBasic.c:5926) ==5303== by 0x815F54B: Tcl_EvalObjEx (tclBasic.c:5907) ==5303== by 0x8074461: TkInvokeMenu (tkMenu.c:1112) ==5303== by 0x8073D64: MenuWidgetObjCmd (tkMenu.c:924) ==5303== by 0x815D373: NRRunObjProc (tclBasic.c:4366) ==5303== by 0x815D137: TclNRRunCallbacks (tclBasic.c:4313) ==5303== by 0x81D4C1A: TclExecuteByteCode (tclExecute.c:2816) ==5303== by 0x815D3F6: NRCallTEBC (tclBasic.c:4389) ==5303== ==5303== Invalid read of size 4 ==5303== at 0x815D1F9: NRCommand (tclBasic.c:4332) ==5303== by 0x6F8CD13: ??? ==5303== Address 0x58 is not stack'd, malloc'd or (recently) free'd ==5303== ==5303== ==5303== Process terminating with default action of signal 11 (SIGSEGV) ==5303== Access not within mapped region at address 0x58 ==5303== at 0x815D1F9: NRCommand (tclBasic.c:4332) ==5303== by 0x6F8CD13: ??? ==5303== If you believe this happened as a result of a stack ==5303== overflow in your program's main thread (unlikely but ==5303== possible), you can try to increase the size of the ==5303== main thread stack using the --main-stacksize= flag. ==5303== The main thread stack size used in this run was 8388608. ==5303== ==5303== HEAP SUMMARY: ==5303== in use at exit: 15,182,487 bytes in 6,827 blocks ==5303== total heap usage: 52,073 allocs, 45,246 frees, 36,840,762 bytes allocated ==5303== ==5303== LEAK SUMMARY: ==5303== definitely lost: 5,256 bytes in 21 blocks ==5303== indirectly lost: 29,888 bytes in 1,388 blocks ==5303== possibly lost: 14,562,456 bytes in 3,138 blocks ==5303== still reachable: 584,887 bytes in 2,280 blocks ==5303== suppressed: 0 bytes in 0 blocks ==5303== Rerun with --leak-check=full to see details of leaked memory ==5303== ==5303== For counts of detected and suppressed errors, rerun with: -v ==5303== Use --track-origins=yes to see where uninitialised values come from ==5303== ERROR SUMMARY: 63 errors from 2 contexts (suppressed: 75 from 13) Killed
- login: "jaspertheperson"
- mimetype: "text/plain"
- username: "jaspertheperson"
- icomment:
Ticket change [7ad700eddd] (rid 90407) by msofer on 2011-01-31 19:32:55:
- closedate changed to: "2011-01-31T12:32:55"
- closer changed to: "msofer"
- icomment:
oops ... fell under the radar for ages ... sorry! Is this still happening? Could you provide data with current HEAD? A way to repro the crash would be even better.
- login: "msofer"
- mimetype: "text/plain"
- status changed to: "Pending"
- username: "msofer"
Ticket change [73d92e0152] (rid 105102) by sf-robot on 2011-02-14 20:20:05:
- closedate changed to: "2011-02-14T13:20:05"
- closer changed to: "sf-robot"
- icomment:
allow_comments - 1 This Tracker item was closed automatically by the system. It was previously set to a Pending status, and the original submitter did not respond within 14 days (the time period specified by the administrator of this Tracker).
- login: "sf-robot"
- mimetype: "text/plain"
- status changed to: "Closed"
- username: "sf-robot"