Ticket #20 (closed defect: invalid)

Opened 4 months ago

Last modified 4 months ago

loading list.lgt put the compiler in an infinite loop with current git of swi-prolog

Reported by: victor Owned by: pmoura
Priority: blocker Milestone: Logtalk distribution
Component: compiler Version: 2.32.1
Keywords: Cc:

Description

Hello,

This morning I updated my git source tree of swi-prolog at this revision : http://gollem.science.uva.nl/git/pl.git?a=commit;h=2168ae7145e84a8589f6d878f1441351bfcdb324

And when starting logtalk like this :

consult('configs/swi.config').
consult('compiler/logtalk.pl').
assertz(logtalk_library_path(library, 'library/')).
logtalk_load(library(types_loader), [reload(skip)]).

I get this following ouput :

+++ working on directory /users/stages/noel/Stage/Code/repos/scalogtalk/logtalk/library/
<<< loading source file types_loader... 
>>> compiling source file types_loader...
>>> types_loader source file compiled
<<< loading source file termp... 
>>> compiling source file termp...
    compiling protocol termp... compiled
>>> termp source file compiled
%  termp.pl compiled 0.00 sec, 2,008 bytes
<<< termp source file loaded
<<< loading source file term... 
>>> compiling source file term...
    compiling object term... compiled
>>> term source file compiled
%  term.pl compiled 0.01 sec, 10,032 bytes
<<< term source file loaded
<<< loading source file atomic... 
>>> compiling source file atomic...
    compiling object atomic... compiled
>>> atomic source file compiled
%  atomic.pl compiled 0.00 sec, 2,764 bytes
<<< atomic source file loaded
<<< loading source file atom... 
>>> compiling source file atom...
    compiling object atom... compiled
>>> atom source file compiled
%  atom.pl compiled 0.01 sec, 2,744 bytes
<<< atom source file loaded
<<< loading source file callable... 
>>> compiling source file callable...
    compiling object callable... compiled
>>> callable source file compiled
%  callable.pl compiled 0.00 sec, 2,808 bytes
<<< callable source file loaded
<<< loading source file characterp... 
>>> compiling source file characterp...
    compiling protocol characterp... compiled
>>> characterp source file compiled
%  characterp.pl compiled 0.00 sec, 2,800 bytes
<<< characterp source file loaded
<<< loading source file character... 
>>> compiling source file character...
    compiling object character... compiled
>>> character source file compiled
%  character.pl compiled 0.00 sec, 9,096 bytes
<<< character source file loaded
<<< loading source file number... 
>>> compiling source file number...
    compiling object number... compiled
>>> number source file compiled
%  number.pl compiled 0.01 sec, 2,772 bytes
<<< number source file loaded
<<< loading source file float... 
>>> compiling source file float...
    compiling object float... compiled
>>> float source file compiled
%  float.pl compiled 0.00 sec, 2,788 bytes
<<< float source file loaded
<<< loading source file integer... 
>>> compiling source file integer...
    compiling object integer... compiled
>>> integer source file compiled
%  integer.pl compiled 0.00 sec, 3,864 bytes
<<< integer source file loaded
<<< loading source file natural... 
>>> compiling source file natural...
    compiling object natural... compiled
>>> natural source file compiled
%  natural.pl compiled 0.00 sec, 3,180 bytes
<<< natural source file loaded
<<< loading source file compound... 
>>> compiling source file compound...
    compiling object compound... compiled
>>> compound source file compiled
%  compound.pl compiled 0.00 sec, 2,772 bytes
<<< compound source file loaded
<<< loading source file listp... 
>>> compiling source file listp...
    compiling protocol listp... compiled
>>> listp source file compiled
%  listp.pl compiled 0.01 sec, 4,056 bytes
<<< listp source file loaded
<<< loading source file list... 
>>> compiling source file list...

And the processing hangs here.

I tried the commit just before of swi-prolog and it worked with no problem.

I am unable to spot the place in the code where there is a problem. I guess it is because of swi-prolog, but since I get this problem with Logtalk, I prefer to tell you first, maybe you will have an idea :)

Attachments

Change History

Changed 4 months ago by pmoura

  • owner set to pmoura
  • status changed from new to assigned

I cannot reproduce the problem with the latest stable version of SWI-Prolog (5.6.57) and the current Logtalk development version of Logtalk. You could try to load just the "list.lgt" file to try to isolate the problem (if you're using the Logtalk development version, please update it first). It seems likely that this is a bug in the current git version of SWI-Prolog, so we should try to diagnose the problem and send Jan a bug report.

Changed 4 months ago by victor

You are right,

I am using the last version of logtalk, and the bug appeared with the last commit (the one I wrote in the bug report).

I tried see where the error was by doing C when it freeze, then I typed t (for trace) and I got the trace of the compiler.

Then if I skip (s) them all, at a moment, a predicate "Exit" then nothing more appear, like at the beginning of the freeze and I can do C again and trace, and I can redo the same ...

I will try to see where in the logtalk compiler it is happening and come back to you :)

Changed 4 months ago by victor

Looks like WikiFormatting got me :)

I was meaning ^C when the text is in superscript.

Also, when I am talking about the last commit, it is the last git commit of swi-prolog.

Changed 4 months ago by victor

For now,

I can say that if I load them all by hand, it work !

If I load listp and list before, then call

logtalk_load(library(types_loader), [reload(skip)]).

it hangs after list1 !

If I load more by hand, it hangs later, for example after dictionaryp ...

Changed 4 months ago by pmoura

  • status changed from assigned to closed
  • resolution set to invalid

Jan acknowledge and corrected a bug in the garbage collector in the 32-bits git version of SWI-Prolog. This bug seems to be the culprit for the problem you described. I'm going to close this ticket as "invalid". Reopen it if, after upgrading to the latest git version of SWI-Prolog, the problem persists.

Add/Change #20 (loading list.lgt put the compiler in an infinite loop with current git of swi-prolog)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.