From: SourceForge.net <no...@so...> - 2011-02-14 13:20:09
|
Bugs item #3002655, was opened at 2010-05-17 10:59 Message generated for change (Comment added) made by sf-robot You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=3002655&group_id=10894 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: 17. Commands I-L Group: development: 8.6b1.1 >Status: Closed Resolution: None Priority: 5 Private: No Submitted By: Jasper (jaspertheperson) Assigned to: miguel sofer (msofer) Summary: Semi-repeatable SIGSEGV doing info level Initial Comment: 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 ---------------------------------------------------------------------- >Comment By: SourceForge Robot (sf-robot) Date: 2011-02-14 13:20 Message: 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). ---------------------------------------------------------------------- Comment By: miguel sofer (msofer) Date: 2011-01-31 12:32 Message: 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. ---------------------------------------------------------------------- Comment By: Jasper (jaspertheperson) Date: 2010-05-17 14:19 Message: 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 ---------------------------------------------------------------------- Comment By: Jasper (jaspertheperson) Date: 2010-05-17 12:44 Message: 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. ---------------------------------------------------------------------- Comment By: miguel sofer (msofer) Date: 2010-05-17 12:37 Message: 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 ---------------------------------------------------------------------- Comment By: Donal K. Fellows (dkf) Date: 2010-05-17 12:19 Message: I've no idea why interp is NULL there. It shouldn't be. ---------------------------------------------------------------------- Comment By: Jasper (jaspertheperson) Date: 2010-05-17 11:08 Message: This may be of some help: I reconfigured my app to do everything in one thread, and the crash appears no longer to happen. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=3002655&group_id=10894 |