Comments (20)
Let me know if I can help test anything or if you need more information.
Thanks
from carrier.
Sorry, things are a bit crazy right now with work and family stuff. Will look into this as soon as I get the time =]
from carrier.
No worries, thanks for the update. Let me know. :)
from carrier.
Reproduced. Recently merged some PRs in cl-async/cl-libuv, I'm going to pull those down and see if it fixes it.
from carrier.
Great! Let me know ;)
Thanks again.
from carrier.
With the latest cl-libuv I get this (no longer explodes, but has a different error message now):
(as:with-event-loop ()
(asf:alet ((mine (carrier:request "https://www.apple.com/" :return-body t)))
(format t "~%mine: ~s~&" mine)))
<INFO> [23:58:10] carrier carrier.lisp (request) - request: "GET NIL HTTP/1.1^M
Host: www.apple.com^M
^M
"
<INFO> [23:58:30] carrier carrier.lisp (request) -
carrier error: #<TCP-EOF #<SOCKET {100E8C3723}> {100EA93CD3}>
<INFO> [23:58:30] carrier carrier.lisp (request) - c eof
There is no applicable method for the generic function
#<STANDARD-GENERIC-FUNCTION CL-ASYNC:SOCKET-CLOSED (1)>
when called with arguments
(NIL).
from carrier.
@nightshade427 Try it with latest cl-async master, this looks quite like one of errors I've fixed in orthecreedence/cl-async#106
from carrier.
Ok, actually fixed it as part of orthecreedence/cl-async#107 (not merged yet at the moment of writing). There was :int
vs :pointer
confusion in libssl cffi bindings that caused crashes on Linux x86_64 and probably other platforms.
from carrier.
Awesome, look forward to the merge. Will test once merged.
Thanks again :)
from carrier.
Merged, please give it a shot =]
from carrier.
Same, only slightly different it doesnt explode it just hangs:
This works:
(as:with-event-loop ()
(asf:alet ((result (carrier:request "http://www.apple.com/" :return-body t)))
(format t "result: ~s" result)))
This one hangs:
(as:with-event-loop ()
(asf:alet ((result (carrier:request "https://www.apple.com/" :return-body t)))
(format t "result: ~s" result)))
from carrier.
Try now, please. I'm no longer seeing problems on my end (linux x86_64, sbcl)
from carrier.
The above still hangs for me.
I'm using latest master of cl-async, cl-libuv, carrier.
sbcl --version
SBCL 1.2.6
uname -a
Linux localhost 3.17.2-x86_64-linode48 SMP Mon Nov 3 13:26:05 EST 2014 x86_64 x86_64 x86_64 GNU/Linux
Here is the error after it hangs for long time:
There is no applicable method for the generic function
#<STANDARD-GENERIC-FUNCTION CL-ASYNC:STREAMISH-CLOSED (1)>
when called with arguments
(NIL).
[Condition of type SIMPLE-ERROR]
Restarts:
0: [RETRY] Retry calling the generic function.
1: [ABORT-CALLBACK] Abort cl-async callback.
2: [*EXIT-EVENT-LOOP] Exit the current event loop
3: [RETRY] Retry SLIME REPL evaluation request.
4: [ABORT] Return to SLIME's top level.
5: [ABORT] Abort thread (#<THREAD "repl-thread" RUNNING {100ADE80B3}>)
Backtrace:
0: ((:METHOD NO-APPLICABLE-METHOD (T)) #<STANDARD-GENERIC-FUNCTION CL-ASYNC:STREAMISH-CLOSED (1$
1: (SB-PCL::CALL-NO-APPLICABLE-METHOD #<STANDARD-GENERIC-FUNCTION CL-ASYNC:STREAMISH-CLOSED (1)$
2: ((LAMBDA NIL :IN CARRIER:REQUEST))
3: ((LAMBDA (FAST-HTTP::DATA &KEY (FAST-HTTP::START 0) FAST-HTTP::END) :IN FAST-HTTP:MAKE-PARSE$
4: ((LAMBDA (CARRIER::EV) :IN CARRIER:REQUEST) #<CL-ASYNC:SOCKET-EOF {1013D5B543}>)
5: (CL-ASYNC::EVENT-HANDLER -4095 #<CLOSURE (LAMBDA (CARRIER::EV) :IN CARRIER:REQUEST) {1013C3D$
6: (CL-ASYNC-UTIL:RUN-EVENT-CB CL-ASYNC::EVENT-HANDLER -4095 #<CLOSURE (LAMBDA (CARRIER::EV) :I$
7: ((LAMBDA NIL :IN CL-ASYNC::STREAMISH-READ-CB))
8: (CL-ASYNC-UTIL:CALL-WITH-CALLBACK-RESTARTS #<CLOSURE (LAMBDA NIL :IN CL-ASYNC::STREAMISH-REA$
9: (CL-ASYNC::STREAMISH-READ-CB #.(SB-SYS:INT-SAP #X7FFFDC057E50) -4095 #<unavailable argument>$
10: ((LAMBDA (SB-ALIEN::ARGS-POINTER SB-ALIEN::RESULT-POINTER FUNCTION) :IN "/root/.cache/common$
11: ("foreign function: call_into_lisp")"
from carrier.
It doesnt appear to be carrier direct. Its when you load carrier and drakma-async together. I can repo with smallest setup from my project. Can you use the below and see if you have the same result I do. I use drakma-async to get cookie support util carrier can (#4) and use carrier for everything else because drakma-async has issues downloading large files. So I use the library I can for each use case.
This has the issue
(ql:quickload "carrier")
(ql:quickload "drakma-async")
(as:with-event-loop ()
(asf:alet ((result (carrier:request "https://www.apple.com/" :return-body t)))
(format t "result: ~s" result)))
This works
(ql:quickload "carrier")
(as:with-event-loop ()
(asf:alet ((result (carrier:request "https://www.apple.com/" :return-body t)))
(format t "result: ~s" result)))
from carrier.
drakma-async uses drakma which includes cl+ssl. cl-async is now using its own ssl implementation and i wonder if its butting heads with cl+ssl. that's my first guess. i'll try to look at this tonight if i get a chance...thanks for the test case.
from carrier.
Yeah no problem, sorry it took so long to narrow down the issue to something more easily reproducable.
Thanks! Let me know what you find out :)
from carrier.
Let me know if there is anything I can do to help :)
from carrier.
Hi Nick, sorry for the delay, been trying to improve the error reporting of cl-async to track this one down (see orthecreedence/cl-async#108). Looks like including cl+ssl with cl-async-ssl creates a memory fault in sbcl. Good catch! I am going to pick away at this today, although we're still doing some holiday stuff over here so I may not finish today.
from carrier.
I think this is fixed. Please pull cl-async (in fact, pull cl-libuv, carrier, and blackbird while you're at it, I want to make sure you're all up to date).
Note that the way this was fixed may cause problems when trying to use cl+ssl with cl-async-ssl loaded, but I haven't tested this and I'm not sure if there's a way to make the two play nicely.
from carrier.
I think this is fixed now. I will re-open if I encounter it again
from carrier.
Related Issues (19)
- When using chunked responses carrier returns only the first chunked response HOT 11
- ssl uri sometime work sometimes dont HOT 1
- errors with latest quicklisp HOT 5
- Unbound variable and function HOT 1
- Test against httpbin
- HTTP request returning nil HOT 4
- Parses urls incorrectly HOT 2
- Certain SSL sites don't work HOT 4
- Allow for streaming request body
- Doesnt handle query strings HOT 2
- Issue with `location` in response headers being a relative path
- Any reasons not to use this for AWS SDK? HOT 7
- Reusing SSL Context
- cookie support HOT 6
- Multiple issues when using latest quicklisp and carrier master
- Multiple issues when using latest quicklisp and carrier master HOT 11
- hangs when cannot connect HOT 13
- Can we add this project to quicklisp? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from carrier.