Here's a small snippet that gives us OOM, but it doesn't infinitely hang on GC like previously. No ports or JSON-parsing. [klm@kth arp]$ cat smallerror.scm (define state '()) (define (geojson-mmsi geojson) (let ((mmsi (alist-ref 'mmsi (or (alist-ref 'properties geojson) '())))) (assert (number? mmsi)) mmsi)) (define (prj-geojson geojson state) (assert (<= (length state) 20000)) ;; set properties for mmsi key: (alist-update (geojson-mmsi geojson) ;; key (mmsi) geojson ;; value (geojson feature) state)) (let loop () (set! state (prj-geojson `((type . "Feature") (geometry . ((type . "Point") (coordinates . ,(vector (/ (random 10000) 100) (/ (random 10000) 100))))) (properties . ((mmsi . ,(random 10000)) (name . "debug") (sog . 5)))) state)) (loop)) $ time csi -s ./smallerror.scm -:g -:hm8M > /tmp/csilog 2>&1 real 0m39.305s user 0m39.157s sys 0m0.087s [klm@kth arp]$ tail /tmp/csilog -n 30 [GC] stack 0x00007fffddc9b220 0xffffffffddc9b100 0x00007fffddd9b220 [GC] from 0x00007fd8f132e010 0x00007fd8f1726790 0x00007fd8f172e010 0x00000000003f8780 [GC] to 0x00007fd8f0bab010 0x00007fd8f0bab010 0x00007fd8f0fab010 [GC] 0 locatives (from 32) [GC] level 1 gcs(minor) 0 gcs(major) 4458 [GC] stack 0x00007fffddc9b220 0xffffffffddc9b120 0x00007fffddd9b220 [GC] from 0x00007fd8f0bab010 0x00007fd8f0f623e8 0x00007fd8f0fab010 0x00000000003b73d8 [GC] to 0x00007fd8f132e010 0x00007fd8f132e010 0x00007fd8f172e010 [GC] 0 locatives (from 32) [GC] (old) fromspace: start=0x00007fd8f0bab010, limit=0x00007fd8f0fab010 [GC] (old) tospace: start=0x00007fd8f132e010, limit=0x00007fd8f172e010 [panic] out of memory - heap full while resizing - execution terminated ...more... <--