From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kannan Vijayan Newsgroups: gmane.lisp.guile.bugs Subject: [bug #24554] Pthreads and Stack overflow in guile (reopen bug 20814?) (guile 1.8.5) Date: Tue, 14 Oct 2008 01:39:59 +0000 Message-ID: <20081014-013958.sv70242.45488@savannah.gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain;charset=UTF-8 X-Trace: ger.gmane.org 1223948416 14012 80.91.229.12 (14 Oct 2008 01:40:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 14 Oct 2008 01:40:16 +0000 (UTC) To: Kannan Vijayan , bug-guile@gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Tue Oct 14 03:41:13 2008 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KpYuP-0000jG-9n for guile-bugs@m.gmane.org; Tue, 14 Oct 2008 03:41:13 +0200 Original-Received: from localhost ([127.0.0.1]:47510 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KpYtK-0006YL-Ta for guile-bugs@m.gmane.org; Mon, 13 Oct 2008 21:40:06 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KpYtH-0006Y3-Cx for bug-guile@gnu.org; Mon, 13 Oct 2008 21:40:03 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KpYtE-0006Xg-Pm for bug-guile@gnu.org; Mon, 13 Oct 2008 21:40:02 -0400 Original-Received: from [199.232.76.173] (port=56123 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KpYtE-0006Xd-EZ for bug-guile@gnu.org; Mon, 13 Oct 2008 21:40:00 -0400 Original-Received: from savannah.gnu.org ([199.232.41.3]:35256 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KpYtE-0006KN-8C for bug-guile@gnu.org; Mon, 13 Oct 2008 21:40:00 -0400 Original-Received: from [10.0.0.103] (helo=savannah.gnu.org) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1KpYtD-0004HD-LL; Tue, 14 Oct 2008 01:39:59 +0000 Original-Received: from www-data by savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1KpYtD-0004HA-Fe; Tue, 14 Oct 2008 01:39:59 +0000 X-Savane-Server: savannah.gnu.org:443 [199.232.41.3] X-Savane-Project: guile X-Savane-Tracker: bugs X-Savane-Item-ID: 24554 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Gecko/2008071618 Iceweasel/3.0.1 (Debian-3.0.1-1) X-Apparently-From: 204.83.147.151 (Savane authenticated user kvijayan) Original-References: In-Reply-To: X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-guile@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:4046 Archived-At: URL: Summary: Pthreads and Stack overflow in guile (reopen bug 20814?) (guile 1.8.5) Project: Guile Submitted by: kvijayan Submitted on: Tue 14 Oct 2008 01:39:58 AM GMT Category: None Severity: 3 - Normal Item Group: None Status: None Privacy: Public Assigned to: None Open/Closed: Open Discussion Lock: Any _______________________________________________________ Details: I've scoured the web for anything I could be missing with regards to this bug, including a previous bug report on Savannah dealing with what seems to be the same issue: https://savannah.gnu.org/bugs/?func=detailitem&item_id=20814 I have tried to follow these directions, but nothing really seems to work. I still get stack overflow errors from guile when doing anything in a new thread. The following code is a test case that demonstrates the issue: /* test.c */ #include #include static void *thread_1_scm(void *ignore) { scm_c_eval_string ("(display (+ 2 33)) (newline)"); return NULL; } static void *thread_1(void *ignore) { return scm_with_guile(thread_1_scm, NULL); } static void *main_scm(void *ignore) { scm_c_eval_string("(display (+ 1 55)) (newline)"); pthread_t thr; pthread_create(&thr, NULL, thread_1, NULL); pthread_join(thr, NULL); return NULL; } int main(int argc, char **argv) { scm_with_guile(main_scm, NULL); return 0; } I'm compiling as follows: gcc -o test test.c -lguile -lpthread The output of this code is: 56 ERROR: Stack overflow I really don't know what I'm doing wrong here, if anything. Would appreciate any help. Cheers. -kannan _______________________________________________________ Reply to this item at: _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/