Questions tagged [debugging]
Finding problems in a program and trying to solve these.
202
questions
265
votes
6
answers
618k
views
How to see stdout of ansible commands?
How do I see stdout for ansible-playbook commands? -v only shows ansible output, not the individual commands. It would be great if I could figure out how to do this immediately, so if something ...
102
votes
8
answers
132k
views
How to make bash scripts print out every command before it executes?
For example, I have a simple bash file
#!/bin/bash
cd ~/hello
ls
How can I make it display every command before executing it? Just the opposite effect of "@echo off" in windows batch scripting.
59
votes
10
answers
65k
views
How to setup a fake SMTP server to catch all mails?
I'm looking for an smtp service that essentially obeys the RFC, except rather than sending mail it simply logs to a file
[date] sent mail to <address>
Or whatever. I can bash this together ...
55
votes
6
answers
32k
views
Debugger for Iptables
I'm looking for an easy way to follow a packet through the iptables rules. This is not so much about logging, because I don't want to log all traffic (and I only want to have LOG targets for very few ...
54
votes
4
answers
83k
views
How can I find out what is causing interrupts on Windows?
Occasionally I come across servers (Windows 2003 and 2008) with high processor % interrupt time. Is there a way to see what program or device is causing the interrupts?
42
votes
3
answers
108k
views
Debugging rules in Iptables [duplicate]
How can I know how many packets were dropped by my iptables rules ??
Is there any debugging mechanism to see which rule is Dropping my packet or Accepting it ??
27
votes
5
answers
34k
views
Kernel stack trace to source code lines
Given a kernel stack trace as below, how do you determine the specific line of code where the issue occurred?
kernel: [<ffffffff80009a14>] __link_path_walk+0x173/0xfb9
kernel: [<...
26
votes
5
answers
16k
views
Send bash -x output to logfile without interrupting standard output
Is there a way to send the information displayed by running a bash script with the -x option to a file, while not changing the standard output seen by a user running the script?
This is a debugging ...
17
votes
2
answers
3k
views
ext4 listing of files very slow in one specific directory that contained lots of files before
Background
I had a small logrotate misshap... Logrotate would rotate the archived logs by misstake causing a quadratic growth of files in my /var/log/. And by the time I caught wind that something ...
14
votes
9
answers
9k
views
Equivalent of SysInternals FileMon for Linux?
I'm attempting to debug an application on Ubuntu - I need to listen to file open attempts (even for files that don't exist).
Process Monitor (formerly known as FileMon) is available on Windows - what'...
12
votes
6
answers
20k
views
Failed Request Tracing XML fails to display in Internet Explorer (IIS 7.5)
I have installed the Tracing feature and enabled failed request tracing for a website, to debug a Classic ASP website. The XML logs are created upon occurring errors, however when I open them in IE, ...
12
votes
4
answers
19k
views
How can I find out where a file is physically located on the disk (block numbers)?
This is an obscure question, I know. I'm trying to do some performance testing of some disks on a Linux box. I'm getting some inconsistent results, running the same test on the same disk. I know ...
11
votes
12
answers
715
views
What's the first thing you check when an untouched unix server starts going berserk?
So you have this neatly setup unix server and it's super fast and works swell and everything is great for months, and suddenly all kinds of weird errors start showing up for a variety of different ...
11
votes
2
answers
18k
views
How to enable debug of dhcp client on Windows 7
Is it possible to enable some sort of debugging for dhcp client on Windows 7?
11
votes
2
answers
27k
views
How to trace Apache 301 Moved Permanently?
I have one virtual host on my machine, which I am accessing localy. I am running apache2 under windows 7.
When accessing this host, I see in Fiddler, that server redirects browser to different remote ...
9
votes
4
answers
48k
views
How to debug "HTTP request sent, awaiting response"?
I have a Linux server on an ADSL connection, and I just noticed that sometimes I get
Connecting to example.com|xxx.xxx.xxx.122|:80... connected.
HTTP request sent, awaiting response...
when I use ...
9
votes
3
answers
5k
views
Performing root-cause analysis
I want to learn more about how to perform root-cause analysis. More times than not, our department tells the user to try rebooting (thier Windows XP system), which actually "fixes" a good number of ...
8
votes
2
answers
48k
views
Online mod_rewrite testing tool
mod_rewrite statements can be hard to write and debug, therefore I need a lightweight online tool that enables me to test my RewriteCond, RewriteRule statements on the fly.
Any such tool?
8
votes
3
answers
10k
views
Why is MemAvailable a lot less than MemFree+Buffers+Cached?
I'm running a Linux workstation without swap and I have installed earlyoom daemon to automatically kill some processes if I'm running out of RAM. The earlyoom works by monitoring kernel MemAvailable ...
7
votes
1
answer
3k
views
SQL Server Debugging: "Unable to Step. Invalid operation"
I'm debugging a call to a Stored Procedure in SSMS (2012). Frequently, and various random points in the code, a dialog pops up:
Microsoft SQL Server Management Studio:
Unable to Step. Invalid ...
7
votes
1
answer
3k
views
How to debug CGI over fcgiwrap/nginx
I serve executable scripts (mainly in C) through fcgiwrap connected with nginx. Since the scripts are complied, I can get the coding errors during compilation, but sometimes I receive CGI errors ...
7
votes
1
answer
2k
views
How to configure PHPStorm to debug on IIS
I installed PHP 5 on IIS on a Windows 7 64 bit machine using the Web Platform Installer. I am using PHPStorm as my PHP IDE but cant find any documentation on how to get debugging to work. PHPStorm ...
6
votes
4
answers
2k
views
How to pinpoint which process/activity/software/protocol is slowing down LAN on a single computer
From this question about debugging our business LAN I've been able to pinpoint a single computer which slows down our network.
When the computer is turned on and connected to the network, roughly 5% ...
6
votes
3
answers
30k
views
How do I identify slow queries in sql server?
I've found long, complicated instructions like this when googling for the answer to this question, an brief reference links such as in this post.
I'm looking for a succinct a procedure as possible to ...
6
votes
3
answers
34k
views
All connections from this network get stuck in SYN_RECV state, connections from my home or phone properly get ESTABLISHED
My server (a linode VPS) suddenly started to timeout on every request yesterday.
I'm pretty inexperienced in networking and would love to learn a process for debugging these connectivity issues.
What ...
5
votes
2
answers
11k
views
Why would brk() in strace output be taking several seconds?
We've been noticing a significant slowdown of one of our applications when migrated to Ubuntu Hardy, amd64. It runs perfectly well on Debian Sarge i386.
Running an 'strace -r' against the (Apache 1.3)...
5
votes
1
answer
6k
views
Ubuntu Server with systemd - how to get a backtrace or coredump?
I'm using Ubuntu 18.04 Server with systemd. Recently a program my department has developed crashed twice within a day with the following error:
Jun 07 06:33:07 xxx systemd[1]: xxx.service: Main ...
5
votes
4
answers
17k
views
How can I investigate sustained high CPU usage by Microsoft.Exchange.Rpc.ClientAccess.Service.exe?
One CAS server in our array has nearly 90% of its 4 CPUs used. The remaining CAS servers are at 30 percent.
How should I investigate what is causing this increase?
Below is a graph of:
Six (6) ...
5
votes
2
answers
5k
views
nginx. How to log ssl errors without blowing up the server logs
I have a web site, that is visited by many different mobile devices and embedded devices.
Quite often I encounter the issue, that some devices cannot connect.
The reasons can be:
the device doesn'...
5
votes
1
answer
8k
views
How to debug Node + Socket.io CPU Issues
We are running a Node Socket.io server with Express 3. The server is monitored using Forever. The service is running well, but the CPU grows throughout the day, until it reaches 90%+ and then suddenly ...
4
votes
1
answer
11k
views
Describing `strace` command output
I have php process which could not finish for more then 2 days.
root 26511 0.0 1.6 407788 27684 ? Ss Jul09 0:08 /usr/bin/php action.php
This is the output from the strace command:
...
4
votes
1
answer
2k
views
Why can't openSSL verify google's certificate?
When I run the command openssl -connect www.google.com:443 from a Debian VM, I get the following within the output:
Verify return code: 20 (unable to get local issuer certificate)
What's going on ...
4
votes
3
answers
8k
views
Getting debug output from a debian initramfs
I'm attempting to configure a server for a debian lenny on software raid0 and a LVM root filesystem via the serial console and the hosting company's recovery console (basically an ubuntu liveCD).
...
4
votes
3
answers
12k
views
Monitoring HTTP 5xx errors in an Azure App Service
The Azure App service UI used to have an ability to inspect 5xx errors directly. Since we starting using Azure, the UI has been changing almost constantly though, and this ability seems to have ...
4
votes
2
answers
9k
views
Configuration parameter in xdebug for allowing multiple hosts on remote machine
I am working on one web application. The project located on my linux box i.e. server. We are remotely accessing this machine from windows.
I am using xdebug for debugging alongwith Eclipse PDT. ...
4
votes
1
answer
2k
views
What might be causing repeated mmap/munmap in strace results?
I have a (node.js) application which is occasionally causing 100% CPU usage. I've attached to the process with strace when it's been in this state - but I don't know what to make if the strace output....
4
votes
1
answer
2k
views
Lighttpd won't start when fastcgi.debug directive is used
I'm running lighttpd/1.4.28 (ssl) on Ubuntu 12.04 LTS. Everything's working, and I'm trying to do some performance tuning. I'd like to enable debug mode for the fastcgi module, however when I add ...
4
votes
1
answer
4k
views
centos 6 debuginfo repository does not have httpd debug version available
I am trying to get the debug version of httpd so I can use it in conjunction with gdb. I am having a hard time getting them, and they don't seem to be in the standard epel-debuginfo repository. What ...
4
votes
1
answer
6k
views
Verifying RADIUS server is sending the correct certificates?
How can I see the TLS (SSL) certificates that my RADIUS server is using, to make sure it is sending the correct certificate and chain?
I am implementing 802.1x authentication with a RADIUS server, ...
4
votes
1
answer
434
views
Crash dump analysis
I hope this isn't a stupid question, and if it is, then I want to at least get it over with so I don't feel so dumb in the future.
Here we are, loading up a Windows crash dump with Windbg. Here are ...
3
votes
3
answers
20k
views
View headers of HTML requests to apache
Is there a good way of viewing a detailed version of incoming requests to apache? At the minimum I'd like to check for the existence of a specific header and check its value. Requests are not coming ...
3
votes
2
answers
7k
views
Debugging perceived network saturation
I'm having a network issue where one machine is saying it is sending data at a rate of 150 Mbit/s but the other machine is receiving at a mere 100 Mbit/s. The sending application eventually crashes, ...
3
votes
3
answers
287
views
Are there any risks to enabling SQL Debugging
In our current environment, developers are not allowed to use SQL Debugging against any of the QA servers. It's not clear to me why the decision was made.
What factors should be considered to decide ...
3
votes
1
answer
2k
views
How to debug linux startup hang
My ubuntu system hangs on the startup. It hangs on [OK] items like usual on boot. Interestingly, I am able to ssh onto this machine, but the boot never finishes and login screen doesn't appear. What ...
3
votes
3
answers
138
views
debugger in bash
I use
sh -xv my_script.sh
to debug the /bin/sh script.
How do I debug /bin/bash scripts?
I am getting the following error and I need to know the line that needs to edit.
# ./batch_master.sh
'@'...
3
votes
3
answers
2k
views
Identifying "Lock Timeout" errors on SQL Server 2000
Our ERP software uses a SQL Server 2000 database. When we run a specific task on the software that used to take few seconds, a 300 seconds delay happens and SQL Server returns the error "Lock Timeout. ...
3
votes
2
answers
2k
views
Debugging Prometheus OOMkilled despite 6Gi limits
I'm at the end of my patience with a prometheus setup leveraging kube-prometheus-stack 44.3.0 (latest being 45).
I have two environments, staging and prod. In staging, my prometheus runs smoothly. In ...
3
votes
2
answers
5k
views
How do I Identify an anonymous process that's changing a system setting?
I see an anonymous process changing the time of my systemtime to UTC every 80 sec. Using the journalctl -f command I only see a message that says
'systemd[1]: time has been changed' but it doesn't ...
3
votes
1
answer
3k
views
Debug DNS: What to do if host name resolution does not work as expected?
The current search results for "debug dns" don't reveal a guide-line what to do, if you (as user/client) think there is something wrong with the host name resolution.
What steps can I do to narrow ...
3
votes
1
answer
7k
views
How to debug/log 502 Bad Gateway from reverse proxy?
We're running a web service and hitting 502 Bad Gateway randomly. The 502 is reported by reverse proxy (Apache 2.4.x) while talking to backend server (Apache 2.4.x). The problem randomly re-appears ...