unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* Possible infinite loop during compilation in 2.2
@ 2014-04-18 16:05 Julian Graham
  2014-04-18 19:20 ` Andy Wingo
  0 siblings, 1 reply; 6+ messages in thread
From: Julian Graham @ 2014-04-18 16:05 UTC (permalink / raw)
  To: guile-devel

Hey Guilers,

I was experimenting with building one of my projects using Guile 2.2
and found that some files just don't seem to want to finish compiling,
and peg my CPU at 100% -- seems like they might be getting stuck in a
loop. (Other files compile just fine.)

As per some conversations with Andy and Mark on #guile, I tried
compiling one of the troublesome files from the REPL and captured the
following stack trace. (You can see the source code of the file here:
http://git.savannah.gnu.org/cgit/gzochi.git/tree/gzochi-server/src/scheme/gzochi/private/app.scm)

In system/base/compile.scm:
    150:6 27 (compile-file #<unbound> #:output-file _ #:from _ #:to _
#:env _ #:opts _ #:canonicalization _)
     43:4 26 (call-once _)
In ice-9/boot-9.scm:
    823:4 25 (with-throw-handler _ _ _)
In system/base/compile.scm:
    59:11 24 ("#<procedure 7fe3b25b9b58>")
   153:11 23 ("#<procedure 7fe3b25b9398>" #<closed: file 23b74e0>)
   233:18 22 (read-and-compile #<input: gzochi/private/app.scm 14>
#:from _ #:to _ #:env _ #:opts _)
   181:32 21 (compile-fold _ _ _ (#:to-file? #t))
In ice-9/boot-9.scm:
   2654:4 20 (save-module-excursion #<unbound>)
In language/scheme/compile-tree-il.scm:
    31:15 19 ("#<procedure 7fe3af1581dc>")
In ice-9/psyntax.scm:
  1189:36 18 (expand-top-sequence #<unbound> _ _ #f #<unbound>
(compile load eval) #<unbound>)
  1081:18 17 (parse _ (("placeholder" placeholder)) ((top) #(ribcage
() () ())) _ c (compile load eval) (hygiene #{ g276}#))
  1302:32 16 (syntax-type #<unbound> (("placeholder" placeholder))
(()) ((line . 18) (column . 0) (filename . "gzochi/private/app.scm"))
#(ribcage () () ()) (hygiene #{ g276}#) #f)
  1513:32 15 (expand-macro #<procedure 7fe3b26beb20 at
ice-9/r6rs-libraries.scm:126:2 (stx)> _ _ _ _ _ _)
In ice-9/r6rs-libraries.scm:
   181:14 14 ("#<procedure 7fe3b26732a4>" #(syntax-object gzochi ((#f
top) shift #(ribcage () () ()) #(ribcage () () ())) (hygiene #{
g276}#)) (#(syntax-object private ((#f top) shift #(# # …) #) #) #) …)
In ice-9/boot-9.scm:
   845:31 13 (map #<procedure 7fe3b26c5990 at
ice-9/r6rs-libraries.scm:181:19 (im)> _)
  3117:17 12 (resolve-interface (gzochi private client) #:select _
#:hide _ #:prefix _ #:renamer _ #:version _)
  3042:10 11 ("#<procedure 7fe3b267c53c>" (gzochi private client) _ _
#:ensure _)
  3318:16 10 (try-module-autoload _ _)
   2654:4  9 (save-module-excursion #<unbound>)
  3338:22  8 ("#<procedure 7fe3b267ab00>")
In unknown file:
           7 (primitive-load-path "gzochi/private/client" #<procedure
266e2a0 at ice-9/boot-9.scm:3325:32 ()>)
In gzochi/private/client.scm:
     44:2  6 ("#<procedure 7fe3ade1d0e8>")
In gzochi/private/data.scm:
    153:2  5 (gzochi:make-managed-record-constructor-descriptor
#<r6rs:record-type:gzochi:client-session> #f #f)
In rnrs/records/inspection.scm:
     65:2  4 (record-type-parent _)
     58:2  3 (guarantee-rtd record-type-parent
#<r6rs:record-type:gzochi:client-session>)
In rnrs/records/procedural.scm:
    174:2  2 (record-type-descriptor? _)
In unknown file:
           1 (scm-error signal #f "User interrupt" () (2))
In ice-9/boot-9.scm:
   747:26  0 (dispatch-exception _ _ _)


Regards,
Julian



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Possible infinite loop during compilation in 2.2
  2014-04-18 16:05 Possible infinite loop during compilation in 2.2 Julian Graham
@ 2014-04-18 19:20 ` Andy Wingo
  2014-04-18 19:21   ` Julian Graham
  0 siblings, 1 reply; 6+ messages in thread
From: Andy Wingo @ 2014-04-18 19:20 UTC (permalink / raw)
  To: Julian Graham; +Cc: guile-devel

On Fri 18 Apr 2014 18:05, Julian Graham <joolean@gmail.com> writes:

> I was experimenting with building one of my projects using Guile 2.2
> and found that some files just don't seem to want to finish compiling,
> and peg my CPU at 100% -- seems like they might be getting stuck in a
> loop. (Other files compile just fine.)

Interestingly this seems to happen at macro-expansion time.  Did you C-c
your file early, or was this after letting it run for a while?

Andy
-- 
http://wingolog.org/



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Possible infinite loop during compilation in 2.2
  2014-04-18 19:20 ` Andy Wingo
@ 2014-04-18 19:21   ` Julian Graham
  2014-04-18 19:57     ` Julian Graham
  0 siblings, 1 reply; 6+ messages in thread
From: Julian Graham @ 2014-04-18 19:21 UTC (permalink / raw)
  To: Andy Wingo; +Cc: guile-devel

On Fri, Apr 18, 2014 at 3:20 PM, Andy Wingo <wingo@pobox.com> wrote:
> Interestingly this seems to happen at macro-expansion time.  Did you C-c
> your file early, or was this after letting it run for a while?


I think it was compiling for about a minute or two, which was much
longer than it took to compile everything else. I'll let it go for a
good 30 minutes and send another trace.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Possible infinite loop during compilation in 2.2
  2014-04-18 19:21   ` Julian Graham
@ 2014-04-18 19:57     ` Julian Graham
  2014-04-18 21:43       ` Mark H Weaver
  0 siblings, 1 reply; 6+ messages in thread
From: Julian Graham @ 2014-04-18 19:57 UTC (permalink / raw)
  To: Andy Wingo; +Cc: guile-devel

On Fri, Apr 18, 2014 at 3:21 PM, Julian Graham <joolean@gmail.com> wrote:
> I think it was compiling for about a minute or two, which was much
> longer than it took to compile everything else. I'll let it go for a
> good 30 minutes and send another trace.


Okay, this is interesting: The stack trace is largely the same after
running it for half an hour – it's still getting stuck in expansion.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Possible infinite loop during compilation in 2.2
  2014-04-18 19:57     ` Julian Graham
@ 2014-04-18 21:43       ` Mark H Weaver
  2014-04-18 22:28         ` Julian Graham
  0 siblings, 1 reply; 6+ messages in thread
From: Mark H Weaver @ 2014-04-18 21:43 UTC (permalink / raw)
  To: Julian Graham; +Cc: Andy Wingo, guile-devel

Julian Graham <joolean@gmail.com> writes:

> On Fri, Apr 18, 2014 at 3:21 PM, Julian Graham <joolean@gmail.com> wrote:
>> I think it was compiling for about a minute or two, which was much
>> longer than it took to compile everything else. I'll let it go for a
>> good 30 minutes and send another trace.
>
>
> Okay, this is interesting: The stack trace is largely the same after
> running it for half an hour – it's still getting stuck in expansion.

Does Guile 2.0.11 or current stable-2.0 compile it correctly?

    Mark



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Possible infinite loop during compilation in 2.2
  2014-04-18 21:43       ` Mark H Weaver
@ 2014-04-18 22:28         ` Julian Graham
  0 siblings, 0 replies; 6+ messages in thread
From: Julian Graham @ 2014-04-18 22:28 UTC (permalink / raw)
  To: Mark H Weaver; +Cc: Andy Wingo, guile-devel

Hey Mark,


On Fri, Apr 18, 2014 at 5:43 PM, Mark H Weaver <mhw@netris.org> wrote:
> Does Guile 2.0.11 or current stable-2.0 compile it correctly?

I tested with a 2.0.11 built from source as well as with the stock
Ubuntu 13.10 guile-2.0 package (which is 2.0.9, I think) and they both
compiled it just fine.



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-04-18 22:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-18 16:05 Possible infinite loop during compilation in 2.2 Julian Graham
2014-04-18 19:20 ` Andy Wingo
2014-04-18 19:21   ` Julian Graham
2014-04-18 19:57     ` Julian Graham
2014-04-18 21:43       ` Mark H Weaver
2014-04-18 22:28         ` Julian Graham

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).