From: SourceForge.net <no...@so...> - 2010-05-17 12:44:43
|
Bugs item #3002655, was opened at 2010-05-17 11:59 Message generated for change (Comment added) made by jaspertheperson 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: Open 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: Jasper (jaspertheperson) Date: 2010-05-17 13: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 13: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 13:19 Message: I've no idea why interp is NULL there. It shouldn't be. ---------------------------------------------------------------------- Comment By: Jasper (jaspertheperson) Date: 2010-05-17 12: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 |