Skip to content

[2.7] bpo-36421: Fix ref counting bugs in _ctypes.c's PyCArrayType_new() #12534

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

ZackerySpytz
Copy link
Contributor

@ZackerySpytz ZackerySpytz commented Mar 25, 2019

Add missing Py_DECREF()s.

https://bugs.python.org/issue36421

@serhiy-storchaka serhiy-storchaka added type-bug An unexpected behavior, bug, or error skip news labels Mar 25, 2019
@serhiy-storchaka serhiy-storchaka merged commit 0516f81 into python:2.7 Mar 25, 2019
@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot AMD64 Windows10 2.7 has failed when building commit 0516f81.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/96/builds/361) and take a look at the build logs.
  4. Check if the failure is related to this commit (0516f81) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/96/builds/361

Click to see traceback logs
From https://github.com/python/cpython
 * branch            2.7        -> FETCH_HEAD
 * [new tag]         v3.4.10    -> v3.4.10
 * [new tag]         v3.5.7     -> v3.5.7
Reset branch '2.7'

Could Not Find D:\buildarea\2.7.bolen-windows10\build\Lib\*.pyc
The system cannot find the file specified.

Berkeley DB 4.7.25: (May 15, 2008)
Test path prefix:  d:\temp\z-test_bsddb3-5204
Resource 'ipv6.google.com' is not available
    a DOS box should flash briefly ...
D:\buildarea\2.7.bolen-windows10\build\lib\shutil.py:78: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
  os.path.normcase(os.path.abspath(dst)))
D:\buildarea\2.7.bolen-windows10\build\lib\threading.py:846: DeprecationWarning: sys.exc_clear() not supported in 3.x; use except clauses
  self.__exc_clear()
D:\buildarea\2.7.bolen-windows10\build\lib\distutils\msvc9compiler.py:120: DeprecationWarning: decoding Unicode is not supported in 3.x
  s = dec("mbcs")
can't invoke "event" command:  application has been destroyed
    while executing
"event generate $w <<ThemeChanged>>"
    (procedure "ttk::ThemeChanged" line 6)
    invoked from within
"ttk::ThemeChanged"
can't invoke "event" command:  application has been destroyed
    while executing
"event generate $w <<ThemeChanged>>"
    (procedure "ttk::ThemeChanged" line 6)
    invoked from within
"ttk::ThemeChanged"
D:\buildarea\2.7.bolen-windows10\build\lib\multiprocessing\pool.py:117: DeprecationWarning: can't pickle function objects
  put((job, i, result))
D:\buildarea\2.7.bolen-windows10\build\lib\multiprocessing\pool.py:117: DeprecationWarning: can't pickle function objects
  put((job, i, result))
'python2.4' is not recognized as an internal or external command,
operable program or batch file.
'python2.5' is not recognized as an internal or external command,
operable program or batch file.
'python2.6' is not recognized as an internal or external command,
operable program or batch file.
'python2.7' is not recognized as an internal or external command,
operable program or batch file.
Resource 'http://www.pythontest.net' is not available
Resource 'http://www.pythontest.net/index.html#frag' is not available
test test_urllib2net failed -- multiple errors occurred; run in verbose mode for details
test test_urllib2net failed -- multiple errors occurred

@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot AMD64 Ubuntu Shared 2.7 has failed when building commit 0516f81.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/139/builds/238) and take a look at the build logs.
  4. Check if the failure is related to this commit (0516f81) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/139/builds/238

Click to see traceback logs
Traceback (most recent call last):
  File "/srv/buildbot/buildarea/2.7.bolen-ubuntu/build/Lib/test/test_urllib2net.py", line 174, in test_fileno
    res = opener.open(req)
  File "/srv/buildbot/buildarea/2.7.bolen-ubuntu/build/Lib/urllib2.py", line 429, in open
    response = self._open(req, data)
  File "/srv/buildbot/buildarea/2.7.bolen-ubuntu/build/Lib/urllib2.py", line 447, in _open
    '_open', req)
  File "/srv/buildbot/buildarea/2.7.bolen-ubuntu/build/Lib/urllib2.py", line 407, in _call_chain
    result = func(*args)
  File "/srv/buildbot/buildarea/2.7.bolen-ubuntu/build/Lib/urllib2.py", line 1228, in http_open
    return self.do_open(httplib.HTTPConnection, req)
  File "/srv/buildbot/buildarea/2.7.bolen-ubuntu/build/Lib/urllib2.py", line 1198, in do_open
    raise URLError(err)
