LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-06-2005, 12:01 AM   #16
KWTm
Member
 
Registered: Jan 2004
Distribution: Kubuntu 14.04 (Dell Linux-preinstalled laptop + 2 other laptops)
Posts: 117

Original Poster
Rep: Reputation: 21
"strace" shows KDE programs seeking library files in wrong places, delaying startup


To follow up with my previous query, I browsed through some of the archives at www.kde-forum.org. I'd have to say that the geek factor there is higher than here, and newbies might find it a bit daunting. Anyway, from there I learned about the "strace" command.

I had said that I tried running commands like "kwrite" from the command line, but it shows no error message or output, so I don't know why it's taking so long to start up. This time I tried running the command
Code:
strace kwrite
This tracked the communication between the "kwrite" program (or whatever program you specify) and the Linux kernel. I was able to see that kwrite was looking for all sorts of files in the wrong places, and then finally hitting the right places after a while. For example:


open("/usr/lib/qt3/lib/libdl.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/X11R6/lib/tls/libdl.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/X11R6/lib/libdl.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libdl.so.2", O_RDONLY) = 3


Here we see that it's looking for the file "libdl.so.2" under the directory "/usr/lib/qt3/lib/", but it's not there (the Linux kernel says to kwrite: "-1 ENOENT"); then it tries again at "/usr/X11R6/lib/tls/" but again it's not there. It fails again once before getting it on the fourth try.

This is just one example, and it looks for other files, most of which contain the string ".so.", which tells me it's a library file ("so" = "shared object").

So, somehow the KDE programs don't know where their own library is located and have to search. There must be some config setting for me to tell them. Barring that, I might just have to put in symbolic links to the places where the programs expect to find the libraries (by using the command "ln -s /path/to/real/library/file.so /path/to/where/the/KDE/program/is/looking/file.so") but these are in all sorts of different places, and I'd rather have a clean solution than have to do a hack job on all these libraries.

Anyway, I thought I'd share what I'd learned so far. Main lesson: when things are frustratingly slow, at least "strace <slow-as-molasses-command>" might tell you how a program might be banging its head against the wall.

Second lesson: this is the second time I've found that, when a computer gradually gets slower and slower (over a few months, on the same installation), it's because of stepwise but unnoticed changes in the config. So, no, it's not because of files gradually filling up disk space or something.

To reply to KimVette's post, I do keep services to a minimum, although that minimum does include "sshd" and CUPS, which may be more than what a desktop uses. No BIND, no Apache, no dhcpd, no MySQL. (Hmmm, I am running SWAT ...) But you're right, I should go analyze what exactly the computer is doing ... "strace" is a start.

By the way, I am sheepishly admitting that I actually asked a very similar question a few months back, and completely forgot about it. (I think I was too frustrated with my computer to surf the web and check for answers.) Readers can get some insight there, too; the thread is at:

http://www.linuxquestions.org/questi...hreadid=235165
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mounting Reiser4 partition takes about 5 seconds DX2 Linux - General 4 05-03-2005 06:55 PM
NFS mount takes 6 seconds drspiffy Linux - Networking 5 03-16-2005 09:34 PM
KDE 3.1 suddenly slow (boot and opening programs) nameLock Linux - Newbie 4 01-14-2004 11:45 PM
programs &KDE loading slow in 9.2 erik Mandriva 5 12-01-2003 04:42 AM
Mandrake 9.1/KDE launching programs slow ShakyJake Linux - General 11 08-02-2003 05:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration