[cl-debian] Bug#444450: sbcl: garbage collector failure: attempted to scavenge non-descriptor value
Philipp Benner
pbenner at uos.de
Fri Sep 28 15:38:17 UTC 2007
Package: sbcl
Version: 1:1.0.9.0-1
Severity: important
Hi,
I get the following warnings when running the attached code:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
* (load "debug")
T
* (main)
warning: attempted to scavenge non-descriptor value 40942156 at
0x7f9b9d88.
If you can reproduce this warning, please send a bug report
(see manual page for details).
warning: attempted to scavenge non-descriptor value 40942156 at
0x7f9ba1b8.
If you can reproduce this warning, please send a bug report
(see manual page for details).
warning: attempted to scavenge non-descriptor value 408e163a at
0x7f9b9d88.
If you can reproduce this warning, please send a bug report
(see manual page for details).
warning: attempted to scavenge non-descriptor value 408e163a at
0x7f9ba1b8.
If you can reproduce this warning, please send a bug report
(see manual page for details).
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
The code is from a bigger project but I could reduce it to a few
lines.
It seems to be a problem with the garbage collector
(more precisely with src/runtime/gc-common.c). The bug might only occur
on non x86/X86_64 machines.
Regards
-- System Information:
Debian Release: lenny/sid
APT prefers testing
APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable')
Architecture: powerpc (ppc)
Kernel: Linux 2.6.18
Locale: LANG=en_IE at euro, LC_CTYPE=en_IE at euro (charmap=ISO-8859-15)
Shell: /bin/sh linked to /bin/bash
Versions of packages sbcl depends on:
ii common-lisp-controller 6.11 Common Lisp source and compiler ma
ii libc6 2.6.1-1 GNU C Library: Shared libraries
Versions of packages sbcl recommends:
ii binfmt-support 1.2.10 Support for extra binary formats
-- no debconf information
--
Philipp Benner
-------------- next part --------------
(defvar l '(1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
82 83 84 85 86 87 88 89))
(defvar *data* '((1 11511.389 42106.39) (2 11503.056 42855.277) (3 11438.333 42057.223)
(4 11438.333 42057.223) (5 11438.333 42057.223) (6 11785.277 42884.445)
(7 11785.277 42884.445) (8 11785.277 42884.445) (9 11785.277 42884.445)
(10 12363.333 43189.168) (11 11846.944 42660.555) (12 11503.056 42855.277)
(13 11963.056 43290.555) (14 11963.056 43290.555) (15 12300.0 42433.332)
(16 11973.056 43026.11) (17 11973.056 43026.11) (18 11461.111 43252.777)
(19 11461.111 43252.777) (20 11461.111 43252.777) (21 11461.111 43252.777)
(22 11600.0 43150.0) (23 12386.667 43334.723) (24 12386.667 43334.723)
(25 11595.0 43148.055) (26 11595.0 43148.055) (27 11569.444 43136.668)
(28 11310.277 42929.445) (29 11310.277 42929.445) (30 11310.277 42929.445)
(31 11963.056 43290.555) (32 11416.667 42983.332) (33 11416.667 42983.332)
(34 11595.0 43148.055) (35 12149.444 42477.5) (36 11595.0 43148.055)
(37 11595.0 43148.055) (38 11108.611 42373.89) (39 11108.611 42373.89)
(40 11108.611 42373.89) (41 11108.611 42373.89) (42 11183.333 42933.332)
(43 12372.777 42711.39) (44 11583.333 43150.0) (45 11583.333 43150.0)
(46 11583.333 43150.0) (47 11583.333 43150.0) (48 11583.333 43150.0)
(49 11822.777 42673.61) (50 11822.777 42673.61) (51 12058.333 42195.555)
(52 11003.611 42102.5) (53 11003.611 42102.5) (54 11003.611 42102.5)
(55 11522.223 42841.945) (56 12386.667 43334.723) (57 12386.667 43334.723)
(58 12386.667 43334.723) (59 11569.444 43136.668) (60 11569.444 43136.668)
(61 11569.444 43136.668) (62 11155.833 42712.5) (63 11155.833 42712.5)
(64 11155.833 42712.5) (65 11155.833 42712.5) (66 11133.333 42885.832)
(67 11133.333 42885.832) (68 11133.333 42885.832) (69 11133.333 42885.832)
(70 11133.333 42885.832) (71 11003.611 42102.5) (72 11770.277 42651.945)
(73 11133.333 42885.832) (74 11690.556 42686.668) (75 11690.556 42686.668)
(76 11751.111 42814.445) (77 12645.0 42973.332) (78 12421.667 42895.555)
(79 12421.667 42895.555) (80 11485.556 43187.223) (81 11423.889 43000.277)
(82 11423.889 43000.277) (83 11715.833 41836.11) (84 11297.5 42853.332)
(85 11297.5 42853.332) (86 11583.333 43150.0) (87 11569.444 43136.668)
(88 12286.944 43355.555) (89 12355.833 43156.39)))
(defun permutation (list &optional (destructive nil)
&aux (new-list (if destructive list (copy-list list)))
(n (length new-list)))
(loop for i below n do (rotatef (elt new-list i) (elt new-list (random n))))
new-list)
(defun get-position (city data)
"Returns the position of a city."
(apply 'vector
(loop for i in data thereis (when (equal city (first i)) (cdr i)))))
(defun euclidean-norm (vector)
(sqrt (reduce #'+ (map 'vector #'(lambda (x) (expt x 2)) vector))))
(defun sub-vectors (v1 &rest tail)
(let ((result v1))
(loop for v2 in tail do
(setf result (map 'vector #'- result v2)))
result))
(defun distance (a b data)
(let ((pos-a (get-position a data))
(pos-b (get-position b data)))
(euclidean-norm (sub-vectors pos-a pos-b))))
(defun tour-distance (tour data)
;; close the tour by appending the first element to the list's tail
(let ((circ-tour (append tour (list (car tour)))))
;; calculate and sum distances
(reduce #'+ (mapcar #'(lambda (a b) (distance a b data))
(cdr circ-tour) (butlast circ-tour)))))
(defun main ()
(loop repeat 10000000 do (tour-distance (permutation l) *data*)))
;; (sb-ext:save-lisp-and-die "bin" :toplevel #'main :executable t)
More information about the Cl-debian
mailing list