Bug 595033 - condor_shadow memory: condor processes link with libcrypt, incur its memory penalty, but don't use it
condor_shadow memory: condor processes link with libcrypt, incur its memory p...
Status: CLOSED ERRATA
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: condor (Show other bugs)
Development
All Linux
high Severity high
: 1.3
: ---
Assigned To: Matthew Farrellee
Luigi Toscano
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-05-22 20:13 EDT by Matthew Farrellee
Modified: 2012-02-09 13:13 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-10-20 07:30:19 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Matthew Farrellee 2010-05-22 20:13:09 EDT
Description of problem:

condor_shadow's private address space is a precious thing, and must be as small as possible.

All Condor processes, including condor_shadow, link with libcrypt, which maintains a large chunk of writable memory. Since crypt is not actually used, libcrypt is not needed.


Version-Release number of selected component (if applicable):

likely all, definitely 7.4.3-0.14
Comment 1 Matthew Farrellee 2010-05-22 20:14:20 EDT
ldd -

bad,

$ ldd condor_shadow              
	libpthread.so.0 => /lib64/libpthread.so.0 (0x000000317aa00000)
	libpcre.so.0 => /lib64/libpcre.so.0 (0x000000378fe00000)
	libdl.so.2 => /lib64/libdl.so.2 (0x000000317a600000)
	libcrypt.so.1 => /lib64/libcrypt.so.1 (0x000000318dc00000)
	libkrb5.so.3 => /usr/lib64/libkrb5.so.3 (0x0000003186000000)
	libcrypto.so.6 => /lib64/libcrypto.so.6 (0x0000003184000000)
	libssl.so.6 => /lib64/libssl.so.6 (0x0000003187000000)
	libresolv.so.2 => /lib64/libresolv.so.2 (0x0000003181e00000)
	libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x000000318d000000)
	libm.so.6 => /lib64/libm.so.6 (0x000000317a200000)
	libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x0000003189000000)
	libc.so.6 => /lib64/libc.so.6 (0x0000003179e00000)
	libk5crypto.so.3 => /usr/lib64/libk5crypto.so.3 (0x0000003185800000)
	libcom_err.so.2 => /lib64/libcom_err.so.2 (0x0000003183c00000)
	/lib64/ld-linux-x86-64.so.2 (0x0000003179800000)
	libkrb5support.so.0 => /usr/lib64/libkrb5support.so.0 (0x0000003186400000)
	libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x0000003186c00000)
	libz.so.1 => /usr/lib64/libz.so.1 (0x000000317b200000)
	libgssapi_krb5.so.2 => /usr/lib64/libgssapi_krb5.so.2 (0x0000003185c00000)
	libselinux.so.1 => /lib64/libselinux.so.1 (0x000000317b600000)
	libsepol.so.1 => /lib64/libsepol.so.1 (0x000000317ba00000)

good,

$ ldd condor_shadow 
	libpthread.so.0 => /lib64/libpthread.so.0 (0x000000317aa00000)
	libpcre.so.0 => /lib64/libpcre.so.0 (0x000000378fe00000)
	libdl.so.2 => /lib64/libdl.so.2 (0x000000317a600000)
	libkrb5.so.3 => /usr/lib64/libkrb5.so.3 (0x0000003186000000)
	libcrypto.so.6 => /lib64/libcrypto.so.6 (0x0000003184000000)
	libssl.so.6 => /lib64/libssl.so.6 (0x0000003187000000)
	libz.so.1 => /usr/lib64/libz.so.1 (0x000000317b200000)
	libresolv.so.2 => /lib64/libresolv.so.2 (0x0000003181e00000)
	libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x000000318d000000)
	libm.so.6 => /lib64/libm.so.6 (0x000000317a200000)
	libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x0000003189000000)
	libc.so.6 => /lib64/libc.so.6 (0x0000003179e00000)
	libk5crypto.so.3 => /usr/lib64/libk5crypto.so.3 (0x0000003185800000)
	libcom_err.so.2 => /lib64/libcom_err.so.2 (0x0000003183c00000)
	/lib64/ld-linux-x86-64.so.2 (0x0000003179800000)
	libkrb5support.so.0 => /usr/lib64/libkrb5support.so.0 (0x0000003186400000)
	libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x0000003186c00000)
	libgssapi_krb5.so.2 => /usr/lib64/libgssapi_krb5.so.2 (0x0000003185c00000)
	libselinux.so.1 => /lib64/libselinux.so.1 (0x000000317b600000)
	libsepol.so.1 => /lib64/libsepol.so.1 (0x000000317ba00000)


pmap -

