Bug 714909 - various traceback when using poor proxy server
Summary: various traceback when using poor proxy server
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: yum-rhn-plugin
Version: 6.1
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Miroslav Suchý
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-06-21 09:40 UTC by Petr Sklenar
Modified: 2011-12-06 16:05 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-12-06 16:05:19 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Petr Sklenar 2011-06-21 09:40:56 UTC
Description of problem:
Various traceback when using poor proxy server.
Poor means that few packets are fuzzed 

Version-Release number of selected component (if applicable):
yum-rhn-plugin-0.9.1-26.el6.noarch
yum-3.2.29-17.el6.noarch

How reproducible:
1 from 4 attempts

Steps to Reproduce:
1. have poor proxy server
2. register to rhn, satellite, whatever
3. yum clean all;yum repolist --disablerepo=\* --enablerepo=rhel-ppc64-server-6
  
Actual results:
# yum clean all;yum repolist --disablerepo=\* --enablerepo=rhel-ppc64-server-6
Loaded plugins: product-id, rhnplugin, subscription-manager
Updating Red Hat repositories.
Cleaning repos: beaker-Server beaker-debug beaker-harness beaker-optional-ppc64-debug beaker-optional-ppc64-os beaker-tasks
              : rhel-ppc64-server-6
Cleaning up Everything
Loaded plugins: product-id, rhnplugin, subscription-manager
Updating Red Hat repositories.
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in <module>
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 274, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 129, in main
    result, resultmsgs = base.doCommands()
  File "/usr/share/yum-cli/cli.py", line 436, in doCommands
    return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, self.extcmds)
  File "/usr/share/yum-cli/yumcommands.py", line 854, in doCommand
    base.repos.populateSack()
  File "/usr/lib/python2.6/site-packages/yum/repos.py", line 289, in populateSack
    sack.populate(repo, mdtype, callback, cacheonly)
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 164, in populate
    if self._check_db_version(repo, mydbtype):
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 222, in _check_db_version
    return repo._check_db_version(mdtype)
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1255, in _check_db_version
    repoXML = self.repoXML
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1454, in <lambda>
    repoXML = property(fget=lambda self: self._getRepoXML(),
  File "/usr/share/yum-plugins/rhnplugin.py", line 498, in _getRepoXML
    return YumRepository._getRepoXML(self)
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1446, in _getRepoXML
    self._loadRepoXML(text=self)
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1436, in _loadRepoXML
    return self._groupLoadRepoXML(text, self._mdpolicy2mdtypes())
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1411, in _groupLoadRepoXML
    if self._commonLoadRepoXML(text):
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1229, in _commonLoadRepoXML
    result = self._getFileRepoXML(local, text)
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1015, in _getFileRepoXML
    size=102400) # setting max size as 100K
  File "/usr/share/yum-plugins/rhnplugin.py", line 323, in _getFile
    up2dateAuth.updateLoginInfo()
  File "/usr/share/rhn/up2date_client/up2dateAuth.py", line 204, in updateLoginInfo
    login(forceUpdate=True)
  File "/usr/share/rhn/up2date_client/up2dateAuth.py", line 186, in login
    li = server.up2date.login(systemId)
  File "/usr/share/rhn/up2date_client/rhnserver.py", line 50, in __call__
    return rpcServer.doCall(method, *args, **kwargs)
  File "/usr/share/rhn/up2date_client/rpcServer.py", line 206, in doCall
    ret = method(*args, **kwargs)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1199, in __call__
    return self.__send(self.__name, args)
  File "/usr/share/rhn/up2date_client/rpcServer.py", line 39, in _request1
    ret = self._request(methodname, params)
  File "/usr/lib/python2.6/site-packages/rhn/rpclib.py", line 383, in _request
    self._handler, request, verbose=self._verbose)
  File "/usr/lib/python2.6/site-packages/rhn/transports.py", line 188, in request
    return self._process_response(fd, connection)
  File "/usr/lib/python2.6/site-packages/rhn/transports.py", line 216, in _process_response
    return self.parse_response(fd)
  File "/usr/lib/python2.6/site-packages/rhn/transports.py", line 236, in parse_response
    p.feed(response)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 601, in feed
    self._parser.Parse(data, 0)
xml.parsers.expat.ExpatError: not well-formed (invalid token): line 1, column 515

--------------------------
 yum clean all;yum repolist --disablerepo=\* --enablerepo=rhel-ppc64-server-6
Loaded plugins: product-id, rhnplugin, subscription-manager
Updating Red Hat repositories.
Cleaning repos: beaker-Server beaker-debug beaker-harness beaker-optional-ppc64-debug beaker-optional-ppc64-os beaker-tasks
              : rhel-ppc64-server-6
Cleaning up Everything
Loaded plugins: product-id, rhnplugin, subscription-manager
Updating Red Hat repositories.
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in <module>
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 274, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 129, in main
    result, resultmsgs = base.doCommands()
  File "/usr/share/yum-cli/cli.py", line 436, in doCommands
    return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, self.extcmds)
  File "/usr/share/yum-cli/yumcommands.py", line 854, in doCommand
    base.repos.populateSack()
  File "/usr/lib/python2.6/site-packages/yum/repos.py", line 289, in populateSack
    sack.populate(repo, mdtype, callback, cacheonly)
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 164, in populate
    if self._check_db_version(repo, mydbtype):
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 222, in _check_db_version
    return repo._check_db_version(mdtype)
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1255, in _check_db_version
    repoXML = self.repoXML
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1454, in <lambda>
    repoXML = property(fget=lambda self: self._getRepoXML(),
  File "/usr/share/yum-plugins/rhnplugin.py", line 503, in _getRepoXML
    return YumRepository._getRepoXML(self)
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1446, in _getRepoXML
    self._loadRepoXML(text=self)
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1436, in _loadRepoXML
    return self._groupLoadRepoXML(text, self._mdpolicy2mdtypes())
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1411, in _groupLoadRepoXML
    if self._commonLoadRepoXML(text):
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1229, in _commonLoadRepoXML
    result = self._getFileRepoXML(local, text)
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1015, in _getFileRepoXML
    size=102400) # setting max size as 100K
  File "/usr/share/yum-plugins/rhnplugin.py", line 323, in _getFile
    up2dateAuth.updateLoginInfo()
  File "/usr/share/rhn/up2date_client/up2dateAuth.py", line 204, in updateLoginInfo
    login(forceUpdate=True)
  File "/usr/share/rhn/up2date_client/up2dateAuth.py", line 186, in login
    li = server.up2date.login(systemId)
  File "/usr/share/rhn/up2date_client/rhnserver.py", line 50, in __call__
    return rpcServer.doCall(method, *args, **kwargs)
  File "/usr/share/rhn/up2date_client/rpcServer.py", line 206, in doCall
    ret = method(*args, **kwargs)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1199, in __call__
    return self.__send(self.__name, args)
  File "/usr/share/rhn/up2date_client/rpcServer.py", line 39, in _request1
    ret = self._request(methodname, params)
  File "/usr/lib/python2.6/site-packages/rhn/rpclib.py", line 383, in _request
    self._handler, request, verbose=self._verbose)
  File "/usr/lib/python2.6/site-packages/rhn/transports.py", line 171, in request
    headers, fd = req.send_http(host, handler)
  File "/usr/lib/python2.6/site-packages/rhn/transports.py", line 706, in send_http
    response = self._connection.getresponse()
  File "/usr/lib/python2.6/site-packages/rhn/connections.py", line 125, in getresponse
    response.begin()
  File "/usr/lib64/python2.6/httplib.py", line 411, in begin
    raise UnknownProtocol(version)
httplib.UnknownProtocol: HTTP/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA1.1
------------
yum clean all;yum repolist --disablerepo=\* --enablerepo=rhel-ppc64-server-6
Loaded plugins: product-id, rhnplugin, subscription-manager
Updating Red Hat repositories.
Cleaning repos: beaker-Server beaker-debug beaker-harness beaker-optional-ppc64-debug beaker-optional-ppc64-os beaker-tasks
              : rhel-ppc64-server-6
Cleaning up Everything
Loaded plugins: product-id, rhnplugin, subscription-manager
Updating Red Hat repositories.
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in <module>
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 274, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 129, in main
    result, resultmsgs = base.doCommands()
  File "/usr/share/yum-cli/cli.py", line 436, in doCommands
    return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, self.extcmds)
  File "/usr/share/yum-cli/yumcommands.py", line 854, in doCommand
    base.repos.populateSack()
  File "/usr/lib/python2.6/site-packages/yum/repos.py", line 289, in populateSack
    sack.populate(repo, mdtype, callback, cacheonly)
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 164, in populate
    if self._check_db_version(repo, mydbtype):
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 222, in _check_db_version
    return repo._check_db_version(mdtype)
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1255, in _check_db_version
    repoXML = self.repoXML
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1454, in <lambda>
    repoXML = property(fget=lambda self: self._getRepoXML(),
  File "/usr/share/yum-plugins/rhnplugin.py", line 502, in _getRepoXML
    up2dateAuth.updateLoginInfo()
  File "/usr/share/rhn/up2date_client/up2dateAuth.py", line 204, in updateLoginInfo
    login(forceUpdate=True)
  File "/usr/share/rhn/up2date_client/up2dateAuth.py", line 186, in login
    li = server.up2date.login(systemId)
  File "/usr/share/rhn/up2date_client/rhnserver.py", line 50, in __call__
    return rpcServer.doCall(method, *args, **kwargs)
  File "/usr/share/rhn/up2date_client/rpcServer.py", line 279, in doCall
    raise up2dateErrors.CommunicationError(e.errmsg)
up2date_client.up2dateErrors.CommunicationError: Error communicating with server. The message was:
Request-URI Too Large
------------
there are more various tracebacks

Expected results:
it writes info message:
there is issue with your connection, try to extend networkRetries in /etc/sysconfig/rhn/up2date

Additional info:
extending network retries helps so please don't close this bug with wontfix when its generating various traceback.

Comment 1 Jan Pazdziora 2011-11-24 09:47:15 UTC
(In reply to comment #0)
> Description of problem:
> Various traceback when using poor proxy server.
> Poor means that few packets are fuzzed 

Please be more specific about the fuzzed thing.

How do I reproduce the issue?

[...]

> Expected results:
> it writes info message:
> there is issue with your connection, try to extend networkRetries in
> /etc/sysconfig/rhn/up2date

This would be a documentation issue then. The software should not try to do half-baked guesses about the cause of the traceback -- it should just log what it saw and leave the investigation and resolution on the admin. There might be millions other reasons for getting the traceback and in many of those cases, increasing the networkRetries would just make things worse (generate more tracebacks).

> Additional info:
> extending network retries helps so please don't close this bug with wontfix
> when its generating various traceback.

Unless we have some customer case attached to this bugzilla and unless we have a solid way how to reproduce the issue, this will be either NOTABUG or WONTFIX. Please describe the steps to setup the reproducer.

Comment 2 Petr Sklenar 2011-11-24 10:39:01 UTC
Solid way how to reproduce:
0, machine with rhel62
1, wget http://www.secforce.com/media/tools/proxyfuzz.py.txt -O /tmp/proxyfuzz.py
2, yum install python-twisted\* -y
3, python /tmp/proxyfuzz.py -l 81 -r xmlrpc.crypton.com -p 80 -v -w 5000

#open second terminal on your machine and
4, rhnreg_ks --proxy=127.0.0.1:81 --username=superman --password=Lois_Lane --server=http://xmlrpc.crypton.com/XMLRPC --force

5, yum clean all ; yum repolist --disablerepo=\* --enablerepo=rhel-x86_64-server-6
6, traceback is there, if not then try step 5 again

Comment 3 Petr Sklenar 2011-11-24 12:19:51 UTC
(In reply to comment #2)
> /tmp/proxyfuzz.py
If you change variable n on line 110 of proxyfuzz.py file you will get more different tracebacks. For ex I set n = int(l*0.001/100000000000000)

I don't mean any user will play with such a testing tool. I guess there are many users running on magic network environment who can see such an issue.

Of course you can say that's not bug in our component its problem in networking. But I can imagine more attempts to establish connection again and expect it will work this time. 

And I can imagine that rhn client tools is such a robust tools to do that.

Comment 4 Jan Pazdziora 2011-11-24 15:02:28 UTC
(In reply to comment #2)
> Solid way how to reproduce:
> 0, machine with rhel62
> 1, wget http://www.secforce.com/media/tools/proxyfuzz.py.txt -O
> /tmp/proxyfuzz.py
> 2, yum install python-twisted\* -y
> 3, python /tmp/proxyfuzz.py -l 81 -r xmlrpc.crypton.com -p 80 -v -w 5000
> 
> #open second terminal on your machine and
> 4, rhnreg_ks --proxy=127.0.0.1:81 --username=superman --password=Lois_Lane
> --server=http://xmlrpc.crypton.com/XMLRPC --force

I get

An error has occurred:
Error communicating with server. The message was:
Not Found
See /var/log/up2date for more information

here. I've set

127.0.0.2	xmlrpc.crypton.com

in my /etc/hosts.

Comment 5 Jan Pazdziora 2011-11-28 09:09:36 UTC
Any hint?

Comment 8 RHEL Program Management 2011-12-06 16:05:19 UTC
Development Management has reviewed and declined this request.  You may appeal
this decision by reopening this request.


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