Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 738355

Summary: [vdsm] [guestIF] UnboundLocalError: local variable 'line' referenced before assignment
Product: Red Hat Enterprise Linux 6 Reporter: David Naori <dnaori>
Component: vdsmAssignee: Gal Hammer <ghammer>
Status: CLOSED DUPLICATE QA Contact: David Naori <dnaori>
Severity: low Docs Contact:
Priority: unspecified    
Version: 6.1CC: abaron, bazulay, danken, dnaori, hateya, iheim, mgoldboi, ykaul
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-09-15 11:00:56 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
vdsm log none

Description David Naori 2011-09-14 15:34:17 UTC
Created attachment 523183 [details]
vdsm log

Description of problem:

Thread-825::ERROR::2011-09-14 17:52:02,018::guestIF::268::vm.Vm::(run) vmId=`ff1ef43c-bf3d-4231-8545-26731306a048`::Unexpected exception: Traceback (most recent call last):
  File "/usr/share/vdsm/guestIF.py", line 265, in run
    self.log.exception("Run exception: %s", line)
UnboundLocalError: local variable 'line' referenced before assignment

            while not self._stopped:
                try:
                    line = self._readLine()
                    # line is always None after stop() is called and the
                    # socket is closed.
                    if line:
                        (message, args) = self._parseLine(line)
                        self._agentTimestamp = time.time()
                        self._handleMessage(message, args)
                except:
                    self.log.exception("Run exception: %s", line)


should set line to None before the read

Version-Release number of selected component (if applicable):
vdsm-4.9-98.el6.x86_64

How reproducible:
happened in migration destenation

Actual results:


Expected results:


Additional info:

Comment 2 Dan Kenigsberg 2011-09-14 18:28:42 UTC
BTW David, this bug was introduced in vdsm-4.9-99-7-ga5f8785 (vdsm-4.9-100).

Any word on how to reproduce it, and the functional effect?

Thanks for the suggested fix, I've posted it under your name at

http://gerrit.usersys.redhat.com/936

Comment 3 David Naori 2011-09-14 21:08:40 UTC
(In reply to comment #2)
> BTW David, this bug was introduced in vdsm-4.9-99-7-ga5f8785 (vdsm-4.9-100).
> 
> Any word on how to reproduce it, and the functional effect?
> 
> Thanks for the suggested fix, I've posted it under your name at
> 
> http://gerrit.usersys.redhat.com/936

i don't know if there is any functional effects, and i don't know exactly how to reproduce it, i just saw it in the log after some concurrent migrations -
since the fix is simple i didn't find it significant to investigate the cause.

i can try to reproduce it anytime if needed.

Comment 5 Dan Kenigsberg 2011-09-15 11:00:56 UTC
If not fixed, vdsm may stop waiting for guest messages after migration (which is bad). This is a failure of the first implementation of the fix for bug 736422, and should be verified as a part of it. No need to chase more flags.

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