(using job: echo "cmd=/bin/sleep\nargs=1d\nnotification=never\nqueue 1" | condor_submit)

bad,

$ pmap -d $(pidof condor_shadow) | grep -e rw -e private                
00000000007e9000       8 rw--- 00000000001e9000 0fd:00000 condor_shadow
00000000007eb000      16 rw--- 00000000007eb000 000:00000   [ anon ]
00000000009ea000     208 rw--- 00000000001ea000 0fd:00000 condor_shadow
000000001a297000     396 rw--- 000000001a297000 000:00000   [ anon ]
0000003179a1c000       4 rw--- 000000000001c000 0fd:00000 ld-2.5.so
000000317a151000       4 rw--- 0000000000151000 0fd:00000 libc-2.5.so
000000317a152000      20 rw--- 000000317a152000 000:00000   [ anon ]
000000317a482000       4 rw--- 0000000000082000 0fd:00000 libm-2.5.so
000000317a803000       4 rw--- 0000000000003000 0fd:00000 libdl-2.5.so
000000317ac16000       4 rw--- 0000000000016000 0fd:00000 libpthread-2.5.so
000000317ac17000      16 rw--- 000000317ac17000 000:00000   [ anon ]
000000317b413000       4 rw--- 0000000000013000 0fd:00000 libz.so.1.2.3
000000317b815000       8 rw--- 0000000000015000 0fd:00000 libselinux.so.1
000000317b817000       4 rw--- 000000317b817000 000:00000   [ anon ]
000000317bc3b000       4 rw--- 000000000003b000 0fd:00000 libsepol.so.1
000000317bc3c000      40 rw--- 000000317bc3c000 000:00000   [ anon ]
0000003182012000       4 rw--- 0000000000012000 0fd:00000 libresolv-2.5.so
0000003182013000       8 rw--- 0000003182013000 000:00000   [ anon ]
0000003183e01000       4 rw--- 0000000000001000 0fd:00000 libcom_err.so.2.1
000000318432c000     132 rw--- 000000000012c000 0fd:00000 libcrypto.so.0.9.8e
000000318434d000      16 rw--- 000000318434d000 000:00000   [ anon ]
0000003185a23000       8 rw--- 0000000000023000 0fd:00000 libk5crypto.so.3.1
0000003185e2c000       8 rw--- 000000000002c000 0fd:00000 libgssapi_krb5.so.2.2
0000003186291000      16 rw--- 0000000000091000 0fd:00000 libkrb5.so.3.3
0000003186607000       4 rw--- 0000000000007000 0fd:00000 libkrb5support.so.0.1
0000003186e01000       4 rw--- 0000000000001000 0fd:00000 libkeyutils-1.2.so
0000003187244000      24 rw--- 0000000000044000 0fd:00000 libssl.so.0.9.8e
000000318920d000       4 rw--- 000000000000d000 0fd:00000 libgcc_s-4.1.2-20080825.so.1
000000318d2eb000      12 rw--- 00000000000eb000 0fd:00000 libstdc++.so.6.0.8
000000318d2ee000      72 rw--- 000000318d2ee000 000:00000   [ anon ]
000000318de09000       4 rw--- 0000000000009000 0fd:00000 libcrypt-2.5.so
000000318de0a000     184 rw--- 000000318de0a000 000:00000   [ anon ]
000000379001b000       4 rw--- 000000000001b000 0fd:00000 libpcre.so.0.0.1
00002b4cc3227000       4 rw--- 00002b4cc3227000 000:00000   [ anon ]
00002b4cc3242000      36 rw--- 00002b4cc3242000 000:00000   [ anon ]
00002b4cc3455000       4 rw--- 000000000000a000 0fd:00000 libnss_files-2.5.so
00002b4cc3456000       4 rw--- 00002b4cc3456000 000:00000   [ anon ]
00007fff21719000      84 rw--- 00007ffffffea000 000:00000   [ stack ]
mapped: 60672K    writeable/private: 1384K    shared: 0K

good,

$ pmap -d $(pidof condor_shadow) | grep -e rw -e private                
00000000007e9000       8 rw--- 00000000001e9000 0fd:00000 condor_shadow
00000000007eb000      16 rw--- 00000000007eb000 000:00000   [ anon ]
000000001cb01000     396 rw--- 000000001cb01000 000:00000   [ anon ]
0000003179a1c000       4 rw--- 000000000001c000 0fd:00000 ld-2.5.so
000000317a151000       4 rw--- 0000000000151000 0fd:00000 libc-2.5.so
000000317a152000      20 rw--- 000000317a152000 000:00000   [ anon ]
000000317a482000       4 rw--- 0000000000082000 0fd:00000 libm-2.5.so
000000317a803000       4 rw--- 0000000000003000 0fd:00000 libdl-2.5.so
000000317ac16000       4 rw--- 0000000000016000 0fd:00000 libpthread-2.5.so
000000317ac17000      16 rw--- 000000317ac17000 000:00000   [ anon ]
000000317b413000       4 rw--- 0000000000013000 0fd:00000 libz.so.1.2.3
000000317b815000       8 rw--- 0000000000015000 0fd:00000 libselinux.so.1
000000317b817000       4 rw--- 000000317b817000 000:00000   [ anon ]
000000317bc3b000       4 rw--- 000000000003b000 0fd:00000 libsepol.so.1
000000317bc3c000      40 rw--- 000000317bc3c000 000:00000   [ anon ]
0000003182012000       4 rw--- 0000000000012000 0fd:00000 libresolv-2.5.so
0000003182013000       8 rw--- 0000003182013000 000:00000   [ anon ]
0000003183e01000       4 rw--- 0000000000001000 0fd:00000 libcom_err.so.2.1
000000318432c000     132 rw--- 000000000012c000 0fd:00000 libcrypto.so.0.9.8e
000000318434d000      16 rw--- 000000318434d000 000:00000   [ anon ]
0000003185a23000       8 rw--- 0000000000023000 0fd:00000 libk5crypto.so.3.1
0000003185e2c000       8 rw--- 000000000002c000 0fd:00000 libgssapi_krb5.so.2.2
0000003186291000      16 rw--- 0000000000091000 0fd:00000 libkrb5.so.3.3
0000003186607000       4 rw--- 0000000000007000 0fd:00000 libkrb5support.so.0.1
0000003186e01000       4 rw--- 0000000000001000 0fd:00000 libkeyutils-1.2.so
0000003187244000      24 rw--- 0000000000044000 0fd:00000 libssl.so.0.9.8e
000000318920d000       4 rw--- 000000000000d000 0fd:00000 libgcc_s-4.1.2-20080825.so.1
000000318d2eb000      12 rw--- 00000000000eb000 0fd:00000 libstdc++.so.6.0.8
000000318d2ee000      72 rw--- 000000318d2ee000 000:00000   [ anon ]
000000379001b000       4 rw--- 000000000001b000 0fd:00000 libpcre.so.0.0.1
00002b1d591d0000       4 rw--- 00002b1d591d0000 000:00000   [ anon ]
00002b1d591eb000      36 rw--- 00002b1d591eb000 000:00000   [ anon ]
00002b1d593fe000       4 rw--- 000000000000a000 0fd:00000 libnss_files-2.5.so
00002b1d593ff000       4 rw--- 00002b1d593ff000 000:00000   [ anon ]
00007fff31bdc000      84 rw--- 00007ffffffea000 000:00000   [ stack ]
mapped: 58196K    writeable/private: 988K    shared: 0K
Comment 2 Matthew Farrellee 2010-05-22 20:17:21 EDT
This 28.6% improvement should be available in 7.4.3-0.15
Comment 3 Luigi Toscano 2010-06-01 06:36:54 EDT
condor_* daemon in the condor package (including condor_shadow) are not linked to libcrypt.so anymore.

However, condor_* processes that are part of condor-qmf and condor-vm-gahp still link to libcrypt.
Comment 4 Matthew Farrellee 2010-06-01 10:15:37 EDT
Specifically,

# rpm -q condor
condor-7.4.3-0.16.el5
# rpm -qV condor
.M......    /var/lib/condor/execute
# ldd /usr/bin/condor_* /usr/sbin/condor_* | grep -e ":" -e "crypt\."
...
/usr/sbin/condor_job_server:
        libcrypt.so.1 => /lib64/libcrypt.so.1 (0x000000321a000000)
...
/usr/sbin/condor_trigger_config:
        libcrypt.so.1 => /lib64/libcrypt.so.1 (0x000000321a000000)
/usr/sbin/condor_triggerd:
        libcrypt.so.1 => /lib64/libcrypt.so.1 (0x000000321a000000)
/usr/sbin/condor_vm-gahp:
        libgcrypt.so.11 => /usr/lib64/libgcrypt.so.11 (0x0000003224200000)
        libcrypt.so.1 => /lib64/libcrypt.so.1 (0x000000321a000000)

This is ok for 0.16, please open a new BZ for the others.
Comment 5 Luigi Toscano 2010-06-01 12:22:01 EDT
I've misread the bug, which is about condor_shadow.
condor_shadow no longer links against libcrypt on condor 7.4.3-0.16 (RHEL 4.8/5.5, i386/x86_64), so this bug is verified.

Note You need to log in before you can comment on or make changes to this bug.