From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Prafulla Giri Newsgroups: gmane.lisp.guile.bugs Subject: bug#42574: Probable (system vm trace) bug Date: Sat, 1 Aug 2020 18:50:38 +0545 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="0000000000009054d705abd090b5" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31822"; mail-complaints-to="usenet@ciao.gmane.io" To: 42574@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Sat Aug 01 15:06:08 2020 Return-path: Envelope-to: guile-bugs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k1rDE-0008A7-AO for guile-bugs@m.gmane-mx.org; Sat, 01 Aug 2020 15:06:08 +0200 Original-Received: from localhost ([::1]:38902 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k1rDC-0004W0-Ju for guile-bugs@m.gmane-mx.org; Sat, 01 Aug 2020 09:06:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36960) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k1rD8-0004Vt-5H for bug-guile@gnu.org; Sat, 01 Aug 2020 09:06:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:56633) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k1rD7-000339-T0 for bug-guile@gnu.org; Sat, 01 Aug 2020 09:06:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1k1rD7-0000uv-K1 for bug-guile@gnu.org; Sat, 01 Aug 2020 09:06:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Prafulla Giri Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Sat, 01 Aug 2020 13:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42574 X-GNU-PR-Package: guile X-Debbugs-Original-To: bug-guile@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.15962871583516 (code B ref -1); Sat, 01 Aug 2020 13:06:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 1 Aug 2020 13:05:58 +0000 Original-Received: from localhost ([127.0.0.1]:39946 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k1rD3-0000ue-Lu for submit@debbugs.gnu.org; Sat, 01 Aug 2020 09:05:58 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:41370) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k1rD0-0000uV-S1 for submit@debbugs.gnu.org; Sat, 01 Aug 2020 09:05:56 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36948) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k1rD0-0004VW-NK for bug-guile@gnu.org; Sat, 01 Aug 2020 09:05:54 -0400 Original-Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]:34859) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k1rCy-00032v-G6 for bug-guile@gnu.org; Sat, 01 Aug 2020 09:05:54 -0400 Original-Received: by mail-pf1-x432.google.com with SMTP id d188so9751840pfd.2 for ; Sat, 01 Aug 2020 06:05:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=lDGyFqko0xvLqZZbk5B6VdabgNH6j8LmY0hPWZY31QA=; b=dL5zHm3EfGnM6ToSV6vzyjxEr+JRNDOYEtTXOLASjoI0QtU6kwz6EjQ7WNypemq05I bevEOfI4IlwvYHpbUsLINFJQnvmf5An0GvJwdZHeS6YL6e5IN+/sH6UTPw3xhWbM/gRd rl2FHpWJklWnL27N3eG/C+f5xiyktP/ncJ31iMIPDU220EfS5YeN9QZSTzpTV1qcy1Rg u4e2s+5QkEQHvEvvdvoJTsCZeLXttWJLicic9NFNJGEmmmJkOE/GQw4d6VA5V2Vq3XFy ZRQI379B7bOJ5NnqcVc+CR2NFDLow3M7VI+r2/5crAlt3eLrNWzOuAdkgnY7nik+geJB TTgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=lDGyFqko0xvLqZZbk5B6VdabgNH6j8LmY0hPWZY31QA=; b=HHqtxPlYwOYMPcgk7uRsVkfpqZyas1cpeX3fSlpp71AykbRKHGN07VF4FFNR+LHWwR AjjZ+oH3PvSl/gL1PIvTOjmUTDTeO15/Qj01cb/IUfLR/Rd3CY8rxkOIuPMA89hKFTrK u+di4YSJfCtMyGEuMAa5Jupy6YT5OvGx2H5hNgnEaJk+UkEbuQ2o0SLfsm2hkq/OiwU1 prel8QyIkrmdbEiEnt2pqiU3Rk0HVSOiPDMB87HHYAzeAXuJLrN74wWNIk0gxxQvovD1 OF3DDmdlnoJjj84gYi4rwxmgAfrQS9U0YIwsamGUeuaqJRJdSfarviTJ2h5tIFALqEte Gq6Q== X-Gm-Message-State: AOAM532P7RtaIF7X89HqlyeAysNFsL32CFFALjwU95jI2mUIdiGBT9oa JlhMeCCL/SfRHGv3HaVPThFJ/hMKkAU7nExrSRNIScT2olo= X-Google-Smtp-Source: ABdhPJyzXihu2wyvbAfGGCShthm3swTMpqtyt/e4DK+0koxlBQga8Gc/4RC1Yt8g1UXiEAuIWA4p/S3rOaredpsj9GA= X-Received: by 2002:a63:fa15:: with SMTP id y21mr7729928pgh.339.1596287150472; Sat, 01 Aug 2020 06:05:50 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::432; envelope-from=pratheblackdiamond@gmail.com; helo=mail-pf1-x432.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Original-Sender: "bug-guile" Xref: news.gmane.io gmane.lisp.guile.bugs:9848 Archived-At: --0000000000009054d705abd090b5 Content-Type: multipart/alternative; boundary="0000000000009054d505abd090b3" --0000000000009054d505abd090b3 Content-Type: text/plain; charset="UTF-8" Attached is a patch to fix this issue. I would like to acknowledge RhodiumToad, who actually figured out what was causing this issue. On Tue, Jul 28, 2020 at 3:23 PM Prafulla Giri wrote: > Esteemed Maintainers, > > I am quite positive that what I am experiencing is not quite a bug but > just some mis-step on my part. But I have been encouraged to report this as > a possible bug. Thus, here it is. > > Context: > Guile version: 3.0.2 (installed using guix) > Loaded Files: simply.scm ( > https://github.com/hosoe-masaki/SimplyScheme/blob/master/simply.scm) > Reverse function (referred to in the report, assumes 'simply.scm' has been > loaded): > (define (reverse wd) (if (equal? wd "") "" (word (reverse (bf wd)) (first > wd)))) > ;; (reverse 'asdf) -> 'fdsa > > This started with my first wanting to run a (trace) of a recursive > procedure as seen in Chapter 13 of the book 'Simply Scheme' ( > https://people.eecs.berkeley.edu/~bh/ssch13/convince-recur.html). I > looked for a waay to (trace) in guile, but couldn't find anything except > ,trace, which was giving a trace of everything that the function (reverse) > called from inside of it, thus making the trace 'polluted'. > > I then looked around and found that a (trace) function, much like the one > being demonstrated in the book used to exist once in guile: > https://www.gnu.org/software/guile/docs/docs-1.8/guile-ref/Tracing.html > and then found that for guile3 there was something that looked similarly > promising: the (trace-calls-to-procedure) function ( > https://www.gnu.org/software/guile/docs/master/guile.html/Tracing-Traps.html). > However, > > (trace-calls-to-procedure reverse) > > (reverse 'asdf) > fdsa > produced no trace. This led me to ask around IRC for some guidance > regarding it. Someone from #emacs suggested I try doing this: > http://ix.io/2suZ > When I attempted to do the same thing, however, I encountered the > following error, at the sight of which, it was recommended that I file a > (possible) bug report: https://termbin.com/6nm5 > > The following `script` typescript might also be of interest to the > maintainers (to be replayed using `scriptreplay`): > typescript - https://termbin.com/sx5o > timing file - https://termbin.com/73ei > (This one records the (call-with-trace) call with both #:call? #f and > without the specification). > > I must confess, I don't understand a whole lot of this. All I would like > to say is that I have a feeling (trace-calls-to-procedure procedure) > should have worked like (trace) as shown in chapter 13 section 'trace' in > the book (https://people.eecs.berkeley.edu/~bh/ssch13/convince-recur.html); > it just seems 'right' by the name of it. I was expecting the trace from (trace-call-to-procedure > reverse) (reverse 'asdf) to be basically like ,trace (reverse 'asdf) but > without the traces of all other procedures. > > Please do let me know if I have left out any important details. And please > do let me know if I am doing something wrong here. I am almost quite > certain this is just a minor error on my part, rather than a bug (and I'd > really like to be able to trace those procedures). > --0000000000009054d505abd090b3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Attached is a patch to fix this issue. I would l= ike to acknowledge RhodiumToad, who actually figured out what was causing t= his issue.

