Hi all,

(this is actually Joerg using Peter's machine).

Am Montag, den 04.08.2008, 21:20 -0500 schrieb Jim Ursetto:
> Ran okay here.  Do you have more stats about your environment, chicken
> version, a less complicated program that can reproduce the problem,
> etc.? 

The environment, where the case came up: my Laptop: 64 Bit Intel-HW, 32
Bit Ubuntu, chicken from svn (up to date yesterday) build with
DEBUGBUILD=1.

Results: Segfault and "heap full".

Here: Debian stable, 64 Bit.  Results: Success and "heap full".

Virtualbox (32 bit) with chicken-livecd-0.3.iso (downloaded is from 30th
Apr).
Results: Sucess, "heap full", Segfault

Attached a further simplified test case.  It becomes clear to me that
"thread-terminate!" appears to be the problematic call.  On the livecd,
we just saw about 50% Segfault and 50% success for that version of
"ttm".  BUT: as soon as I coment out the call to "thread-terminate!" it
runs without problems, even in a loop.

best regards

/Jörg

(declare (uses srfi-18))

(define (logerr . args)
  (apply format (current-error-port) args)
  (flush-output (current-error-port))
  (format (current-error-port) "let's do some garbage\n")
  (flush-output (current-error-port))
  (let ((s ""))
    (do ((i 0 (+ i 1)))
	((eqv? i 20000) #t)
      (set! s (string-append s (number->string i)))))
  (format (current-error-port) "enough garbage\n")
  (flush-output (current-error-port)))

(define (with-timeout timeout thunk)
  (let ((thread (thread-start! (make-thread thunk
                                            ;; (string-append (thread-name (current-thread)) "-worker")
                                            ))))
    (thread-sleep! timeout)
    (thread-terminate! thread)))

(define (test2)
  (handle-exceptions
   ex
   (begin (logerr "error ~a\n"  ex) #f)
   (with-timeout 3 (lambda () (do () (#f) #t)))))

(print "test")
(test2)
(logerr "done\n")
(exit 0)
_______________________________________________
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to