Custom Query (1030 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (481 - 483 of 1030)

Ticket Resolution Summary Owner Reporter
#1032 fixed Add ccl:*lisp-exit-functions* or change behavior of ccl:*lisp-cleanup-functions* or document image hooks James M. Lawrence
Description

I was surprised that ccl:save-application called ccl:*lisp-cleanup-functions* before saving the image. I expected a snapshot of the current image (this is the behavior of other implementations), not an image in a post-shutdown state.

I can use ccl:*save-exit-functions* to save the desired state, or restore state with ccl:*lisp-startup-functions*, but neither may be easy in general.

If it is decided that the current behavior is preferred, then at least document it in ccl:save-application or elsewhere, as it differs from other implementations.

#1042 fixed Initial thread can spontaneously die (or be removed from ccl:all-processes) James M. Lawrence
Description
(defun test (thread-count)
  (let ((threads (loop repeat thread-count
                       collect (ccl:process-run-function
                                "test" (lambda ())))))
    ;;(sleep 0.01)
    (mapc #'ccl:process-kill threads)))

(defun run ()
  (loop
     (assert (find "Initial" (ccl:all-processes)
                   :key #'ccl:process-name
                   :test #'string=))
     (test 10)
     (format t ".")))

The assertion fails within 100 iterations on dx86cl64, dx86cl, and lx86cl. With the SLEEP call I did not see a failure for 20k iterations.

#1050 fixed Bad file descriptor error in accept or bind or listen James M. Lawrence
Description
(defun run-server (host port out)
  (with-open-stream (server (ccl:make-socket :connect :passive
                                             :local-host host
                                             :local-port port
                                             :reuse-address t))
    (with-open-stream (stream (ccl:accept-connection server))
      (format out "~s~%" (read stream))
      (print :pong stream)
      (finish-output stream))))

(defun make-socket/retry (host port tries)
  (loop (handler-case (return (ccl:make-socket :remote-host host
                                               :remote-port port))
          (ccl:socket-creation-error (err)
            (unless (plusp (decf tries)) (error err))
            (format t "retry~%")
            (sleep 0.1)))))

(defun test (host port)
  (ccl:process-run-function "server" #'run-server
                            host port *standard-output*)
  ;(sleep 0.001)
  (with-open-stream (stream (make-socket/retry host port 5))
    (print :ping stream)
    (finish-output stream)
    (format t "~s~%" (read stream))))

(defun run ()
  (loop for port from 10000 to 20000 do (test "localhost" port)))

Failure happens within three iterations on my machine.

retry
:PING
:PONG
retry
> Error: on #<CCL::LISTENER-SOCKET #x1866FB36> : 
>        Bad file descriptor (error #9) during accept
> While executing: SOCKET-ERROR, in process server(3).

or

retry
:PING
:PONG
retry
> Error: Bad file descriptor (error #9) during socket creation operation in bind
> While executing: SOCKET-ERROR, in process server(3).

or

retry
:PING
:PONG
retry
:PING
:PONG
retry
> Error: Bad file descriptor (error #9) during socket creation operation in listen
> While executing: SOCKET-ERROR, in process server(4).

Adding the SLEEP call after PROCESS-RUN-FUNCTION prevents all errors.

Tested on 1.9-dev-r15576M-trunk (LinuxX8632). Failure on Darwin has happened but is very rare; I've only seen it twice.

I can work around this issue by handling/retrying, however CCL is the only implementation which requires this special attention.

Batch Modify
Note: See TracBatchModify for help on using batch modify.
Note: See TracQuery for help on using queries.