On Tue, Jul 28, 2020 at 3:23 PM= Prafulla Giri <prathebl= ackdiamond@gmail.com> wrote:
Esteemed Maintainers,
<= br>
I am quite positive that what I am experiencing is not quite = a bug but just some mis-step on my part. But I have been encouraged to repo= rt this as a possible bug. Thus, here it is.

Conte= xt:
Guile version: 3.0.2 (installed using guix)
Reverse function (referre= d to in the report, assumes 'simply.scm' has been loaded):
(define (reverse wd) (if (equal? wd= "") "" (word (reverse (bf wd)) (first wd))))
;; (reverse 'asdf) -> = 'fdsa

This started with my first wa= nting to run a (trace) of a recursive procedure as seen in Chapter 13 of th= e book 'Simply Scheme' (https://people.eecs.berk= eley.edu/~bh/ssch13/convince-recur.html). I looked for a waay to (trace= ) in guile, but couldn't find anything except ,trace, which was giving = a trace of everything that the function (reverse) called from inside of it,= thus making the trace 'polluted'.

I then = looked around and found that a (trace) function, much like the one being de= monstrated in the book used to exist once in guile: https://www.gnu.org/software/guile/docs/docs-1.8/guile-ref/Tracing.html= and then found that for guile3 there was something that looked similar= ly promising: the (trace-calls-to-procedure) function (https://www.gnu.org/software/guile/docs/master/guile.html/Traci= ng-Traps.html). However,
> (trace-calls-to-procedure reverse)
> (reverse 'asdf)
fdsa
produced no trace. This led me = to ask around IRC for some guidance regarding it. Someone from #emacs sugge= sted I try doing this: http= ://ix.io/2suZ
When I attempted to do the same thing,= however, I encountered the following error, at the sight of which, it was = recommended that I file a (possible) bug report: https://termbin.com/6nm5

The following `script` typescript might also be o= f interest to the maintainers (to be replayed using `scriptreplay`):=
I must confess, I don't understand a whole lot of this. Al= l I would like to say is that I have a feeling (trace-calls-to-procedure procedure) should have worked li= ke (trace) as shown in chapter= 13 section 'trace' in the book (https://people.= eecs.berkeley.edu/~bh/ssch13/convince-recur.html); it just seems 'r= ight' by the name of it. I was expecting the trace from (trace-call-to-procedure reverse) (reverse 'asdf= ) to be basically like ,trace = (reverse 'asdf) but without the traces of all other procedures.<= br>

Please do let me know i= f I have left out any important details. And please do let me know if I am = doing something wrong here. I am almost quite certain this is just a minor = error on my part, rather than a bug (and I'd really like to be able to = trace those procedures).
--0000000000009054d505abd090b3-- --0000000000009054d705abd090b5 Content-Type: text/x-patch; charset="US-ASCII"; name="0001-Fix-return-handler-of-trace-calls-to-procedure.patch" Content-Disposition: attachment; filename="0001-Fix-return-handler-of-trace-calls-to-procedure.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_kdbo4m4n0 RnJvbSBjOTA3ZTlmN2VjYzQ3NjRmNmNkY2Y1ZjZiMmNkNmNlZDgwYWQ5NWE5IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBQcmFmdWxsYSBHaXJpIDxwcmF0aGVibGFja2RpYW1vbmRAZ21h aWwuY29tPgpEYXRlOiBTYXQsIDEgQXVnIDIwMjAgMTU6Mzk6MjIgKzA1NDUKU3ViamVjdDogW1BB VENIXSBGaXggcmV0dXJuLWhhbmRsZXIgb2YgdHJhY2UtY2FsbHMtdG8tcHJvY2VkdXJlCgpUaGlz IGNoYW5nZSByZW1vdmVzIHRoZSBleHRyYS91bnVzZWQgZm9ybWFsIHBhcmFtZXRlciAndmFsdWVz JyBmcm9tCnRoZSBkZWZpbml0aW9uIG9mIHJldHVybi1oYW5kbGVyIGluIHRyYWNlLWNhbGxzLXRv LXByb2NlZHVyZS4gVGhpcwpleHRyYSBwYXJhbWV0ZXIgd2FzIGNhdXNpbmcgdHJhY2UtY2FsbHMt dG8tcHJvY2VkdXJlIHRvIGZhaWwgZm9yIHRoZQpsYWNrIG9mIGFuIGFyZ3VtZW50IHRoYXQgd2Fz IG5ldmVyIHBhc3NlZCB0byBpdC4gVGhhbmtzIHRvIE1yLiBBbmRyZXcKKFJob2RpdW1Ub2FkKSBm b3IgZmlndXJpbmcgdGhpcyBvdXQuIEZpeGVzICM0MjU3NC4KCiogbW9kdWxlL3N5c3RlbS92bS90 cmFjZS5zY20gKHRyYWNlLWNhbGxzLXRvLXByb2NlZHVyZSAocm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