Questions tagged [debugging]
is a process of finding and reducing the number of bugs, or defects, in a computer program, thus making it behave as expected
444
questions
0
votes
1
answer
77
views
Permission denied for user in group (group has directory write permissions)
I'm getting Permission Denied when attempting to create/touch files in a directory with group ownership permissions.
touch /data/www/acoder.txt
[acoder@box]$ touch /data/www/acoder.txt
touch: cannot ...
0
votes
1
answer
32
views
GDB fails to download debuginfo for math.h
I have a simple clock program that uses math.h functions. I am currently on Kubuntu 21.10, the GCC version is (Ubuntu 12.2.0-3ubuntu1) 12.2.0, and the GDB version is (Ubuntu 12.1-3ubuntu2) 12.1.
The ...
0
votes
0
answers
21
views
Systemd on Kali - session-3.scope hangs, how to debug?
How do you debug this?
When I try to turn off my VM the session 3 of the user kali (session-3.scope) hangs, which contains basically the whole process tree of the GUI.
It waits for 90s and then it ...
2
votes
1
answer
219
views
How to read and debug SSH verbose-mode?
Let's say I use this command:
ssh -vvv user@server
I get an output similar to this:
send packet: type 21
ssh_set_newkeys: mode 1
receive packet: type 6
SSH2_MSG_SERVICE_ACCEPT received
receive packet:...
0
votes
1
answer
33
views
How to diagnose a sharp, sudden increase in the frequency with which processes enter the D ("uninterruptible sleep") state
The Linux cluster I work on recently started getting frozen for a few minutes at a time. I've determined that the reason for this behavior is that processes are very frequently landing in the D (&...
0
votes
0
answers
54
views
Debug Node.js from VSCode when node running with different user
EDIT2:
Instead of command palette (Ctrl+Shift+P), If I go to Debug with (Ctrl+Shift+D) and click on the attach process it works. So it is very strange, maybe it is a bug. It was the first time I tried ...
0
votes
1
answer
159
views
Redirect output of current script to a socket
I am trying to debug a shell script executing on a remote server, where I do not have access to the standard output of the script. Can I redirect the output to go over a socket?
0
votes
1
answer
203
views
Systemtap probe kernel module function while that module is loaded
How to use a Systemtap probe on a kernel module function while that module is loaded. I am trying to print the functions being called for a particular module while it is being loaded. Suppose I have a ...
4
votes
1
answer
59
views
Debug segfault race condition
I can provoke a race condition that gives output similar to this in dmesg:
[ 5432.541379] perl[408327]: segfault at 22 ip 0000564eb8af9cc2 sp 00007ffec318cea0 error 6 in perl[564eb8af7000+1a1000]
[ ...
-2
votes
1
answer
58
views
sh script won't run, (unexpected end of file) but the individual lines execute fine
Below is what I'm attempting to run on my remote machine, and I'm getting 'Unexpected end of file'.
However, if i take the lines and paste them into the CLI, it executes normally.
# if [ -f running....
9
votes
3
answers
766
views
Temporarily unset bash option -x
I like to use set -x in scripts to show what's going on, especially if the script is going to run in a CI/CD pipeline and I might need to debug some failure post-hoc.
One annoyance with doing this is ...
0
votes
0
answers
47
views
Bash truncates long PS4 strings
I am trying to debug a large build project which calls a bunch of bash scripts. Someone suggested modifying PS4 so I set it to the following snippet in order to print the path of the script and the ...
0
votes
0
answers
24
views
How to start kdump service as early as possible
yocto LTS kdump have no early kdump feature let said if i want start kdump as earlier as possible how should i do that? i edit the service file to below
[Unit]
Description=Reboot and dump vmcore via ...
1
vote
0
answers
19
views
C++ How to debug a WM/DE or X.org crash?
I have a huge code that deals with sockets, threads and processes and it is a complete mess... While editing recently, my WM crashed after I executed my code. Since every window is killed, I can't ...
0
votes
1
answer
73
views
ansible echo to terminal when condition is found
How can I have the output printed to the terminal when condition is met using lineinfile
- lineinfile:
path: /home/pc/date.txt
state: present
line: 'yes'
regexp: '^\s*Wednesday\s*$'
...
0
votes
2
answers
568
views
Permission error when attaching GDB to PID of running process
I have such a toy C++ program
#include <iostream>
int main() {
int n{};
std::cin >> n; // waits for input
std::cout << n << std::endl;
}
which pauses upon ...
0
votes
0
answers
28
views
Why is my script misbehaving sometimes? [duplicate]
I have created a script that can split an audio file into smaller files via ffmpeg using timestamps, and another script which can take in timestamps & names in batches. My use for this script ...
0
votes
0
answers
126
views
Debug: Internet connection becomes slow
My Wifi works great with my Android phone: 40 ms to 9.9.9.9. I get 40 ms all the time - no problem.
But when I connect my laptop to the same wifi, it starts out fine (40 ms) but within a minute it ...
5
votes
3
answers
831
views
Tool to detect errors in application's execution logic
I want to detect errors in application's execution logic. E.g.:
forgot to call free() on address returned by malloc()
did not close file handle returned by open()
invalid flags passed to open()
...
0
votes
1
answer
1k
views
CodeLLDB for VSCode not working with remote gdbserver
I'm currently trying to set up remote debugging on a Raspberry Pi using the CodeLLDB plugin for Visual Studio Code and gdbserver. Unfortunately this doesn't seem to work, since every breakpoint I set ...
0
votes
0
answers
125
views
Testing an application under Eclipse with sudo elevation
I am developing a C++ application that requires root privilege. I am working under Eclipse and I would like to be able to launch/debug from it.
I know I could start Eclipse as a root, but I am looking ...
2
votes
0
answers
62
views
What is the complete list of file functions equivalent to the "strace -e file" options?
According to man strace the -e file option traces all syscalls which take a file name as an argument. What is the whole set?
%file
file Trace all system calls which take a file ...
0
votes
1
answer
76
views
Why does OpenSSH debug2 handshake logging only on some logins, not on every login?
Running Ubuntu 18.04.1 LTS with package openssh-server 7.6p1-4ubuntu0.5
In /etc/ssh/sshd_config is set LogLevel DEBUG2.
I get the debug2 log message of the client MACs offering part of handshake:
May ...
0
votes
0
answers
101
views
How to gather the application crash info in docker
I have an application written in Ansi C that crashes (I believe) on very rare occasions in a docker container (docker has no effect because the application crashes on the real machine as well, but ...
0
votes
0
answers
87
views
Keyboard mapping stops working -- how to debug?
I am alternating between two layouts, English and Hungarian (the latter has some accented characters).
The problem is that sometimes the Hungarian layout stops working, i.e. when I switch to it, the ...
0
votes
0
answers
14
views
403 Error in schema testing tool
Problem :
My URLs are
https://v2.domainsanalytics.com/allheartweb.com
https://v2.domainsanalytics.com/name/komal
https://v2.domainsanalytics.com/name/komal.com
I am only getting an error when a dot . ...
1
vote
1
answer
65
views
systemd debug (embedded case)
How to trace systemd unit files, to be specific, device unit files? I use 3.18 version of linux kernel. On my board after systemd has started, (mypartition).device runs and, I suppose, remounts the ...
1
vote
0
answers
2k
views
Why does my USB device randomly disconnects?
I am using Linux on a system that is constantly running. An USB Soundcard is connected to the system.
From time to time, on a random basis, sometimes in the middle of the night, the usb disconnects ...
3
votes
2
answers
2k
views
Inconsistent Fedora 35 audio problem
I have a really strange audio problem on my Fedora distro (Fedora 35 Workstation Edition), installed on my laptop.
Previously I used Windows 10 on my laptop, and I had no audio problem whatsoever. ...
0
votes
1
answer
92
views
No "notify" category debug log entries anymore with Bind 9.11.3
On old server with Ubuntu 12 and Bind 9.8.1
I got the following "notify" category log entries as expected (domain names and IP addresses redacted):
27-Dec-2021 12:58:51.786 notify: debug 3: ...
0
votes
1
answer
2k
views
how to enable debug logs in stdout for logstash?
I'm struggling as newbie in logstash, below is some info of my env
Logstash Version: logstash-7.16.2-1.x86_64
java Version: openjdk version "11.0.13" 2021-10-19 LTS
Logstash Conf
input {
...
3
votes
1
answer
349
views
Does zsh have any equivalent to BASH_ENV?
I would like to be able to use something like the BASH_ENV variable in zsh, however I can't find anything like it by Googling.
From man bash:
BASH_ENV
If this parameter is set when bash is executing ...
0
votes
1
answer
98
views
Practically unfork process
I have an executable binary (no source) that clone()s.
It doesn't print anything and I think the child is trying to, which I'd like it to do.
It always returns successfully even when the child ...
6
votes
2
answers
5k
views
Kernel: BUG: unable to handle page fault for address
One of our devices froze today with the following kernel messages:
[79648.067306] BUG: unable to handle page fault for address: 0000000004000034
[79648.067315] #PF: supervisor read access in kernel ...
1
vote
0
answers
920
views
Seemingly random freezes after update to Debian Bullseye
About two months ago I updated my laptop (Asus Zenboox UX303LA) from Debian Buster to Bullseye. This involved a kernel update to Linux 5.10 (the problem persists on 5.10.84-1, which is current stable)....
0
votes
1
answer
331
views
Debugging Applications Running in a Singularity Container in an IDE
I am developing algorithms within the framework of Tensorflow (custom OPs and graphs) within a Singularity container (with Ubuntu 20.04, CUDA 11.2 and the Tensorflow 2.4 library). I understand that ...
2
votes
2
answers
1k
views
How can I get glibc/libstdc++ sources and set them up for gdb to find?
I'm debugging this program which raises an exception. This makes my debugger look for some source code, e.g. ../sysdeps/unix/sysv/linux/raise.c - and fail to find it.
Now, I realize it's not necessary ...
0
votes
1
answer
284
views
asterisk debug extension bad quality audio - rtp out of sequence
FreePBX 16.0.10.34, or direct Asterisk 11/16/18.6.0 is the same, all of those with some SIP phones got weird audio issues, i.e. voice volume constantly change in one way, metallic voice in the other ...
0
votes
1
answer
72
views
How to debug a CentOS weird networking issue
I have a CentOS 7 machine that is continuously copying data to AWS/S3.
However, it has a problem, which I'd be grateful for suggestions on how to debug.
The copy to S3 would go on for hours/days, and ...
2
votes
0
answers
178
views
for loop and appending over list of arrays
I am new to Bash scripting and presently find myself dealing with a small problem in working with for loops, arrays and variable assignment/substitution which I do not know how to solve. Since I am ...
1
vote
0
answers
208
views
Can't compile linux kernel with -Og/-O0 option for debugging purpoces
Having custom hardware running embedded Linux (OpenWrt) like a charm. CPU - is IMX6ULL (ArmV7) so it is supported by Jlink to debug over JTAG interface.
Starting GDB server and step by step debugging ...
0
votes
1
answer
518
views
Error: Unable to retrieve http://repo.mysql.com/apt/debian/dists/buster/InRelease 403 Forbidden [IP: 23.57.81.191 80]
I'm installing mysql-server on my Debian 10.
I used the command: wget in the /tmp file,
then sudo dpkg command which returned the following response:
acelys @ uno-test-temp: / tmp $ sudo dpkg -i ...
0
votes
1
answer
208
views
Debugging ssh connection that prints incorrect characters to terminal what appears randomly after ssh logins
With random occurence for ssh logins into remote terminal ('agetty') there is immediate output of unrelated characters into that ssh session terminal.
With periodical repetition these are "hh��...
0
votes
1
answer
103
views
bash debug options?
It seems to me (and correct me if I'm wrong please) that bash is quite bad at error messages that correctly tell you where the problem in your script is. For example, often I will get "bad EOF at ...
0
votes
0
answers
28
views
How do I examine the execution of a software tool?
I am using GNU Screen inside Termux, a terminal emulator for Android.
I noticed that I cannot scroll up in a terminal with my finger (and I don't know any other ways) when I am inside Screen.
Instead ...
0
votes
0
answers
183
views
How can I recover from a Sway crash?
I crash pretty frequently when using Sway. The biggest culprit is OpenOffice, but sometimes Chrome crashes. These crashes are always freezes; so the screen just freezes. I know it is a low level crash ...
0
votes
1
answer
573
views
Is there an in-kernel way to debug netlink protocol communications?
Netlink (as in, the kernel internal protocol) seems to be very difficult to debug without additional tools - which I can't actually use because I'm on a very confined embedded system.
Is there an in-...
1
vote
0
answers
239
views
how to write logs to specific file from kernel space?
I have a kernel module that uses printk() for debugging. printk() logs to /var/log/messages. /var/log/messages contains information of other modules too. I am trying to implement dynamic tracing for ...
4
votes
1
answer
2k
views
Is there a command line program to check IP location (for VPN)?
There are a plethora of websites that will try to deduce your location from your IP address. For example: https://nordvpn.com/what-is-my-ip/.
This is handy for debugging VPNs - if I visit one of these ...
1
vote
1
answer
116
views
XScreenSaver lag when pressing Shift
I use Void Linux with kernel version 5.12.13 and LXQt and would like to use XScreenSaver 6.01 to lock my screen.
However, it's quite difficult to write my password on the xscreensaver-auth screen as ...