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
1 answer

avoid access syscall with php apc

I'm trying avoid any unneeded syscall for an apache+php website. So far I made the following changes: apc.stat = false (to avoid apc checking file for updates) use include instead of include_once (to avoid getting realpath of file) use absolute…
Niko Sams
  • 4,304
  • 3
  • 25
  • 44
0
votes
1 answer

strace does not report creation of file

Yesterday I asked a question here on how to see which files were written by an application command, and a good answer pointed me to strace. I can look for open system calls in the output of strace. This worked until today, when I tried to do this…
Mark Galeck
  • 6,155
  • 1
  • 28
  • 55
0
votes
0 answers

apache failing to boot

I successfully installed apache on my machine,but when I try to run it throws core dump. I ran it again using strace,it throws core dump at write system call. Below is the extract from output of stace. What can I infer from this error ? write(2,…
g4ur4v
  • 3,210
  • 5
  • 32
  • 57
0
votes
1 answer

strace is returning a lot of open("/etc/hosts", O_RDONLY|O_CLOEXEC) for a php file

I'm trying to debug why a PHP of mine is using so much of the CPU. After running strace like this: strace -e open,close php /scripName.php It shows me all of the files that it uses and when I think it reaches the part of the code where it uses a…
Jan
  • 2,462
  • 3
  • 31
  • 56
0
votes
1 answer

How to use strace to locate one system call belong which function?

I want to use strace to locate where my tiny program do write system call. For example, my strace ouput is like this: # strace -i regget -f /home/lucid/.config/ctsc.ini Admin Password [2ac5b250] execve("/usr/sbin/regget", ["regget", "-f",…
Fei Xue
  • 1,995
  • 5
  • 19
  • 29
0
votes
2 answers

using strace to debug db2 CLI executing a query

I would like to use strace to debug a strange behaviour I have with db2. I have a SQL function myFoo() implemented in C that doesn't get called for some reason (some code access path not existing or not authorized see here). My Sql Function call a…
Abruzzo Forte e Gentile
  • 14,423
  • 28
  • 99
  • 173
0
votes
1 answer

strace output problems solve

I tried to run strace in linux for my Program. Here is the example Output : brk(0) = 0x804b000 brk(0x806c000) = 0x806c000 open("test.txt", O_RDONLY) = 3 fstat64(3,…
MSK
  • 159
  • 1
  • 2
  • 7
0
votes
1 answer

Xlib Muti-thread program only works under strace

I'm writing a muti-thread program using xlib, pthread and cairo. This program create a thread in order to draw ten points after a click event. The problem is: After the program drew three points, it got crashed and xlib complaint X Error of failed…
0
votes
0 answers

Java - identify system calls associated with method calls

I'm trying to identify what system calls are made by my java program when it runs. Even more specifically, I want to know what java methods invoke what system calls. I've tried strace in Linux: strace -o output.txt java MyProgram This, however,…
DarkyTheOdd
  • 128
  • 1
  • 12
0
votes
1 answer

How do you debug a LONG RUNNING php script?

The problem is that the script hangs up after some long time. strace returns something like this and nothing else: Process 7286 attached - interrupt to quit restart_syscall(<... resuming interrupted call ...>) = 0 poll([{fd=13,…
xvga
  • 591
  • 1
  • 9
  • 15
0
votes
0 answers

PHP Strace result - mysql sleeping connections

So, after running a strace on some sleeping connections, I have come across a few things which I have fixed (removed from the strace) But was wondering if anyone can notice anything else from this strace result. It's a mysql Sleep state that when…
Graymic
  • 17
  • 4
0
votes
1 answer

Why doesn't strace show HDD IOCTL syscalls?

When doing an strace -ttT date I miss a lot of syscalls right after the lauch of the executable. After the execve() there are no further syscalls where the date ELF is copied from HDD to memory, does this happen within the kernel? I thought I'd see…
JohnnyFromBF
  • 9,873
  • 10
  • 45
  • 59
0
votes
1 answer

Hanging on rake db:migrate ts:conf

I have Jenkins running a deploy script on all of our app machines. Lately, half my builds don't finish and keep hanging while trying to run the same thing. The last of the output looks like this: ** [app@app1 :: stdout] Generating Configuration to…
Eric R.
  • 933
  • 1
  • 9
  • 19
0
votes
4 answers

Get the output of multiple strace calls in one file

I want to get the Output of multiple strace calls in one file, but i do not know how. At the moment i am using: strace -o tmpfile, but this just puts the output of one file in and then overrites the file with the new output. Has anyone an idea,…
Naturjoghurt
  • 541
  • 6
  • 21
0
votes
2 answers

How can I monitor network connections by maven and childs?

We have a Maven project that runs several integration tests. Some of the tests involve spawning child processes like a HSQLDB database, but it could also be that any of the maven plugins might be opening socket connections to places I'm not aware…
tonicebrian
  • 4,715
  • 5
  • 41
  • 65