Getting a live backtrace

 pstack pid

or use gdb to attach to the running process
and then using "where" to print the backtrace
gdb prog pid

gdb apache2 26219
...
(gdb) where
#0 0xb7799424 in __kernel_vsyscall ()
#1 0xb7689b7b in semop () from /lib/i686/cmov/libc.so.6
#2 0xb7731a4f in ?? () from /usr/lib/libapr-1.so.0
#3 0x01158003 in ?? ()
#4 0xb7746548 in ?? () from /usr/lib/libapr-1.so.0
#5 0x00000001 in ?? ()
...

https://wiki.ubuntu.com/Backtrace

User tags

kernel tftp bind fail2ban soa ubuntu ipmi chroot freedos X forwarding virt-install wordpress ssh zRam iSCSI bash virtualbox PXE hdparm lts conntrack security erase xfs cluster mysql ddos taskset tin Adaptec MegaRAID asoundrc /etc/network/interfaces CPAN dpkg squeeze openvpn rtl8723be find ipmitool StorMan lstat quagga puppet idmapd storage proxy backup HTTPS mdadm opcontrol fio exim cgroups mkfs dhcp ha qemu docker-compose in-addr.arpa oprofile centos 7 nginx OpenStack vrrpd pam build AMD debootstrap pulseaudio scsi tzdata pvmove rtsp java LVM ulimit vlan sysctl.conf top rsync groups fido7 LSI bridge htop route cpu tun PTR SSD nfs4 jackd SpamAssassin sysresccd rkhunter xhost .htaccess OpenSSL DRBD SuperMicro swap mariadb vim perlbrew KVM php ip numa CentOS nvidia radeon su bacula parallel elliptics gre opreport hotplug rpm tar bonding video replication alien SYN RT Areca dhclient arping etch shellshock slab gdb flash arch boot shorewall dstat regex bug wget NFS usb initrd Swift performance equalizer limit_conn graylog2 iptables lxc search HDFS APU debian sg vtysh tool iops perl firefox iowait youtube glxinfo docker sublime corosync deb encrypt sftp keyboard gpg pacemaker apt dns sysrq lubuntu raid cpu usage xen core dump source munin language xargs newgrp cpanm iostat 3Ware arp ardour gtk grub ansible apache glusterfs chromium backtrace leap second raid5 qcow2 dovecot cfq tiger routing alsa vrrp mount MODx profiling lenny git exim4 virsh cache netfilter Salt sysctl sysfs noop drupal ps bscan