Visit Our UNIX and Linux User Community


process doesn't crash when i use the truss ??


 
Thread Tools Search this Thread
Operating Systems Solaris process doesn't crash when i use the truss ??
# 1  
Old 09-22-2009
process doesn't crash when i use the truss ??

Hi All,

We a critical application running on the Sun Solaris platform. But, for some reasons the process get's killed abnormally in the production environment and not sure what was causing this. I thought i would use the truss command to trace the errors.. so i used the bellow command

truss -p <pid> once i issued this command my application didn't crash at all. It's been running for 24 hrs with out any issues. previously the application used to crash at least 2 hrs once. Can somebody please explain what's so special when i use the truss on a process id. Did any of you had similar situations ??? Please kindly suggest.


Thank you,
Sudharma.
# 2  
Old 09-22-2009
truss is eating CPU time and maybe this prevents the crash... use "dtrace" for a real-time look at your application. this link is a good startpoint to learn about dtrace:
DTrace Tools
# 3  
Old 09-22-2009
Thanks a lot DukeNuke. I will try this out.


Cheers Smilie
Sudharma.

---------- Post updated at 09:22 AM ---------- Previous update was at 09:09 AM ----------

Hi DukeNuke,

When you said it's eating up the CPU time, how does it stop my process being killed. Sorry, just wanted to know how this thing works. Smilie

Thank you,
Sudharma.
# 4  
Old 09-22-2009
truss can use a lot of cpu time... i don't know if that is the problem but it CAN be... dtrace in solaris 10+ is the better solution to look for resource (and other) problems.

Last edited by DukeNuke2; 09-22-2009 at 12:01 PM..
# 5  
Old 09-22-2009
Thanks DukeNuke


Cheers Smilie
Sudharma
# 6  
Old 09-22-2009
Is your application multi-threaded? If so, you're probably dying in a SIGSEGV or SIGBUS and should be able to find a core file somewhere if you've got core files enabled.

If you do find such core files, you've probably got a race condition that running under truss masks. As others have noted, truss takes up some CPU cycles and this can impact the timing of your application in unpredictable ways.

FWIW, this isn't exactly a new type of bug, and I've even seen the exact opposite of your problem, too. An application would run fine until truss was attached to it - a race condition would almost immediately be triggered and the app would crash.

Previous Thread | Next Thread
Test Your Knowledge in Computers #728
Difficulty: Medium
Bjarne Stroustrup was awarded the Computer Pioneer Award for pioneering C++.
True or False?

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Truss output

Hi, I want to trace a background java program which runs in infinite loop. I have used truss command for this. But the program terminated after some hours with below truss output: Received signal #1, SIGHUP, in lwp_cond_wait() /1: siginfo: SIG#0 Please let me know what... (5 Replies)
Discussion started by: Hara Prasad
5 Replies

2. AIX

How to start monitoring with truss before a process starts

Hi guys, Is there some way to monitor a process but previously starting truss like this? truss ls & ls Thanks in advance. (1 Reply)
Discussion started by: edgarvm
1 Replies

3. UNIX Desktop Questions & Answers

Automatically killing a process if it doesn't use any CPU time

Hi, I'm new to Linux. I have a windows server that run many processes on it. In some cases the processes doesn't exit properly or just stop working and the process needs to be killed. I was wondering how i can automatically (couple of times a day) check which process doesn't use any CPU... (3 Replies)
Discussion started by: ramikom
3 Replies

4. Programming

dbx - attach to process, break when crash

Hey everyone, I have a process that is crashing, and I'd like to have some way to see where it crashes. Is this possible? (2 Replies)
Discussion started by: ctote
2 Replies

5. Shell Programming and Scripting

need help with truss !

i have to gather some info about a process and redirect it to a1.txt file. For this i m using truss command truss -po a1.txt $PID_Detail where $PID_Detail= 1482944 3362976 -------------------------------------------------------------------------- Below the script: #!/bin/ksh for i... (6 Replies)
Discussion started by: ali560045
6 Replies

6. Shell Programming and Scripting

how to use truss?

Hi all, while trying to debug and figure out why a lofiadm command was not working on my script, i came across a cmd called "truss" all i know about it is that it executes the specified command and produces a trace of the system calls it performs, the signals it receives, and the machine faults... (5 Replies)
Discussion started by: wrapster
5 Replies

7. Programming

Process crash when allocating memory

Hi I'm currently using C++ on a HP-UX 11i system (upgrading some libraries) and am encountering a problem with the process crashing when allocating memory via a call to new (a rather large array of objects are being created). Is there a way to find out what the sizes of the stack and heap are?... (1 Reply)
Discussion started by: themezzaman
1 Replies

8. IP Networking

truss results

I have tried to analyze the log of truss shown below. I haven't found anything clear for me indicating the problem. The process is the server that accepts client connections. To establish the connection it starts the child thread then it should transfer data. In reality it gets only connection.... (1 Reply)
Discussion started by: gogogo
1 Replies

9. UNIX for Advanced & Expert Users

truss

I'm a DBA so no abuse please! I've for 5 Oracle Forms processes that are spinning and am trying to find out if they're doing anything: Running HPUX 11.11 CPU TTY PID USERNAME PRI NI SIZE RES STATE TIME %WCPU %CPU COMMAND 9 ? 2735 oracle 241 20 24228K 16668K run 2607:29 84.92... (2 Replies)
Discussion started by: fraze
2 Replies

10. UNIX for Advanced & Expert Users

Process calls - making sense of truss results

Can someone point me at resources for system calls? Specifically, I am trying to make sense of what I am seeing in a truss command. Thanks! (3 Replies)
Discussion started by: jpeery
3 Replies

Featured Tech Videos