pstack missing from Ubuntu 10.10


 
Thread Tools Search this Thread
Operating Systems Linux Ubuntu pstack missing from Ubuntu 10.10
# 1  
Old 01-11-2011
pstack missing from Ubuntu 10.10

Hi All
I would like to use the tool "pstack" to get a sample of the stack trace for a process.
As far as I understood It seems widely available in all Linux systems, but it is not in Ubuntu 10.10.
I tried using apt-get as per some posts in few forum, but it cannot be found in the APT repositories.

I found this link here https://launchpad.net/ubuntu/+source/pstack/1.2-1 but I see 3 files:
A => 1 .dsc file that I don't know what does it mean
B => 2 different source tarball ( 1 ORIGINAL + 1 DIFF ?!?! ). I guess that they must be installed one after one in strictly order.

Is there any safe way to install it into my Ubuntu?
Any package that contains it that can be found via APT-GET?
Thanks a lot
Regards
# 2  
Old 01-11-2011
According to the Launchpad site it should be available in Maverick (10.10) in the universe section. Could you post your /etc/apt/sources.list?

As for the files you've found: the .dsc is a general description of the package, the first tarball is the original source, and the second are the changes made by the packager to better fit into the distribution. You'll have to run dpkg-buildpackage on it to create an installable .deb.
# 3  
Old 01-11-2011
Thanks for your kind help: here we go my list.

Code:
#deb cdrom:[Ubuntu 10.10 _Maverick Meerkat_ - Release amd64 (20101007)]/ maverick main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.

deb http://gb.archive.ubuntu.com/ubuntu/ maverick main restricted
deb-src http://gb.archive.ubuntu.com/ubuntu/ maverick main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://gb.archive.ubuntu.com/ubuntu/ maverick-updates main restricted
deb-src http://gb.archive.ubuntu.com/ubuntu/ maverick-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://gb.archive.ubuntu.com/ubuntu/ maverick universe
deb-src http://gb.archive.ubuntu.com/ubuntu/ maverick universe
deb http://gb.archive.ubuntu.com/ubuntu/ maverick-updates universe
deb-src http://gb.archive.ubuntu.com/ubuntu/ maverick-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to 
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://gb.archive.ubuntu.com/ubuntu/ maverick multiverse
deb-src http://gb.archive.ubuntu.com/ubuntu/ maverick multiverse
deb http://gb.archive.ubuntu.com/ubuntu/ maverick-updates multiverse
deb-src http://gb.archive.ubuntu.com/ubuntu/ maverick-updates multiverse

## Uncomment the following two lines to add software from the 'backports'
## repository.
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
# deb http://gb.archive.ubuntu.com/ubuntu/ maverick-backports main restricted universe multiverse
# deb-src http://gb.archive.ubuntu.com/ubuntu/ maverick-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu maverick partner
# deb-src http://archive.canonical.com/ubuntu maverick partner

## This software is not part of Ubuntu, but is offered by third-party
## developers who want to ship their latest software.
deb http://extras.ubuntu.com/ubuntu maverick main
deb-src http://extras.ubuntu.com/ubuntu maverick main

deb http://security.ubuntu.com/ubuntu maverick-security main restricted
deb-src http://security.ubuntu.com/ubuntu maverick-security main restricted
deb http://security.ubuntu.com/ubuntu maverick-security universe
deb-src http://security.ubuntu.com/ubuntu maverick-security universe
deb http://security.ubuntu.com/ubuntu maverick-security multiverse
deb-src http://security.ubuntu.com/ubuntu maverick-security multiverse


Last edited by pludi; 01-12-2011 at 03:32 AM..
# 4  
Old 01-12-2011
Hm, you have the universe repo enabled. Did you run apt-get update after changing your repository list?
# 5  
Old 01-12-2011
Auchh...no.
I did it after your advice but still calling
Code:
sudo apt-get install pstack

I don't get anything back.
I am trying to build the files shown in the web site.
I downloaded the files and called
Code:
me@myPc:~/myFolder$dpkg-source -x pstack_1.2-1.dsc

gpgv: Signature made Fri 08 Oct 2004 19:00:15 BST using DSA key ID AB474598
gpgv: Can't check signature: public key not found
dpkg-source: warning: failed to verify signature on ./pstack_1.2-1.dsc
dpkg-source: info: extracting pstack in pstack-1.2
dpkg-source: info: unpacking pstack_1.2.orig.tar.gz
dpkg-source: info: applying pstack_1.2-1.diff.gz
dpkg-source: info: upstream files that have been modified: 
 pstack-1.2/pstack.c

