curl-library
Re: A couple of handles stuck in WAITDO state?
Date: Fri, 11 Jun 2010 18:21:10 -0700
On Fri, Jun 11, 2010 at 10:31:38AM -0700, johansen_at_opensolaris.org wrote:
> I couldn't figure out why writechannel_inuse would be left as TRUE,
> either. I wondered if addHandleToSendOrPendPipeline() should check if
> the added handle gets moved to the head of the pipeline, like
> checkPendPipeline() does, but I still can't imagine how a connection
> might leave the pipeline and have writechannel_inuse remain TRUE.
> I'll provide more details as soon as I have them.
I have more details, but not as much insight as I was hoping for.
Last time I caught a process doing this, it looks like one handle was
just inserted into the multi object, and the others are waiting in
WAITDO:
> 81486f4::list struct Curl_one_easy next | ::print struct Curl_one_easy
{
next = 0x32d37e88
prev = 0x32d37888
easy_handle = 0
easy_conn = 0
state = 0 (CURLM_STATE_INIT)
result = 0 (CURLE_OK)
msg = 0
msg_num = 0
sockets = [ 0, 0, 0, 0, 0 ]
numsocks = 0
}
{
next = 0x818d308
prev = 0x81486f4
easy_handle = 0x8cc0008
easy_conn = 0x2f66a808
state = 6 (CURLM_STATE_WAITDO)
result = 0 (CURLE_OK)
msg = 0
msg_num = 0
sockets = [ 0, 0, 0, 0, 0 ]
numsocks = 0
}
{
next = 0x818d488
prev = 0x32d37e88
easy_handle = 0x8cb7008
easy_conn = 0x2f66a808
state = 6 (CURLM_STATE_WAITDO)
result = 0 (CURLE_OK)
msg = 0
msg_num = 0
sockets = [ 0, 0, 0, 0, 0 ]
numsocks = 0
}
<...>
> 0x2f66a808::print struct connectdata writechannel_inuse send_pipe
writechannel_inuse = 0x1
send_pipe = 0x8c8e450
> 0x8c8e450::print struct curl_llist head
head = 0x32bf8838
> 0x32bf8838::print struct curl_llist_element ptr
ptr = 0x8cc0008
According to this output anyway, the writechannel is inuse, but the head
of the send_pipe is 0x8cc0008, the very first guy in our list to be in
the CURLM_STATE_WAITDO state.
It's still not obvious to me how writechannel_inuse might have been left
as true. I've looked through the source, but nothing is jumping out at
me at the moment. I'm wondering if addHandleToSendOrPendPipeline()
should set writechannel_inuse to False, if the handle gets added to the
send_pipe and the head of the pipeline changes. I'm also curious if
it's safe to proceed if you're at the head of the send_pipe, but
writechannel_inuse is still true.
Thanks,
-j
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-06-12