From unknown Tue Jun 17 01:50:20 2025 X-Loop: help-debbugs@gnu.org Subject: bug#25386: guile-2.0 and 2.2 thread leakage+crash; very simple test attached. Resent-From: Linas Vepstas Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Sat, 07 Jan 2017 21:49:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 25386 X-GNU-PR-Package: guile X-GNU-PR-Keywords: To: 25386@debbugs.gnu.org X-Debbugs-Original-To: bug-guile@gnu.org Reply-To: linasvepstas@gmail.com Received: via spool by submit@debbugs.gnu.org id=B.148382570420045 (code B ref -1); Sat, 07 Jan 2017 21:49:01 +0000 Received: (at submit) by debbugs.gnu.org; 7 Jan 2017 21:48:24 +0000 Received: from localhost ([127.0.0.1]:46245 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPyqe-0005DE-4e for submit@debbugs.gnu.org; Sat, 07 Jan 2017 16:48:24 -0500 Received: from eggs.gnu.org ([208.118.235.92]:56557) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPyqc-0005D1-I4 for submit@debbugs.gnu.org; Sat, 07 Jan 2017 16:48:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cPyqW-0006SN-CZ for submit@debbugs.gnu.org; Sat, 07 Jan 2017 16:48:17 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:59297) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cPyqW-0006SH-9I for submit@debbugs.gnu.org; Sat, 07 Jan 2017 16:48:16 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47527) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cPyqU-0007Wx-W8 for bug-guile@gnu.org; Sat, 07 Jan 2017 16:48:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cPyqT-0006Ru-UD for bug-guile@gnu.org; Sat, 07 Jan 2017 16:48:15 -0500 Received: from mail-qk0-x235.google.com ([2607:f8b0:400d:c09::235]:33795) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cPyqT-0006Ri-Q3 for bug-guile@gnu.org; Sat, 07 Jan 2017 16:48:13 -0500 Received: by mail-qk0-x235.google.com with SMTP id a20so108601335qkc.1 for ; Sat, 07 Jan 2017 13:48:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:reply-to:from:date:message-id:subject:to; bh=XQs5ZPfQwMUZSRTpExWR9Wn+AP27trjTf+kp5Wc0k4Y=; b=TjtCrLpKdtupNwaKXI6SYOwmZfDr0g1yS5Mh5IXKxEG2Rcjso1zT5iHc5Qyg8qR+7V l+FwRFuxPhjfNYarW2sE37odCkJCEIGTi6DQ+pcX/DrIrRbTBOsJ4mIcyYBna8ojY6Mw CLZTaIflfIjmU2NqBhrRWEgs9fVHYdEl3p1OY9fzzI8Vy4djrz36IzDJIjdIPfN52vSl DKIPaG6HsexW/pFGisXqdUDOjTh7HQPDbVasFBzr84ODbaiAhr7C0M87Y+HTT1c4xFHG GABNFm4GHXNsnIPkr8/kU83gsowJqGXcX1sGg/96UwUCPH2xFjOgWymR73W8BcY5+tD0 BCNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:from:date:message-id :subject:to; bh=XQs5ZPfQwMUZSRTpExWR9Wn+AP27trjTf+kp5Wc0k4Y=; b=ow5BWvpxzqG6hyLB6Jnk57F0Nd5A51KreNk2mhusQ7CdzxvpzCpXd2Bq48iPVGjmPi +3XWjS7e6bH0atv5wJu18eUF8PPRS24UEizweqD3kQi2k0b1XVhjcR8ItS9emP8BWq0F K0rq937SGW7K5/KG579umVyn1rexARqY6ueN4z710Y2hU9FiB6Khl4Gn4A6vNC92Z0fN RPo/ve9XbvqNyBi/6AhSsb61nYfucMFaYf1BFwXmqZ74TQjnGizZeio+KonVJuRmJcWU 1LwxmAfLDP8whSOw780NDga2yMVu+CrW0rY5VNHTprO6/GP4jD7WHzqjmKHFzlvjUK3I O1kA== X-Gm-Message-State: AIkVDXIKTL8oywh/IX+BPWmIA9wiw9TNfTqU2S4u/NsbnCVxHRcCQiMDATedn45iYEzFsx1c4uWeK7oQgeIwvA== X-Received: by 10.55.114.70 with SMTP id n67mr88254615qkc.185.1483825691615; Sat, 07 Jan 2017 13:48:11 -0800 (PST) MIME-Version: 1.0 Received: by 10.12.128.78 with HTTP; Sat, 7 Jan 2017 13:47:51 -0800 (PST) From: Linas Vepstas Date: Sat, 7 Jan 2017 15:47:51 -0600 Message-ID: Content-Type: text/plain; charset=UTF-8 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) The (very simple) program below leaks ... something, very rapidly, and then crashes after about 15-30 seconds. Last thing printed before crash: rate=194.80519560944032 num threads=2 ((gc-time-taken . 2791348254) (heap-size . 7532883968) (heap-free-size . 2449408) (heap-total-allocated . 23912882640) (heap-allocated-since-gc . 1073995264) (protected-objects . 90) (gc-times . 87)) Too many heap sections: Increase MAXHINCR or MAX_HEAP_SECTS Aborted Similar issue in guile-2.2 except it takes longer (8 minutes) and crashes in gc somewhere. I assume that some sort of continuation is left lying about, even though the thread has exited. (define junk 0) (define halt #f) (define (wtf-thr) (define start (- (current-time) 0.1)) ; Create thread that does junk and exits. Yes, the increment ; of `junk` is not protected, and its racey, but so what. (define (mkthr v) (call-with-new-thread (lambda () (set! junk (+ junk 1))))) ; thread arguments (define thrarg (make-list 10 0)) (define cnt 0) (define (mke) ; Create a limited number of threads (define thr-list (map mkthr thrarg)) ; (display (length (all-threads))) (map join-thread thr-list) ; Some handy debug printing. (set! cnt (+ cnt 1)) (if (eq? 0 (modulo cnt 500)) (begin (display "rate=") (display (/ cnt (- (current-time) start))) (newline) (display "num threads=") (display (length (all-threads))) (newline) (display (gc-stats)) (newline) (newline) ))) ; tail recursive infinite loop. (define (aloop) (mke) (if (not halt) (aloop))) ; while forever. (aloop) ) ; Run elsewhere, so that we have a shell prompt ; (not required for the bug) (call-with-new-thread wtf-thr) ; halt if desired. ; (set! halt #t) From unknown Tue Jun 17 01:50:20 2025 X-Loop: help-debbugs@gnu.org Subject: bug#25386: Manual gc helps References: In-Reply-To: Resent-From: Linas Vepstas Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Sun, 08 Jan 2017 02:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25386 X-GNU-PR-Package: guile X-GNU-PR-Keywords: To: 25386@debbugs.gnu.org Reply-To: linasvepstas@gmail.com Received: via spool by 25386-submit@debbugs.gnu.org id=B25386.148384427527770 (code B ref 25386); Sun, 08 Jan 2017 02:58:01 +0000 Received: (at 25386) by debbugs.gnu.org; 8 Jan 2017 02:57:55 +0000 Received: from localhost ([127.0.0.1]:46366 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cQ3gB-0007Dq-4R for submit@debbugs.gnu.org; Sat, 07 Jan 2017 21:57:55 -0500 Received: from mail-qk0-f171.google.com ([209.85.220.171]:33444) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cQ3g9-0007Dd-0T for 25386@debbugs.gnu.org; Sat, 07 Jan 2017 21:57:53 -0500 Received: by mail-qk0-f171.google.com with SMTP id s140so88517545qke.0 for <25386@debbugs.gnu.org>; Sat, 07 Jan 2017 18:57:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:reply-to:from:date:message-id:subject:to; bh=1kS3gkJIlLACpsGjzdh9CyHzsg5munvTtIYr1TJt+ag=; b=nsk+GXFUFbkVfZP6Dhw4BLBI4LGb2bYjpYHavxS9TVfZgHNXraCxnc9CRuM8VIHTPd mgiOYiBkazCqqb0YSZSJT6W5UtR8rjWGuzh9DhCjqw9WXpahbZS/1NWjLLmMw2nlXd7Z ERSYcZ7YpqMp+XGEy/FOnLPwP44raUg876z1N+OjMbzBPg6yQqGEJDKZ8z1ErQ5jNctC CzGSpJvR8CBMippCn/ca8aCFJa5epLPOshJM45F/qnVNuq/UhCTynE8ZKAlBNVRqhS5B HFZTk2wAZ9gDk+Pg0bXMx/j3jqIAsmgaSWZI9jmdWjuRn0NVGyPcbfwTW5yZhWh1qAAC Hs9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:from:date:message-id :subject:to; bh=1kS3gkJIlLACpsGjzdh9CyHzsg5munvTtIYr1TJt+ag=; b=IYv4ANjLHc7MxW9SOVbsOz3S1IC5bffueIZeK32HQAbT4FIldCDrKUUpT1nLg+X7/w kDXDk5zuGWqQPwwpEUazd/Sy8DL2BDoBNhRnvSB8u3PyYPM8zXf1jrwkLKFHc6H2rKwp Slzd9NPERVipX2UvHt46rKpQr89jwLX+3qjb66C4SvO80Kvq/nn8EZr9ElQOB4MMBe8S KCFvr6hZGG8t7BAgY8DHOerwImhDYxZTxEafpvbSEKPBvLQxu/ujNcduApyMAPZ5/tk8 /W0OWJVjyZm79aaATruxL7C0oOH6RDKI2Id20quA/5r6Xei4ZncLnWZ2xUJLYpv84EV3 6lWQ== X-Gm-Message-State: AIkVDXJNU1qz9fxMXDCCbD1ZGteBOUQ18X+iIT6dKq59UyvhHLsQFs4/TTSMn3bZG7BxSr0rjBa0XawQ58Gjew== X-Received: by 10.55.198.149 with SMTP id s21mr89211348qkl.196.1483844267290; Sat, 07 Jan 2017 18:57:47 -0800 (PST) MIME-Version: 1.0 Received: by 10.12.128.78 with HTTP; Sat, 7 Jan 2017 18:57:26 -0800 (PST) From: Linas Vepstas Date: Sat, 7 Jan 2017 20:57:26 -0600 Message-ID: Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.6 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.6 (/) I did a fairly through review of the thread-creation and thread-join code in the git master branch, and it looks to be just fine. Thus, some experimentation is in order: Going back to guile-2.0, I see this behavior: guile -v guile (GNU Guile) 2.0.11 Packaged by Debian (2.0.11-deb+1-10) If I add a manual gc to the exit of the thread, like so: (define (mkthr v) (call-with-new-thread (lambda () (set! junk (+ junk 1)) (gc) ))) then the heap blows up, in minutes, to about 180MB but then stops growing, even after hours and millions of thread creates: (heap-size . 183734272) (gc-times . 1957954) If I gc only every third thread create, it quickly blows up to about 400MB, and then stablizes, for hours: (heap-size . 428638208) (gc-times . 1292663) If I gc every 17th thread, it blows up to about 1.8GB and then is stable: (heap-size . 1875902464) (gc-times . 327462) This last one after about 5.5 million thread creates and joins. The counting is done like so: (define (mkthr v) (call-with-new-thread (lambda () (lock-mutex mtx) (if (eq? 0 (modulo junk 17)) (gc)) (set! junk (+ junk 1)) (unlock-mutex mtx) ))) In each case, it seems to hit a plateau at about (n+1)*100MB when gc is done on one out of every n threads. This seems quite bizarre to me: why does this inverted relation on number of gcs vs number of thread creates? What's magic about 100MB? Clearly 100MB is wayyy too large for this very simple program. I mean, even if I gc at *every* thread-exit ... (I have not yet explored above in guile-2.2) Since I cannot find any 'obvious' bugs in guile, this suggests some strange stochastic behavior in bdw-gc? From unknown Tue Jun 17 01:50:20 2025 X-Loop: help-debbugs@gnu.org Subject: bug#25386: test case update References: In-Reply-To: Resent-From: Linas Vepstas Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Sun, 08 Jan 2017 14:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25386 X-GNU-PR-Package: guile X-GNU-PR-Keywords: To: 25386@debbugs.gnu.org Reply-To: linasvepstas@gmail.com Received: via spool by 25386-submit@debbugs.gnu.org id=B25386.14838874697603 (code B ref 25386); Sun, 08 Jan 2017 14:58:02 +0000 Received: (at 25386) by debbugs.gnu.org; 8 Jan 2017 14:57:49 +0000 Received: from localhost ([127.0.0.1]:47005 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cQEuq-0001yZ-Vk for submit@debbugs.gnu.org; Sun, 08 Jan 2017 09:57:49 -0500 Received: from mail-qk0-f182.google.com ([209.85.220.182]:34828) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cQEup-0001yN-S4 for 25386@debbugs.gnu.org; Sun, 08 Jan 2017 09:57:48 -0500 Received: by mail-qk0-f182.google.com with SMTP id u25so503343081qki.2 for <25386@debbugs.gnu.org>; Sun, 08 Jan 2017 06:57:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:reply-to:from:date:message-id:subject:to; bh=zJ49yXHbbbN3RhtF57tZF3eHdQyxJFDFulWer1wlsVI=; b=cchYyqo4zOCkZs2JaaWFtncmBwOjZg+IhDZ+YiPlsHS+s/OgTELJ47y4oicEW96ziJ 2D3ac2PRfRVk2TcEaM0j0iEo4BKSWk2YO0KITRfa+5JckZUQe+TKpA+4PoSsEjkSKBSt BywHPPOCAj6UsIyN9df0VrntPUKjqDMWqLHP6qsN2q4Cv/MJvdGcFR0gCThhlkuA0VsB nvgQvvgLi1ZKD8ARemNXI/7jpOQQFJeUz2FReOFJcXqI9WNyNKsfnPQBVsLWFBGoKFIQ kbtX6SSdwJgXWv+BUHoFFXtEh37G0fzLXhcq0oLk4GEdBqLoRdrzA2/Q953zjhexmGDH uVbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:from:date:message-id :subject:to; bh=zJ49yXHbbbN3RhtF57tZF3eHdQyxJFDFulWer1wlsVI=; b=aq2u/LGOsEY9a9rPPuR/lKrlc7iB8nREZRc1PAj3XKU3cpbSdFtwPSJ90uLJpvMl19 CB4sbMKB3f9LYkVGQFUuCnG+crZxqDL+G5AzD/5RIBq3mOShj7myFbmsNfTFvKgAz4Ny +Rnbxz7LSuAluWEYPxSZiMgmIN+JqrEYke+NAU0emg1FuvQCISz+kignEsJfhDpWBWkj avLqYfwbz+8QxAgp+xGSU9kdQcicJ8l+Z3N6w/QxorPR8fQKza3dIbnU7q3igCyiR8P0 wk8V+s2HxMX8hiPURuZOmQUvoqYcfJHV1eaB0v8UvVs0IF3cGvFgEc81m/i93/eRJPjK Yu0w== X-Gm-Message-State: AIkVDXIYeIqfbg1zuLjnUz4txorPlL6G7/eI5niJVolPlwsY7KFkqBCO+p6WVvAfHLGrhFlWjGu/A8B/1vniow== X-Received: by 10.55.114.70 with SMTP id n67mr90912560qkc.185.1483887462176; Sun, 08 Jan 2017 06:57:42 -0800 (PST) MIME-Version: 1.0 Received: by 10.12.128.78 with HTTP; Sun, 8 Jan 2017 06:57:21 -0800 (PST) From: Linas Vepstas Date: Sun, 8 Jan 2017 08:57:21 -0600 Message-ID: Content-Type: text/plain; charset=UTF-8 X-Spam-Score: 0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) Ran the three test case overnight; saw mostly no increase in mem usage. -- gc before every thread exit: up to 9M thread exits, no change in heap-size -- gc before every third thread exit: 25M thread exits, no change. -- gc before every 17th thread exit: 44M thread exits, relatively small increase, from (heap-size . 1875902464) to (heap-size . 2068840448) From unknown Tue Jun 17 01:50:20 2025 X-Loop: help-debbugs@gnu.org Subject: bug#25386: calling gc too often triggers a crash References: In-Reply-To: Resent-From: Linas Vepstas Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Sun, 08 Jan 2017 21:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25386 X-GNU-PR-Package: guile X-GNU-PR-Keywords: To: 25386@debbugs.gnu.org Reply-To: linasvepstas@gmail.com Received: via spool by 25386-submit@debbugs.gnu.org id=B25386.148391256721930 (code B ref 25386); Sun, 08 Jan 2017 21:57:02 +0000 Received: (at 25386) by debbugs.gnu.org; 8 Jan 2017 21:56:07 +0000 Received: from localhost ([127.0.0.1]:47181 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cQLRe-0005he-Lx for submit@debbugs.gnu.org; Sun, 08 Jan 2017 16:56:06 -0500 Received: from mail-qt0-f169.google.com ([209.85.216.169]:35062) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cQLRc-0005hA-FW for 25386@debbugs.gnu.org; Sun, 08 Jan 2017 16:56:04 -0500 Received: by mail-qt0-f169.google.com with SMTP id x49so55882103qtc.2 for <25386@debbugs.gnu.org>; Sun, 08 Jan 2017 13:56:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:reply-to:from:date:message-id:subject:to; bh=o3+40C4x4ebJ8C6UwhlkZoBYk37nSiX+Fxe1UmIPswY=; b=KD2/WVHicXMQWjb9d88nBTp0AEcH9n1OI2AB//bpcQfGGIsLajjY82nVe3yTbzlsy5 Wd7EZ9H+Klsg0E4d0RwtV7EAbJfou3gZEQqVp+XA+jmCRYGey8wUSoaMCDiI1VUniXb3 OtnoudRgbyW7nfnHwpCIPDfWue/rmAzPI/AowSflraKIUjGDKoAM8ZdnZOkxWSKPCS/t Xezh4gu91oHGm9vog3wHc77Et2SRYbbBQJkQyYF753B8PbbevZX4aNQ2D+1hrMAoAoy7 fCccGOFFgRxbs0gceT+tzYznZLaUd1FW+a0fW8to7pKzwAAuR+czVHMb1sQUtjPQJg6Y h0+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:from:date:message-id :subject:to; bh=o3+40C4x4ebJ8C6UwhlkZoBYk37nSiX+Fxe1UmIPswY=; b=VQcW5jIJ6KpD5t1MZf7dXMqdzMadi0xCRuenBb18Blxh89iH6FKCJ+KmLyYsMfd9M7 h/i8HvseZ/jvQAB9xBDYvZ1hhv3Gta6edbm7bhMljClp4AOp8drPyR+6VFa677cm+yso tjYVakf/XzMq5qt65R4A3KtHc4RR0f/Us1OBEYTIxTEOejdpmWFpsZ1EsX29lncq1sFL aMzG0zhgQDhufge3eaCkHAZhe33fewYaqPNlMTPanUYSmeug+d1iWngll4iiiW1fA7C4 mAqvNTaQCP6Hn0cYl34GXgF01oHGrysSHaqczEqUObvo+g/I41IMX2ZOavTeuYMT/8J/ GjSQ== X-Gm-Message-State: AIkVDXIWWilNun8p0nmJxdL08ytH19Z70ATBVFoCkH4I3wTBz4TJ0fKHfkqbdEEsO9a/H2yhiF+KbJg7HyBP/w== X-Received: by 10.200.33.244 with SMTP id 49mr80035890qtz.70.1483912558719; Sun, 08 Jan 2017 13:55:58 -0800 (PST) MIME-Version: 1.0 Received: by 10.12.128.78 with HTTP; Sun, 8 Jan 2017 13:55:38 -0800 (PST) From: Linas Vepstas Date: Sun, 8 Jan 2017 15:55:38 -0600 Message-ID: Content-Type: text/plain; charset=UTF-8 X-Spam-Score: 0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) Since above works so swimmingly in the bove example, I tried it in a production system. Calling gc shortly before thread exit results in a crash, always the same crash, always in under 20 minutes: guile: hashtab.c:137: vacuum_weak_hash_table: Assertion `removed <= len' failed. Aborted again, this is for guile -v guile (GNU Guile) 2.0.11 Packaged by Debian (2.0.11-deb+1-10) Perhaps this is fixed in 2.0.13 ??? guile: hashtab.c:137: vacuum_weak_hash_table: Assertion `removed <= len' failed. Thread 1416 "guile" received signal SIGABRT, Aborted. [Switching to Thread 0x7ffe7b7fe700 (LWP 29883)] 0x00007ffff749e428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54 54 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory. (gdb) bt #0 0x00007ffff749e428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54 #1 0x00007ffff74a002a in __GI_abort () at abort.c:89 #2 0x00007ffff7496bd7 in __assert_fail_base (fmt=, assertion=assertion@entry=0x7ffff7b5f7a2 "removed <= len", file=file@entry=0x7ffff7b5f798 "hashtab.c", line=line@entry=137, function=function@entry=0x7ffff7b5ff60 "vacuum_weak_hash_table") at assert.c:92 #3 0x00007ffff7496c82 in __GI___assert_fail ( assertion=0x7ffff7b5f7a2 "removed <= len", file=0x7ffff7b5f798 "hashtab.c", line=137, function=0x7ffff7b5ff60 "vacuum_weak_hash_table") at assert.c:101 #4 0x00007ffff7ac3108 in ?? () from /usr/lib/x86_64-linux-gnu/libguile-2.0.so.22 #5 0x00007ffff7ac31af in ?? () from /usr/lib/x86_64-linux-gnu/libguile-2.0.so.22 #6 0x00007ffff7ac5b1c in scm_c_hook_run () from /usr/lib/x86_64-linux-gnu/libguile-2.0.so.22 #7 0x00007ffff7207ff5 in GC_try_to_collect_inner () from /usr/lib/x86_64-linux-gnu/libgc.so.1 #8 0x00007ffff72082aa in GC_try_to_collect_general () from /usr/lib/x86_64-linux-gnu/libgc.so.1 #9 0x00007ffff720838d in GC_gcollect () from /usr/lib/x86_64-linux-gnu/libgc.so.1 #10 0x00007ffff7ab9109 in scm_gc () from /usr/lib/x86_64-linux-gnu/libguile-2.0.so.22 #11 0x00007ffff7b3402b in ?? () from /usr/lib/x86_64-linux-gnu/libguile-2.0.so.22 #12 0x00007ffff7aab107 in scm_call_1 () from /usr/lib/x86_64-linux-gnu/libguile-2.0.so.22 #13 0x00007ffff7b34093 in ?? () from /usr/lib/x86_64-linux-gnu/libguile-2.0.so.22 #14 0x00007ffff7aab21e in scm_call_3 () from /usr/lib/x86_64-linux-gnu/libguile-2.0.so.22 #15 0x00007ffff7b34093 in ?? () from /usr/lib/x86_64-linux-gnu/libguile-2.0.so.22 #16 0x00007ffff7aab283 in scm_call_4 () from /usr/lib/x86_64-linux-gnu/libguile-2.0.so.22 #17 0x00007fffefb90d79 in opencog::SchemeEval::do_eval(std::__cxx11::basic_string, std::allocator > const&) ( this=0x7ffe74000980, expr=...) at /home/ubuntu/src/atomspace/opencog/guile/SchemeEval.cc:564 #18 0x00007fffefb90e2a in opencog::SchemeEval::c_wrap_eval(void*) ( p=0x7ffe74000980) at /home/ubuntu/src/atomspace/opencog/guile/SchemeEval.cc:493 #19 0x00007ffff7aa158a in ?? () from /usr/lib/x86_64-linux-gnu/libguile-2.0.so.22 #20 0x00007ffff7b34093 in ?? () from /usr/lib/x86_64-linux-gnu/libguile-2.0.so.22 #21 0x00007ffff7aab283 in scm_call_4 () from /usr/lib/x86_64-linux-gnu/libguile-2.0.so.22 #22 0x00007ffff7aa1d21 in ?? () from /usr/lib/x86_64-linux-gnu/libguile-2.0.so.22 #23 0x00007ffff7aa1e05 in scm_c_with_continuation_barrier () from /usr/lib/x86_64-linux-gnu/libguile-2.0.so.22 #24 0x00007ffff72198e7 in GC_call_with_gc_active () from /usr/lib/x86_64-linux-gnu/libgc.so.1 #25 0x00007ffff7b21c01 in ?? () from /usr/lib/x86_64-linux-gnu/libguile-2.0.so.22 #26 0x00007ffff7213952 in GC_call_with_stack_base () from /usr/lib/x86_64-linux-gnu/libgc.so.1 #27 0x00007ffff7b21fe8 in scm_with_guile () from /usr/lib/x86_64-linux-gnu/libguile-2.0.so.22 #28 0x00007fffefb90eae in opencog::SchemeEval::eval_expr(std::__cxx11::basic_string, std::allocator > const&) ( this=0x7ffe74000980, expr=...) at /home/ubuntu/src/atomspace/opencog/guile/SchemeEval.cc:465 #29 0x00007fffe386cc86 in opencog::GenericShell::eval_loop ( this=0x7ffe4c001380) at /home/ubuntu/src/opencog/opencog/cogserver/shell/GenericShell.cc:446 #30 0x00007fffee768c80 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6 #31 0x00007ffff78396ba in start_thread (arg=0x7ffe7b7fe700) at pthread_create.c:333 #32 0x00007ffff756f82d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109 From unknown Tue Jun 17 01:50:20 2025 X-Loop: help-debbugs@gnu.org Subject: bug#25386: Please ignore previous stack trace. References: In-Reply-To: Resent-From: Linas Vepstas Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Mon, 09 Jan 2017 01:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25386 X-GNU-PR-Package: guile X-GNU-PR-Keywords: To: 25386@debbugs.gnu.org Reply-To: linasvepstas@gmail.com Received: via spool by 25386-submit@debbugs.gnu.org id=B25386.148392533123916 (code B ref 25386); Mon, 09 Jan 2017 01:29:02 +0000 Received: (at 25386) by debbugs.gnu.org; 9 Jan 2017 01:28:51 +0000 Received: from localhost ([127.0.0.1]:47295 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cQOlW-0006Dg-RS for submit@debbugs.gnu.org; Sun, 08 Jan 2017 20:28:50 -0500 Received: from mail-qt0-f172.google.com ([209.85.216.172]:34712) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cQOlV-0006DS-6E for 25386@debbugs.gnu.org; Sun, 08 Jan 2017 20:28:49 -0500 Received: by mail-qt0-f172.google.com with SMTP id l7so75169839qtd.1 for <25386@debbugs.gnu.org>; Sun, 08 Jan 2017 17:28:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:reply-to:from:date:message-id:subject:to; bh=Rt6nYC9ls6o5cp+ypiE8KETtDK5cp4pfvToC1aXb4lM=; b=qq5wA6DnCbMlZPN41lBWKbfDL+3div4LjjtuAJyMYDub8XsEah7sTYEDQg3NNEaEwD vDbiV4kTjnR0nVgppE3TjRo6pd23CPntokv+aX26G0orkmMiaySRIbMfB+Zh02N/oBj/ mwqgh35iffqi6zI0neKMt6boRiLnCRJIZLzhjP9o4A6uwCe3TcA7WjXXlXFVScxoD6oM B52CfjzoND4jLvsGQzAdBFEVssKCSqqk6L+UMxYobclXcFWdXOqoqx/W0fOpohBPGRlo XSZtkWRWRhpvJxQcxZ5qwguz4PQljpj+swd4qkjbZ7e3z6Hv9riXXL2HSSlKUa3Ij9yM TacQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:from:date:message-id :subject:to; bh=Rt6nYC9ls6o5cp+ypiE8KETtDK5cp4pfvToC1aXb4lM=; b=ij1EeZ78HpJICYkzdAxgHBO+2/pWf/8iiehKj9Po5EwU7TNM28rI2l8uCt6vxodDoa EVs60cdisjFIP6Izs2YRwyZ0OdCfnDZ494N4NnOILMdPRBFNFYIULB5mLBnpn9WGzD9r jO98jDWy/A2s01Ok7qFEsR4CNuOuy64RH7ZIL6uMjmK4+u9zSu/AL182vj43nYPPPRUf zVT9CCneTps+OOponnKEx3i/1ohTNC1S5YSnTOaVd2Gt1n+NXmMML3XO8n/ZRfe53Xpy dYcfcb009ozSw0YLmsdO7AkHkbL/gV4usJD39pf0DUdEsGwxHT8Py2SNUpo1CIYlIh+9 ZkOA== X-Gm-Message-State: AIkVDXJgXHYRFlHxFmadfyHz1ae7nTYLkvSgYnxudQ0yGa1YvR70empljAmLHt741v8GFG45eDVvy8sue00l1g== X-Received: by 10.200.44.165 with SMTP id 34mr76040883qtw.233.1483925323404; Sun, 08 Jan 2017 17:28:43 -0800 (PST) MIME-Version: 1.0 Received: by 10.12.128.78 with HTTP; Sun, 8 Jan 2017 17:28:23 -0800 (PST) From: Linas Vepstas Date: Sun, 8 Jan 2017 19:28:23 -0600 Message-ID: Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.2 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.2 (/) Sorry, please ignore the previous stack trace. I updated to version 2.0.13 (manually compiled) and it crashed with a zillion messages: guile: warning: weak hash table corruption (https://bugs.gnu.org/19180) so that's a done deal, then. From unknown Tue Jun 17 01:50:20 2025 X-Loop: help-debbugs@gnu.org Subject: bug#25386: This can be closed References: In-Reply-To: Resent-From: Linas Vepstas Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Wed, 11 Jan 2017 06:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25386 X-GNU-PR-Package: guile X-GNU-PR-Keywords: To: 25386@debbugs.gnu.org Reply-To: linasvepstas@gmail.com Received: via spool by 25386-submit@debbugs.gnu.org id=B25386.148411528217287 (code B ref 25386); Wed, 11 Jan 2017 06:15:02 +0000 Received: (at 25386) by debbugs.gnu.org; 11 Jan 2017 06:14:42 +0000 Received: from localhost ([127.0.0.1]:49307 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cRCBG-0004Ul-0W for submit@debbugs.gnu.org; Wed, 11 Jan 2017 01:14:42 -0500 Received: from mail-qk0-f181.google.com ([209.85.220.181]:34618) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cRCBE-0004US-8E for 25386@debbugs.gnu.org; Wed, 11 Jan 2017 01:14:41 -0500 Received: by mail-qk0-f181.google.com with SMTP id a20so199666018qkc.1 for <25386@debbugs.gnu.org>; Tue, 10 Jan 2017 22:14:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:reply-to:from:date:message-id:subject:to; bh=3jXWNenFqlGKcG1/GodoCeMLQ8YBLRrLGGmmZM103M8=; b=OgMb6wWYVt1EuqJHjSPWX+x8N/LH+lzDMC3YFsjE5naGv6s0my7AYS8tUM8Y025l9L 80S0rbF5ZtWOOORXuIbCLJp5eviWZt0NTUGwS7K3m5qtajw1WyjabyECkMui5bSxykSJ 4aqhzUvaHySPiv3A3iT2AMIwIhfCX+K6YJSXgfKfATWbgGPb9Q86xfI+tezhsIVhlXQj LG0Bm34CQVMjzecY7gr+ESzXpUFI6u3rhhNdWs9BWoXlH1mzBpfa0z7PNRxgIZ4SDimw WbaBczFyKpMmJLXO5eyaRAGwzMnuJvaU19y0LdXXGdwDwVTefgGn+Rk2yBAaiJmY3GvM +jRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:from:date:message-id :subject:to; bh=3jXWNenFqlGKcG1/GodoCeMLQ8YBLRrLGGmmZM103M8=; b=NZTNr4AUdUW6EO+hV9DvXDr0i1RnDWOw9gIkTewtFTe0A7mlUDmScH4KHjj3jBbAN2 7NsKXWYeTaMaqqcJgUi2D/3BhPObPDYWaQ0c2N19Yyqraoyx3Nhd0KLMlKDed1N3l1Hq efhcRppzoBj46S1wWiaOfljh5vu/ghUqxA2FQgW17r3n2Vl2ecyK85o2VRgTiLyFhXIY ntHMGQH3KIxRGStPKumENhS36wflc0vVVDEga1XxR6zDQO073VXhi8I7H4Ezoitun4Fz c44YQoeg6OQ6WOoMNyATq0DVvx1x6nhIsyta7sedVn8MDRL4BqmYkrWYG+nIl3RZmY1k 2Emg== X-Gm-Message-State: AIkVDXIYvN3tCNL6LWKD0S5sIM2nG7Tj1y44rgeRDJWYFXIlj49vzOIZILWkqQ438KA0gr6DKo6VBlea0MDpMQ== X-Received: by 10.55.215.202 with SMTP id t71mr7613885qkt.114.1484115274751; Tue, 10 Jan 2017 22:14:34 -0800 (PST) MIME-Version: 1.0 Received: by 10.12.128.78 with HTTP; Tue, 10 Jan 2017 22:14:14 -0800 (PST) From: Linas Vepstas Date: Wed, 11 Jan 2017 00:14:14 -0600 Message-ID: Content-Type: text/plain; charset=UTF-8 X-Spam-Score: 0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) This can be closed as 'fixed'; I tested on today's git guile (GNU Guile) 2.1.5.19-7e9395 and the worst of it seems to be over. mem usage growth on the original test case: (heap-size . 7921664) (gc-times . 40) (heap-size . 14344192) (gc-times . 953) (heap-size . 14344192) (gc-times . 5219) ; after 4 minutes CPU (heap-size . 26419200) (gc-times . 64975) ; after 77 minutes CPU (heap-size . 26419200) (gc-times . 133346) ; after 154 mins CPU (heap-size . 26419200) (gc-times . 170083) ; after 192 mins CPU (heap-size . 26419200) (gc-times . 249102) ; after 283 mins cpu (heap-size . 26419200) (gc-times . 420031) ; after 468 min cpu (heap-size . 26419200) (gc-times . 557039) ; after 804 mins CPU i.e. 26MBytes - larger than it needs to be, but acceptable. The last entry was, in full, ((gc-time-taken . 355210357) (heap-size . 26419200) (heap-free-size . 20336640) (heap-total-allocated . 2522568563312) (heap-allocated-since-gc . 57648) (protected-objects . 0) (gc-times . 557619)) i.e. of the 26MB, only 6MB is in use, the rest is free. The 6MB is close to what it starts with. 2522 GB were chewed through in the process, so this is OK, I guess. A variant test case, create 510 threads before calling join: (change 10 to 510 in above test) (heap-size . 10604544) (gc-times . 32) (heap-size . 19505152) (gc-times . 484) (heap-size . 35926016) (gc-times . 1761) (heap-size . 48238592) (gc-times . 4217) ; after 8 minutes cpu time (heap-size . 48238592) (gc-times . 47902) ; after 76 mins CPU (heap-size . 48238592) (gc-times . 73063) ; after 114 mins CPU (heap-size . 65540096) (gc-times . 128094) ; after 209 mins cpu (heap-size . 65540096) (gc-times . 248321) ; after 399 mins (heap-size . 65540096) (gc-times . 344197) ; after 546 min i.e. 65MBytes .. acceptable, I guess. The last one was: ((gc-time-taken . 218714374) (heap-size . 65540096) (heap-free-size . 54419456) (heap-total-allocated . 2057186203744) (heap-allocated-since-gc . 4553872) (protected-objects . 0) (gc-times . 344799)) so of the 65MB, only 11MB is in-use. My production server is doing this: (heap-size . 652918784) (gc-times . 233) ; about 8 mins CPU (heap-size . 737722368) (gc-times . 339) ; 12 mins CPU (heap-size . 1332973568) (gc-times . 1797) ; 120 mins CPU (heap-size . 1441443840) (gc-times . 2221) ; 151 min CPU (heap-size . 1521213440) (gc-times . 2441) ; 168 min cpu (heap-size . 1595101184) (gc-times . 3061) ; 218 min cpu (heap-size . 1726119936) (gc-times . 3292) ; 237 min (heap-size . 1960865792) (gc-times . 6698) ; 510 minn (heap-size . 1960865792) (gc-times . 10383) ; 805 min (heap-size . 2931556352) (gc-times . 14211) ; 1199 min about 3GB -- Last one is, in full: (gc-stats) ((gc-time-taken . 19818394581722) (heap-size . 2931556352) (heap-free-size . 1767579648) (heap-total-allocated . 731393991040) (heap-allocated-since-gc . 4063680) (protected-objects . 318) (gc-times . 14211)) so of the 3GB, 1.8GB is free, and 1.2GB in use which is surprisingly high for my app, but I can live with that. Thanks! --linas From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 12 16:19:40 2017 Received: (at control) by debbugs.gnu.org; 12 Feb 2017 21:19:40 +0000 Received: from localhost ([127.0.0.1]:37477 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cd1Ya-0005z0-1u for submit@debbugs.gnu.org; Sun, 12 Feb 2017 16:19:40 -0500 Received: from eggs.gnu.org ([208.118.235.92]:59596) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cd1YZ-0005yj-0L for control@debbugs.gnu.org; Sun, 12 Feb 2017 16:19:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cd1YO-0005wv-Sl for control@debbugs.gnu.org; Sun, 12 Feb 2017 16:19:33 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:50854) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cd1YO-0005wp-PM for control@debbugs.gnu.org; Sun, 12 Feb 2017 16:19:28 -0500 Received: from reverse-83.fdn.fr ([80.67.176.83]:55822 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cd1YO-00057D-2Q for control@debbugs.gnu.org; Sun, 12 Feb 2017 16:19:28 -0500 Date: Sun, 12 Feb 2017 22:19:26 +0100 Message-Id: <87tw7zqf8h.fsf@gnu.org> To: control@debbugs.gnu.org From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: control message for bug #25386 MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) tags 25386 fixed From unknown Tue Jun 17 01:50:20 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: linasvepstas@gmail.com Subject: bug#25386: closed (Re: bug#25386: This can be closed) Message-ID: References: <8760jtf1xu.fsf@pobox.com> X-Gnu-PR-Message: they-closed 25386 X-Gnu-PR-Package: guile X-Gnu-PR-Keywords: fixed Reply-To: 25386@debbugs.gnu.org Date: Wed, 01 Mar 2017 15:33:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1488382382-9669-1" This is a multi-part message in MIME format... ------------=_1488382382-9669-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #25386: guile-2.0 and 2.2 thread leakage+crash; very simple test attached. which was filed against the guile package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 25386@debbugs.gnu.org. --=20 25386: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D25386 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1488382382-9669-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 25386-done) by debbugs.gnu.org; 1 Mar 2017 15:32:09 +0000 Received: from localhost ([127.0.0.1]:34547 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cj6EZ-0002Up-VE for submit@debbugs.gnu.org; Wed, 01 Mar 2017 10:32:08 -0500 Received: from pb-sasl1.pobox.com ([64.147.108.66]:55590 helo=sasl.smtp.pobox.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cj6EY-0002Uh-1S for 25386-done@debbugs.gnu.org; Wed, 01 Mar 2017 10:32:06 -0500 Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-sasl1.pobox.com (Postfix) with ESMTP id CE3135EEB3; Wed, 1 Mar 2017 10:32:05 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=OwqrxuvXHAOZGLyh/4WGlW7dFO8=; b=GSI/2O AV66I39/mUlEAcYQeD02II9rFeg7fglRnOPaA+MZMdSFoqsOE7UHFoGdJkoR9zpN svchx5AHUbONQ8nF2eik9s8tRU/Emi65eat+NO9ifG81vOGMorBvw0mZsYyEoYxY CfV/rvCoDmmRFMhjSqL3b49wPeMqJXRsdGIcI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=i87GTQYt8wmBonjxPpuH4RMHOeZ9+Qvc ZB+G0MX97q4gzFpsqDua3soisEKKOCBBfyPX1wxeMGPOanykWWxDvOkBQiQquj6Z 5LQ9y1rE+Cp5pR4Sw7HZbhFZjBwesa3eqzz7xLSAev+TSWIXcYAq3Bjv2LzHE8j5 EDwXOKoRnPA= Received: from pb-sasl1.nyi.icgroup.com (unknown [127.0.0.1]) by pb-sasl1.pobox.com (Postfix) with ESMTP id C88275EEB2; Wed, 1 Mar 2017 10:32:05 -0500 (EST) Received: from clucks (unknown [109.190.228.233]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by pb-sasl1.pobox.com (Postfix) with ESMTPSA id 017875EEB1; Wed, 1 Mar 2017 10:32:04 -0500 (EST) From: Andy Wingo To: Linas Vepstas Subject: Re: bug#25386: This can be closed References: Date: Wed, 01 Mar 2017 16:31:57 +0100 In-Reply-To: (Linas Vepstas's message of "Wed, 11 Jan 2017 00:14:14 -0600") Message-ID: <8760jtf1xu.fsf@pobox.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: 395AFA14-FE94-11E6-B522-B667064AB293-02397024!pb-sasl1.pobox.com X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 25386-done Cc: 25386-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) On Wed 11 Jan 2017 07:14, Linas Vepstas writes: > This can be closed as 'fixed'; I tested on today's git > > guile (GNU Guile) 2.1.5.19-7e9395 > > and the worst of it seems to be over. mem usage growth on the > original test case: OK, closing :) Andy ------------=_1488382382-9669-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 7 Jan 2017 21:48:24 +0000 Received: from localhost ([127.0.0.1]:46245 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPyqe-0005DE-4e for submit@debbugs.gnu.org; Sat, 07 Jan 2017 16:48:24 -0500 Received: from eggs.gnu.org ([208.118.235.92]:56557) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPyqc-0005D1-I4 for submit@debbugs.gnu.org; Sat, 07 Jan 2017 16:48:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cPyqW-0006SN-CZ for submit@debbugs.gnu.org; Sat, 07 Jan 2017 16:48:17 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:59297) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cPyqW-0006SH-9I for submit@debbugs.gnu.org; Sat, 07 Jan 2017 16:48:16 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47527) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cPyqU-0007Wx-W8 for bug-guile@gnu.org; Sat, 07 Jan 2017 16:48:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cPyqT-0006Ru-UD for bug-guile@gnu.org; Sat, 07 Jan 2017 16:48:15 -0500 Received: from mail-qk0-x235.google.com ([2607:f8b0:400d:c09::235]:33795) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cPyqT-0006Ri-Q3 for bug-guile@gnu.org; Sat, 07 Jan 2017 16:48:13 -0500 Received: by mail-qk0-x235.google.com with SMTP id a20so108601335qkc.1 for ; Sat, 07 Jan 2017 13:48:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:reply-to:from:date:message-id:subject:to; bh=XQs5ZPfQwMUZSRTpExWR9Wn+AP27trjTf+kp5Wc0k4Y=; b=TjtCrLpKdtupNwaKXI6SYOwmZfDr0g1yS5Mh5IXKxEG2Rcjso1zT5iHc5Qyg8qR+7V l+FwRFuxPhjfNYarW2sE37odCkJCEIGTi6DQ+pcX/DrIrRbTBOsJ4mIcyYBna8ojY6Mw CLZTaIflfIjmU2NqBhrRWEgs9fVHYdEl3p1OY9fzzI8Vy4djrz36IzDJIjdIPfN52vSl DKIPaG6HsexW/pFGisXqdUDOjTh7HQPDbVasFBzr84ODbaiAhr7C0M87Y+HTT1c4xFHG GABNFm4GHXNsnIPkr8/kU83gsowJqGXcX1sGg/96UwUCPH2xFjOgWymR73W8BcY5+tD0 BCNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:from:date:message-id :subject:to; bh=XQs5ZPfQwMUZSRTpExWR9Wn+AP27trjTf+kp5Wc0k4Y=; b=ow5BWvpxzqG6hyLB6Jnk57F0Nd5A51KreNk2mhusQ7CdzxvpzCpXd2Bq48iPVGjmPi +3XWjS7e6bH0atv5wJu18eUF8PPRS24UEizweqD3kQi2k0b1XVhjcR8ItS9emP8BWq0F K0rq937SGW7K5/KG579umVyn1rexARqY6ueN4z710Y2hU9FiB6Khl4Gn4A6vNC92Z0fN RPo/ve9XbvqNyBi/6AhSsb61nYfucMFaYf1BFwXmqZ74TQjnGizZeio+KonVJuRmJcWU 1LwxmAfLDP8whSOw780NDga2yMVu+CrW0rY5VNHTprO6/GP4jD7WHzqjmKHFzlvjUK3I O1kA== X-Gm-Message-State: AIkVDXIKTL8oywh/IX+BPWmIA9wiw9TNfTqU2S4u/NsbnCVxHRcCQiMDATedn45iYEzFsx1c4uWeK7oQgeIwvA== X-Received: by 10.55.114.70 with SMTP id n67mr88254615qkc.185.1483825691615; Sat, 07 Jan 2017 13:48:11 -0800 (PST) MIME-Version: 1.0 Received: by 10.12.128.78 with HTTP; Sat, 7 Jan 2017 13:47:51 -0800 (PST) From: Linas Vepstas Date: Sat, 7 Jan 2017 15:47:51 -0600 Message-ID: Subject: guile-2.0 and 2.2 thread leakage+crash; very simple test attached. To: bug-guile@gnu.org Content-Type: text/plain; charset=UTF-8 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: linasvepstas@gmail.com Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) The (very simple) program below leaks ... something, very rapidly, and then crashes after about 15-30 seconds. Last thing printed before crash: rate=194.80519560944032 num threads=2 ((gc-time-taken . 2791348254) (heap-size . 7532883968) (heap-free-size . 2449408) (heap-total-allocated . 23912882640) (heap-allocated-since-gc . 1073995264) (protected-objects . 90) (gc-times . 87)) Too many heap sections: Increase MAXHINCR or MAX_HEAP_SECTS Aborted Similar issue in guile-2.2 except it takes longer (8 minutes) and crashes in gc somewhere. I assume that some sort of continuation is left lying about, even though the thread has exited. (define junk 0) (define halt #f) (define (wtf-thr) (define start (- (current-time) 0.1)) ; Create thread that does junk and exits. Yes, the increment ; of `junk` is not protected, and its racey, but so what. (define (mkthr v) (call-with-new-thread (lambda () (set! junk (+ junk 1))))) ; thread arguments (define thrarg (make-list 10 0)) (define cnt 0) (define (mke) ; Create a limited number of threads (define thr-list (map mkthr thrarg)) ; (display (length (all-threads))) (map join-thread thr-list) ; Some handy debug printing. (set! cnt (+ cnt 1)) (if (eq? 0 (modulo cnt 500)) (begin (display "rate=") (display (/ cnt (- (current-time) start))) (newline) (display "num threads=") (display (length (all-threads))) (newline) (display (gc-stats)) (newline) (newline) ))) ; tail recursive infinite loop. (define (aloop) (mke) (if (not halt) (aloop))) ; while forever. (aloop) ) ; Run elsewhere, so that we have a shell prompt ; (not required for the bug) (call-with-new-thread wtf-thr) ; halt if desired. ; (set! halt #t) ------------=_1488382382-9669-1--