[prev in list] [next in list] [prev in thread] [next in thread] 

List:       serdev
Subject:    Re: [sr-dev] http_async_client segfault
From:       Jason Penton <jason.penton () gmail ! com>
Date:       2016-05-30 9:28:32
Message-ID: CALoGXNViL9nsK_A52QAN4CnQCuwiPDFv79zzE1Gbicwb0OgRpw () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hey Daniel,

Yes it has something to do with pthreads and libnss. Something to do with
pthread library being linked by an .so and not linked by the main
application. I am trying to reproduce now and will report back.

Cheers
Jason

On Mon, 30 May 2016 at 11:08 Daniel-Constantin Mierla <miconda@gmail.com>
wrote:

> Hello,
> 
> this shows that one of the threads created by the module or by one of its
> dependency libs crashed. Not sure which lib creates the thread here,
> because the module depends on libevent and libcurl. It appears to be in the
> functions resolving the domain part of the http url.
> 
> Can you reproduce it?
> 
> Cheers,
> Daniel
> 
> On 30/05/16 09:35, Jason Penton wrote:
> 
> Hi,
> 
> Has anyone experienced segfault using http_async_query from
> http_async_client module? Here is BT:
> 
> #0  __GI_fgets_unlocked (buf=0x7fca23ffe660 "127.0.0.1", n=n@entry=1032,
> fp=0x7fca23ffe660) at iofgets_u.c:53
> 53      iofgets_u.c: No such file or directory.
> (gdb) bt
> #0  __GI_fgets_unlocked (buf=0x7fca23ffe660 "127.0.0.1", n=n@entry=1032,
> fp=0x7fca23ffe660) at iofgets_u.c:53
> #1  0x00007fca68f08afa in get_contents (stream=<optimized out>, len=1032,
> linebuf=0x7fca23ffe660 "127.0.0.1") at nss_files/files-XXX.c:201
> #2  internal_getent (result=0x7fca23ffe5c0, buffer=buffer@entry=0x7fca23ffe640
> "\177", buflen=buflen@entry=1064, errnop=errnop@entry=0x7fca23ffebb0,
> herrnop=herrnop@entry=0x7fca23ffec00, af=af@entry=0,
> flags=flags@entry=0) at nss_files/files-XXX.c:246
> #3  0x00007fca68f09ca3 in _nss_files_gethostbyname4_r \
> (name=name@entry=0x7fca2e790fa0 "localhost", pat=pat@entry=0x7fca23ffebe0, \
> buffer=buffer@entry=0x7fca23ffe640 "\177", buflen=buflen@entry=1064,
> errnop=errnop@entry=0x7fca23ffebb0, herrnop=herrnop@entry=0x7fca23ffec00,
> ttlp=ttlp@entry=0x0) at nss_files/files-hosts.c:402
> #4  0x00007fca79eb7757 in gaih_inet (name=<optimized out>, \
> name@entry=0x7fca2e790fa0 "localhost", service=<optimized out>, \
> req=req@entry=0x7fca341c7490, pai=pai@entry=0x7fca23ffed10,
> naddrs=naddrs@entry=0x7fca23ffed00) at
> ../sysdeps/posix/getaddrinfo.c:850
> #5  0x00007fca79ebae0d in __GI_getaddrinfo (name=0x7fca2e790fa0
> "localhost", service=0x7fca23ffeec0 "18000", hints=0x7fca341c7490,
> pai=0x7fca23ffee78) at ../sysdeps/posix/getaddrinfo.c:2406
> #6  0x00007fca6e0f80f4 in ?? () from
> /usr/lib/x86_64-linux-gnu/libcurl.so.4
> #7  0x00007fca6e104fa4 in ?? () from
> /usr/lib/x86_64-linux-gnu/libcurl.so.4
> #8  0x00007fca6e10284b in ?? () from
> /usr/lib/x86_64-linux-gnu/libcurl.so.4
> #9  0x00007fca723c9182 in start_thread (arg=0x7fca23fff700) at
> pthread_create.c:312
> #10 0x00007fca79ee547d in clone () at
> ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
> 
> Camille, are you maintaining this module now?
> 
> 
> 
> 
> 
> _______________________________________________
> sr-dev mailing listsr-dev@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
>  
> 
> --
> Daniel-Constantin Mierlahttp://www.asipto.com - \
> http://www.kamailio.orghttp://twitter.com/#!/miconda - \
> http://www.linkedin.com/in/miconda 
> _______________________________________________
> sr-dev mailing list
> sr-dev@lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
> 


[Attachment #5 (text/html)]

<div dir="ltr">Hey Daniel,<div><br></div><div>Yes it has something to do with \
pthreads and libnss. Something to do with pthread library being linked by an .so and \
not linked by the main application. I am trying to reproduce now and will report \
back.</div><div><br></div><div>Cheers</div><div>Jason</div></div><br><div \
class="gmail_quote"><div dir="ltr">On Mon, 30 May 2016 at 11:08 Daniel-Constantin \
Mierla &lt;<a href="mailto:miconda@gmail.com">miconda@gmail.com</a>&gt; \
wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 \
.8ex;border-left:1px #ccc solid;padding-left:1ex">  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <p>Hello,</p>
    <p>this shows that one of the threads created by the module or by
      one of its dependency libs crashed. Not sure which lib creates the
      thread here, because the module depends on libevent and libcurl.
      It appears to be in the functions resolving the domain part of the
      http url.</p>
    <p>Can you reproduce it?</p>
    <p>Cheers,<br>
      Daniel<br>
    </p></div><div bgcolor="#FFFFFF" text="#000000">
    <br>
    <div>On 30/05/16 09:35, Jason Penton wrote:<br>
    </div>
    </div><div bgcolor="#FFFFFF" text="#000000"><blockquote type="cite">
      <div dir="ltr">Hi,
        <div><br>
        </div>
        <div>Has anyone experienced segfault using http_async_query from
          http_async_client module? Here is BT:</div>
        <div><br>
        </div>
        <div><span style="font-family:monospace">#0   __GI_fgets_unlocked
            (buf=0x7fca23ffe660 &quot;127.0.0.1&quot;, n=n@entry=1032,
            fp=0x7fca23ffe660) at iofgets_u.c:53
            <br>
            53           iofgets_u.c: No such file or directory.
            <br>
            (gdb) bt
            <br>
            #0   __GI_fgets_unlocked (buf=0x7fca23ffe660 &quot;127.0.0.1&quot;,
            n=n@entry=1032, fp=0x7fca23ffe660) at iofgets_u.c:53
            <br>
            #1   0x00007fca68f08afa in get_contents (stream=&lt;optimized
            out&gt;, len=1032, linebuf=0x7fca23ffe660 &quot;127.0.0.1&quot;) at
            nss_files/files-XXX.c:201
            <br>
            #2   internal_getent (result=0x7fca23ffe5c0,
            buffer=buffer@entry=0x7fca23ffe640 &quot;\177&quot;,
            buflen=buflen@entry=1064,
            errnop=errnop@entry=0x7fca23ffebb0,
            herrnop=herrnop@entry=0x7fca23ffec00, af=af@entry=0,
            <br>
                  flags=flags@entry=0) at nss_files/files-XXX.c:246
            <br>
            #3   0x00007fca68f09ca3 in _nss_files_gethostbyname4_r
            (name=name@entry=0x7fca2e790fa0 &quot;localhost&quot;,
            pat=pat@entry=0x7fca23ffebe0,
            buffer=buffer@entry=0x7fca23ffe640 &quot;\177&quot;,
            buflen=buflen@entry=1064,
            <br>
                  errnop=errnop@entry=0x7fca23ffebb0,
            herrnop=herrnop@entry=0x7fca23ffec00, ttlp=ttlp@entry=0x0)
            at nss_files/files-hosts.c:402
            <br>
            #4   0x00007fca79eb7757 in gaih_inet (name=&lt;optimized
            out&gt;, name@entry=0x7fca2e790fa0 &quot;localhost&quot;,
            service=&lt;optimized out&gt;, req=req@entry=0x7fca341c7490,
            pai=pai@entry=0x7fca23ffed10,
            <br>
                  naddrs=naddrs@entry=0x7fca23ffed00) at
            ../sysdeps/posix/getaddrinfo.c:850
            <br>
            #5   0x00007fca79ebae0d in __GI_getaddrinfo
            (name=0x7fca2e790fa0 &quot;localhost&quot;, service=0x7fca23ffeec0
            &quot;18000&quot;, hints=0x7fca341c7490, pai=0x7fca23ffee78) at
            ../sysdeps/posix/getaddrinfo.c:2406
            <br>
            #6   0x00007fca6e0f80f4 in ?? () from
            /usr/lib/x86_64-linux-gnu/libcurl.so.4
            <br>
            #7   0x00007fca6e104fa4 in ?? () from
            /usr/lib/x86_64-linux-gnu/libcurl.so.4
            <br>
            #8   0x00007fca6e10284b in ?? () from
            /usr/lib/x86_64-linux-gnu/libcurl.so.4
            <br>
            #9   0x00007fca723c9182 in start_thread (arg=0x7fca23fff700)
            at pthread_create.c:312
            <br>
            #10 0x00007fca79ee547d in clone () at
            ../sysdeps/unix/sysv/linux/x86_64/clone.S:111</span></div>
        <div><span style="font-family:monospace"><br>
          </span></div>
        <div>Camille, are you maintaining this module now?  <span \
style="font-family:monospace"><br>  <br>
          </span></div>
        <div><br>
        </div>
        <div><br>
        </div>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      </blockquote></div><div bgcolor="#FFFFFF" text="#000000"><blockquote \
type="cite"><pre>_______________________________________________ sr-dev mailing list
<a href="mailto:sr-dev@lists.sip-router.org" \
target="_blank">sr-dev@lists.sip-router.org</a> <a \
href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev" \
target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</a> \
</pre>  </blockquote>
    <br>
    <pre cols="72">-- 
Daniel-Constantin Mierla
<a href="http://www.asipto.com" target="_blank">http://www.asipto.com</a> - <a \
href="http://www.kamailio.org" target="_blank">http://www.kamailio.org</a> <a \
href="http://twitter.com/#!/miconda" \
target="_blank">http://twitter.com/#!/miconda</a> - <a \
href="http://www.linkedin.com/in/miconda" \
target="_blank">http://www.linkedin.com/in/miconda</a></pre>  </div>

_______________________________________________<br>
sr-dev mailing list<br>
<a href="mailto:sr-dev@lists.sip-router.org" \
target="_blank">sr-dev@lists.sip-router.org</a><br> <a \
href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev" rel="noreferrer" \
target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</a><br> \
</blockquote></div>



_______________________________________________
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic