From: SourceForge.net <no...@so...> - 2006-12-20 03:53:17
|
Bugs item #1618411, was opened at 2006-12-18 13:44 Message generated for change (Comment added) made by mistachkin You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=1618411&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: 48. Threading Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Arkadiusz Miskiewicz (arekm) Assigned to: Nobody/Anonymous (nobody) Summary: TclpCheckStackSpace() fails on recent linux system Initial Comment: tcl fail randomly with: application-specific initialization failed: too many nested evaluations (infinite loop?) this is Linux 2.6.16, glibc 2.5, x86_64 system, testing vanilla tcl 8.5 a5 configured as: ./configure --enable-threads Note that --enable-threads seems to be needed to reproduce the problem. Also I needed to run tclsh via make call to reproduce the problem - direct running tclsh aaa.tcl didn't trigger it. While tracking the problem with dgp@jabber we found that problem is in TclpCheckStackSpace() function. Further investigation shows that that this function seem to be wrong on recent Linux/glibc systems where many things are randomized (see http://gcc.gnu.org/wiki/Randomization) and finally we found out that disabling memory address space randomization makes TclpCheckStackSpace() pass: sysctl -w kernel.randomize_va_space=0 Looks like TclpCheckStackSpace() isn't ready for recent systems with randomization stuff (which means any recent linux distro). Test case: [arekm@arm ~/tcl]$ ls aaa.tcl Makefile [arekm@arm ~/tcl]$ cat aaa.tcl [arekm@arm ~/tcl]$ cat Makefile test: tclsh aaa.tcl > bbb.txt [arekm@arm ~/tcl]$ make test tclsh aaa.tcl > bbb.txt [arekm@arm ~/tcl]$ make test tclsh aaa.tcl > bbb.txt application-specific initialization failed: too many nested evaluations (infinite loop?) [arekm@arm ~/tcl]$ make test tclsh aaa.tcl > bbb.txt application-specific initialization failed: too many nested evaluations (infinite loop?) [arekm@arm ~/tcl]$ make test tclsh aaa.tcl > bbb.txt application-specific initialization failed: too many nested evaluations (infinite loop?) [arekm@arm ~/tcl]$ make test tclsh aaa.tcl > bbb.txt application-specific initialization failed: too many nested evaluations (infinite loop?) [arekm@arm ~/tcl]$ make test tclsh aaa.tcl > bbb.txt application-specific initialization failed: too many nested evaluations (infinite loop?) [arekm@arm ~/tcl]$ make test tclsh aaa.tcl > bbb.txt [arekm@arm ~/tcl]$ make test tclsh aaa.tcl > bbb.txt application-specific initialization failed: too many nested evaluations (infinite loop?) [arekm@arm ~/tcl]$ make test tclsh aaa.tcl > bbb.txt [arekm@arm ~/tcl]$ make test tclsh aaa.tcl > bbb.txt [arekm@arm ~/tcl]$ with stack debugging: [arekm@arm ~/tcl]$ make test /home/users/arekm/tcl-test/bin/tclsh8.5 aaa.tcl stack OVERFLOW in:0x7fffffa9c4e4 out:0x7fffffa9c4e4 use:0000 max:F06E2000 application-specific initialization failed XXX: too many nested evaluations (infinite loop?) stack OVERFLOW in:0x7fffffa9c954 out:0x7fffffa9c4e4 use:0470 max:F06E2000 ---------------------------------------------------------------------- >Comment By: Joe Mistachkin (mistachkin) Date: 2006-12-19 19:53 Message: Logged In: YES user_id=113501 Originator: NO I can help work on this; however, I have no box that can repro the issue. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=1618411&group_id=10894 |