We changed our privacy policy. Read more.

Questions tagged [strace]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
17 views

Why does strace change command behavior?

I'm trying to use PICpgm to program a Microchip connected via GPIO. I'm running Raspbian Buster on a Pi 4B. Running as root, this command returns with no error but it doesn't print anything useful. ...
0
votes
0answers
12 views

How to find out which file is mmapped by process in macos?

I have a process, that works really slow. With dtruss utility I can see that it makes a lot of mmap calls. How can I find out, which file on disk is mmapped? (My plan is to replace it's directory with ...
0
votes
1answer
369 views

Why does sudo fail with strace?

I can run this command without issue. /tmp $ sudo echo "hello world" hello world However, this command fails: /tmp $ strace -o /tmp/out.log sudo echo "hello world" sudo: effective ...
0
votes
0answers
23 views

Debugging slow cygwin bash startup

Running: strace bash -li and grepping for CreateProcessW: 182 590565 [main] bash 512 frok::parent: CreateProcessW (C:\cygwin64\bin\bash.exe, C:\cygwin64\bin\bash.exe, 0, 0, 1, 0x420, 0, 0, ...
1
vote
0answers
62 views

Why accept4() is slow with Apache?

I am running a website on Apache2 and I noticed that the first bit is always slow to come. I tried to diagnose the problem with strace and found that accept4() is slow on each request. Below the ...
0
votes
0answers
569 views

2 java processing hanging for about 2.8s

I have 2 processes running on a VMWare server on the same vm. Centos 6.x I ran strace on both processes and saved the output 6970 14:04:09.643295 futex(0x7f47d8027754, FUTEX_WAKE_OP_PRIVATE, 1, 1, ...
4
votes
0answers
5k views

What’s the command line equivalent of strace on Windows?

I need to | findstr SomePATH in order to search if a program access and close immediately a specific path. On Linux, I would use myprogram | strace 2>&1 | grep SomPATH. But what’s the ...
1
vote
1answer
2k views

How to properly unescape strace output

How do I unescape strings outputted by strace? I see some advices to use printf '%b' for that, but that doesn't work correctly for me in some cases. Consider echo -ne '\037\061': $ strace -e write ...
0
votes
0answers
44 views

Intercept environment variables read by a process

I have a process that’s reading some environment variables to set itself up, but I’m not sure which one. The programming language is foreign to me, so let’s supposed I don’t have the source. Is there ...
0
votes
1answer
170 views

Libreoffice is eating all cpu

On my debian box, LibreOffice (even while idle) is eating 100% of the CPU is runs on. I used strace and those 4 lines are constantly displayed as in a loop (as such I can tell which one comes first): ...
2
votes
1answer
1k views

Is it possible to strace pinging a host?

I am doing this $ strace -f ping -s 1 www.google.com execve("/bin/ping", ["ping", "-s", "1", "www.google.com"], [/* 80 vars */]) = 0 getuid() = 1001 setuid(1001) ...
4
votes
1answer
2k views

What can trigger a SIGPWR signal that interrupts a 'sendmsg' system call?

On a RHEL 6 host, I have a Cassandra server listening for TCP connections on localhost. In parallel, I have a client application that sends it requests. The client (C# Mono) uses sendmsg to send the ...
3
votes
1answer
1k views

docker version hangs before server info

Introduction I'm attempting to use the following version of docker on a Linux VM (uname -a returns Linux xen 4.1.17-yocto-standard #1 SMP PREEMPT Thu Jun 2 13:29:47 PDT 2016 x86_64 GNU/Linux), built ...
0
votes
0answers
515 views

dnsmasq; log querying process

I'm running dnsmasq in development and found that something on my laptop is putting forward queries for randomly generated domain names. Hence I'd like to display the PID/lsof -p output of the process ...
6
votes
1answer
4k views

Why strace sudo command bombs when sudo command works?

my username is allowed to execute sudo command then why does this bomb strace sudo command with the error: sudo: must be setuid root
0
votes
1answer
183 views

make strace print EUID

I'm trying to debug a permission problem, but I'm having trouble finding out with which EUID the application is being executed at the moment of the error. Is there a way to make strace print the ...
2
votes
0answers
864 views

How to find out the reason why ssh processes are hanging?

When i run command like iostat -dkx 2 2 via ssh, I get the expected result, but the processes on the local computer are saying alive in status "interruptible sleep". Why is this happening? Is there a ...
0
votes
1answer
75 views

Is it secure to send strace log to third-party person?

I have some specific software - a console to access remote equipment. At some time it's UI starts to slow down too much (not because lack of resources but because some bug in that program). Developer ...
2
votes
1answer
135 views

why doesn't strace use test syscalls to find out their indices in the system call table?

I understand that strace command uses ptrace(PTRACE_PEEKUSER, child, __builtin_offsetof(struct user, regs.orig_eax)) to find the index of a system call the tracee child is trapped at. Then to ...
2
votes
1answer
441 views

why doesn't strace work on gcc -c

>echo > foobar.c >strace gcc -c foobar.c 2>&1 | grep foobar.o > (nothing) - foobar.o is being written obviously, but I don't see it on strace. Why?
0
votes
1answer
160 views

strace reports incorrect relative path?

I am using strace to report open and chdir system calls, and a fragment of its output is: 6791 chdir("//etc") = 0 6791 open("etc/fstab", O_RDONLY) = 3 This doesn't make ...
1
vote
1answer
412 views

strace to discover sudo password persistence location

strace/dtrace/ltrace ... useful for lots of things, from finding hidden access violations to network socket tracing, but maybe it can't see all. I haven't been able to figure out using strace (it ...
0
votes
1answer
74 views

dtruss SQL-Queries on Mac OSX

In our shop we have an inhomogenous environment and doing Java on different boxes - mostly Mac OSX, me on Linux and one Windows box. When it comes to debugging JPQL-Queries and its SQL-outcome, there ...
0
votes
0answers
33 views

Assistance remembering the name of a Linux “strace”-based tool for file paths mocking

Once surfing the Internet I’ve seen a home page for a Linux tool which claims it can employ Linux systrace interface to execute other programs with manipulated paths. Something like that: $ this-...
0
votes
0answers
105 views

Tool similar to `strace` but for CPU instructions

I am hoping to find something similar to strace which will yield the instructions used by the CPU. For example, I have a simple loop which calculates a sum and prints out every tenth iteration float ...
2
votes
1answer
985 views

ntfs disk dying or..? rsync and mkdir failing, strange behavior

System root@host:~# uname -a Linux host 3.2.0-4-686-pae #1 SMP Debian 3.2.57-3+deb7u1 i686 GNU/Linux Mounts root@host:~# mount | tail -2 /dev/sda1 on /mnt/sda1 type ntfs (rw,relatime,uid=1000,gid=...
2
votes
1answer
1k views

how to collect all files, that are opened by linux application

I want to collect a list of all files, that are opened by an application (in my case, it's a s/w bulder). 'strace -f' fails, because it mixes continuos opening from different forks, for example: ...
1
vote
1answer
635 views

Tracing syscalls

I am trying to learn some tricks using "trace" (or dtrace or strace or truss), so I using the command: trace -d [random PID] I am getting the following error messages: trace error: trace facility ...
4
votes
0answers
575 views

Understanding the strace output on a mac [closed]

I am seeing syscalls that I do not understand. Multiple calls ending with _nocancel. E.g. open_nocancel, close_nocancel. What are these calls and where do I find information about these? Google does ...
0
votes
1answer
1k views

Correlating strace output to source code function calls

I'm trying to fix a keyboard problem in a Linux application which I have the source code for. The application starts a TCP server and sends local keyboard and mouse events to connected clients. What's ...
4
votes
1answer
2k views

What is a SIG_0 when looking at an strace

Attaching strace to a process that is using a lot of cpu, shows that the pid is 'killed' over and over. The process is using 130% cpu. What is a tgkill( SIG_0) ? strace -p 3876 nanosleep({0, ...
4
votes
2answers
4k views

Interfacing strace with Process Name instead of PID

How do I implement a wrapper script pstrace in bash that changes the interface of [sudo] strace -c -p [PID] to [sudo] pstrace -c -p [PROCESS-NAME] similar to how killall [PROCESS-NAME] is used. ...
2
votes
1answer
1k views

How to calculate and group the time differences of specified syscalls when running strace

I'm planing to do some web performance testing (to see how much time it's spent for each file), but it could be useful for any application. I exactly know existence and how to use different ...
4
votes
2answers
2k views

How do I strace the whole system?

strace allows you to monitor the activity of a particular program. How can I monitor the activity of all programs (expect for sshd/bash/strace_itself)? Currently I'm using a hack like this: function ...
6
votes
2answers
20k views

Debugging connection timeouts using strace?

I'm trying to figure out why is Eclipse spinning, so I decided to fire up strace. I found the eclipse process using: $ ps ax | grep java 5546 ? Sl 19:04 /usr/bin/java ... [arguments ...
8
votes
5answers
4k views

Linux equivalent to Mac OS X's fs_usage

Is there a Linux equivalent to the Mac OS X command fs_usage? According to the man page it does the following: "report system calls and page faults related to filesystem activity in real-time". I ...
2
votes
2answers
3k views

How does 'strace' work?

Recently, I was using mv to move a large amount of files from my hard drive to a flash drive. I forgot to add a verbose flag so I had no idea "where" the move was at and how many transfers remained. ...
1
vote
1answer
6k views

Strange strace and setuid behaviour: permission denied under strace, but not running normally

This is related to this question. I have a script (fix-permissions.sh) that fixes some file permissions: #! /bin/bash sudo chown -R person:group /path/ sudo chmod -R g+rw /path/ And a small c ...
4
votes
1answer
1k views

Why do strace/truss sometimes 'fix' stuck processes?

Sometimes you have a stuck process that's been stuck for a while, and as soon as you go to poke at it with strace/truss just to see what's going on, it gets magically unstuck and continues to run! So ...
11
votes
1answer
6k views

Will strace watch system calls recursively on child processes of the main process being observed?

If I run strace on a program and that program spawns a subprocess (e.g. perl's system() call), will strace report the system calls for the child process as well?