problem with ldconfig
Hi,
So a while back I was having problems with installpkg hanging. I finally got back to this and isolated the problem to the ldconfig part of installpkg. Lo and behold running ldconfig hung. So I tried the various directories in ldconfig.conf with -n and all of them ran fine except one, /usr/lib64, which hangs. Any ideas where I can go from here? Thanks |
Is ldconfig.conf a file you wrote or do you actually mean the file /etc/ld.so.conf? Anyway I don't observe this behavior here, ldconfig runs usually instantly.
|
Sorry, I meant ld.so.conf.
|
This is just a shot in the dark, but maybe your ld.so.cache has become corrupted?
You could try this: Code:
rm /etc/ld.so.cache |
Another thought is that perhaps a library in /usr/lib64 has become corrupted. While this one-liner can't guarantee there are no corrupted files, it would at least point out any that are corrupted enough that "file" no longer sees them as ELF objects:
Code:
file /usr/lib64/*.so.* | grep -v ELF | grep -v symbolic | grep -v Python |
Quote:
|
Quote:
|
Here are a few more ideas.
First, please ensure that the harddisk is not failing and the delay is caused by some faulty I/O operation. You probably would have noticed during normal operation but let us get this out of the way, anyway. Second, are you by any chance in a VM? I do recall some time ago to have experienced a similar issue when running slackware in virtualbox. With the above out of the way I came up with three scripts that may help you diagnose the problem. For a better overview I will post them in three separate posts instead of making one huge bulky post. All scripts must NOT be run as root. All scripts expect the library directory to check as parameter $1. All scripts will produce a logfile which will store the library name and the elapsed time (milliseconds) it took to process aforementioned library. You can use the elapsed time to determine which libraries take the longest to process and possibly cause 'ldconfig' to hang. |
Script number #1
Script number #1 will run 'ldconfig' on every library in the folder specified in parameter $1.
I *think* when the -l option is passed to 'ldfonfig' then it will not update the cache, however, it will try to update the links. In addition to running the script as normal user the '-NX' option will ensure that neither happens, so nothing should be updated and/or break. The resuls will be stored in a file called 'ldconf.log' in the current folder (see below for sample output). Code:
#!/bin/bash Code:
libsmartcols.so.1 -> libsmartcols.so.1.1.0 |
Script number #2
Script number #2 will use the dynamic linker to verify the library and try to list its dependencies. If the library is corrupted then this might diagnose it. The results will be stored in a logfile called 'ld.so.log' in the current directory.
Code:
#!/bin/bash Code:
/lib64/libsmartcols.so.1.1.0 OK |
Script number #3
Script number #3 uses 'ldd' to check the dependencies of each library. The results will be stored in a logfile called 'ldd.log' in the current folder.
IMPORTANT: Here is a verbatim warning from the manpage of 'ldd': Quote:
Code:
#!/bin/bash Code:
linux-vdso.so.1 (0x00007fff0b3b6000) |
All times are GMT -5. The time now is 10:33 AM. |