Global Analysis of Dynamic Library Dependencies Alva L. Couch, - - PowerPoint PPT Presentation

global analysis of dynamic library dependencies
SMART_READER_LITE
LIVE PREVIEW

Global Analysis of Dynamic Library Dependencies Alva L. Couch, - - PowerPoint PPT Presentation

Global Analysis of Dynamic Library Dependencies Alva L. Couch, couch@eecs.tufts.edu Yizhan Sun, ysun@eecs.tufts.edu Tufts University, Medford MA USA http://sowhat.sourceforge.net How to Create Library Dependency Problems Mix package


slide-1
SLIDE 1

Global Analysis of Dynamic Library Dependencies

Alva L. Couch, couch@eecs.tufts.edu Yizhan Sun, ysun@eecs.tufts.edu Tufts University, Medford MA USA http://sowhat.sourceforge.net

slide-2
SLIDE 2

How to Create Library Dependency Problems

 Mix package management and

compiling.

 Mix local and remote software.  Compile and use in conflicting

environments.

 Don’t coordinate software installers.  Let software outlast installers.  Wait!

slide-3
SLIDE 3

/usr/lib/ /usr/lib/libfoo.a

  • ne.o

From Whence Come Library Bindings

Static library Executable file bar

  • ne.o

ld/gcc

Dynamic library Executable image bar

  • ne.o

libfoo.so.1

ld.so

Need

libfoo.so

libfoo.so.1

slide-4
SLIDE 4

What Sowhat Does

/usr/bin/csh / usr/ lib/ libc.so.1 ldd, ld.so sowhat Forward

dependencies

Reverse

dependencies

One program All programs

slide-5
SLIDE 5

Avoiding Waiting for Results

Host

sowhat --scan sowhat --report

Indexed cache (Mysql) Physical dependencies Report of bindings “Offline” “Instant”

554MB 3.3MB

slide-6
SLIDE 6

Example Output

/loc/X11/lib/libXaw.so.5.0 LDD /local/bin/ghostview (libXaw.so.5.0) LDD /local/bin/xarchie (libXaw.so.5.0) LDD /local/bin/xcoloredit (libXaw.so.5.0) LDD /local/bin/xgopher (libXaw.so.5.0) LDD /local/bin/xrn (libXaw.so.5.0) LDD /local/bin/xxgdb (libXaw.so.5.0)

program pattern library kind

slide-7
SLIDE 7

Sowhat Uses

 Analyze impacts of changes.  Clean up library directories.  And more…

slide-8
SLIDE 8

Change Analysis

 Execute:

sowhat –-scan --path

 Make changes.

sowhat –-diff –-path

 Lists impacts of changes.

slide-9
SLIDE 9

Cleanup

 Check whether a directory can be

deleted:

sowhat --report \

  • -to=/path/to/goners

 Lists references to contents.

slide-10
SLIDE 10

What Sowhat Exposed

 Programs outlived libraries by several

years!

 Likewise, libraries outlived programs!  Daemons depended upon remote

libraries unavailable at boot!

slide-11
SLIDE 11

Sowhat Also Analyzes

 Symbolic and hard links.  References to script handlers (#!).  Configuration file references.  More to come!

slide-12
SLIDE 12

Performance

 Sample run on /local/bin, /usr/bin, /bin.  554 megabytes of executables.

 2022 executable files.

 3.3 megabytes of cached data.

 7929 library dependencies.  1437 symlinks, 226 hardlinks, 499 scripts.

 Overhead = 3.3/554 = 0.6 percent.  Index time: 13 minutes real time, 87.6 cpu-

seconds (Sun E-250,/local/bin nfs mounted)

slide-13
SLIDE 13

Status and Availability

 http://sowhat.sourceforge.net  GPL  Platform: Solaris 7-8, Mysql, Perl with

DBI, DBD::Mysql.

 LISA materials:

http://www.eecs.tufts.edu/ ~ couch/sowhat