URLError: <urlopen error [Errno 110] Connection timed out>

======================================================================
ERROR: test_ftp (test.test_urllib2net.OtherNetworkTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/srv/buildbot/buildarea/2.7.bolen-ubuntu/build/Lib/test/test_urllib2net.py", line 117, in test_ftp
    self._test_urls(urls, self._extra_handlers())
  File "/srv/buildbot/buildarea/2.7.bolen-ubuntu/build/Lib/test/test_urllib2net.py", line 223, in _test_urls
    f = urlopen(url, req, TIMEOUT)
  File "/srv/buildbot/buildarea/2.7.bolen-ubuntu/build/Lib/test/test_urllib2net.py", line 25, in wrapped
    return _retry_thrice(func, exc, *args, **kwargs)
  File "/srv/buildbot/buildarea/2.7.bolen-ubuntu/build/Lib/test/test_urllib2net.py", line 16, in _retry_thrice
    return func(*args, **kwargs)
  File "/srv/buildbot/buildarea/2.7.bolen-ubuntu/build/Lib/urllib2.py", line 429, in open
    response = self._open(req, data)
  File "/srv/buildbot/buildarea/2.7.bolen-ubuntu/build/Lib/urllib2.py", line 447, in _open
    '_open', req)
  File "/srv/buildbot/buildarea/2.7.bolen-ubuntu/build/Lib/urllib2.py", line 407, in _call_chain
    result = func(*args)
  File "/srv/buildbot/buildarea/2.7.bolen-ubuntu/build/Lib/urllib2.py", line 1420, in ftp_open
    fp, retrlen = fw.retrfile(file, type)
  File "/srv/buildbot/buildarea/2.7.bolen-ubuntu/build/Lib/urllib.py", line 897, in retrfile
    self.ftp.voidcmd(cmd)
  File "/srv/buildbot/buildarea/2.7.bolen-ubuntu/build/Lib/ftplib.py", line 255, in voidcmd
    self.putcmd(cmd)
  File "/srv/buildbot/buildarea/2.7.bolen-ubuntu/build/Lib/ftplib.py", line 183, in putcmd
    self.putline(line)
  File "/srv/buildbot/buildarea/2.7.bolen-ubuntu/build/Lib/ftplib.py", line 178, in putline
    self.sock.sendall(line)
AttributeError: 'NoneType' object has no attribute 'sendall'

