Questions tagged [strace]

86 questions
2
votes
1 answer

Tracing system calls is slow on a KVM VPS?

I run a website on a KVM VPS and I noticed that processes appear to run extremely slowly when being traced. For example, I ran ls on my home directory, which contains 72 files and directories. With strace: real 0m13.591s user 0m0.024s sys …
Brian Bi
  • 347
  • 1
  • 2
  • 9
2
votes
0 answers

Apache web server maxing out due to processes stuck at D status

I have a Apache 2.2.3 web server running on a 8 core VM with 8G Ram. During a load test, the web server stopped responding and load average went up to 1000. When I run Top command, I see a large number of httpd processes are stuck at "D" status. I…
Allen Qin
  • 121
  • 3
2
votes
1 answer

Tracking down an elusive and slow anon_inode from lsof and Apache strace

Experiencing an intermittent issue with a LAMP application wherein Apache forks to its ServerLimit and grinds to a (near) halt. An strace on any httpd process shows numerous, slow epoll_wait calls. 1.254721 epoll_wait(14, {{EPOLLIN, ... 3.296430…
2
votes
2 answers

puppet hanging or long time on rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0

In our setup, we manage our servers using puppet. Since a few days I saw the puppet client running very slow. When stracing the puppet process I get loads of rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) =…
Hannes
  • 135
  • 1
  • 3
  • 17
2
votes
1 answer

Attaching strace to 100% CPU Apache process - output

I am having a problem with Apache2 spawning processes that use 100% CPU. Attaching strace to one of such processes produces no output sometimes and sometimes gives this: 2672 17:18:07 poll([{fd=14, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout) 2672 …
Stan
  • 139
  • 4
2
votes
1 answer

60 second php mail() delay through browser / Apache, but no delay through commandline

I am having a problem on my server when the PHP mail() function is being used in a browser, so through Apache. When the script, lets call it mailtest.php, is being called through a browser, there is a 60 second delay in actually sending the…
Oscar
  • 21
  • 1
2
votes
1 answer

Cannot Login as any user other than Root - permission denied

Help! I'm desperate :) I can't login as any user other than root. I'm on Ubuntu 10.04. Here's command output: root@pinky:~# adduser test Adding user `test' ... Adding new group `test' (1003) ... Adding new user `test' (1003) with group `test'…
Charlie
1
vote
1 answer

Trace httpd when using cgi

I have configured httpd (apache2.4.6) cgi to run /bin/bash scripts. I would like to trace httpd calls of /bin/bash and see the actual command that is run. So far I have tried to use strace -p but for some reason, I only see: wait4(-1,…
Yon
  • 13
  • 2
1
vote
1 answer

How to use strace to monitor files being saved on an smb share or being transferred over http

Can strace be used to trigger events or notify whenever a file is saved on an smb share or file is uploaded to a website over http/https?
Omnipresent
  • 227
  • 2
  • 7
  • 13
1
vote
1 answer

Debugging slow ls on cifs mount strace makes it fast

I've got a server that has a cifs share (Azure storage files) mounted. Sometimes ls is returning slowly (20seconds). After debugging a bit I've so far found that: doing ls /data/some/symlink/directory return in 20 seconds going into the…
olle
  • 151
  • 6
1
vote
1 answer

nscd works when strace is attaching to the process

I have a server where I am running nslcd to query an AD server, and use it for authorization, and this is working as expected. Now, I introduced nscd to reduce the load on the AD servers. The results are a bit weird. If I am running the nscd process…
nohup
  • 113
  • 5
1
vote
1 answer

How do audit changes to dir via symlink?

Use of the auditd system to watch a directory via a symlink hardly triggers any logs. Here is the situation: # pwd /home/root/serverfault # ls -l total 4 drwxr-xr-x 2 root root 4096 Sep 1 15:12 dir lrwxrwxrwx 1 root root 3 Sep 1 15:12 p ->…
pdp
  • 778
  • 1
  • 7
  • 16
1
vote
1 answer

strange strace output of httpd process of apache running django with mod_wsgi

I have about 12 httpd processes running for an RHEL aws box that no one is hitting in the browser (shared team dev box). These processes together are consuming over 1.8 GB on the dev box, and I have seen it up to 6 GB on production. Each one of…
Sam Hammamy
  • 189
  • 5
  • 17
1
vote
2 answers

TCP packet which is absent in strace log

Can somebody give me ideas about following situation (Linux 2.6.18-348.4.1.el5 ): At some point tcpdump shows [FIN, ACK] packet sent from server port to local client strace log shows no socket activity performed on that socket handle for that port…
noonex
  • 248
  • 2
  • 10
1
vote
1 answer

Debugging high CPU load when adding new domain inside server's control panel

When adding a new domain inside my server's control panel it takes much longer than usual since some time. CPU shows 100% usage on one core and strace reports something like this: poll([{fd=7, events=POLLIN|POLLERR|POLLHUP}], 1, -64771072) = 1…
Spacedust
  • 568
  • 5
  • 13
  • 28