
| This forum is proudly powered by Scientific Linux 6 | SL website Download SL Help Search Members |
| Welcome Guest ( Log In | Register ) | Resend Validation Email |
![]() ![]() ![]() |
| log69 |
Posted: Jun 19 2012, 05:39 PM
|
|
![]() SLF Member ![]() ![]() ![]() Group: Members Posts: 97 Member No.: 1325 Joined: 24-February 12 |
Hi Everyone,
I'm having an issue with my system, specifically the yum package after a recent update. Yum stopped working and its python is missing a module. Does anyone have the same issue? I wrote to the ML, would you guys take a look at that? http://www.mail-archive.com/scientific-linux-users@listserv.fnal.gov/msg11641.html I greatly welcome every idea! Thanks. |
|
| AndrewSerk |
Posted: Jun 19 2012, 06:22 PM
|
|
![]() SLF Moderator ![]() ![]() ![]() ![]() ![]() ![]() Group: Moderators Posts: 524 Member No.: 54 Joined: 14-April 11 |
Hi log69,
I see you manually downloaded and installed the new python packages. You may want to try to do the same but with the older packages: python-2.6.6-29.el6. instead of python-2.6.6-29.el6_2.2 python-libs-2.6.6-29.el6 instead of python-libs-2.6.6-29.el6_2.2 and so on for the packages that where updated with python. Hope this helps, |
|
| zxq9 |
Posted: Jun 19 2012, 09:16 PM
|
|
![]() SLF Advocate ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 369 Member No.: 611 Joined: 5-August 11 |
Is there anything unique running on your systems? Like non-standard setup, anything installed via pip or pipy or something you got that needed a "python install.py setup" thing to happen? By "unique" I really mean external repos or anything that isn't canonical SL. Also, are you on SL 6.2 or upgrading from another point release to 6.2 in one big jump?
Since I haven't seen widespread reports of Python or Yum failures I feel like something (probably tiny) is unique about your setup that is messing you around. Yum or Python failing or even acting a little sick are two things I would notice immediately on my own systems. |
|
| log69 |
Posted: Jun 20 2012, 05:49 AM
|
|||
![]() SLF Member ![]() ![]() ![]() Group: Members Posts: 97 Member No.: 1325 Joined: 24-February 12 |
There's nothing extra, couple of media packages from rpmforge with keeping the least minimum, and only enabled repos are epel. And what surprised me is that the problem occurred on python update and failing since then. Can't seem to find the problem since the files are all ok. Edit: This error message is weird too while running "yum update": Plugin "refresh-packagekit" can't be imported |
|||
| log69 |
Posted: Jun 20 2012, 06:27 AM
|
|
![]() SLF Member ![]() ![]() ![]() Group: Members Posts: 97 Member No.: 1325 Joined: 24-February 12 |
If I restore "/usr/lib64/python2.6" directory from my backup, then yum works again just fine. I can run "yum update" too. But when I run "yum reinstall python", then after the package install everything goes wrong again.
Any idea what could cause this? This is a simple case installing a package. |
|
| zxq9 |
Posted: Jun 20 2012, 07:02 AM
|
|
![]() SLF Advocate ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 369 Member No.: 611 Joined: 5-August 11 |
From the symptoms sounds like the Python runtime or library in the new Python you're installing is borked.
That's pretty weird, though, because that would mean the last Python patch should have screwed everybody, but that's not the case. You don't happen to still have rpmforge enabled or maybe have a Python library package coming from a repo other than SL? If these packages were unsigned then I'd ask what mirror you were getting your updates from, but since they are all signed any mistake in the copy should invalidate the package, so this shouldn't be a problem. |
|
| log69 |
Posted: Jun 20 2012, 07:05 AM
|
|||||
![]() SLF Member ![]() ![]() ![]() Group: Members Posts: 97 Member No.: 1325 Joined: 24-February 12 |
I checked which files change and how they change after reinstalling the python package. So I copied my dir as "python2.6.good", then ran "yum reinstall python", and then ran:
Now I see which files were modified, so I checked their diff too. From what I saw I think only the "./distutils/config.py" file may cause the problem. The diff looks like this:
|
|||||
| log69 |
Posted: Jun 20 2012, 07:07 AM
|
|||
![]() SLF Member ![]() ![]() ![]() Group: Members Posts: 97 Member No.: 1325 Joined: 24-February 12 |
No rpmforge is enabled. Also, I always update manually running "yum update" and see which repos the packages are coming from (to avoid any mistake). And they come only from SL. See more details in my other reply. |
|||
| zxq9 |
Posted: Jun 20 2012, 08:15 AM
|
|||||
![]() SLF Advocate ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 369 Member No.: 611 Joined: 5-August 11 |
Two thoughts:
1- Reading your original traceback from the ML post more critically, I'm not sure that config.py has anything to do with this. From the traceback it looks like there is an import not being made from /usr/lib64/python2.6/xml/etree/cElementTree.py for some reason. But the problem could be way more complicated than that. Check and see if that's there, at least, and if your updating did anything to it or altered the path to it. Speaking of path, I don't think the Python runtime's own path is borked. If it was then none of this should spin up properly in the first place. 2- It seems like someone has an overactive desire to use low-ish file operations instead of just leaving yum with a few extra (very short) lines that don't halt execution when file permissions prevent the writing of .pypirc. I'm not certain, but it seems like the os.fdopen(blahblah... stuff in the patch might not work in all situations (like maybe if you're using networked storage and the SELinux permissions are set on mount, for example) but the original try...finally version would still permits failure of this non-essential write. That said, maybe could try something like:
to see if this is the troubled section or not. I don't think it is, though. Also, I haven't tried using a with statement inside of a try, but it should work the same. If not you could tack the .write() call on to the os.fdopen thing directly. The author this seems to use the fp tag only to shorten the length of the line for whatever reason (granted, that line would be like 109 characters which is 29 too long for some people's taste and 4 short of the limit of some other standards -- but a necessity for gigantic lines tends to indicate the presence of other issues...).
should be an equivalent statement. But I'm a Python noob, so don't expect this to work. Alternately you could just jam the old one block back in there and see if you get the same problem. I don't think this will fix it, though. I think the problem probably lies somewhere in a change to the xml module or something else yum is depending on that's not this. --- UPDATE: I just learned something interesting about exception handling in Python and how to use os.open() as a context manager. I'd have to go back and read the function again to be sure that the code I extended by tacking the write() call directly onto the fdopen() bit was actually doing this, but in any case I understand where the idiom/habit might come from, whether or not the author was actually doing this or not. This is what I read that happened to touch on this obliquely |
|||||
| log69 |
Posted: Jun 20 2012, 08:44 AM
|
|||||
![]() SLF Member ![]() ![]() ![]() Group: Members Posts: 97 Member No.: 1325 Joined: 24-February 12 |
@zxq9:
Adding the "try" and "except" lines don't change anything, I get the same error traceback as in my original post. What's weird is that the only difference between a working and non-working configuration is the result of a "yum reinstall python" command. I don't get it. What else could change after running this?
After the reinstall, the only files modified are the ones above in my other post. I include here the full diff: http://pastebin.com/GGkDQxhN Files are:
|
|||||
| zxq9 |
Posted: Jun 20 2012, 12:39 PM
|
|||||
![]() SLF Advocate ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 369 Member No.: 611 Joined: 5-August 11 |
Where did you get your yum plugins from? This bit here interests me a little:
My plugins include only these by default: fastestmirror, refresh-packagekit, security I wonder if something about the protectbase or remove-with-leaves plugin (or the way it has been used, rather) made your update get funny. That could definitely cause some unpredictable weirdness depending on what you've declared as "protected". Can you roll back to the previous Python version again, and then try updating with
and see if you get a proper xml/etree installed? Also, if you roll back to the old Python, when you run yum can refresh-packagekit load, or have you always gotten that message? |
|||||
| log69 |
Posted: Jun 20 2012, 12:48 PM
|
|||
![]() SLF Member ![]() ![]() ![]() Group: Members Posts: 97 Member No.: 1325 Joined: 24-February 12 |
I rolled back my /usr/lib64/python2.6 dir and ran this:
But it brought back the same problem. Also, this is interesting too: http://www.mail-archive.com/scientific-linux-users@listserv.fnal.gov/msg11658.html (thanks for your help) |
|||
| zxq9 |
Posted: Jun 20 2012, 01:33 PM
|
|||
![]() SLF Advocate ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 369 Member No.: 611 Joined: 5-August 11 |
What is the output of this?
Lefty and Righty just aren't looking at the same thing, I think. |
|||
| log69 |
Posted: Jun 20 2012, 01:47 PM
|
|||||
![]() SLF Member ![]() ![]() ![]() Group: Members Posts: 97 Member No.: 1325 Joined: 24-February 12 |
/home/$USER/Desktop /usr/lib64/python26.zip /usr/lib64/python2.6 /usr/lib64/python2.6/plat-linux2 /usr/lib64/python2.6/lib-tk /usr/lib64/python2.6/lib-old /usr/lib64/python2.6/lib-dynload /usr/lib64/python2.6/site-packages /usr/lib64/python2.6/site-packages/gst-0.10 /usr/lib64/python2.6/site-packages/gtk-2.0 /usr/lib64/python2.6/site-packages/webkit-1.0 /usr/lib/python2.6/site-packages /usr/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg-info |
|||||
| zxq9 |
Posted: Jun 20 2012, 01:53 PM
|
|
![]() SLF Advocate ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 369 Member No.: 611 Joined: 5-August 11 |
Hrm... you might want to put your /home/$USER/Desktop bit at the end, not the beginning. Do you know what the reason is for it being up there at the beginning or rather, what package or code set it that way? Is it in your .bashrc or someplace similar?
|
|
| log69 |
Posted: Jun 20 2012, 01:58 PM
|
|
![]() SLF Member ![]() ![]() ![]() Group: Members Posts: 97 Member No.: 1325 Joined: 24-February 12 |
I have no idea why that's at the first line. I don't have any settings for that in my .bashrc or anywhere else.
|
|
| zxq9 |
Posted: Jun 20 2012, 02:19 PM
|
|||
![]() SLF Advocate ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 369 Member No.: 611 Joined: 5-August 11 |
Can you try this:
and paste the output? |
|||
| log69 |
Posted: Jun 20 2012, 03:35 PM
|
|||
![]() SLF Member ![]() ![]() ![]() Group: Members Posts: 97 Member No.: 1325 Joined: 24-February 12 |
|
|||
| zxq9 |
Posted: Jun 20 2012, 03:37 PM
|
|
![]() SLF Advocate ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 369 Member No.: 611 Joined: 5-August 11 |
Yeah, that's trying to pull it from the wrong place.
I just saw the new posts on your ML thread about this. The system simply missing a lib like that is pretty weird -- actually really weird. Also (and probably unrelated) having something prepend instead of append your Python runtime path is also sort of troublesome. My guess is that you installed a naughty package that thought it would go off and do smart things with your Python installation. |
|
| log69 |
Posted: Jun 20 2012, 04:03 PM
|
|
![]() SLF Member ![]() ![]() ![]() Group: Members Posts: 97 Member No.: 1325 Joined: 24-February 12 |
About my recent mail to the ML: This file is the root of all problems: /usr/lib64/python2.6/lib-dynload/pyexpat.so
What's wierd is that my updated python from SL repo works good with the older version of pyexpat.so, but doesn't work with the one that the python package ships with itself. What's really astonishing is that all my files are identical to other compared systems of mine (servers, chroot, vm), and changing this very file solves everything. |
|
| log69 |
Posted: Jun 20 2012, 04:13 PM
|
|||
![]() SLF Member ![]() ![]() ![]() Group: Members Posts: 97 Member No.: 1325 Joined: 24-February 12 |
Finally, Success has come!
![]() Oleg's last answer on ML:
Wow, thanks for your great help and time, I appreciate that! |
|||
![]() |
![]() ![]() ![]() |