After then I try to build the library
Code:
cd pstack
make

cc -Wall -DVERSION=\"1.2\"  -g -o pstack pstack.c
pstack.c: In function ‘loadSymbols':
pstack.c:505: warning: cast from pointer to integer of different size
pstack.c: In function ‘crawl':
pstack.c:544: error: ‘EIP' undeclared (first use in this function)
pstack.c:544: error: (Each undeclared identifier is reported only once
pstack.c:544: error: for each function it appears in.)
pstack.c:546: error: ‘EBP' undeclared (first use in this function)
make: *** [pstack] Error 1

From the README files I see that they need ELF library. I installed them already but still it cannot compile. I might probably using a wrong one or what?
# 6  
Old 01-12-2011
Ugh, sorry for not noticing this earlier, but which platform are you running on? Because there's a bug report for pstack on AMD64 platforms.

To properly (attempt) to build a package, run this
Code:
sudo apt-get install fakeroot build-essential dpkg-dev    # Install required programs to build
sudo apt-get source pstack    # Get the source
sudo apt-get build-dep pstack    # Get possible required extra programs for the build
dpkg-source -x pstack*.dsc    # Unpack/patch the source
cd pstack-<version>
dpkg-buildpackage -rfakeroot -b    # Build a .deb
dpkg -i ../pstack*.deb    # Install the package if all went well

# 7  
Old 01-12-2011
I have INTEL based on this call
Code:
cat /etc/proc/info

model name    : Intel(R) Core(TM)2 Duo CPU     E8500  @ 3.16GHz

but executing the list of commands you are suggesting I see a suspect file called
Code:
pstack_1.2-1_amd64.changes

and other errors so the procedure is not successfull ( I am going to retry again ).

If you see code below is noted where is produced.
---------- Post updated at 07:08 AM ---------- Previous update was at 07:05 AM ----------

Code:
ME@MyPC:~/Downloads$ sudo apt-get source pstack

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Need to get 16.5kB of source archives.
Get:1 http://gb.archive.ubuntu.com/ubuntu/ maverick/universe pstack 1.2-1 (dsc) [555B]
Get:2 http://gb.archive.ubuntu.com/ubuntu/ maverick/universe pstack 1.2-1 (tar) [14.2kB]
Get:3 http://gb.archive.ubuntu.com/ubuntu/ maverick/universe pstack 1.2-1 (diff) [1,706B]
Fetched 16.5kB in 0s (265kB/s)
gpgv: Signature made Fri 08 Oct 2004 19:00:15 BST using DSA key ID AB474598
gpgv: Can't check signature: public key not found
dpkg-source: warning: failed to verify signature on ./pstack_1.2-1.dsc
dpkg-source: info: extracting pstack in pstack-1.2
dpkg-source: info: unpacking pstack_1.2.orig.tar.gz
dpkg-source: info: applying pstack_1.2-1.diff.gz
dpkg-source: info: upstream files that have been modified: 
 pstack-1.2/pstack.c

another error is this where the host architecture is recognized as AMD64.

Code:
ME@MYPC~/Downloads/pstack-1.2$ dpkg-buildpackage -rfakeroot -b

dpkg-buildpackage: export CFLAGS from dpkg-buildflags (origin: vendor): -g -O2
dpkg-buildpackage: export CPPFLAGS from dpkg-buildflags (origin: vendor): 
dpkg-buildpackage: export CXXFLAGS from dpkg-buildflags (origin: vendor): -g -O2
dpkg-buildpackage: export FFLAGS from dpkg-buildflags (origin: vendor): -g -O2
dpkg-buildpackage: export LDFLAGS from dpkg-buildflags (origin: vendor): -Wl,-Bsymbolic-functions
dpkg-buildpackage: source package pstack
dpkg-buildpackage: source version 1.2-1
dpkg-buildpackage: source changed by Baruch Even <baruch@debian.org>
dpkg-buildpackage: host architecture amd64
 dpkg-source --before-build pstack-1.2
 fakeroot debian/rules clean
