- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Multiple entries for a shared lib private data in ...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-03-2009 10:15 PM
тАО09-03-2009 10:15 PM
We have a service which makes use of a host of shared libraries. When the service is run and the shared libs are loaded, we ran pmap on the pid of the particular service in order to know the usage of memory and allied data.
But, for a particular library, we see that entries corresponding to PD [private data] are shown twice.
[myhost]/me> pmap 13797 | grep -i
dc8c6000 1512K 1332K PD rw- /app/runtime/exe/libb3.so
dcae8000 10.3M 7928K PD rwx /app/runtime/exe/libb3.so
dd50c000 1744K 1376K PD rw- /app/runtime/exe/libb2.so
dd718000 11.7M 8548K PD rwx /app/runtime/exe/libb2.so
de27a000 1304K 1260K PD rw- /app/runtime/exe/libb1.so
de43c000 9696K 6992K PD rwx /app/runtime/exe/libb1.so
[myhost]/me> pmap 13797 |grep -w "runtime/exe"|grep -w PD|awk '{print $6}'|wc -l
179
[myhost]/me> pmap 13797 |grep -w "runtime/exe"|grep -w PD|awk '{print $6}'|sort -u|wc -l
90
[myhost]/me>
All our libraries had two entries corresponding to 'PD' as shown through pmap.
Should not the PD for a particular shared lib be shown just once? And if not, what is the significance of two entries and which one is to be considered a reference for our analysis concerning measuring the footprint of our service?
Please provide info or pointers to further reference.
Thanks.
_raghava_
PS: Same query put up in workload/resource management section [http://forums13.itrc.hp.com/service/forums/questionanswer.do?threadId=1369019]
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-03-2009 10:34 PM
тАО09-03-2009 10:34 PM
Re: Multiple entries for a shared lib private data in pmap output.
try a chmod 555 on it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-03-2009 10:45 PM
тАО09-03-2009 10:45 PM
Re: Multiple entries for a shared lib private data in pmap output.
the other is the static data of the shared lib, and is private.
Probably the rwx should be only r-x and is probably the text segment, the rw- is probably the static data
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-03-2009 10:57 PM
тАО09-03-2009 10:57 PM
Re: Multiple entries for a shared lib private data in pmap output.
Ran a 'chatr +dbg enable' to set private mapping. Also, did set file access mode to 555.
Still, multiple entries for PD as seen from pmap. :(
[myhost]/me> pmap 6713 | grep libb
dc9c6000 1512K 1368K PD rw- /tmp/PMAP-LOG/libb/libb3.so
dcbe8000 10M 4740K PD rwx /tmp/PMAP-LOG/libb/libb3.so
dd5cc000 1744K 1376K PD rw- /tmp/PMAP-LOG/libb/libb2.so
dd7dc000 11.3M 5224K PD rwx /tmp/PMAP-LOG/libb/libb2.so
de2fa000 1304K 1272K PD rw- /tmp/PMAP-LOG/libb/libb1.so
de494000 9348K 4500K PD rwx /tmp/PMAP-LOG/libb/libb1.so
[myhost]/me> ls -lrt /tmp/PMAP-LOG/libb/libb*
-r-xr-xr-x 1 me adm 15414996 Sep 4 12:29 /tmp/PMAP-LOG/libb/libb1.so
-r-xr-xr-x 1 me adm 18761784 Sep 4 12:29 /tmp/PMAP-LOG/libb/libb2.so
-r-xr-xr-x 1 me adm 16624648 Sep 4 12:29 /tmp/PMAP-LOG/libb/libb3.so
[myhost]/me> chatr /tmp/PMAP-LOG/libb/libb1.so | grep -iw private
shared library mapped private enabled
[myhost]/me> chatr /tmp/PMAP-LOG/libb/libb2.so | grep -iw private
shared library mapped private enabled
[myhost]/me> chatr /tmp/PMAP-LOG/libb/libb3.so | grep -iw private
shared library mapped private enabled
[myhost]/me>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-04-2009 01:03 AM
тАО09-04-2009 01:03 AM
Re: Multiple entries for a shared lib private data in pmap output.
What does "size libb3.so" show? Does the text match with 10.3M and data 1512K?
>which one is to be considered a reference for our analysis concerning measuring the footprint of our service?
If both are PD, then both need to be counted.
>Please provide info
If you want to continue to get info, you need to look into your point assignment:
assigned points to 0 of 8
http://forums.itrc.hp.com/service/forums/pageList.do?userId=WW218166&listType=unassigned&forumId=1
>Ran a 'chatr +dbg enable' to set private mapping.
>shared library mapped private enabled
You absolutely positively don't want to do that! That maps your text as private.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-04-2009 01:43 AM
тАО09-04-2009 01:43 AM
Re: Multiple entries for a shared lib private data in pmap output.
>>points.
Done. I regret the delay.
size libb*so shows as below [have taken out hex column, will it help if put?]
text data bss dec filename
9569404 1332127 310864 11212395 libb1.so
11538454 1782844 305920 13627218 libb2.so
10249065 1546992 607056 12403113 libb3.so
>>If both are PD, then both need to be counted.
Please correct me if am wrong; but should not pmap output have exactly one line each for PD and SC per shared lib under use? I still am not understanding the significance of two sets of the same shared lib being used by the process.
>>mapping text to private.
I do understand the impact. We use private mapping only while debugging the libs (in a controlled local env) and not always. This was just a check.
Thanks again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-04-2009 02:27 AM
тАО09-04-2009 02:27 AM
Re: Multiple entries for a shared lib private data in pmap output.
(Your pmap data is in decimal. That's why I didn't mention size -x.)
These compare very closely with your pmap data:
1512K PD rw- libb3.so
10.3M PD rwx libb3.so
10,249,065 1,546,992 607,056 libb3.so
And the BSS has another mmap.
>but should not pmap output have exactly one line each for PD and SC per shared lib under use? I still am not understanding the significance of two sets of the same shared lib being used by the process.
You have two PDs because you used the "evil" "chatr +dbg enable". Did you forget to disable this on your application? Or are you currently debugging?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-04-2009 02:49 AM
тАО09-04-2009 02:49 AM
Re: Multiple entries for a shared lib private data in pmap output.
>>You have two PDs because you used the "evil" "chatr +dbg enable".
No. What is mentioned @thread start here was without having 'chatr +dbg enable' done. Am quite sure about it.
Also, as could be seen below; we have two sets of entries for private data even with private mapping disabled. Hence, the doubt in the first place.
[myhost]/me> pmap 2968 | grep libb
dc9c6000 1512K 1368K PD rw- /tmp/PMAP-LOG/libb/libb3.so
dcc04000 10M 4740K PD rwx /tmp/PMAP-LOG/libb/libb3.so
dd5cc000 1744K 1376K PD rw- /tmp/PMAP-LOG/libb/libb2.so
dd7f8000 11.3M 5224K PD rwx /tmp/PMAP-LOG/libb/libb2.so
de2fa000 1304K 1272K PD rw- /tmp/PMAP-LOG/libb/libb1.so
de4a8000 9348K 4500K PD rwx /tmp/PMAP-LOG/libb/libb1.so
[myhost]/tmp/PMAP-LOG/libb> chatr libb*so | grep -w private
shared library mapped private disabled
shared library mapped private disabled
shared library mapped private disabled
[myhost]/tmp/PMAP-LOG/libb> ls -l libb*so
-r-xr-xr-x 1 me adm 15414996 Sep 4 16:20 libb1.so
-r-xr-xr-x 1 me adm 18761784 Sep 4 16:20 libb2.so
-r-xr-xr-x 1 me adm 16624648 Sep 4 16:20 libb3.so
[myhost]/tmp/PMAP-LOG/libb>
(let me also mention that I have restarted my process after changing permissions/running through chatr etc)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-04-2009 12:16 PM
тАО09-04-2009 12:16 PM
SolutionSorry for not realizing this on my first reply, you have fallen into the chatr(1) trap of having an option that doesn't work for shlibs but chatr shows something changed, giving you the illusion it works.
For this option, you must use chatr(1) on the executable, not each shlib!
http://docs.hp.com/en/5187-8590/5187-8590.pdf
chatr +dbg enable
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1238538
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=943480
>as could be seen below; we have two sets of entries for private data
Because you have it enabled on the executable.
>I have restarted my process after changing permissions/running through chatr etc)
There are several conclusions you can make if you didn't restart:
1) If chatr(1) worked, it wasn't mapped shared.
2) If it was mapped shared, chatr(1) would fail.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-07-2009 12:24 AM
тАО09-07-2009 12:24 AM
Re: Multiple entries for a shared lib private data in pmap output.
Thanks again,
_raghava_
/* Comment by Dennis above (timestamp Sep 4, 2009 20:16:35 GMT) provides the solution to the query. */