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

No respond installation #44

Open
vajrabisj opened this issue Sep 4, 2023 · 9 comments
Open

No respond installation #44

vajrabisj opened this issue Sep 4, 2023 · 9 comments

Comments

@vajrabisj
Copy link

after:

(ql-dist:install-dist "http://dist.ultralisp.org/"
:prompt nil)
(ql:quickload :reblocks)

there is no response...

used in portacle

@svetlyak40wt
Copy link
Member

Try to interrupt thread with Ctrl-C Ctrl-C and see the backtrace?

@vajrabisj
Copy link
Author

here is the full backtrace:
Backtrace:
0: ((FLET "CLEANUP-FUN-69" :IN SB-THREAD::CALL-WITH-RECURSIVE-SYSTEM-LOCK)) [cleanup]
1: (SB-THREAD::CALL-WITH-RECURSIVE-SYSTEM-LOCK #<CLOSURE (FLET SB-THREAD::RECURSIVE-SYSTEM-LOCK-THUNK :IN FINALIZE) {5D6DCAB}> #<SB-THREAD:MUTEX "hash-table lock" (free)>)
2: (FINALIZE #<SB-SYS:FD-STREAM for "file c:\Lisp\portacle\all\quicklisp\local-projects\system-index.txt" {1003C4D3A3}> #<CLOSURE (LAMBDA NIL :IN SB-SYS:MAKE-FD-STREAM) {1003C4DCFB}> :DONT-SAVE T)
3: (SB-SYS:MAKE-FD-STREAM 732 :CLASS SB-SYS:FD-STREAM :INPUT T :OUTPUT NIL :ELEMENT-TYPE BASE-CHAR :BUFFERING :FULL :EXTERNAL-FORMAT :DEFAULT :SERVE-EVENTS NIL :TIMEOUT NIL :FILE "c:\Lisp\portacle\all..
4: (OPEN #P"c:/Lisp/portacle/all/quicklisp/local-projects/system-index.txt" :DIRECTION :INPUT :ELEMENT-TYPE BASE-CHAR :IF-EXISTS NIL :IF-DOES-NOT-EXIST NIL :EXTERNAL-FORMAT :DEFAULT :CLASS SB-SYS:FD-STRE..
5: (QUICKLISP-CLIENT::FIND-SYSTEM-IN-INDEX "bordeaux-threads" #P"c:/Lisp/portacle/all/quicklisp/local-projects/system-index.txt")
6: (QUICKLISP-CLIENT:LOCAL-PROJECTS-SEARCHER "bordeaux-threads")
7: ((FLET ASDF/SYSTEM-REGISTRY::TRY :IN ASDF/SYSTEM-REGISTRY:SEARCH-FOR-SYSTEM-DEFINITION) QUICKLISP-CLIENT:LOCAL-PROJECTS-SEARCHER)
8: (SB-KERNEL:%MAP-FOR-EFFECT-ARITY-1 #<CLOSURE (FLET ASDF/SYSTEM-REGISTRY::TRY :IN ASDF/SYSTEM-REGISTRY:SEARCH-FOR-SYSTEM-DEFINITION) {1003C43AFB}> (ASDF/PACKAGE-INFERRED-SYSTEM:SYSDEF-PACKAGE-INFERRED-..
Locals:
SB-IMPL::FUN = #<CLOSURE (FLET ASDF/SYSTEM-REGISTRY::TRY :IN ASDF/SYSTEM-REGISTRY:SEARCH-FOR-SYSTEM-DEFINITION) {1003C43AFB}>
#:SEQUENCE0 = (ASDF/PACKAGE-INFERRED-SYSTEM:SYSDEF-PACKAGE-INFERRED-SYSTEM-SEARCH ASDF/SYSTEM-REGISTRY:SYSDEF-CENTRAL-REGISTRY-SEARCH ASDF/SYSTEM-REGISTRY:SYSDEF-SOURCE-REGISTRY-SEARCH ..)
SB-C::THING#3 = #<CLOSURE (FLET ASDF/SYSTEM-REGISTRY::TRY :IN ASDF/SYSTEM-REGISTRY:SEARCH-FOR-SYSTEM-DEFINITION) {1003C43AFB}>
9: (ASDF/SYSTEM-REGISTRY:SEARCH-FOR-SYSTEM-DEFINITION "bordeaux-threads")
10: ((LAMBDA NIL :IN ASDF/FIND-SYSTEM:LOCATE-SYSTEM))
11: ((LAMBDA NIL :IN ASDF/SYSTEM:FIND-SYSTEM))
12: (ASDF/SESSION:CONSULT-ASDF-CACHE (ASDF/SYSTEM:FIND-SYSTEM "bordeaux-threads") #<CLOSURE (LAMBDA NIL :IN ASDF/SYSTEM:FIND-SYSTEM) {1003C4307B}>)
13: (ASDF/SESSION:CALL-WITH-ASDF-SESSION #<CLOSURE (LAMBDA NIL :IN ASDF/SYSTEM:FIND-SYSTEM) {1003C4307B}> :OVERRIDE NIL :KEY (ASDF/SYSTEM:FIND-SYSTEM "bordeaux-threads") :OVERRIDE-CACHE NIL :OVERRIDE-FORC..
14: ((LABELS QUICKLISP-CLIENT::RECURSE :IN QUICKLISP-CLIENT::COMPUTE-LOAD-STRATEGY) "bordeaux-threads")
15: ((LABELS QUICKLISP-CLIENT::RECURSE :IN QUICKLISP-CLIENT::COMPUTE-LOAD-STRATEGY) "ironclad/core")
16: ((LABELS QUICKLISP-CLIENT::RECURSE :IN QUICKLISP-CLIENT::COMPUTE-LOAD-STRATEGY) "ironclad/kdfs")
17: ((LABELS QUICKLISP-CLIENT::RECURSE :IN QUICKLISP-CLIENT::COMPUTE-LOAD-STRATEGY) "ironclad")
18: ((LABELS QUICKLISP-CLIENT::RECURSE :IN QUICKLISP-CLIENT::COMPUTE-LOAD-STRATEGY) "lack-util")
19: ((LABELS QUICKLISP-CLIENT::RECURSE :IN QUICKLISP-CLIENT::COMPUTE-LOAD-STRATEGY) "reblocks/session")
20: ((LABELS QUICKLISP-CLIENT::RECURSE :IN QUICKLISP-CLIENT::COMPUTE-LOAD-STRATEGY) "reblocks/server")
21: ((LABELS QUICKLISP-CLIENT::RECURSE :IN QUICKLISP-CLIENT::COMPUTE-LOAD-STRATEGY) "reblocks")
22: (QL-DIST::CALL-WITH-CONSISTENT-DISTS #<CLOSURE (LAMBDA NIL :IN QUICKLISP-CLIENT::COMPUTE-LOAD-STRATEGY) {100465351B}>)
23: (QUICKLISP-CLIENT::COMPUTE-LOAD-STRATEGY "reblocks")
24: (QUICKLISP-CLIENT::AUTOLOAD-SYSTEM-AND-DEPENDENCIES "reblocks" :PROMPT NIL)
25: ((:METHOD QL-IMPL-UTIL::%CALL-WITH-QUIET-COMPILATION (T T)) # #<CLOSURE (FLET QUICKLISP-CLIENT::QL :IN QUICKLISP-CLIENT:QUICKLOAD) {10046524DB}>) [fast-method]
26: ((:METHOD QL-IMPL-UTIL::%CALL-WITH-QUIET-COMPILATION :AROUND (QL-IMPL:SBCL T)) #<QL-IMPL:SBCL {1006161743}> #<CLOSURE (FLET QUICKLISP-CLIENT::QL :IN QUICKLISP-CLIENT:QUICKLOAD) {10046524DB}>) [fast-me..
27: ((:METHOD QUICKLISP-CLIENT:QUICKLOAD (T)) :REBLOCKS :PROMPT NIL :SILENT NIL :VERBOSE NIL) [fast-method]
28: (QL-DIST::CALL-WITH-CONSISTENT-DISTS #<CLOSURE (LAMBDA NIL :IN QUICKLISP-CLIENT:QUICKLOAD) {100463BE0B}>)
29: (SB-INT:SIMPLE-EVAL-IN-LEXENV (QUICKLISP-CLIENT:QUICKLOAD :REBLOCKS) #)
30: (EVAL (QUICKLISP-CLIENT:QUICKLOAD :REBLOCKS))
31: (SWANK::EVAL-REGION "(ql:quickload :reblocks) ..)
32: ((LAMBDA NIL :IN SWANK-REPL::REPL-EVAL))
33: (SWANK-REPL::TRACK-PACKAGE #<CLOSURE (LAMBDA NIL :IN SWANK-REPL::REPL-EVAL) {100463AE0B}>)
34: (SWANK::CALL-WITH-RETRY-RESTART "Retry SLIME REPL evaluation request." #<CLOSURE (LAMBDA NIL :IN SWANK-REPL::REPL-EVAL) {100463ADAB}>)
35: (SWANK::CALL-WITH-BUFFER-SYNTAX NIL #<CLOSURE (LAMBDA NIL :IN SWANK-REPL::REPL-EVAL) {100463AD8B}>)
36: (SWANK-REPL::REPL-EVAL "(ql:quickload :reblocks) ..)
37: (SB-INT:SIMPLE-EVAL-IN-LEXENV (SWANK-REPL:LISTENER-EVAL "(ql:quickload :reblocks) ..)
38: (EVAL (SWANK-REPL:LISTENER-EVAL "(ql:quickload :reblocks) ..)
39: (SWANK:EVAL-FOR-EMACS (SWANK-REPL:LISTENER-EVAL "(ql:quickload :reblocks) ..)
40: (SWANK::PROCESS-REQUESTS NIL)
41: ((LAMBDA NIL :IN SWANK::HANDLE-REQUESTS))
42: ((LAMBDA NIL :IN SWANK::HANDLE-REQUESTS))
43: (SWANK/SBCL::CALL-WITH-BREAK-HOOK # #<CLOSURE (LAMBDA NIL :IN SWANK::HANDLE-REQUESTS) {10041C012B}>)
44: ((FLET SWANK/BACKEND:CALL-WITH-DEBUGGER-HOOK :IN "c:/Lisp/portacle/all/emacsd/elpa/slime-20191224.2328/swank/sbcl.lisp") # #<CLOSURE (LAMBDA NIL :IN SWANK::HANDLE-R..
45: (SWANK::CALL-WITH-BINDINGS ((STANDARD-INPUT . #1=#<SWANK/GRAY::SLIME-INPUT-STREAM {1004141143}>) (STANDARD-OUTPUT . #2=#<SWANK/GRAY::SLIME-OUTPUT-STREAM {1004249C73}>) (TRACE-OUTPUT . #2#) (*ERR..
46: (SWANK::HANDLE-REQUESTS #<SWANK::MULTITHREADED-CONNECTION {1002799623}> NIL)
47: ((FLET SB-UNIX::BODY :IN SB-THREAD::NEW-LISP-THREAD-TRAMPOLINE))
48: ((FLET "WITHOUT-INTERRUPTS-BODY-4" :IN SB-THREAD::NEW-LISP-THREAD-TRAMPOLINE))
49: ((FLET SB-THREAD::WITH-MUTEX-THUNK :IN SB-THREAD::NEW-LISP-THREAD-TRAMPOLINE))
50: ((FLET "WITHOUT-INTERRUPTS-BODY-1" :IN SB-THREAD::CALL-WITH-MUTEX))
51: (SB-THREAD::CALL-WITH-MUTEX #<CLOSURE (FLET SB-THREAD::WITH-MUTEX-THUNK :IN SB-THREAD::NEW-LISP-THREAD-TRAMPOLINE) {5D6FBEB}> #<SB-THREAD:MUTEX "thread result lock" owner: #<SB-THREAD:THREAD "repl-thr..
52: (SB-THREAD::NEW-LISP-THREAD-TRAMPOLINE #<SB-THREAD:THREAD "repl-thread" RUNNING {1004268473}> NIL #<CLOSURE (LAMBDA NIL :IN SWANK-REPL::SPAWN-REPL-THREAD) {10042683FB}> NIL)
53: ("foreign function: #x438ADB")
54: ("foreign function: #x404D31")

@vajrabisj
Copy link
Author

i tried several ctl-c ctl-c, it seems running background? but still no response and output for long time...

@svetlyak40wt
Copy link
Member

Looking at the backtrace, I see that probably it hangs somewhere inside quicklisp client on opening the file. This is not looks like a problem related to the distribution itself.

Could you please check if this issue can be reproduced with newer non-Portacle SBCL, fresh ASDF and Quicklisp?

@vajrabisj
Copy link
Author

Let me try later. It could be quickload on my linux anyway.

btw, how can I use ros script to make reblocks server as systemd service? I tried but the package which is successfully started in sbcl cannot properly launched as systemd… do you have any sample? Thx.

@svetlyak40wt
Copy link
Member

Usually there is no problems running a binary. However if you are using Clack, it may try to quickload additional ASDF system to support Hunchentoot оr other webserver of your choice. To prevent this, you need to make you system depend on clack-handler-hunchentoot system. Most probable you are having this problem. The same problem might occur if you are using cl-dbi – it will try to download and install DB driver if it is not already loaded.

@vajrabisj
Copy link
Author

By reviewing some of your sample code I just got confused about certain methods, such as defroute vs defroutes, init-page vs session-init etc.
For example, what’s the way to define the root page “/“? Through defroute? or init-page? Or defroutes? If some clear comparison or examples would be seems much better…

@svetlyak40wt
Copy link
Member

svetlyak40wt commented Sep 6, 2023

DEFROUTES does not belong to REBLOCKS itself, it is a macro from a separate library REBLOCKS-NAVIGATION-WIDGET. It defines a widget which renders different subwidgets depending on URL's path.

INIT-PAGE is a generic function which was introduced after the I've created the REBLOCKS-NAVIGATION-WIDGET system. Theoretically, you can use it instead of DEFROUTES and just return different widget depending on URL-PATH.

DEFROUTE is a lowlevel interface for adding additional routes to the webserver under the Reblocks. For example, you can use it to add a handler to return robots.txt or some other static files. Or to add an API handler.

@svetlyak40wt
Copy link
Member

I think it is make sense to add this description to the documentation. Thank you for pointing to this issue.

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