Questions tagged [strace]

strace is a Linux/UNIX tool for logging and analysing the system calls made by a user-side process.

strace is a diagnostic, debugging and instructional userspace utility for Linux. It is used to monitor interactions between processes and the Linux kernel, which include system calls, signal deliveries, and changes of process state. The operation of strace is made possible by the kernel feature known as .

Use this tag to ask programming questions related to the strace command and the strace() system call.

Source: Wikipedia

485 questions
0
votes
0 answers

How to run strace command on an Android device from java application

I can't run strace command from my java application . I tried the code above try { // Executes the command. java.lang.Process process = Runtime.getRuntime().exec("strace -p 2545 -o /mnt/sdcard/Result.txt"); BufferedReader reader = new…
Jane1310
  • 1
  • 1
0
votes
1 answer

Strace command from Android app writes empty file

I'm trying to exceute strace command for a PID from the android app. the code segment is below: Runtime.getRuntime().exec("strace -p 20436 -o /mnt/sdcard/sampleTrace11.txt"); The file sampleTrace11.txt is created but it is empty. When I execute the…
srooth
  • 33
  • 2
  • 11
0
votes
1 answer

strace shell command issue in Android

I'm building a monitor app, which runs in background and logs the system calls executed by currently running application using the strace command. String cmd="strace -p "+processID+" -o…
srooth
  • 33
  • 2
  • 11
0
votes
1 answer

cpu pegged, memory pegged, strace output

All of the sudden an application that I've been working on is hammering the server's cpu and memory. I have not had any code changes since this "pegging" has started. I did some digging into strace to try and find out what is going on but I'm…
Josh
  • 301
  • 5
  • 15
0
votes
2 answers

Environment for a Qt Program

I have a Qt executable file. When this program runs on a Ubuntu 11.04 virtual machine, the GUI is ugly though you can still tell it is the GUI that you want. When it runs on Ubuntu 12.04 of my laptop, however, everything goes well. Thus I guess…
beaver
  • 550
  • 1
  • 9
  • 23
0
votes
1 answer

Android app for strace

I am using an Android tablet and am looking to debug an app which is causing random reboots. Is there an app I can install to perform the equivalent of a background strace or equivalent ? How is this normally handled. I am looking to see if there…
boffin
  • 639
  • 2
  • 13
  • 26
0
votes
1 answer

Two simultaneous sends locks up both programs

I'm debugging my application (sort of a follow up to an earlier question), which is essentially a toy peer to peer client. It works as follows: Peer 1 requests a block (or several blocks) from Peer 2 Peer 2 receives the request, and sends the…
the_man_slim
  • 1,155
  • 2
  • 11
  • 18
0
votes
1 answer

Memory Allocation without mmap2 system call strace?

Is it possible to allocate memory without the mmap2 call? I was working on A10 board video player, where I have a huge memory leak. possibly in each frame displayer. There is a library libvecore which handles system call and we don't have the…
0
votes
1 answer

Coro + Coro::LWP freezes

I have script using Coro, Coro::LWP and LWP::UserAgent. I make an array of requests and run them by Coro's async {}. Then i use results from them and save to file. Script runs for hours or sometimes for minutes and then freezes. I've made a strace…
elgato
  • 321
  • 3
  • 13
0
votes
2 answers

sendto pid and groups

I'm trying to understand this line from an strace on linux: sendto(10, "\24\0\0\0\26\0\1\3\233\274\362O\0\0\0\0\0\0\0\0", 20, 0, {sa_family=AF_NETLINK, pid=0, groups=00000000}, 12) = 20 I have looked on the net and in man pages about sendto, but I…
user300811
  • 158
  • 1
  • 6
0
votes
1 answer

Why does strace following a different execution flow?

I am referring the following article learning symbolic link attacks: struct stat st; FILE * fp; if (argc != 3) { fprintf (stderr, "usage : %s file message\n", argv [0]); exit(EXIT_FAILURE); } if (stat (argv [1], & st) < 0) { fprintf (stderr,…
kidd0
  • 731
  • 2
  • 8
  • 25
-1
votes
1 answer

Linux Executable fails to run with error “/usr/bin/strace: exec: No such file or directory” on running strace

I need to analyse linux binary executable file using strace for capturing the system calls. On running the command: /usr/bin/strace ./005f32fffe1da3bc100e7dcd8b2f8f2c I got this error: execve("./005f32fffe1da3bc100e7dcd8b2f8f2c",…
mmg
  • 59
  • 1
  • 5
-1
votes
1 answer

Why no call fstab64 after read? And can this be a problem?

I want to create a new dynamic library instead of another, the source code of which is lost. I have created a library with exported functions, but the program does not load it. Conclusion Strace is almost the same, the only difference is that in the…
-1
votes
1 answer

Comparing String Values from Strace

Using strace to compare outputs of two different binaries, I am having trouble determining what the values written actually are. write(3, "g\377\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 4096) = 4096 write(4,…
user2725742
  • 398
  • 2
  • 12
-1
votes
1 answer

strace high epoll_wait time

i am facing high epoll_wait time when i used this command to check the page execution. strace -o output.txt -f -r -s4096 -p 21605 the outout was big txt file but i was interested in this piece of data and unable to find out the reason of this.…
Steeve
  • 423
  • 2
  • 9
  • 23
1 2 3
32
33