Greetings,
I'll start off with a caveat: I'm new to Gambit and add-ons such as Black Hole, but have been exploring and having a good time so far.
One of the modules I would like to make use of is net/http-client, so that I can use Gambit-C to fetch data from CouchDB. I believe I have everything installed OK, but I receive immediate deadlock errors when attempting to make a request. (Any request, URL doesn't matter.)
I have appended the request, error and stack dump below; please let me know if I'm doing something wrong, or have stumbled onto a bug.
Thanks, Tim
(http-get-url "http://localhost:5000/")
*** ERROR IN ##thread-deadlock-action! -- Deadlock detected 1> ,bed 0 ##thread-deadlock-action! (current-exception-handler) = primordial-exception-handler (current-input-port) = '#<input-port #9 (stdin)> (current-output-port) = '#<output-port #10 (stdout)> (current-directory) = "/home/tim/prog/scheme/" 1 ##mutex-lock-out-of-line! (current-exception-handler) = primordial-exception-handler (current-input-port) = '#<input-port #9 (stdin)> (current-output-port) = '#<output-port #10 (stdout)> (current-directory) = "/home/tim/prog/scheme/" 2 call-with-output-u8vector (current-exception-handler) = primordial-exception-handler (current-input-port) = '#<input-port #9 (stdin)> (current-output-port) = '#<output-port #10 (stdout)> (current-directory) = "/home/tim/prog/scheme/" 3 http-client#http-access-url "../../dl/Scheme/Gambit/Blackhole/blackhole/std/net/http-client.scm"@1005:1 12#headers = '() 11#response-headers = #f 10#response-code = #f 9#mtx = '#<mutex #12> 8#up = '#<output-port #13 (u8vector)> 1#method = 'get 2#uri = "http://localhost:5000/" 3#http-username = #f 4#http-password = #f 5#headers = '() 6#follow = #t 7#query = #f (current-exception-handler) = primordial-exception-handler (current-input-port) = '#<input-port #9 (stdin)> (current-output-port) = '#<output-port #10 (stdout)> (current-directory) = "/home/tim/prog/scheme/" 4 (interaction) "(generated)"@1:1 (http-client#http-get-url... (current-exception-handler) = primordial-exception-handler (current-input-port) = '#<input-port #9 (stdin)> (current-output-port) = '#<output-port #10 (stdout)> (current-directory) = "/home/tim/prog/scheme/"
Afficher les réponses par date
On 2010-11-30, at 11:59 AM, Tim Lavoie wrote:
Greetings,
I'll start off with a caveat: I'm new to Gambit and add-ons such as Black Hole, but have been exploring and having a good time so far.
One of the modules I would like to make use of is net/http-client, so that I can use Gambit-C to fetch data from CouchDB. I believe I have everything installed OK, but I receive immediate deadlock errors when attempting to make a request. (Any request, URL doesn't matter.)
I have appended the request, error and stack dump below; please let me know if I'm doing something wrong, or have stumbled onto a bug.
Thanks, Tim
It is hard for me to analyze this problem with so little information. Deadlock problems are often hard to debug because they are caused by a combination of factors.
Is this a multithreaded program? Are you trying to contact the server from the same Scheme thread? Are the client and the server in the same OS process?
From your backtrace it seems that the current-thread is trying to lock a mutex that is already locked (perhaps by the same thread), and no other thread is currently executable. Please check your program logic.
Marc
Marc Feeley feeley@iro.umontreal.ca wrote:
It is hard for me to analyze this problem with so little information. Deadlock problems are often hard to debug because they are caused by a combination of factors.
Is this a multithreaded program? Are you trying to contact the server from the same Scheme thread? Are the client and the server in the same OS process?
From your backtrace it seems that the current-thread is trying to lock a mutex that is already locked (perhaps by the same thread), and no other thread is currently executable. Please check your program logic.
Hi Marc, thanks for the reply, and sorry for not adding more detail.
Rather than trying anything fancy, I was actually just noodling around in the bsc REPL, e.g.:
(import (std net/http-client)) (http-get-url "http://localhost:5000/")
Gambit version is 4.6.0, with blackhole-libs downloaded on October 24th. The system is Linux 2.6.32, running on a single-core AMD64 (686 kernel though, 32-bit mode).
Tim
The problem is inherent to that version of http client, has nothing to do with Gambit. Attaching an update.
2010/12/1 Marc Feeley feeley@iro.umontreal.ca
On 2010-11-30, at 11:59 AM, Tim Lavoie wrote:
Greetings,
I'll start off with a caveat: I'm new to Gambit and add-ons such as Black Hole, but have been exploring and having a good time so far.
One of the modules I would like to make use of is net/http-client, so that I can use Gambit-C to fetch data from CouchDB. I believe I have everything installed OK, but I receive immediate deadlock errors when attempting to make a request. (Any request, URL doesn't matter.)
I have appended the request, error and stack dump below; please let me know if I'm doing something wrong, or have stumbled onto a bug.
Thanks, Tim
It is hard for me to analyze this problem with so little information. Deadlock problems are often hard to debug because they are caused by a combination of factors.
Is this a multithreaded program? Are you trying to contact the server from the same Scheme thread? Are the client and the server in the same OS process?
From your backtrace it seems that the current-thread is trying to lock a
mutex that is already locked (perhaps by the same thread), and no other thread is currently executable. Please check your program logic.
Marc
Gambit-list mailing list Gambit-list@iro.umontreal.ca https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
2010/12/1 Bradley Lucier lucier@math.purdue.edu
On Wed, 2010-12-01 at 10:00 -0600, Tim Lavoie wrote:
By the way, is there a better place to discuss anything which isn't really core Gambit material?
Discuss it here, there isn't that much traffic ;-).
Brad
mmm yes, and is an interesting topic! :)
by the way, I can't see any attached file, is it just me?
Álvaro
Gambit-list mailing list Gambit-list@iro.umontreal.ca https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
Attached informal patch to sack (one is not supposed to use (std net/http-client) afaik). Up to per to include what's good of it in sack's repo, maybe he did already.
2010/12/2 Adrien Piérard pierarda@iro.umontreal.ca
by the way, I can't see any attached file, is it just me?
The dreaded curse of the "see attached document" without any attached document :)
P!
-- Français, English, 日本語, 한국어 _______________________________________________ Gambit-list mailing list Gambit-list@iro.umontreal.ca https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list