From debbugs-submit-bounces@debbugs.gnu.org Thu May 30 07:22:20 2013 Received: (at submit) by debbugs.gnu.org; 30 May 2013 11:22:20 +0000 Received: from localhost ([127.0.0.1]:41650 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ui0vz-0008Bg-NI for submit@debbugs.gnu.org; Thu, 30 May 2013 07:22:20 -0400 Received: from eggs.gnu.org ([208.118.235.92]:34711) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ui0vw-0008BL-Nv for submit@debbugs.gnu.org; Thu, 30 May 2013 07:22:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ui0u0-0006sW-2H for submit@debbugs.gnu.org; Thu, 30 May 2013 07:20:42 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-101.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, HTML_MESSAGE, T_DKIM_INVALID, USER_IN_WHITELIST autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:33555) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ui0tz-0006jp-TJ for submit@debbugs.gnu.org; Thu, 30 May 2013 07:20:15 -0400 Received: from eggs.gnu.org ([208.118.235.92]:43167) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ui0h8-0005Dn-Dv for bug-guile@gnu.org; Thu, 30 May 2013 07:07:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ui0h3-0002id-Fx for bug-guile@gnu.org; Thu, 30 May 2013 07:06:58 -0400 Received: from mail-we0-x22a.google.com ([2a00:1450:400c:c03::22a]:49748) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ui0h3-0002iN-8w for bug-guile@gnu.org; Thu, 30 May 2013 07:06:53 -0400 Received: by mail-we0-f170.google.com with SMTP id u59so104270wes.1 for ; Thu, 30 May 2013 04:06:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=0GrVQkAamXmWKVx3LaUqJ689HUzg/Z6FUt9KFoeTw3c=; b=S8chodYQUYwbweQWog2GPNbIrZCzsyBBSM+jVRMLWQR/b48K9pDd3txPzAIZqdTYbl Ku7bM2ROyfSkPdNtppSkdwaUOl8d/9kKossbceoROBfak1DioE9f3RoM6VNkAwCqEfNV qfssM59pwXWFANmHHfAjUqeaLAYfq19tz0gosri/XuZLo52f9T8nQWlXtVkO4H2ebuu+ XtCi541V06zsq7O1o6N+7LetkQzaJoE8ebRUSpqz/54Jl5Tr6y9jZ2V+koDvj2Xo4Zww AY0ciqjbelVKSRBsQiNE//CnzyTzOC3Fxm6fHkFBofOILMgUX+tJh6t6F7GEf9vnNIqB GRIg== MIME-Version: 1.0 X-Received: by 10.194.47.240 with SMTP id g16mr4140988wjn.43.1369912011710; Thu, 30 May 2013 04:06:51 -0700 (PDT) Received: by 10.194.43.8 with HTTP; Thu, 30 May 2013 04:06:51 -0700 (PDT) Date: Thu, 30 May 2013 13:06:51 +0200 Message-ID: Subject: Unexpected behaviour of scm_gc+sleep/usleep in another thread From: Panicz Maciej Godek To: bug-guile@gnu.org Content-Type: multipart/alternative; boundary=047d7ba97272d4e9cc04dded7e79 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.1 (------) --047d7ba97272d4e9cc04dded7e79 Content-Type: text/plain; charset=ISO-8859-1 Hi, I've noticed that when a thread is asleep and (gc) or scm_gc() is called, it gets awoken. It can be demonstrated with the following example: > (call-with-new-thread (lambda() (while #t (display "tick!\n") (sleep 5)))) ;; <= this is 5 seconds! > (gc) tick! ;; this happens immediately after each call to gc! This behaviour is both unexpected and undocumented, so I consider it a bug. --047d7ba97272d4e9cc04dded7e79 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi,
I've noticed that when a thread is aslee= p and (gc) or scm_gc() is called, it gets awoken. It can be demonstrated wi= th the following example:

> (call-w= ith-new-thread=A0
=A0 =A0 (lambda()
=A0 =A0 =A0 (while #t=A0
=
=A0 =A0 =A0 =A0 (display "tick!\n")
= =A0 =A0 =A0 =A0 (sleep 5)))) ;; <=3D this is 5 seconds!

> (gc)
tick! ;; this happens immediately after each call to gc!

This behaviour is both unexpected and undocum= ented, so I consider it a bug.

--047d7ba97272d4e9cc04dded7e79-- From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 04 08:51:25 2013 Received: (at 14511) by debbugs.gnu.org; 4 Jun 2013 12:51:25 +0000 Received: from localhost ([127.0.0.1]:50180 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ujqhw-0000iS-Qw for submit@debbugs.gnu.org; Tue, 04 Jun 2013 08:51:24 -0400 Received: from hera.aquilenet.fr ([141.255.128.1]:55053) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ujqhv-0000iB-08 for 14511@debbugs.gnu.org; Tue, 04 Jun 2013 08:51:23 -0400 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 9B23F5ED; Tue, 4 Jun 2013 14:49:20 +0200 (CEST) Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jsN8YIKboxwC; Tue, 4 Jun 2013 14:49:20 +0200 (CEST) Received: from pluto (195.Red-88-5-174.dynamicIP.rima-tde.net [88.5.174.195]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 1442F29F; Tue, 4 Jun 2013 14:49:19 +0200 (CEST) From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Panicz Maciej Godek Subject: Re: bug#14511: Unexpected behaviour of scm_gc+sleep/usleep in another thread References: Date: Tue, 04 Jun 2013 14:49:19 +0200 In-Reply-To: (Panicz Maciej Godek's message of "Thu, 30 May 2013 13:06:51 +0200") Message-ID: <87hahe9h2o.fsf@gnu.org> User-Agent: Gnus/5.130007 (Ma Gnus v0.7) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 1.5 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Panicz Maciej Godek skribis: > I've noticed that when a thread is asleep and (gc) or scm_gc() is called, > it gets awoken. It can be demonstrated with the following example: > >> (call-with-new-thread > (lambda() > (while #t > (display "tick!\n") > (sleep 5)))) ; ; <= this is 5 seconds! > >> (gc) > tick! ; ; this happens immediately after each call to gc! [...] Content analysis details: (1.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.7 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% [score: 0.4975] X-Debbugs-Envelope-To: 14511 Cc: 14511@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.7 (/) Panicz Maciej Godek skribis: > I've noticed that when a thread is asleep and (gc) or scm_gc() is called, > it gets awoken. It can be demonstrated with the following example: > >> (call-with-new-thread > (lambda() > (while #t > (display "tick!\n") > (sleep 5)))) ;; <=3D this is 5 seconds! > >> (gc) > tick! ;; this happens immediately after each call to gc! I can=E2=80=99t reproduce it with current =E2=80=98stable-2.0=E2=80=99 and = =E2=80=98master=E2=80=99, on x86_64-linux-gnu, with libgc 7.2alpha6 (which is ancient). Could you provide more info about your system and dependency versions? TIA, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 04 09:13:43 2013 Received: (at 14511) by debbugs.gnu.org; 4 Jun 2013 13:13:43 +0000 Received: from localhost ([127.0.0.1]:50195 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ujr3W-0002BZ-GK for submit@debbugs.gnu.org; Tue, 04 Jun 2013 09:13:42 -0400 Received: from mail-vb0-f49.google.com ([209.85.212.49]:36418) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ujr3T-0002BE-HA for 14511@debbugs.gnu.org; Tue, 04 Jun 2013 09:13:40 -0400 Received: by mail-vb0-f49.google.com with SMTP id q13so127216vbe.36 for <14511@debbugs.gnu.org>; Tue, 04 Jun 2013 06:11:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=er7c2ULvYeg4WW9UYCb9L78O8hZ2BMlu9eND0DMCFDk=; b=Kq/3vUaLXRvpkmLNO8a1zzGhWoKV6nLtJ0dqNH8h6rM3br+uVGdPwrm96cRSnRHm0q M/28NwSr3ht5Q7l0CheTmZZ24CzzQk3vCX+nvndl6nNKTJBOLenMeQcaauI7UPZm3guG XfufwD5wBjdMyNwSz3eOLFTaYOgw0FEJ7O/nVomSIMYlteoGSZp1pZfDqcamSsfnYMg8 RiiSnDyHJb2YkeR93PgLF3dEwt9V/4zRulUzHOH1N+j7fQfdfLrwXbqSg6fDfeSVqTCJ bTDJc8llejyx4MmaFsQiH9c8zc+SS3KO2pOsCtmZTPRKpPHHurFDzn0xWfos4GyvTX2p otgw== MIME-Version: 1.0 X-Received: by 10.52.30.14 with SMTP id o14mr14903388vdh.106.1370351496349; Tue, 04 Jun 2013 06:11:36 -0700 (PDT) Received: by 10.220.249.4 with HTTP; Tue, 4 Jun 2013 06:11:36 -0700 (PDT) In-Reply-To: <87hahe9h2o.fsf@gnu.org> References: <87hahe9h2o.fsf@gnu.org> Date: Tue, 4 Jun 2013 15:11:36 +0200 Message-ID: Subject: Re: bug#14511: Unexpected behaviour of scm_gc+sleep/usleep in another thread From: Panicz Maciej Godek To: =?ISO-8859-1?Q?Ludovic_Court=E8s?= Content-Type: multipart/alternative; boundary=20cf307ca1e6287c6204de53d257 X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: 14511 Cc: 14511@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) --20cf307ca1e6287c6204de53d257 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable 2013/6/4 Ludovic Court=E8s > [...] > I can=92t reproduce it with current =91stable-2.0=92 and =91master=92, on > x86_64-linux-gnu, with libgc 7.2alpha6 (which is ancient). > > Could you provide more info about your system and dependency versions i am using the version from ubuntu 12.04 repository $ guile --version | grep guile guile (GNU Guile) 2.0.5-deb+1-1 $ uname -a Linux godek-ThinkPad-X61s 3.2.0-45-generic #70-Ubuntu SMP Wed May 29 20:12:06 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux $ ldd /usr/bin/guile linux-vdso.so.1 =3D> (0x00007fff191dc000) libguile-2.0.so.22 =3D> /usr/lib/libguile-2.0.so.22 (0x00007f135393d000) libpthread.so.0 =3D> /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f1353720000) libc.so.6 =3D> /lib/x86_64-linux-gnu/libc.so.6 (0x00007f1353360000) libgc.so.1 =3D> /usr/lib/libgc.so.1 (0x00007f135310c000) libffi.so.6 =3D> /usr/lib/x86_64-linux-gnu/libffi.so.6 (0x00007f1352f04000) librt.so.1 =3D> /lib/x86_64-linux-gnu/librt.so.1 (0x00007f1352cfb000) libunistring.so.0 =3D> /usr/lib/x86_64-linux-gnu/libunistring.so.0 (0x00007f13529e6000) libgmp.so.10 =3D> /usr/lib/x86_64-linux-gnu/libgmp.so.10 (0x00007f135277800= 0) libltdl.so.7 =3D> /usr/lib/x86_64-linux-gnu/libltdl.so.7 (0x00007f135256d00= 0) libcrypt.so.1 =3D> /lib/x86_64-linux-gnu/libcrypt.so.1 (0x00007f1352334000) libm.so.6 =3D> /lib/x86_64-linux-gnu/libm.so.6 (0x00007f1352038000) /lib64/ld-linux-x86-64.so.2 (0x00007f1353cdd000) libdl.so.2 =3D> /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f1351e33000) libgcc_s.so.1 =3D> /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f1351c1d000) If you need more information, let me know. --20cf307ca1e6287c6204de53d257 Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: quoted-printable
2013/6/4 Ludovic Court=E8s <ludo@gnu.org>
<= div class=3D"gmail_extra">
[...]
I can=92t reproduce it with current =91stable-2.0=92 and =91master=92= , on
x86_64-linux-gnu, with libgc 7.2alpha6 (which is ancient).

Could you provide more info about your system and dependency versions

i am usi= ng the version from ubuntu 12.04 repository

$ guile --version | grep guile
guile (GNU Guile) 2.0.5-deb+1-1

$ uname -a
Linux godek-ThinkPad-X61s 3.2.0-45-generic #70-U= buntu SMP Wed May 29 20:12:06 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

$ ldd /usr/bin/guile
linux-vdso.so.1 =3D> =A0(0x00007fff191dc000= )
libguile-2.0.so.22 =3D> /usr/lib/libguile-2.0.so.22 (0x00007f1= 35393d000)
libpthread.so.0 =3D> /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f1= 353720000)
libc.so.6 =3D> /lib/x86_64-linux-gnu/libc.so.6 (0x000= 07f1353360000)
libgc.so.1 =3D> /usr/lib/libgc.so.1 (0x00007f135310c000)
libf= fi.so.6 =3D> /usr/lib/x86_64-linux-gnu/libffi.so.6 (0x00007f1352f04000)<= /div>
librt.so.1 =3D> /lib/x86_64-linux-gnu/librt.so.1 (0x00007f1352cfb000)=
libunistring.so.0 =3D> /usr/lib/x86_64-linux-gnu/libunistring.s= o.0 (0x00007f13529e6000)
libgmp.so.10 =3D> /usr/lib/x86_64-linux-gnu/libgmp.so.10 (0x00007f135= 2778000)
libltdl.so.7 =3D> /usr/lib/x86_64-linux-gnu/libltdl.so.= 7 (0x00007f135256d000)
libcrypt.so.1 =3D> /lib/x86_64-linux-gnu/libcrypt.so.1 (0x00007f13523= 34000)
libm.so.6 =3D> /lib/x86_64-linux-gnu/libm.so.6 (0x00007f1= 352038000)
/lib64/ld-linux-x86-64.so.2 (0x00007f1353cdd000)
libdl.so.2 =3D&= gt; /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f1351e33000)
libgcc_s.so.1 =3D> /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f1351c= 1d000)

