cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Question about Content-type: multipart

From: Waitman Gobble <gobble.wa_at_gmail.com>
Date: Mon, 7 Mar 2016 07:28:03 -0800

On Mon, Mar 7, 2016 at 7:17 AM, Waitman Gobble <gobble.wa_at_gmail.com> wrote:
> On Mon, Mar 7, 2016 at 6:59 AM, Waitman Gobble <gobble.wa_at_gmail.com> wrote:
>> On Mon, Mar 7, 2016 at 1:54 AM, Daniel Stenberg <daniel_at_haxx.se> wrote:
>>> On Mon, 7 Mar 2016, Waitman Gobble wrote:
>>>
>>>> I'm still seeing it hang, tomorrow I'll attach to debugger and see what is
>>>> sticking.
>>>
>>>
>>> If you show us a full program that reproduces the hang we might be able to
>>> tell you why.
>>>
>>>
>>> --
>>>
>>> / daniel.haxx.se
>>> -------------------------------------------------------------------
>>> List admin: https://cool.haxx.se/list/listinfo/curl-library
>>> Etiquette: https://curl.haxx.se/mail/etiquette.html
>>
>> OK, how about this.
>>
>> http://git.cloudqx.com/root/test-curl
>>
>> --
>> Waitman Gobble
>> Los Altos California USA
>> 650-900-8557
>
>
>
>
>
> At the moment it appears to be stuck in curl_multi_wait() in lib/multi.c
>
>
>
>
> # gdb testcurl
> GNU gdb 6.1.1 [FreeBSD]
> Copyright 2004 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you are
> welcome to change it and/or distribute copies of it under certain conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB. Type "show warranty" for details.
> This GDB was configured as "amd64-marcel-freebsd"...
> (gdb) run
> Starting program: /b/build/test-ex/testcurl
> [New LWP 100141]
> check len: 134610 post size: 134610 post length: 172
> before perform
> [New Thread 802c06400 (LWP 100141/testcurl)]
> ^C
> Program received signal SIGINT, Interrupt.
> [Switching to Thread 802c06400 (LWP 100141/testcurl)]
> 0x0000000801468e6a in _poll () from /lib/libc.so.7
> (gdb) bt
> #0 0x0000000801468e6a in _poll () from /lib/libc.so.7
> #1 0x0000000802417d26 in pthread_suspend_all_np () from /lib/libthr.so.3
> #2 0x00000008008554bb in Curl_poll () from /b/build/curl/distlib/libcurl.so.4
> #3 0x00000008008515ec in curl_multi_wait () from
> /b/build/curl/distlib/libcurl.so.4
> #4 0x000000080084bcf8 in curl_easy_perform () from
> /b/build/curl/distlib/libcurl.so.4
> #5 0x000000000040167a in main () at testcurl.cpp:51
> (gdb) step
> Single stepping until exit from function _poll,
> which has no line number information.
> 0x00000008014d470c in memcpy () from /lib/libc.so.7
> (gdb) step
> Single stepping until exit from function memcpy,
> which has no line number information.
> ^C
> Program received signal SIGINT, Interrupt.
> 0x0000000801468e6a in _poll () from /lib/libc.so.7
> (gdb) step
> Single stepping until exit from function _poll,
> which has no line number information.
> 0x00000008014d470c in memcpy () from /lib/libc.so.7
> (gdb) step
> Single stepping until exit from function memcpy,
> which has no line number information.
>
>
>
>
>
> --
> Waitman Gobble
> Los Altos California USA
> 650-900-8557

Doesn't hang on Debian GNU/Linux. SO It could be related to FreeBSD,
or it could be something that cropped in curl updates? Older version
of curl on Debian.

# uname -a
Linux ujsf.cloudqx.com 3.16.0-4-amd64 #1 SMP Debian
3.16.7-ckt11-1+deb8u5 (2015-10-09) x86_64 GNU/Linux

# dpkg-query -l | grep curl
ii curl 7.38.0-4+deb8u3 amd64
     command line tool for transferring data with URL syntax
ii libcurl3:amd64 7.38.0-4+deb8u3 amd64
     easy-to-use client-side URL transfer library (OpenSSL flavour)
ii libcurl3-gnutls:amd64 7.38.0-4+deb8u3 amd64
     easy-to-use client-side URL transfer library (GnuTLS flavour)
ii libcurl4-openssl-dev:amd64 7.38.0-4+deb8u3 amd64
     development files and documentation for libcurl (OpenSSL flavour)

# ./testcurl
check len: 134610 post size: 134610 post length: 172
before perform
HTTP/1.1 200 OK
Strict-Transport-Security: max-age=63072000; includeSubdomains
X-Powered-By: PHP/7.0.3
Content-type: text/html; charset=UTF-8
Transfer-Encoding: chunked
Date: Mon, 07 Mar 2016 15:20:02 GMT
Server: Syntax error on line 110

<pre>Array
(
)
</pre><hr /><pre>Array
(
    [TEMP] => /tmp
    [TMPDIR] => /tmp
    [TMP] => /tmp
    [PATH] => /usr/local/bin:/usr/bin:/bin
    [HOSTNAME] =>
    [USER] => nobody
    [HOME] => /nonexistent
    [HTTP_CONTENT_LENGTH] => 134610
    [CONTENT_TYPE] => multipart/form-data;
boundary=-----------------------------84927149120355803091994092429
    [HTTP_ACCEPT] => */*
    [HTTP_HOST] => hub.zilla.tech
    [HTTPS] => on
    [SERVER_PROTOCOL] => HTTP/1.1
    [REDIRECT_STATUS] => 200
    [REQUEST_METHOD] => POST
    [QUERY_STRING] =>
    [REQUEST_URI] => /filepost.php
    [DOCUMENT_ROOT] => /www/zilla/hubzilla
    [SCRIPT_FILENAME] => /www/zilla/hubzilla/filepost.php
    [PATH_INFO] =>
    [SCRIPT_NAME] => /filepost.php
    [CONTENT_LENGTH] => 134610
    [REMOTE_ADDR] => 107.170.216.117
    [REMOTE_PORT] => 34531
    [SERVER_ADDR] => 72.13.82.37
    [SERVER_PORT] => 443
    [GATEWAY_INTERFACE] => CGI/1.1
    [SERVER_NAME] => hub.zilla.tech
    [SERVER_SOFTWARE] => Syntax error on line 110
    [FCGI_ROLE] => RESPONDER
    [PHP_SELF] => /filepost.php
    [REQUEST_TIME_FLOAT] => 1457364002.6116
    [REQUEST_TIME] => 1457364002
    [argv] => Array
        (
        )

    [argc] => 0
)
</pre><pre>Array
(
)
</pre>finis
root_at_ujsf:~/test-curl#

the _FILES array is not populated, though.

-- 
Waitman Gobble
Los Altos California USA
650-900-8557
-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:  https://curl.haxx.se/mail/etiquette.html
Received on 2016-03-07