test -x debian/rules
dh_testroot
rm -f debian/stamp-makefile-build debian/stamp-makefile-install
/usr/bin/make  -C . CFLAGS="-g -O2 -g -Wall -O2" CXXFLAGS="-g -O2 -g -Wall -O2" CPPFLAGS="" LDFLAGS="-Wl,-Bsymbolic-functions"  -k clean
make[1]: Entering directory `/home/emanueler/Downloads/pstack-1.2'
rm pstack
rm: cannot remove `pstack': No such file or directory
make[1]: *** [clean] Error 1
make[1]: Leaving directory `/home/emanueler/Downloads/pstack-1.2'
make: [makefile-clean] Error 2 (ignored)
dh_clean 
dh_clean: Compatibility levels before 5 are deprecated.
 debian/rules build
make: Nothing to be done for `build'.
 fakeroot debian/rules binary
make: Nothing to be done for `binary'.
 dpkg-genchanges -b >../pstack_1.2-1_amd64.changes
dpkg-genchanges: error: cannot read files list file: No such file or directory
dpkg-buildpackage: error: dpkg-genchanges gave error exit status 2


Last edited by manustone; 01-12-2011 at 08:15 AM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Missing menu.lst file in Ubuntu

I am not able to find menu.lst in /boot. During the Linux Kernel Compilation I installed the kernel using make install. Next I created an initrd image. I had to modify the Grub configuration file - /boot/grub/menu.lst which I am not able to find. Any resolution for the issue? (3 Replies)
Discussion started by: rupeshkp728
3 Replies

2. Solaris

pstack file analysis

Hi ... Can you please share how to analyse pstack file and various options for core dump analysis (3 Replies)
Discussion started by: anand87
3 Replies

3. Ubuntu

/dev/ttyb missing from UBUNTU

HI All I am doing first steps in debugging with GDB. I have been suggested to redirect output to another terminal using the command using tty /dev/ttyb I had a look at my ubuntu doing ls /dev/tty* and I cannot find this ttyb. What is it and how to achieve the same thing? I am... (0 Replies)
Discussion started by: manustone
0 Replies

4. Solaris

analyse core file using pmap and pstack

Dear All, I am new to this forum. This is my first. I am facing customer issue. Customer has got core file while running the server. He had sent core file and details from pstack, pmap and pldd commands. I have to debug this application, please help me to fix this issue. I am using sparc 10... (4 Replies)
Discussion started by: KiranBangalore
4 Replies

5. UNIX for Advanced & Expert Users

analyse core file using pmap and pstack

Dear All, I am new to this forum. This is my first. I am facing customer issue. Customer has got core file while running the server. He had sent core file and details from pstack, pmap and pldd commands. I have to debug this application, please help me to fix this issue. I am using sparc... (1 Reply)
Discussion started by: KiranBangalore
1 Replies

6. Red Hat

pfiles and pstack and ptree

Can someone tell me the Linux equivalent for pstack and pfiles and ptree which are Solaris commands. (1 Reply)
Discussion started by: bdsffl
1 Replies

7. UNIX for Advanced & Expert Users

Required info on Pstack on solaris10

Hi All , I am wanted to know the #of thread ( Kernal & User ) created by the Process i was looking into the prstat PID USERNAME SIZE RSS STATE PRI NICE TIME CPU PROCESS/NLWP 994 httpd 126M 99M sleep 58 0 1:11.25 2.4% ns-httpd/33 997 httpd 114M 86M sleep 58 0 0:40.02 2.7% ns-httpd/22 995... (0 Replies)
Discussion started by: rajendra44
0 Replies

8. Solaris

pstack usage on Solaris 9

Hello everyone, I have a 12-thread application running on Solaris 9. When I use the pstack command after a typical core dump, it prints the stack output of all 12 threads/lwps. This is the standard procedure as it is described in the Solaris MAN pages. Is there a way to filter out the... (1 Reply)
Discussion started by: gregb32
1 Replies

9. UNIX for Advanced & Expert Users

Core Dump Analysis Using PStack and PMAP

Hello, I'm new to the group and this is my first post. I'm hoping someone can help me out. I have a core dump that I need to analyze from a Unix box and I've never done this sort of thing before. I was told to run a pmap and pstack on the core file which provided two different output files. ... (3 Replies)
Discussion started by: kimblebee
3 Replies

10. Solaris

decipher pstack with problem lwp

My company has a product that is running on JBoss on Solaris against Oracle 8.1.7. We are having an issue with the server process and high CPU utilization. During this time, and only during this time, we are experiencing database locks that will not let go. A 'ps -L' on the server process... (5 Replies)
Discussion started by: hosierdm
5 Replies
Login or Register to Ask a Question