If you need more information, let me know.

--20cf307ca1e6287c6204de53d257-- From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 04 09:38:43 2013 Received: (at 14511) by debbugs.gnu.org; 4 Jun 2013 13:38:44 +0000 Received: from localhost ([127.0.0.1]:50203 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UjrRi-0003fD-AN for submit@debbugs.gnu.org; Tue, 04 Jun 2013 09:38:43 -0400 Received: from hera.aquilenet.fr ([141.255.128.1]:55104) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UjrRX-0003dN-KC for 14511@debbugs.gnu.org; Tue, 04 Jun 2013 09:38:32 -0400 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 9C4DF617; Tue, 4 Jun 2013 15:36:32 +0200 (CEST) Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id A5Ioe4NvwC9A; Tue, 4 Jun 2013 15:36:32 +0200 (CEST) Received: from pluto (195.Red-88-5-174.dynamicIP.rima-tde.net [88.5.174.195]) by hera.aquilenet.fr (Postfix) with ESMTPSA id D7D725ED; Tue, 4 Jun 2013 15:36:31 +0200 (CEST) From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Panicz Maciej Godek Subject: Re: bug#14511: Unexpected behaviour of scm_gc+sleep/usleep in another thread References: <87hahe9h2o.fsf@gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 16 Prairial an 221 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu Date: Tue, 04 Jun 2013 15:36:30 +0200 In-Reply-To: (Panicz Maciej Godek's message of "Tue, 4 Jun 2013 15:11:36 +0200") Message-ID: <8761xu9ew1.fsf@gnu.org> User-Agent: Gnus/5.130007 (Ma Gnus v0.7) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 14511 Cc: 14511@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.2 (-) Panicz Maciej Godek skribis: > 2013/6/4 Ludovic Court=C3=A8s > >> [...] >> I can=E2=80=99t reproduce it with current =E2=80=98stable-2.0=E2=80=99 a= nd =E2=80=98master=E2=80=99, on >> x86_64-linux-gnu, with libgc 7.2alpha6 (which is ancient). >> >> Could you provide more info about your system and dependency versions > > > i am using the version from ubuntu 12.04 repository > > $ guile --version | grep guile > guile (GNU Guile) 2.0.5-deb+1-1 And what version of libgc (the garbage collector)? Could you check whether the problem still occurs with Guile 2.0.9? TIA, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 04 10:40:49 2013 Received: (at 14511) by debbugs.gnu.org; 4 Jun 2013 14:40:49 +0000 Received: from localhost ([127.0.0.1]:50655 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UjsPo-0008G0-Eo for submit@debbugs.gnu.org; Tue, 04 Jun 2013 10:40:49 -0400 Received: from mail-ve0-f171.google.com ([209.85.128.171]:58409) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UjsPj-0008FL-G6 for 14511@debbugs.gnu.org; Tue, 04 Jun 2013 10:40:45 -0400 Received: by mail-ve0-f171.google.com with SMTP id b10so248837vea.16 for <14511@debbugs.gnu.org>; Tue, 04 Jun 2013 07:38:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=hePpt85hasWYzl1SvZBHlAYWxU6txYqMFVWmZfcM/QI=; b=F9i/U+d1P4NZ0oElfRe9CDysvjgiy9y1x+aw++pxPLMsOsqWRVWfyXM/33jA8HFo4Q otYyyXcOxhglo7bImWyCKkfIOvFWBESizL+APzMyf0rOGInALJJaZf/IxkVPx3eKAhPL fChycc7Dr4QKYdErBx/CTVDEWHQJnFWu0rlV9+j7dSSosD10ifAS3QBbBw8aJQGzG+MR I/eNn62IVqsaPg8zeprxthBknm189LNColb/OKWHeXCj++zCvEjE6RgwEmBul4FnBzx2 P36frRMwMAWxFw5qEWb9OOo0BMjSwCudMe8KKHUmnxyTayG/XD/G7JYtjQra2YNXaTOJ ioDA== MIME-Version: 1.0 X-Received: by 10.58.187.232 with SMTP id fv8mr2764930vec.50.1370356719766; Tue, 04 Jun 2013 07:38:39 -0700 (PDT) Received: by 10.220.249.4 with HTTP; Tue, 4 Jun 2013 07:38:39 -0700 (PDT) In-Reply-To: <8761xu9ew1.fsf@gnu.org> References: <87hahe9h2o.fsf@gnu.org> <8761xu9ew1.fsf@gnu.org> Date: Tue, 4 Jun 2013 16:38:39 +0200 Message-ID: Subject: Re: bug#14511: Unexpected behaviour of scm_gc+sleep/usleep in another thread From: Panicz Maciej Godek To: =?ISO-8859-1?Q?Ludovic_Court=E8s?= Content-Type: multipart/alternative; boundary=047d7b6dc4a07f82a004de550997 X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 14511 Cc: 14511@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) --047d7b6dc4a07f82a004de550997 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable 2013/6/4 Ludovic Court=E8s > Panicz Maciej Godek skribis: > > > 2013/6/4 Ludovic Court=E8s > > > >> [...] > >> I can=92t reproduce it with current =91stable-2.0=92 and =91master=92,= on > >> x86_64-linux-gnu, with libgc 7.2alpha6 (which is ancient). > >> > >> Could you provide more info about your system and dependency versions > > > > > > i am using the version from ubuntu 12.04 repository > > > > $ guile --version | grep guile > > guile (GNU Guile) 2.0.5-deb+1-1 > > And what version of libgc (the garbage collector)? > > I don't exactly know how to check it. Dpkg reports the following: $ dpkg -s libgc1c2 Package: libgc1c2 Status: install ok installed Priority: standard Section: libs Installed-Size: 254 Maintainer: Ubuntu Developers Architecture: amd64 Source: libgc Version: 1:7.1-8ubuntu0.12.04.1 Replaces: libgc1 Depends: libc6 (>=3D 2.14), libgcc1 (>=3D 1:4.1.1) Conflicts: libgc1 Description: conservative garbage collector for C and C++ Could you check whether the problem still occurs with Guile 2.0.9? > > It does (at least when linked against the same garbage collector) --047d7b6dc4a07f82a004de550997 Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: quoted-printable
2013/6/4 Ludovic Court=E8s <ludo@gnu.org>
<= div class=3D"gmail_extra">
Panicz Maciej Godek <godek.maciek@gmail.com> skribis:

> 2013/6/4 Ludovic Court=E8s <ludo@gnu.org>
>
>> [...]
>> I can=92t reproduce it with current =91stable-2.0=92 and =91master= =92, on
>> x86_64-linux-gnu, with libgc 7.2alpha6 (which is ancient).
>>
>> Could you provide more info about your system and dependency versi= ons
>
>
> i am using the version from ubuntu 12.04 repository
>
> $ guile --version | grep guile
> guile (GNU Guile) 2.0.5-deb+1-1

And what version of libgc (the garbage collector)?


I don't exactly know how to = check it. Dpkg reports the following:

=
$ dpkg -s libgc1c2
Package: libgc1c2
Status: insta= ll ok installed
Priority: standard
Section: libs
Installed-Size: 2= 54
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com><= /div>
Architecture: amd64
Source: libgc
Version: 1:7.1-8= ubuntu0.12.04.1
Replaces: libgc1
Depends: libc6 (>= =3D 2.14), libgcc1 (>=3D 1:4.1.1)
Conflicts: libgc1
= Description: conservative garbage collector for C and C++

Could you check whether the problem still occurs with Guile 2.0.9?

<= /blockquote>

=A0It does (at least when linked agai= nst the same garbage collector)

--047d7b6dc4a07f82a004de550997-- From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 05 04:05:20 2013 Received: (at 14511) by debbugs.gnu.org; 5 Jun 2013 08:05:21 +0000 Received: from localhost ([127.0.0.1]:51549 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Uk8id-0008FD-VX for submit@debbugs.gnu.org; Wed, 05 Jun 2013 04:05:20 -0400 Received: from hera.aquilenet.fr ([141.255.128.1]:56699) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Uk8iY-0008Er-NH for 14511@debbugs.gnu.org; Wed, 05 Jun 2013 04:05:18 -0400 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 38F0D5F8; Wed, 5 Jun 2013 10:03:11 +0200 (CEST) Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id amM87slRBiKe; Wed, 5 Jun 2013 10:03:11 +0200 (CEST) Received: from pluto (208.186.216.87.static.jazztel.es [87.216.186.208]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 89DA85ED; Wed, 5 Jun 2013 10:03:10 +0200 (CEST) From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Panicz Maciej Godek Subject: Re: bug#14511: Unexpected behaviour of scm_gc+sleep/usleep in another thread References: <87hahe9h2o.fsf@gnu.org> <8761xu9ew1.fsf@gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 17 Prairial an 221 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu Date: Wed, 05 Jun 2013 10:03:09 +0200 In-Reply-To: (Panicz Maciej Godek's message of "Tue, 4 Jun 2013 16:38:39 +0200") Message-ID: <87wqq90yte.fsf@gnu.org> User-Agent: Gnus/5.130007 (Ma Gnus v0.7) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -1.2 (-) X-Debbugs-Envelope-To: 14511 Cc: 14511@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.2 (-) Panicz Maciej Godek skribis: > 2013/6/4 Ludovic Court=C3=A8s > >> Panicz Maciej Godek skribis: >> >> > 2013/6/4 Ludovic Court=C3=A8s >> > >> >> [...] >> >> I can=E2=80=99t reproduce it with current =E2=80=98stable-2.0=E2=80= =99 and =E2=80=98master=E2=80=99, on >> >> x86_64-linux-gnu, with libgc 7.2alpha6 (which is ancient). >> >> >> >> Could you provide more info about your system and dependency versions >> > >> > >> > i am using the version from ubuntu 12.04 repository >> > >> > $ guile --version | grep guile >> > guile (GNU Guile) 2.0.5-deb+1-1 >> >> And what version of libgc (the garbage collector)? >> [...] > Version: 1:7.1-8ubuntu0.12.04.1 [...] >> Could you check whether the problem still occurs with Guile 2.0.9? >> > It does (at least when linked against the same garbage collector) The documentation of =E2=80=98sleep=E2=80=99 is: - Scheme Procedure: sleep i Wait for the given number of seconds (an integer) or until a signal arrives. The return value is zero if the time elapses or the number of seconds remaining otherwise. I=E2=80=99m pretty sure that if you check its return value, you=E2=80=99ll = notice that it behaves as documented. Can you confirm? What happens here is that libgc uses signals for stop-the-world collections, and (gc) certainly does with the libgc version you=E2=80=99re using. =E2=80=98sleep=E2=80=99 calls select(2), which in your case presumably retu= rns prematurely with EINTR. You should be able to confirm this hypothesis by running Guile with: strace -f -e select guile (Note that the problem doesn=E2=80=99t occur with libgc 7.2, presumably bec= ause it uses a different strategy.) Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 05 07:14:50 2013 Received: (at 14511) by debbugs.gnu.org; 5 Jun 2013 11:14:50 +0000 Received: from localhost ([127.0.0.1]:51913 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UkBg2-0005MS-22 for submit@debbugs.gnu.org; Wed, 05 Jun 2013 07:14:50 -0400 Received: from mail-vc0-f173.google.com ([209.85.220.173]:65167) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UkBfz-0005Lq-LP for 14511@debbugs.gnu.org; Wed, 05 Jun 2013 07:14:48 -0400 Received: by mail-vc0-f173.google.com with SMTP id ht11so1018358vcb.18 for <14511@debbugs.gnu.org>; Wed, 05 Jun 2013 04:12:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Fa/JsSLGK/x6Qeh0mv+xCOVwS0QT7QMTnku/qHVjO6M=; b=h/9TAUl3hLMfYXA9Q5AoMShakH+KVfG0RQf191psmL5anFFVQB851F7eogaVQBDDvF 2h5sj5UtfOU5QZfun3avdPtXtamM+qNmMyOVnuaGfYlUMdRcinb7Ma7m1kw8+t3KoB/w P0jdnTg3JlAalHz/t7CGnIOGnils5UOgHBajqwmMkG64GdXo+dc+0TvBcF/9xI2vJNj+ kYKErwre616icIxKMaf20vbmCOorfXmUZ/sYA8XJFiGf8YcuVKF+soEtPuAyHQSQY0o+ YyFXzHW1znyIQM50PlxnPvsiGSIbRdYWOio0w7IpDwaw+Ww7olv0W/qhGjebycTw8TZi 8qoA== MIME-Version: 1.0 X-Received: by 10.52.70.20 with SMTP id i20mr11869582vdu.69.1370430759097; Wed, 05 Jun 2013 04:12:39 -0700 (PDT) Received: by 10.220.249.4 with HTTP; Wed, 5 Jun 2013 04:12:38 -0700 (PDT) In-Reply-To: <87wqq90yte.fsf@gnu.org> References: <87hahe9h2o.fsf@gnu.org> <8761xu9ew1.fsf@gnu.org> <87wqq90yte.fsf@gnu.org> Date: Wed, 5 Jun 2013 13:12:38 +0200 Message-ID: Subject: Re: bug#14511: Unexpected behaviour of scm_gc+sleep/usleep in another thread From: Panicz Maciej Godek To: =?ISO-8859-1?Q?Ludovic_Court=E8s?= Content-Type: multipart/alternative; boundary=20cf307f39b0960e0804de664616 X-Spam-Score: -1.2 (-) X-Debbugs-Envelope-To: 14511 Cc: 14511@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) --20cf307f39b0960e0804de664616 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable 2013/6/5 Ludovic Court=E8s > [...] > > > Version: 1:7.1-8ubuntu0.12.04.1 > > [...] > > >> Could you check whether the problem still occurs with Guile 2.0.9? > >> > > It does (at least when linked against the same garbage collector) > > The documentation of =91sleep=92 is: > > - Scheme Procedure: sleep i > Wait for the given number of seconds (an integer) or until a signa= l > arrives. The return value is zero if the time elapses or the > number of seconds remaining otherwise. > > I=92m pretty sure that if you check its return value, you=92ll notice tha= t > it behaves as documented. Can you confirm? > > What happens here is that libgc uses signals for stop-the-world > collections, and (gc) certainly does with the libgc version you=92re > using. > > =91sleep=92 calls select(2), which in your case presumably returns > prematurely with EINTR. You should be able to confirm this hypothesis > by running Guile with: > > strace -f -e select guile > > (Note that the problem doesn=92t occur with libgc 7.2, presumably because > it uses a different strategy.) > > Yes, you're right. Sleep does behave as documented, but I didn't expect that gc might raise a signal. Sorry for the confusion. However, I replaced the libgc.so with a newly compiled one (7.2d) and nothing changed, so I guess that the reason might be more casual Thanks a lot --20cf307f39b0960e0804de664616 Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: quoted-printable
2013/6/5 Ludovic Court=E8s <ludo@gnu.org>
<= div class=3D"gmail_extra">
[...]

> Version: 1:7.1-8ubuntu0.12.04.1

[...]

>> Could you check whether the problem still occurs with Guile 2.0.9?=
>>
> =A0It does (at least when linked against the same garbage collector)
The documentation of =91sleep=92 is:

=A0 - Scheme Procedure: sleep i
=A0 =A0 =A0 =A0Wait for the given number of seconds (an integer) or until a= signal
=A0 =A0 =A0 =A0arrives. =A0The return value is zero if the time elapses or = the
=A0 =A0 =A0 =A0number of seconds remaining otherwise.

I=92m pretty sure that if you check its return value, you=92ll notice that<= br> it behaves as documented. =A0Can you confirm?

What happens here is that libgc uses signals for stop-the-world
collections, and (gc) certainly does with the libgc version you=92re
using.

=91sleep=92 calls select(2), which in your case presumably returns
prematurely with EINTR. =A0You should be able to confirm this hypothesis by running Guile with:

=A0 strace -f -e select guile

(Note that the problem doesn=92t occur with libgc 7.2, presumably because it uses a different strategy.)


Yes, you're right. Sleep does behave as documented, but I didn't = expect that gc might raise a signal.
Sorry for the confusio= n.
However, I replaced the libgc.so with a newly compiled one (7.2d= ) and nothing changed, so I guess that the reason might be more casual

Thanks a lot

--20cf307f39b0960e0804de664616-- From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 05 07:40:52 2013 Received: (at 14511-done) by debbugs.gnu.org; 5 Jun 2013 11:40:52 +0000 Received: from localhost ([127.0.0.1]:51952 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UkC5E-0007nc-7I for submit@debbugs.gnu.org; Wed, 05 Jun 2013 07:40:52 -0400 Received: from hera.aquilenet.fr ([141.255.128.1]:56999) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UkC5C-0007nT-Cu for 14511-done@debbugs.gnu.org; Wed, 05 Jun 2013 07:40:51 -0400 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id DD16CBD7; Wed, 5 Jun 2013 13:38:45 +0200 (CEST) Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id y5mcDbIebFXl; Wed, 5 Jun 2013 13:38:45 +0200 (CEST) Received: from pluto (unknown [95.63.52.254]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 1DC4CACD; Wed, 5 Jun 2013 13:38:45 +0200 (CEST) From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Panicz Maciej Godek Subject: Re: bug#14511: Unexpected behaviour of scm_gc+sleep/usleep in another thread References: <87hahe9h2o.fsf@gnu.org> <8761xu9ew1.fsf@gnu.org> <87wqq90yte.fsf@gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 17 Prairial an 221 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu Date: Wed, 05 Jun 2013 13:38:44 +0200 In-Reply-To: (Panicz Maciej Godek's message of "Wed, 5 Jun 2013 13:12:38 +0200") Message-ID: <87ppw0yegr.fsf@gnu.org> User-Agent: Gnus/5.130007 (Ma Gnus v0.7) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 14511-done Cc: 14511-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.2 (-) Panicz Maciej Godek skribis: > Yes, you're right. Sleep does behave as documented, but I didn't expect > that gc might raise a signal. > Sorry for the confusion. No problem. > However, I replaced the libgc.so with a newly compiled one (7.2d) and > nothing changed, so I guess that the reason might be more casual Hmm yes. Well, libgc can definitely resort to signals, but how it chooses to do it is really an implementation detail, so I don=E2=80=99t kno= w why we=E2=80=99re seeing a difference here. Ludo=E2=80=99. From unknown Mon Aug 18 15:39:36 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 04 Jul 2013 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator