Summary

lolevel-tests.scm failure on Linux/PPC (assertion failed: (pair? some-foo))

Metadata

Description

4.8.0rc3 tarball on Linux/PPC:

 $ make PLATFORM=linux PREFIX=/home/mario/local/chicken-4.8.0rc3 check
 
 ======================================== lolevel tests ...
 ../chicken lolevel-tests.scm -output-file a.c -verbose -include-path ..
 gcc a.c -o a.o -c  -fno-strict-aliasing -fwrapv -DHAVE_CHICKEN_CONFIG_H -DC_ENABLE_PTABLES -Os -fomit-frame-pointer -I.. -I"/home/mario/local/chicken-4.8.0rc3/include/chicken"
 rm a.c
 gcc a.o -o a.out -L.. -L"/home/mario/local/chicken-4.8.0rc3/lib"  -Wl,-R"/home/mario/local/chicken-4.8.0rc3/lib" -lchicken -lm -ldl
 rm a.o
 
 Error: (lolevel-tests.scm:241) assertion failed: (pair? some-foo)
 
         Call history:
 
         lolevel-tests.scm:180: number-of-bytes    
         lolevel-tests.scm:184: make-record-instance       
         lolevel-tests.scm:190: record-instance?   
         lolevel-tests.scm:192: record-instance?   
         lolevel-tests.scm:196: record-instance-type       
         lolevel-tests.scm:200: record-instance-length     
         lolevel-tests.scm:206: record-instance-slot       
         lolevel-tests.scm:208: record-instance-slot-set!          
         lolevel-tests.scm:210: record-instance-slot       
         lolevel-tests.scm:214: record->vector     
         lolevel-tests.scm:222: object-size        
         lolevel-tests.scm:224: object-evict       
         lolevel-tests.scm:226: object-evicted?    
         lolevel-tests.scm:227: object-release     
         lolevel-tests.scm:239: object-become!     
         lolevel-tests.scm:241: ##sys#error              <--
 make[1]: *** [check] Error 70
 make[1]: Leaving directory `/home/mario/src/chicken-4.8.0rc3'
 make: *** [check] Error 2



 $ gcc --version
 gcc (Debian 4.4.5-8) 4.4.5
 Copyright (C) 2010 Free Software Foundation, Inc.
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Changes and comments

[2012-09-07 16:41:14 UTC] sjamaan wrote:

FWIW, I tested on NetBSD/MacPPC as well, all tests succeeded there.

Did you test this on one of those flaky compile farms?

[2012-09-07 16:48:14 UTC] mario wrote:

No, it was on my old notebook.

[2012-09-08 23:04:52 UTC] felix set milestone to 4.8.0

[2012-09-09 01:25:26 UTC] mario wrote:

Weird stuff. Observe:

 $ cat lolevel-ppc.scm
 (use lolevel)
 
 (define tstvec (vector #f))
 (define ev-tstvec (object-evict tstvec))
 (object-release ev-tstvec)
 
 (define some-foo '#(1 2 3))
 (define some-bar '(1 2 3))
 (object-become! (list (cons some-foo '(1 2 3)) (cons some-bar '#(1 2 3))))
 (assert (pair? some-foo))
 
 $ ./csc lolevel-ppc.scm -compiler ./chicken -v -I. -L. -include-path . -o lolevel-ppc
 ./chicken lolevel-ppc.scm -output-file lolevel-ppc.c -verbose -include-path .
 gcc lolevel-ppc.c -o lolevel-ppc.o -c  -fno-strict-aliasing -fwrapv -DHAVE_CHICKEN_CONFIG_H -DC_ENABLE_PTABLES -Os -fomit-frame-pointer -I. -I"/home/mario/local/chicken-2012-09-08/include/chicken"
 rm lolevel-ppc.c
 gcc lolevel-ppc.o -o lolevel-ppc -L. -L"/home/mario/local/chicken-2012-09-08/lib"  -Wl,-R"/home/mario/local/chicken-2012-09-08/lib" -lchicken -lm -ldl
 rm lolevel-ppc.o
 
 $ ./lolevel-ppc 
 
 Error: (lolevel-ppc.scm:10) assertion failed: (pair? some-foo)
 
         Call history:
 
         lolevel-ppc.scm:4: object-evict   
         lolevel-ppc.scm:5: object-release         
         lolevel-ppc.scm:9: object-become!         
         lolevel-ppc.scm:10: ##sys#error         <--

Now if I comment the tstvec stuff:

 $ cat lolevel-ppc.scm
 (use lolevel)
 
 ; (define tstvec (vector #f))
 ; (define ev-tstvec (object-evict tstvec))
 ; (object-release ev-tstvec)
 
 (define some-foo '#(1 2 3))
 (define some-bar '(1 2 3))
 (object-become! (list (cons some-foo '(1 2 3)) (cons some-bar '#(1 2 3))))
 (assert (pair? some-foo))
 
 $ ./csc lolevel-ppc.scm -compiler ./chicken -v -I. -L. -include-path . -o lolevel-ppc
 ./chicken lolevel-ppc.scm -output-file lolevel-ppc.c -verbose -include-path .
 gcc lolevel-ppc.c -o lolevel-ppc.o -c  -fno-strict-aliasing -fwrapv -DHAVE_CHICKEN_CONFIG_H -DC_ENABLE_PTABLES -Os -fomit-frame-pointer -I. -I"/home/mario/local/chicken-2012-09-08/include/chicken"
 rm lolevel-ppc.c
 gcc lolevel-ppc.o -o lolevel-ppc -L. -L"/home/mario/local/chicken-2012-09-08/lib"  -Wl,-R"/home/mario/local/chicken-2012-09-08/lib" -lchicken -lm -ldl
 rm lolevel-ppc.o
 
 $ ./lolevel-ppc
 
 $ echo $?
 0

[2012-09-09 13:34:46 UTC] mario changed status from new to closed

[2012-09-09 13:34:46 UTC] mario set resolution to wontfix

[2012-09-09 13:34:46 UTC] mario wrote:

That test work if I build chicken with gcc 4.7.1.

Looks like some GCC versions have problems on that platform.

See the thread http://lists.nongnu.org/archive/html/chicken-hackers/2012-09/msg00017.html for more information on this topic.

[2012-09-24 21:47:48 UTC] felix changed milestone from 4.8.0 to 4.9.0

[2012-09-24 21:47:48 UTC] felix wrote:

Milestone 4.8.0 deleted

[2013-10-18 14:55:26 UTC] mario changed description

[2013-10-18 14:55:26 UTC] mario wrote:

I observed the same behavior with gcc 4.7.2 on Linux/x86, CHICKEN master as of 445e245a54b56e232236c3a47ce4905ca79b2007:

 $ gcc --version
 gcc (Debian 4.7.2-5) 4.7.2
 Copyright (C) 2012 Free Software Foundation, Inc.
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

The error is

 ======================================== lolevel tests ...
 
 Error: assertion failed: (pair? some-foo)
 
         Call history:
 
         <syntax>          (cons some-bar (quote #(1 2 3)))
         <syntax>          (quote #(1 2 3))
         <syntax>          (##core#quote #(1 2 3))
         <eval>    (object-become! (list (cons some-foo (quote (1 2 3))) (cons some-bar (quote #(1 2 3)))))
         <eval>    (list (cons some-foo (quote (1 2 3))) (cons some-bar (quote #(1 2 3))))
         <eval>    (cons some-foo (quote (1 2 3)))
         <eval>    (cons some-bar (quote #(1 2 3)))
         <syntax>          (assert (pair? some-foo))
         <syntax>          (##core#if (##core#check (pair? some-foo)) (##core#undefined) (##sys#error "assertion failed" (##cor......
         <syntax>          (##core#check (pair? some-foo))
         <syntax>          (pair? some-foo)
         <syntax>          (##core#undefined)
         <syntax>          (##sys#error "assertion failed" (##core#quote (pair? some-foo)))
         <syntax>          (##core#quote (pair? some-foo))
         <eval>    (pair? some-foo)
         <eval>    (##sys#error "assertion failed" (##core#quote (pair? some-foo)))      <--
 make[1]: *** [check] Error 70
 make[1]: Leaving directory `/home/mario/src/chicken-core'
 make: *** [check] Error 2

I pretty printed some-foo after object-become! and it printed #<unprintable object>

[2013-11-06 22:29:15 UTC] sjamaan changed status from closed to reopened

[2013-11-06 22:29:15 UTC] sjamaan removed resolution wontfix

[2013-11-06 22:30:54 UTC] sjamaan wrote:

Reopened (at least for now), as it still happens on Debian Wheezy/x86 as well. We can easily reproduce this now on a new test server.

Note that it ONLY happens with DEBUGBUILD disabled.

[2014-01-23 20:30:42 UTC] sjamaan changed status from reopened to closed

[2014-01-23 20:30:42 UTC] sjamaan set resolution to worksforme

[2014-01-23 20:30:42 UTC] sjamaan wrote:

Aaaaand... we can't reproduce it today.

Great :(

This bug is too hard to track, so we can't fix it for 4.9.0 (especially considering it might be a GCC bug). Closing the ticket again (for now...)

[2014-04-16 16:08:19 UTC] mario changed status from closed to reopened

[2014-04-16 16:08:19 UTC] mario removed resolution worksforme

[2014-04-16 16:46:08 UTC] mario changed status from reopened to closed

[2014-04-16 16:46:08 UTC] mario set resolution to fixed

[2014-04-16 16:46:08 UTC] mario wrote:

It turns out to be a problem with CHICKEN, not with GCC. The issue has been observed again on Linux Mint 16 x86-64 (gcc 4.8.1) during the 4.9.0 prerelease phase (master at e42caebcb035dccb9853d728b364ada3089344fa can trigger the problem with that GCC version on "make check").

See details in the message Peter wrote to chicken-hackers: https://lists.nongnu.org/archive/html/chicken-hackers/2014-04/msg00012.html

Fixed by 97849ffc17f20c2e035d6e672fe8871dc0487863