This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 996453 - yum crashes with 'TypeError: 'NoneType' object is not callable' when packages are not downloadable
yum crashes with 'TypeError: 'NoneType' object is not callable' when packages...
Status: CLOSED DUPLICATE of bug 751294
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: rhn-client-tools (Show other bugs)
5.10
Unspecified Unspecified
unspecified Severity high
: rc
: ---
Assigned To: Milan Zazrivec
Red Hat Satellite QA List
:
Depends On:
Blocks: 1049888
  Show dependency treegraph
 
Reported: 2013-08-13 04:08 EDT by Frantisek Reznicek
Modified: 2015-11-15 20:14 EST (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-12-17 06:41:49 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Frantisek Reznicek 2013-08-13 04:08:11 EDT
Description of problem:

This problem seems to be very close to bug 824663.
Creating separate defect as I'm not fine with bug 824663 resolution.

yum rarely crashes with following stack trace:

Loaded plugins: product-id, rhnplugin, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in ?
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 309, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 161, in main
    return exFatal(e)
  File "/usr/share/yum-cli/yummain.py", line 64, in exFatal
    logger.critical('\n\n%s', to_unicode(e))
  File "/usr/lib/python2.4/logging/__init__.py", line 1019, in critical
    apply(self._log, (CRITICAL, msg, args), kwargs)
  File "/usr/lib/python2.4/logging/__init__.py", line 1078, in _log
    record = self.makeRecord(self.name, level, fn, lno, msg, args, exc_info)
  File "/usr/lib/python2.4/logging/__init__.py", line 1064, in makeRecord
    return LogRecord(name, level, fn, lno, msg, args, exc_info)
  File "/usr/lib/python2.4/logging/__init__.py", line 226, in __init__
    if args and (len(args) == 1) and args[0] and (type(args[0]) == types.DictType):
TypeError: 'NoneType' object is not callable


Could you possibly check whether yum uses python logging proper way and if so reassign to python component please?


Version-Release number of selected component (if applicable):
yum-3.2.22-40.el5.noarch.rpm

How reproducible:
quite difficult on system with stable networking
quite rapid on system suffering networking problems

Steps to Reproduce:
1. any yum install operation
2. in the meantime block networking traffic with -j DROP eventually -j REJECT eventually -j REJECT --reject-with tcp-reset
3. repeat steps 1. + 2. in a loop

Actual results:
yum crashes.

Expected results:
yum should not crash.

Additional info:


[10:29:20] MRG Install started, phase I (install stable version from RHN): (TEST_PARAM_RHTS_TEST_MRG_INSTALL_RHN_STABLE_ENA:)
Loaded plugins: product-id, rhnplugin, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
This system is receiving updates from RHN Classic or RHN Satellite.
Setting up Group Process
Warning: Group Messaging Client Support does not exist.
Resolving Dependencies
--> Running transaction check
...
---> Package saslwrapper.i386 0:0.18-1.el5 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package         Arch   Version        Repository                          Size
================================================================================
Installing:
 condor          i386   7.8.8-0.4.1.el5
                                       rhel-i386-server-5-mrg-grid-2      3.7 M
 cumin           noarch 0.1.5675-1.el5 rhel-i386-server-5-mrg-grid-2      1.7 M
 mrg-release     noarch 2.3.0-2.el5    rhel-i386-server-5-mrg-grid-2      3.9 k
 qpid-cpp-client-devel
                 i386   0.18-17.el5_9  rhel-i386-server-5-mrg-messaging-2 447 k
 qpid-cpp-client-devel-docs
                 i386   0.18-17.el5_9  rhel-i386-server-5-mrg-messaging-2 1.1 M
 qpid-cpp-client-ssl
                 i386   0.18-17.el5_9  rhel-i386-server-5-mrg-messaging-2 139 k
 qpid-cpp-server-devel
                 i386   0.18-17.el5_9  rhel-i386-server-5-mrg-messaging-2  26 k
 qpid-cpp-server-ssl
                 i386   0.18-17.el5_9  rhel-i386-server-5-mrg-messaging-2  63 k
 qpid-cpp-server-store
                 i386   0.18-17.el5_9  rhel-i386-server-5-mrg-messaging-2 449 k
 qpid-cpp-server-xml
                 i386   0.18-17.el5_9  rhel-i386-server-5-mrg-messaging-2  68 k
 qpid-java-client
                 noarch 0.18-8.el5_9   rhel-i386-server-5-mrg-messaging-2 784 k
 qpid-java-common
                 noarch 0.18-8.el5_9   rhel-i386-server-5-mrg-messaging-2 2.2 M
 qpid-java-example
                 noarch 0.18-8.el5_9   rhel-i386-server-5-mrg-messaging-2  19 k
 qpid-jca        noarch 0.18-8.el5     rhel-i386-server-5-mrg-messaging-2 3.6 M
 qpid-jca-xarecovery
                 noarch 0.18-8.el5     rhel-i386-server-5-mrg-messaging-2  19 k
 rhm-docs        noarch 0.18-2.el5     rhel-i386-server-5-mrg-messaging-2 855 k
 sesame          i386   1.0-7.el5      rhel-i386-server-5-mrg-grid-2       48 k
Installing for dependencies:
 antlr           i386   2.7.6-4jpp.2   rhel-i386-server-5                 978 k
 condor-classads i386   7.8.8-0.4.1.el5
                                       rhel-i386-server-5-mrg-grid-execute-2
                                                                          321 k
 gjdoc           i386   0.7.7-12.el5   rhel-i386-server-5                 793 k
 java-1.4.2-gcj-compat
                 i386   1.4.2.0-40jpp.115
                                       rhel-i386-server-5                  29 k
 jpackage-utils  noarch 1.7.3-1jpp.3.el5
                                       rhel-i386-server-5                  61 k
 libgcj          i386   4.1.2-54.el5   rhel-i386-server-5                  16 M
 log4j           i386   1.2.13-3jpp.2  rhel-i386-server-5                 637 k
 perl-DateManip  noarch 5.44-1.2.1     rhel-i386-server-5                 143 k
 postgresql      i386   8.1.23-6.el5_8 rhel-i386-server-5                 2.9 M
 postgresql-server
                 i386   8.1.23-6.el5_8 rhel-i386-server-5                 3.8 M
 python-psycopg2 i386   2.0.14-3.el5   rhel-i386-server-5-mrg-messaging-2 108 k
 python-qpid     noarch 0.18-5.el5_9   rhel-i386-server-5-mrg-messaging-2 518 k
 python-qpid-qmf i386   0.18-18.el5_9  rhel-i386-server-5-mrg-messaging-2 608 k
 python-saslwrapper
                 i386   0.18-1.el5     rhel-i386-server-5-mrg-messaging-2  26 k
 python-suds     noarch 0.4.1-2.el5    rhel-i386-server-5                 251 k
 python-wallaby  noarch 0.16.3-1.el5   rhel-i386-server-5-mrg-management-2
                                                                           29 k
 qpid-cpp-client i386   0.18-17.el5_9  rhel-i386-server-5-mrg-messaging-2 1.4 M
 qpid-cpp-server i386   0.18-17.el5_9  rhel-i386-server-5-mrg-messaging-2 1.6 M
 qpid-qmf        i386   0.18-18.el5_9  rhel-i386-server-5-mrg-messaging-2 679 k
 saslwrapper     i386   0.18-1.el5     rhel-i386-server-5-mrg-messaging-2  21 k
 xerces-c        i386   2.8.0-1.el5    rhel-i386-server-5-mrg-messaging-2 1.4 M
 xerces-j2       i386   2.7.1-7jpp.2.el5_4.2
                                       rhel-i386-server-5                 2.7 M
 xml-commons     i386   1.3.02-0.b2.7jpp.10
                                       rhel-i386-server-5                  19 k
 xml-commons-apis
                 i386   1.3.02-0.b2.7jpp.10
                                       rhel-i386-server-5                 335 k
 xml-commons-resolver
                 i386   1.1-1jpp.12    rhel-i386-server-5                 148 k
 xqilla          i386   2.0.0-5.el5    rhel-i386-server-5-mrg-messaging-2 3.2 M

Transaction Summary
================================================================================
Install      43 Package(s)
Upgrade       0 Package(s)

Total download size: 54 M
Downloading Packages:


Error Downloading Packages:
  qpid-jca-0.18-8.el5.noarch: (104, 'Connection reset by peer')
  python-saslwrapper-0.18-1.el5.i386: (104, 'Connection reset by peer')
  xerces-c-2.8.0-1.el5.i386: (104, 'Connection reset by peer')
  java-1.4.2-gcj-compat-1.4.2.0-40jpp.115.i386: (104, 'Connection reset by peer')
  log4j-1.2.13-3jpp.2.i386: (104, 'Connection reset by peer')
  qpid-cpp-server-ssl-0.18-17.el5_9.i386: (104, 'Connection reset by peer')
  condor-classads-7.8.8-0.4.1.el5.i386: (104, 'Connection reset by peer')
  python-suds-0.4.1-2.el5.noarch: (104, 'Connection reset by peer')
  xerces-j2-2.7.1-7jpp.2.el5_4.2.i386: (104, 'Connection reset by peer')
  python-psycopg2-2.0.14-3.el5.i386: (104, 'Connection reset by peer')
  python-qpid-qmf-0.18-18.el5_9.i386: (104, 'Connection reset by peer')
  rhm-docs-0.18-2.el5.noarch: (104, 'Connection reset by peer')
  python-qpid-0.18-5.el5_9.noarch: (104, 'Connection reset by peer')
  gjdoc-0.7.7-12.el5.i386: (104, 'Connection reset by peer')
  python-wallaby-0.16.3-1.el5.noarch: (104, 'Connection reset by peer')
  qpid-cpp-client-devel-0.18-17.el5_9.i386: (104, 'Connection reset by peer')
  qpid-jca-xarecovery-0.18-8.el5.noarch: (104, 'Connection reset by peer')
  qpid-qmf-0.18-18.el5_9.i386: (104, 'Connection reset by peer')
  qpid-java-example-0.18-8.el5_9.noarch: (104, 'Connection reset by peer')
  qpid-cpp-server-0.18-17.el5_9.i386: (104, 'Connection reset by peer')
  xml-commons-apis-1.3.02-0.b2.7jpp.10.i386: (104, 'Connection reset by peer')
  sesame-1.0-7.el5.i386: (104, 'Connection reset by peer')
  xml-commons-1.3.02-0.b2.7jpp.10.i386: (104, 'Connection reset by peer')
  libgcj-4.1.2-54.el5.i386: (104, 'Connection reset by peer')
  jpackage-utils-1.7.3-1jpp.3.el5.noarch: (104, 'Connection reset by peer')
  qpid-cpp-server-devel-0.18-17.el5_9.i386: (104, 'Connection reset by peer')
  qpid-cpp-client-ssl-0.18-17.el5_9.i386: (104, 'Connection reset by peer')
  xqilla-2.0.0-5.el5.i386: (104, 'Connection reset by peer')
  saslwrapper-0.18-1.el5.i386: (104, 'Connection reset by peer')
  cumin-0.1.5675-1.el5.noarch: (104, 'Connection reset by peer')
  qpid-java-client-0.18-8.el5_9.noarch: (104, 'Connection reset by peer')
  antlr-2.7.6-4jpp.2.i386: (104, 'Connection reset by peer')
  qpid-cpp-server-xml-0.18-17.el5_9.i386: (104, 'Connection reset by peer')
  qpid-cpp-client-0.18-17.el5_9.i386: (104, 'Connection reset by peer')
  xml-commons-resolver-1.1-1jpp.12.i386: (104, 'Connection reset by peer')
  qpid-cpp-server-store-0.18-17.el5_9.i386: (104, 'Connection reset by peer')
  qpid-cpp-client-devel-docs-0.18-17.el5_9.i386: (104, 'Connection reset by peer')
  condor-7.8.8-0.4.1.el5.i386: (104, 'Connection reset by peer')
  qpid-java-common-0.18-8.el5_9.noarch: (104, 'Connection reset by peer')
  perl-DateManip-5.44-1.2.1.noarch: (104, 'Connection reset by peer')
  postgresql-server-8.1.23-6.el5_8.i386: (104, 'Connection reset by peer')
  postgresql-8.1.23-6.el5_8.i386: (104, 'Connection reset by peer')

Loaded plugins: product-id, rhnplugin, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in ?
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 309, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 161, in main
    return exFatal(e)
  File "/usr/share/yum-cli/yummain.py", line 64, in exFatal
    logger.critical('\n\n%s', to_unicode(e))
  File "/usr/lib/python2.4/logging/__init__.py", line 1019, in critical
    apply(self._log, (CRITICAL, msg, args), kwargs)
  File "/usr/lib/python2.4/logging/__init__.py", line 1078, in _log
    record = self.makeRecord(self.name, level, fn, lno, msg, args, exc_info)
  File "/usr/lib/python2.4/logging/__init__.py", line 1064, in makeRecord
    return LogRecord(name, level, fn, lno, msg, args, exc_info)
  File "/usr/lib/python2.4/logging/__init__.py", line 226, in __init__
    if args and (len(args) == 1) and args[0] and (type(args[0]) == types.DictType):
TypeError: 'NoneType' object is not callable
Comment 2 Zdeněk Pavlas 2013-12-16 08:33:00 EST
I believe the root problem is in rhnplugin, but re-raising the exception in exFatal hides it.  I had no luck reproducting it yet. I still don't know how it causes the "NoneType is not callable" error, but a likely candidate is errorneous "raise None" at rhnplugin.py:493 .. however, it might be something else, too.

--- a/yummain.py
+++ b/yummain.py
@@ -64,6 +64,7 @@ def main(args):
         return 1
 
     def exFatal(e):
+        raise
         logger.critical('\n\n%s', exception2msg(e.value))
         if unlock(): return 200
         return 1

Could you add this 1-liner to yummain.py, and trigger the bug again?  It should print a more meaningful traceback then, and we can then fix the problem at the origin.
Comment 3 Frantisek Reznicek 2013-12-16 09:50:38 EST
I'm sorry unable to re-trigger the issue again as it was caused under special (bad) networking case.
Comment 5 Zdeněk Pavlas 2013-12-16 11:35:51 EST
Finally found the root cause.. Indeed, it was rhnplugin raising an instance of an invalid YumBaseError subclass.

When I fix BZ 751294 with adding "raise AttributeError, name" at the end of up2dateErrors.Error.__getattr__(), I no longer get the traceback, but a "Network Error" message.  Maybe this should be closed as a dupe.
Comment 6 Milan Zazrivec 2013-12-17 05:59:31 EST
I'm not quite sure what should I do with this bug report at this point.

Is there anything that is to be fixed in yum-rhn-plugin?
Comment 7 Zdeněk Pavlas 2013-12-17 06:35:44 EST
I'd close this as a dupe of BZ 751294 since the cause is the same.
Comment 8 Milan Zazrivec 2013-12-17 06:41:49 EST

*** This bug has been marked as a duplicate of bug 751294 ***

Note You need to log in before you can comment on or make changes to this bug.