[Bug 1163609] Re: pycurl FTBFS due to segfault in test suite

Barry Warsaw 1163609 at bugs.launchpad.net
Wed Apr 3 15:02:38 UTC 2013


Reproducible with this simple C program:

#include <stdio.h>
#include <curl/multi.h>

int main()
{
   CURLM *handle = curl_multi_init();
   
   printf("handle: 0x%x\n", (unsigned int)handle);
   curl_multi_cleanup(handle);
   return 0;
}

gcc -g -o curltest curltest.c `curl-config --static-libs`

So this looks like it could be a bug in curl itself.

** Also affects: curl (Ubuntu)
   Importance: Undecided
       Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to pycurl in Ubuntu.
https://bugs.launchpad.net/bugs/1163609

Title:
  pycurl FTBFS due to segfault in test suite

Status in “curl” package in Ubuntu:
  New
Status in “pycurl” package in Ubuntu:
  Triaged
Status in “curl” source package in Raring:
  New
Status in “pycurl” source package in Raring:
  Triaged

Bug description:
  pycurl FTBFS in Raring:

  https://launchpadlibrarian.net/135742128/buildlog_ubuntu-raring-
  amd64.pycurl_7.19.0-5ubuntu6_FAILEDTOBUILD.txt.gz

  The problem is that the test suite runs test_internals.py, and this
  segfaults.  This is easily reproducible outside the build environment
  using the following code:

  $ python
  >>> from pycurl import CurlMulti
  >>> m = CurlMulti()
  >>> del m
  Segmentation fault (core dumped)

  Tracing through with gdb, the problem appears that calling
  curl_multi_cleanup() on a CURLM* previously returned by
  curl_multi_init() is what crashes.  The cleanup is called from
  util_multi_close() in pycurl.c via do_multi_dealloc() but afaict, the
  CURLM* handle is valid.  Or at least, it's unchanged from what
  curl_multi_init() returns.  The above code is taken directly from
  test_internals.py with the extraneous stuff boiled out.

  # remove an invalid but closed handle
  if 1:
      m = CurlMulti()
      c = Curl()
      c.close()
      m.remove_handle(c)
      del m, c

  'c' isn't needed to reproduce the crash.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/curl/+bug/1163609/+subscriptions




More information about the foundations-bugs mailing list