RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 619743 - ssl_example.py fails with MemoryError on ppc64 and s390x
Summary: ssl_example.py fails with MemoryError on ppc64 and s390x
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: python-nss
Version: 6.0
Hardware: All
OS: Linux
high
medium
Target Milestone: rc
: ---
Assignee: John Dennis
QA Contact: Aleš Mareček
URL:
Whiteboard:
Depends On:
Blocks: 580448 642407
TreeView+ depends on / blocked
 
Reported: 2010-07-30 11:53 UTC by Eduard Benes
Modified: 2011-05-19 13:35 UTC (History)
4 users (show)

Fixed In Version: python-nss-0.11-3.el6
Doc Type: Rebase: Bug Fixes and Enhancements
Doc Text:
This field is the basis of the errata or release note for this bug. It can also be used for change logs. The Technical Note template, known as CCFR, is as follows: Cause What actions or circumstances cause this bug to present. Consequence What happens when the bug presents. Fix What was done to fix the bug.
Clone Of:
Environment:
Last Closed: 2011-05-19 13:35:18 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0607 0 normal SHIPPED_LIVE python-nss bug fix and enhancement update 2011-05-18 17:56:27 UTC

Description Eduard Benes 2010-07-30 11:53:14 UTC
Description of problem:
Running ssl_example.py from the python-nss RPM on ppc64 and s390x fails with MemoryError. This works on i386 and x86_64.

<snip>
listening on: 0.0.0.0:1234
client connect from: 10.16.113.7:50803
Traceback (most recent call last):
  File "/usr/share/doc/python-nss-0.8/examples/ssl_example.py", line 352, in <module>
    Server()
  File "/usr/share/doc/python-nss-0.8/examples/ssl_example.py", line 237, in Server
    buf = client_sock.recv(1024)
MemoryError
</snip>

This happens for both io.Socket() and ssl.SSLSocket() in 
/usr/share/doc/python-nss-0.8/examples/ssl_example.py:

 46 import nss.io as io
 47 import nss.nss as nss
 48 import nss.ssl as ssl
 ...
200     if use_ssl:
201         sock = ssl.SSLSocket()
 ...
219     else:
220         sock = io.Socket()
221 
222     # Bind to our network address and listen for clients
223     sock.bind(net_addr)
224     print "listening on: %s" % (net_addr)
225     sock.listen()
226 
227     while True:
228         # Accept a connection from a client
229         client_sock, client_addr = sock.accept()
230         if use_ssl:
231             client_sock.set_handshake_callback(handshake_callback)
232  
  ...
235         while True:
236             # Handle the client connection
237             buf = client_sock.recv(1024)         <<<<<<< MemoryError


Version-Release number of selected component (if applicable):
python-nss-0.8-3.el6.s390x

How reproducible:
always

Steps to Reproduce:
1. Follow instruction in "Getting started" section in file:///usr/share/doc/python-nss-0.8/api/html/index.html
2. Run server side:
  $ python  /usr/share/doc/python-nss-0.8/examples/ssl_example.py -S -d ./pki -n myhost
3. Run client side:
  $ python /usr/share/doc/python-nss-0.8/examples/ssl_example.py -C -d ./pki -n myhost

Alternatively you can use RHTS test /CoreOS/python-nss/Sanity/ssl_example. 

Actual results:
Traceback (most recent call last):
  File "/usr/share/doc/python-nss-0.8/examples/ssl_example.py", line 352, in <module>
    Server()
  File "/usr/share/doc/python-nss-0.8/examples/ssl_example.py", line 237, in Server
    buf = client_sock.recv(1024)
MemoryError

Expected results:
Successful connection and simple message exchange, server received: Hello server, client received: Goodbye.

Additional info:

Comment 22 Florian Nadge 2011-05-10 13:20:46 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
This field is the basis of the errata or release note for this bug. It can also be used for change logs.

The Technical Note template, known as CCFR, is as follows:

Cause
    What actions or circumstances cause this bug to present.
Consequence
    What happens when the bug presents.
Fix
    What was done to fix the bug.

Comment 23 John Dennis 2011-05-10 16:21:09 UTC
Cause:

CPython modules (Python written in C) use object reference counting to control the lifetime of an object. Some code sequences would cause the object reference count to be computed incorrectly causing an object to be released too soon resulting in a memory error.

Consequence:

A Python "memory error" exception is raised.

Fix:

Internal reference counting logic corrected.

Result:

Memory errors and other anomalies eliminated.

Comment 24 errata-xmlrpc 2011-05-19 13:35:18 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0607.html


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