======================================================================
ERROR: test_ftp_basic (test.test_urllib2net.TimeoutTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/srv/buildbot/buildarea/2.7.bolen-ubuntu/build/Lib/test/test_urllib2net.py", line 300, in test_ftp_basic
    u = _urlopen_with_retry(self.FTP_HOST)
  File "/srv/buildbot/buildarea/2.7.bolen-ubuntu/build/Lib/test/test_urllib2net.py", line 25, in wrapped
    return _retry_thrice(func, exc, *args, **kwargs)
  File "/srv/buildbot/buildarea/2.7.bolen-ubuntu/build/Lib/test/test_urllib2net.py", line 21, in _retry_thrice
    raise last_exc
URLError: <urlopen error ftp error: [Errno 111] Connection refused>

======================================================================
ERROR: test_ftp_default_timeout (test.test_urllib2net.TimeoutTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/srv/buildbot/buildarea/2.7.bolen-ubuntu/build/Lib/test/test_urllib2net.py", line 309, in test_ftp_default_timeout
    u = _urlopen_with_retry(self.FTP_HOST)


Traceback (most recent call last):
  File "/srv/buildbot/buildarea/2.7.bolen-ubuntu/build/Lib/test/test_urllib2net.py", line 320, in test_ftp_no_timeout
    u = _urlopen_with_retry(self.FTP_HOST, timeout=None)
  File "/srv/buildbot/buildarea/2.7.bolen-ubuntu/build/Lib/test/test_urllib2net.py", line 25, in wrapped
    return _retry_thrice(func, exc, *args, **kwargs)
  File "/srv/buildbot/buildarea/2.7.bolen-ubuntu/build/Lib/test/test_urllib2net.py", line 21, in _retry_thrice
    raise last_exc
URLError: <urlopen error ftp error: [Errno 111] Connection refused>

======================================================================
ERROR: test_ftp_timeout (test.test_urllib2net.TimeoutTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/srv/buildbot/buildarea/2.7.bolen-ubuntu/build/Lib/test/test_urllib2net.py", line 328, in test_ftp_timeout
    u = _urlopen_with_retry(self.FTP_HOST, timeout=60)
  File "/srv/buildbot/buildarea/2.7.bolen-ubuntu/build/Lib/test/test_urllib2net.py", line 25, in wrapped
    return _retry_thrice(func, exc, *args, **kwargs)
  File "/srv/buildbot/buildarea/2.7.bolen-ubuntu/build/Lib/test/test_urllib2net.py", line 21, in _retry_thrice
    raise last_exc
URLError: <urlopen error ftp error: [Errno 111] Connection refused>

----------------------------------------------------------------------
Ran 15 tests in 371.442s

FAILED (errors=6, skipped=2)

@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot x86 Windows XP 2.7 has failed when building commit 0516f81.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/45/builds/376) and take a look at the build logs.
  4. Check if the failure is related to this commit (0516f81) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/45/builds/376

Click to see traceback logs
From https://github.com/python/cpython
 * branch            2.7        -> FETCH_HEAD
 * [new tag]         v3.4.10    -> v3.4.10
 * [new tag]         v3.5.7     -> v3.5.7
Reset branch '2.7'

Could Not Find d:\cygwin\home\db3l\buildarea\2.7.bolen-windows\build\Lib\*.pyc
The system cannot find the file specified.
'powershell.exe' is not recognized as an internal or external command,
operable program or batch file.
'py' is not recognized as an internal or external command,
operable program or batch file.
'"d:\cygwin\home\db3l\buildarea\2.7.bolen-windows\build\PCbuild\\..\externals\nuget.exe"' is not recognized as an internal or external command,
operable program or batch file.

can't invoke "event" command:  application has been destroyed
    while executing
"event generate $w <<ThemeChanged>>"
    (procedure "ttk::ThemeChanged" line 6)
    invoked from within
"ttk::ThemeChanged"
can't invoke "event" command:  application has been destroyed
    while executing
"event generate $w <<ThemeChanged>>"
    (procedure "ttk::ThemeChanged" line 6)
    invoked from within
"ttk::ThemeChanged"
'python2.4' is not recognized as an internal or external command,
operable program or batch file.
'python2.5' is not recognized as an internal or external command,
operable program or batch file.
'python2.6' is not recognized as an internal or external command,
operable program or batch file.
'python2.7' is not recognized as an internal or external command,
operable program or batch file.
    a DOS box should flash briefly ...
Resource 'http://www.pythontest.net/' is not available
d:\cygwin\home\db3l\buildarea\2.7.bolen-windows\build\lib\shutil.py:78: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
  os.path.normcase(os.path.abspath(dst)))
test test_urllibnet failed -- multiple errors occurred; run in verbose mode for details
Resource 'self-signed.pythontest.net' is not available
Resource 'self-signed.pythontest.net' is not available
Resource 'self-signed.pythontest.net' is not available
Resource 'self-signed.pythontest.net' is not available
Resource 'self-signed.pythontest.net' is not available
Resource 'self-signed.pythontest.net' is not available
Resource 'self-signed.pythontest.net' is not available
test test_ssl failed -- Traceback (most recent call last):
  File "d:\cygwin\home\db3l\buildarea\2.7.bolen-windows\build\lib\test\test_ssl.py", line 1403, in test_connect_ex
    self.assertEqual(0, s.connect_ex((REMOTE_HOST, 443)))
AssertionError: 0 != 10060
Resource 'self-signed.pythontest.net' is not available
Resource 'self-signed.pythontest.net' is not available
Resource 'self-signed.pythontest.net' is not available
d:\cygwin\home\db3l\buildarea\2.7.bolen-windows\build\lib\distutils\msvc9compiler.py:120: DeprecationWarning: decoding Unicode is not supported in 3.x
  s = dec("mbcs")
d:\cygwin\home\db3l\buildarea\2.7.bolen-windows\build\lib\threading.py:846: DeprecationWarning: sys.exc_clear() not supported in 3.x; use except clauses
  self.__exc_clear()
Resource 'http://www.pythontest.net' is not available
test test_urllib2net failed -- multiple errors occurred; run in verbose mode for details
d:\cygwin\home\db3l\buildarea\2.7.bolen-windows\build\lib\multiprocessing\pool.py:117: DeprecationWarning: can't pickle function objects
  put((job, i, result))
d:\cygwin\home\db3l\buildarea\2.7.bolen-windows\build\lib\multiprocessing\pool.py:117: DeprecationWarning: can't pickle function objects
  put((job, i, result))
test test_urllib2net failed -- multiple errors occurred

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip news type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants