Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/dev/urandom and image dumping #51

Open
hemml opened this issue Jun 19, 2022 · 1 comment
Open

/dev/urandom and image dumping #51

hemml opened this issue Jun 19, 2022 · 1 comment

Comments

@hemml
Copy link

hemml commented Jun 19, 2022

I'm using postmodern which uses ironclad to make authentication.
The problem is when I'm saving lisp image with save-lisp-and-die, the first attempt to reconnect to the database produces the following error:

Database error: #<SB-SYS:FD-STREAM for "file /dev/urandom" {1001CF02F3}> was closed by SB-EXT:SAVE-LISP-AND-DIE
   [Condition of type CL-POSTGRES:DATABASE-SOCKET-ERROR]
Restarts: 
  0: [RECONNECT] Try again.
  1: [RETRY] Retry SLIME REPL evaluation request.
  2: [*ABORT] Return to SLIME's top level.
  3: [ABORT] abort thread (#<THREAD "repl-thread" RUNNING {1005968433}>)
Stack Trace: 
  0: ((FLET CL-POSTGRES::ADD-RESTART :IN CL-POSTGRES::INITIATE-CONNECTION) #<SB-INT:CLOSED-SAVED-STREAM-ERROR {1008A5D1D3}>)
  1: (CL-POSTGRES::INITIATE-CONNECTION #<CL-POSTGRES:DATABASE-CONNECTION {1008A5C013}> 0)
  2: (CL-POSTGRES:OPEN-DATABASE "dbmail" "dbmail_admin" "" "mail-database" 5432 :NO "postgres" "" NIL)
  3: (POSTMODERN:CONNECT-TOPLEVEL "dbmail" "dbmail_admin" "" "mail-database" :PORT 5432 :USE-SSL NIL :APPLICATION-NAME "" :USE-BINARY NIL)
  4: (SB-INT:SIMPLE-EVAL-IN-LEXENV (POSTMODERN:CONNECT-TOPLEVEL "dbmail" "dbmail_admin" "" "mail-database") #<NULL-LEXENV>)
  5: (EVAL (POSTMODERN:CONNECT-TOPLEVEL "dbmail" "dbmail_admin" "" "mail-database"))
  6: (SWANK::EVAL-REGION "(postmodern:connect-toplevel \"dbmail\" \"dbmail_admin\" \"\" \"mail-database\")")
  7: ((LAMBDA NIL :IN SWANK-REPL::REPL-EVAL))
  8: (SWANK-REPL::TRACK-PACKAGE #<FUNCTION (LAMBDA NIL :IN SWANK-REPL::REPL-EVAL) {1008A5BDAB}>)
  9: (SWANK::CALL-WITH-RETRY-RESTART "Retry SLIME REPL evaluation request." #<FUNCTION (LAMBDA NIL :IN SWANK-REPL::REPL-EVAL) {1008A5BD4B}>)
  10: (SWANK::CALL-WITH-BUFFER-SYNTAX NIL #<FUNCTION (LAMBDA NIL :IN SWANK-REPL::REPL-EVAL) {1008A5BD2B}>)
  11: (SWANK-REPL::REPL-EVAL "(postmodern:connect-toplevel \"dbmail\" \"dbmail_admin\" \"\" \"mail-database\")")
  12: (SB-INT:SIMPLE-EVAL-IN-LEXENV (SWANK-REPL:LISTENER-EVAL "(postmodern:connect-toplevel \"dbmail\" \"dbmail_admin\" \"\" \"mail-database\")") #<NULL-LEXENV>)
  13: (EVAL (SWANK-REPL:LISTENER-EVAL "(postmodern:connect-toplevel \"dbmail\" \"dbmail_admin\" \"\" \"mail-database\")"))
  14: (SWANK:EVAL-FOR-EMACS (SWANK-REPL:LISTENER-EVAL "(postmodern:connect-toplevel \"dbmail\" \"dbmail_admin\" \"\" \"mail-database\")") "CL-USER" 9912)
  15: (SWANK::PROCESS-REQUESTS NIL)
  16: ((LAMBDA NIL :IN SWANK::HANDLE-REQUESTS))
  17: ((LAMBDA NIL :IN SWANK::HANDLE-REQUESTS))
  18: (SWANK/SBCL::CALL-WITH-BREAK-HOOK #<FUNCTION SWANK:SWANK-DEBUGGER-HOOK> #<FUNCTION (LAMBDA NIL :IN SWANK::HANDLE-REQUESTS) {100597802B}>)
  19: ((FLET SWANK/BACKEND:CALL-WITH-DEBUGGER-HOOK :IN "/home/omg/quicklisp/dists/quicklisp/software/slime-v2.27/swank/sbcl.lisp") #<FUNCTION SWANK:SWANK-DEBUGGER-HOOK> #<FUNCTION (LAMBDA NIL :IN SWANK::HAN..
  20: (SWANK::CALL-WITH-BINDINGS ((*STANDARD-INPUT* . #<SWANK/GRAY::SLIME-INPUT-STREAM {10060F6883}>)) #<FUNCTION (LAMBDA NIL :IN SWANK::HANDLE-REQUESTS) {100597804B}>)
  21: (SWANK::HANDLE-REQUESTS #<SWANK::MULTITHREADED-CONNECTION {1005D57D03}> NIL)
  22: ((FLET SB-UNIX::BODY :IN SB-THREAD::RUN))
  23: ((FLET "WITHOUT-INTERRUPTS-BODY-11" :IN SB-THREAD::RUN))
  24: ((FLET SB-UNIX::BODY :IN SB-THREAD::RUN))
  25: ((FLET "WITHOUT-INTERRUPTS-BODY-4" :IN SB-THREAD::RUN))
  26: (SB-THREAD::RUN)
  27: ("foreign function: call_into_lisp")
  28: ("foreign function: funcall1")

I found a workaround: (setf ironclad::*os-prng-stream* nil) before first connection attempt fixes the problem.

@luismbo
Copy link
Member

luismbo commented Jun 19, 2022

Seems like a duplicate of #45.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants