Artifacts Associated With Ticket 1850424fffffffff
Ticket change [28e51936f3] (rid 88782) by mistachkin on 2007-12-14 00:15:30:
- assignee initialized to: "dgp"
- cmimetype initialized to: "text/plain"
- comment initialized to:
These tests were run against the Tcl/Tk 8.5.0 RC3 bits: ftp://ftp.tcl.tk/pub/tcl/tcl8_5/tcl8.5.0rc3-src.tar.gz The Unix stack checking no longer appears to work correctly on my 32-bit FreeBSD x86 box. proc test { a } { regsub -all -- {^(.*)$} $a {abc\0def} result return [test $result] } test "this is cool." Bus error (core dumped) *** Error code 138 % proc foo { a } { return [foo $a] } % foo 2 Bus error (core dumped) *** Error code 138 - foundin initialized to: "None"
- is_private initialized to: "0"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "mistachkin"
- subsystem initialized to: "38. Init - Library - Autoload"
- title initialized to: "core dump on FreeBSD stack overflow"
- type initialized to: "Bug"
Ticket change [fae4ece6dd] (rid 91964) by mistachkin on 2007-12-14 07:16:37:
- icomment:
Logged In: YES user_id=113501 Originator: YES FYI, this is the threaded debug build.
- login: "mistachkin"
- mimetype: "text/plain"
- username: "mistachkin"
- icomment:
Ticket change [1a4aaabcd8] (rid 122955) by msofer on 2007-12-14 08:30:29:
- icomment:
Logged In: YES user_id=148712 Originator: NO (This may be neither here nor there, but ...) Was that in a 'make shell' shell, or plain ./tclsh? The difference is that make seems to change the process limits: mig@uh:/home/CVS/tcl_SF_clean/unix$ ./tclsh % sh -c "ulimit -s" 8192 % sh -c "ulimit -S" unlimited % mig@uh:/home/CVS/tcl_SF_clean/unix$ make shell LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}; export LD_LIBRARY_PATH; \ TCL_LIBRARY="/home/CVS/tcl_SF_clean/library"; export TCL_LIBRARY; \ ./tclsh % sh -c "ulimit -s" unlimited % sh -c "ulimit -S" unlimited - login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Ticket change [7e975fb553] (rid 97437) by msofer on 2007-12-14 08:31:17:
- assignee changed to: "msofer"
- subsystem changed to: "45. Parsing and Eval"
Ticket change [5db7ec96d8] (rid 115518) by mistachkin on 2007-12-14 09:51:40:
- icomment:
Logged In: YES user_id=113501 Originator: YES This is from make shell. Here is the output from your commands: % sh -c "ulimit -s" 1048576 % sh -c "ulimit -S" unlimited
- login: "mistachkin"
- mimetype: "text/plain"
- username: "mistachkin"
- icomment:
Ticket change [0c99fd898d] (rid 114206) by msofer on 2007-12-14 16:56:57:
- icomment:
Logged In: YES user_id=148712 Originator: NO (Assuming that is or behaves like bash's ulimit builtin) You seem to have a 1GB stack limit under 'make shell', which is a bit largeish. What does 'ulimit -s' at the shell prompt report? Do you still get the core dump if you run your test script under plain tclsh (as opposed to 'make shell')?
- login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Ticket change [4c6d7eac11] (rid 126891) by mistachkin on 2007-12-14 17:22:49:
- icomment:
Logged In: YES user_id=113501 Originator: YES Same thing under plain tclsh, here is my ulimit output: core file size (blocks, -c) unlimited data seg size (kbytes, -d) 1048576 file size (blocks, -f) unlimited max locked memory (kbytes, -l) unlimited max memory size (kbytes, -m) unlimited open files (-n) 11095 pipe size (512 bytes, -p) 1 stack size (kbytes, -s) 1048576 cpu time (seconds, -t) unlimited max user processes (-u) 5547 virtual memory (kbytes, -v) unlimited
- login: "mistachkin"
- mimetype: "text/plain"
- username: "mistachkin"
- icomment:
Ticket change [eaa5638e19] (rid 103408) by msofer on 2007-12-20 22:47:00:
- icomment:
Logged In: YES user_id=148712 Originator: NO It seems like there is a bug in getrlimit: [miguel@jupiter ~/tcl8.5.0/unix]$ ulimit -s 1048576 [miguel@jupiter ~/tcl8.5.0/unix]$ ./tclsh rawStackSize from TclpThreadGetStackSize is 0 rawStackSize from getrlimit is 1073741824 stackSize from GetStackSize is 1073709056 Note tht the 0 from TclpThreadGetStackSize is "correct" - bug workaround for 1815573. But this is what is killing this system - setting 'initialized=1' in TclpThreadGetStackSize (ie, relying on pthread_attr_getstacksize also for the initial thread) fixes things. So the issue now seems to be that we have conflicting bugs in linux and freebsd for determining the size of the initial thread's stack: on linux pthread_attr_getstacksize returns garbage, on freebsd getrlimit does.
- login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Ticket change [ef1689bbea] (rid 108932) by msofer on 2007-12-21 08:28:30:
- icomment:
Logged In: YES user_id=148712 Originator: NO Something nastier is amiss with 8.5 and pthreads, apparently independent of the stack checking: in a build with TCL_NO_STACK_CHECK I get under gdb (gdb) run Starting program: /home/miguel/tcl8.5.0/unix/./tcltest % source ../tests/compExpr-old.test Program received signal SIGBUS, Bus error. 0x4820ff5e in _get_curthread () from /usr/lib/libc_r.so.4 (gdb) bt 10 #0 0x4820ff5e in _get_curthread () from /usr/lib/libc_r.so.4 #1 0x48209913 in pthread_getspecific () from /usr/lib/libc_r.so.4 #2 0x814e5d1 in TclpGetAllocCache () at /home/miguel/tcl8.5.0/unix/../unix/tclUnixThrd.c:844 #3 0x812f97e in TclpAlloc (reqSize=1024) at /home/miguel/tcl8.5.0/unix/../generic/tclThreadAlloc.c:291 #4 0x807508f in Tcl_AttemptAlloc (size=1024) at /home/miguel/tcl8.5.0/unix/../generic/tclCkalloc.c:1071 #5 0x80a6fc6 in ParseExpr (interp=0x81bac08, start=0x829b788 "(1==0)+-1", numBytes=9, opTreePtr=0xbfb001bc, litList=0x82cf7d0, funcList=0x82cbff0, parsePtr=0x82eede0, parseOnly=0) at /home/miguel/tcl8.5.0/unix/../generic/tclCompExpr.c:628 - login: "msofer"
- mimetype: "text/plain"
- priority changed to: "8"
- username: "msofer"
- icomment:
Ticket change [386ed8f655] (rid 112209) by msofer on 2007-12-21 08:29:04:
- subsystem changed to: "49. Threading"
Ticket change [4ca4505ecf] (rid 126926) by msofer on 2007-12-21 19:14:48:
- icomment:
Logged In: YES user_id=148712 Originator: NO (1) a note on the previous comment: that same stack trace occurs independently of TCL_NO_STACK_CHECK. The comment seems to suggest (wrongly) that it happened only if stack check was disabled (2) More symptoms of thread problems: - on netbsd, see Emiliano's 'make test' problems at http://paste.tclers.tk/653 - on freebsd (mistachkin's machine) we have segfaults/bus errors on append.test, compExpr-old.test, error.test, expr.test, fileName.test, opt.test, reg.test and stack.test In both cases non-threaded Tcl8.5.0 tests cleanly.
- login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Ticket change [0b19c46df5] (rid 113924) by msofer on 2007-12-21 19:15:14:
- priority changed to: "9 Immediate"
Ticket change [2cc63ac2bf] (rid 118963) by msofer on 2007-12-21 19:15:52:
- foundin changed to: "obsolete: 8.5.0"
Ticket change [a2ce7bcea7] (rid 109955) by msofer on 2008-01-11 22:33:08:
- closedate changed to: "2008-01-11T15:33:08"
- closer changed to: "msofer"
- icomment:
Logged In: YES user_id=148712 Originator: NO The stack check is fixed in HEAD afaik; there are still some thread issues as shown in the stack trace below, even with stack checking disabled: they seem to be completely independent of the stack checking. The behaviour however does change when it is enabled. Opened #1869390 for the remaining issues.
- login: "msofer"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Pending"
- username: "msofer"
Ticket change [bad32ab18e] (rid 129388) by sf-robot on 2008-01-26 10:20:07:
- closedate changed to: "2008-01-26T03:20:07"
- closer changed to: "sf-robot"
- icomment:
Logged In: YES user_id=1312539 Originator: NO 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"