Get rid of wrapper shell scripts

RESOLVED DUPLICATE of bug 668869

Status

defect
RESOLVED DUPLICATE of bug 668869
8 years ago
8 years ago

People

(Reporter: macachuto, Unassigned)

Tracking

({perf})

10 Branch
x86_64
Linux

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [gs], )

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.2) Gecko/20100101 Firefox/10.0.2
Build ID: 20120215223356

Steps to reproduce:

I start thnderbird thought strace to find out why it takes about 10 sec to start.
I was surprised.


Actual results:

open("/lib64/libtinfo.so.5", O_RDONLY|O_CLOEXEC) = 3
open("/usr/local/share/thunderbird/tls/x86_64/libtinfo.so.5", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/share/thunderbird/tls/libtinfo.so.5", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/share/thunderbird/x86_64/libtinfo.so.5", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/share/thunderbird/libtinfo.so.5", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/share/thunderbird/plugins/tls/x86_64/libtinfo.so.5", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/share/thunderbird/plugins/tls/libtinfo.so.5", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/share/thunderbird/plugins/x86_64/libtinfo.so.5", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/share/thunderbird/plugins/libtinfo.so.5", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib64/libtinfo.so.5", O_RDONLY|O_CLOEXEC) = 3
open("/usr/local/share/thunderbird/tls/x86_64/libtinfo.so.5", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/share/thunderbird/tls/libtinfo.so.5", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/share/thunderbird/x86_64/libtinfo.so.5", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/share/thunderbird/libtinfo.so.5", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/share/thunderbird/plugins/tls/x86_64/libtinfo.so.5", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/share/thunderbird/plugins/tls/libtinfo.so.5", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/share/thunderbird/plugins/x86_64/libtinfo.so.5", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/share/thunderbird/plugins/libtinfo.so.5", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib64/libtinfo.so.5", O_RDONLY|O_CLOEXEC) = 3
open("/usr/local/share/thunderbird/tls/x86_64/libtinfo.so.5", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/share/thunderbird/tls/libtinfo.so.5", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/share/thunderbird/x86_64/libtinfo.so.5", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/share/thunderbird/libtinfo.so.5", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/share/thunderbird/plugins/tls/x86_64/libtinfo.so.5", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/share/thunderbird/plugins/tls/libtinfo.so.5", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/share/thunderbird/plugins/x86_64/libtinfo.so.5", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/share/thunderbird/plugins/libtinfo.so.5", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib64/libtinfo.so.5", O_RDONLY|O_CLOEXEC) = 3

It is only one lib of many.



Second:

open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=97334, ...}) = 0
mmap(NULL, 97334, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f9c869f9000
close(3)                                = 0
open("/lib64/libtinfo.so.5", O_RDONLY|O_CLOEXEC) = 3
...
open("/usr/local/share/thunderbird/libdl.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib64/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
...
open("/usr/local/share/thunderbird/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib64/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
...
open("/usr/local/share/thunderbird/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
...
open("/usr/local/share/thunderbird/libnotify.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 19
fstat(19, {st_mode=S_IFREG|0644, st_size=97334, ...}) = 0
mmap(NULL, 97334, PROT_READ, MAP_PRIVATE, 19, 0) = 0x7f9c868d9000
close(19)                               = 0
open("/lib64/tls/x86_64/libnotify.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib64/tls/x86_64", 0x7fff0a425a00) = -1 ENOENT (No such file or directory)
open("/lib64/tls/libnotify.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib64/tls", {st_mode=S_IFDIR|0555, st_size=4096, ...}) = 0
open("/lib64/x86_64/libnotify.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib64/x86_64", 0x7fff0a425a00)   = -1 ENOENT (No such file or directory)
open("/lib64/libnotify.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib64", {st_mode=S_IFDIR|0555, st_size=12288, ...}) = 0
open("/usr/lib64/tls/x86_64/libnotify.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/tls/x86_64", 0x7fff0a425a00) = -1 ENOENT (No such file or directory)
open("/usr/lib64/tls/libnotify.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/tls", {st_mode=S_IFDIR|0555, st_size=4096, ...}) = 0
open("/usr/lib64/x86_64/libnotify.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/x86_64", 0x7fff0a425a00) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libnotify.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib64", {st_mode=S_IFDIR|0555, st_size=98304, ...}) = 0



Third:
access("/etc/gtk-2.0/gtkrc.en_US", F_OK) = -1 ENOENT (No such file or directory)
access("/etc/gtk-2.0/gtkrc.en", F_OK)   = -1 ENOENT (No such file or directory)
lstat("/home/programs/thunderbird/.gtkrc-2.0", 0x7fff0a427480) = -1 ENOENT (No such file or directory)
access("/home/programs/thunderbird/.gtkrc-2.0.en_US", F_OK) = -1 ENOENT (No such file or directory)
access("/home/programs/thunderbird/.gtkrc-2.0.en", F_OK) = -1 ENOENT (No such file or directory)
lstat("/home/programs/thunderbird/.gnome2/gtkrc-2.0", 0x7fff0a427480) = -1 ENOENT (No such file or directory)
access("/home/programs/thunderbird/.gnome2/gtkrc-2.0.en_US", F_OK) = -1 ENOENT (No such file or directory)
access("/home/programs/thunderbird/.gnome2/gtkrc-2.0.en", F_OK) = -1 ENOENT (No such file or directory)
lstat("/home/programs/thunderbird/.gnome2/thunderbird-binrc", 0x7fff0a427480) = -1 ENOENT (No such file or directory)
access("/home/programs/thunderbird/.gnome2/thunderbird-binrc.en_US", F_OK) = -1 ENOENT (No such file or directory)
access("/home/programs/thunderbird/.gnome2/thunderbird-binrc.en", F_OK) = -1 ENOENT (No such file or directory)
access("/home/programs/thunderbird/.themes/Raleigh/gtk-2.0/gtkrc", F_OK) = -1 ENOENT (No such file or directory)
access("/usr/share/themes/Raleigh/gtk-2.0/gtkrc", F_OK) = 0
lstat("/usr/share/themes/Raleigh/gtk-2.0/gtkrc", {st_mode=S_IFREG|0644, st_size=69, ...}) = 0
open("/usr/share/themes/Raleigh/gtk-2.0/gtkrc", O_RDONLY) = 17

I do have /etc/gtk-2.0/gtkrc. But why it needs to read an empty file in /usr/share/themes/Raleigh/gtk-2.0/gtkrc instead of the normal one in /etc/gtk-2.0/gtkrc ? There is no such file like gtkrc.en_US or gtkrc.en. Why thunderbird is searching for it??



Expected results:

I really think that thunderbird shoul read ls.so.cache and gets lib path from there.

There is a lot of useless searching.
Wayne, Ludo: This is most likely a Core or Toolkit issue, any suggestion which component this should be triaged to so that it gets the proper attention?
Keywords: perf
Whiteboard: [gs]
/me defers to ludo
(In reply to rsx11m from comment #1)
> Wayne, Ludo: This is most likely a Core or Toolkit issue, any suggestion
> which component this should be triaged to so that it gets the proper
> attention?

Nope. I would say core os integration but there's no such things. Let's try ccing mike.
If something needs to read /etc/ld.so.cache, it's ld.so, not thunderbird. That being said, it seems something is adding plenty of thunderbird directories to LD_LIBRARY_PATH, which i doubt is thunderbird doing it itself (you don't use the wrapper script anymore do you?), and I'd say that's a problem as well. Anyways, I don't think the 10s startup has much to do with the library lookups at the wrong place.
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → INVALID
To: Mike Hommey
Thanks for the clue. I added /lib64:/usr/lib64 to run-mozilla.sh and got follow:

open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3

open("/lib64/tls/x86_64/libpthread.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib64/tls/libpthread.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib64/x86_64/libpthread.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib64/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3

open("/lib64/tls/libdbus-glib-1.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib64/libdbus-glib-1.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib64/tls/x86_64/libdbus-glib-1.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib64/tls/libdbus-glib-1.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib64/x86_64/libdbus-glib-1.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libdbus-glib-1.so.2", O_RDONLY|O_CLOEXEC) = 3

open("/lib64/tls/libdbus-1.so.3", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib64/libdbus-1.so.3", O_RDONLY|O_CLOEXEC) = 3

open("/lib64/tls/libglib-2.0.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib64/libglib-2.0.so.0", O_RDONLY|O_CLOEXEC) = 3

open("/lib64/tls/libdl.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib64/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3

open("/lib64/tls/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib64/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib64/tls/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3

open("/lib64/tls/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib64/libm.so.6", O_RDONLY|O_CLOEXEC) = 3

open("/lib64/tls/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib64/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3

open("/lib64/tls/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3

open("/lib64/tls/libgobject-2.0.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib64/libgobject-2.0.so.0", O_RDONLY|O_CLOEXEC) = 3

open("/lib64/tls/libgthread-2.0.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib64/libgthread-2.0.so.0", O_RDONLY|O_CLOEXEC) = 3

open("/lib64/tls/librt.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib64/librt.so.1", O_RDONLY|O_CLOEXEC) = 3

open("/lib64/tls/libffi.so.5", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib64/libffi.so.5", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)

open("/usr/lib64/tls/libffi.so.5", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libffi.so.5", O_RDONLY|O_CLOEXEC) = 3

open("/usr/local/share/thunderbird/dependentlibs.list", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/share/thunderbird/libxul.so", O_RDONLY|O_CLOEXEC) = 3

open("/lib64/tls/libsmime3.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib64/libsmime3.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)

open("/usr/lib64/tls/libsmime3.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libsmime3.so", O_RDONLY|O_CLOEXEC) = 3

open("/lib64/tls/libssl3.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib64/libssl3.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)

open("/usr/lib64/tls/libssl3.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libssl3.so", O_RDONLY|O_CLOEXEC) = 3

open("/lib64/tls/libnss3.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib64/libnss3.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)

open("/usr/lib64/tls/libnss3.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libnss3.so", O_RDONLY|O_CLOEXEC) = 3


First thunderbird reads /etc/d.so.cache and all of this libs are there.

Second - why and what adds "tls" to every path?
open("/lib64/tls/x86_64/libpthread.so.0
open("/lib64/tls/libpthread.so.0
open("/lib64/x86_64/libpthread.so.0
open("/lib64/libpthread.so.0

If LD_LIBRARY_PATH now has the first statement /lib64, why it searches in 3 different places before?


Thanks
Should I can open new one - thunderbird ignores LD_LIBRARY_PATH then?
So it appears thunderbird still doesn't have changed after bug 552864.
Status: RESOLVED → REOPENED
Ever confirmed: true
Resolution: INVALID → ---
Summary: thunderbird ignores ld.so.cache and messes with files. → Get rid of wrapper shell scripts
See bug 722262 for the Seamonkey equivalent.
Status: REOPENED → RESOLVED
Closed: 8 years ago8 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 668869
You need to log in before you can comment on or make changes to this bug.