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

Filter by
Sorted by
Tagged with
1 vote
0 answers
13 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 ...
  • 179
0 votes
0 answers
4 views

PLT GOT: How "jmp DWORD PTR [ebx+0xc]" takes control to GOT? [migrated]

For puts@plt, control should go from main to PLT to GOT. Control is going to PLT but from PLT how "jmp DWORD PTR [ebx+0xc]" takes control to GOT? In GDB, ebx=0, so ebx+0xc=0xc, which is ...
0 votes
1 answer
31 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
59 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 ...
  • 1,066
0 votes
0 answers
27 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 ...
  • 1,861
0 votes
0 answers
21 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 ...
  • 30.7k
5 votes
3 answers
793 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() ...
  • 393
0 votes
1 answer
409 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
30 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 ...
1 vote
0 answers
32 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
35 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 ...
  • 31
0 votes
0 answers
55 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 ...
  • 101
0 votes
0 answers
37 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 ...
  • 325
0 votes
0 answers
10 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
50 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 ...
  • 21
0 votes
0 answers
579 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 ...
  • 181
0 votes
0 answers
256 views

Set Environment Variables in launch.json for CUDA Debugging When Using Nsight Visual Studio Code Edition

I am developing a CUDA application in vs code and would like to debug it with cuda-gdb, which is integrated in nsight visual studio code edition as an IDE. One requirement in using nsight visual ...
  • 167
0 votes
0 answers
14 views

How to setup breakpoint bash debugging for free? [duplicate]

While coding in a programming language like Java, PHP, Python..., we are able to set breakpoints, debug, read variable values and step through the code. How can we accomplish that quality debugging ...
  • 155
0 votes
0 answers
85 views

How to debug C++/CUDA code built into a shared Library and loaded by a python script in VS Code

I am debugging a CUDA function registered as tensorflow custom op and executed in a tensorflow session. The CUDA code is a simple GELU kernel with its launching wrapper: #ifndef GELU_KERNEL_ #define ...
  • 167
0 votes
0 answers
41 views

UFW Block message (level 4) on command line even with console loglevel 1 or 0

I didn't want to ask because I'm afraid of downvotes ... but the next step of research would be reading the code of netfilter. Eventually some of you discovered such issues or has an idea where to ...
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. ...
  • 173
0 votes
1 answer
47 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: ...
  • 31
0 votes
1 answer
673 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 { ...
  • 1,723
3 votes
1 answer
189 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 ...
  • 8,605
0 votes
1 answer
80 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 ...
  • 5
0 votes
0 answers
17 views

Influence of Mixture of Debug and Release Build on Debug

Suppose I have a codebase with two files A and B. If A is built without "-g" and B is build with "-g", and the object file from A is linked with the object file from B for an ...
  • 167
3 votes
2 answers
2k 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 ...
  • 33
1 vote
0 answers
653 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
184 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 ...
  • 167
0 votes
0 answers
23 views

Perl debugger command history not save one character ones

Why does the perl debugger command history not save single character commands? DB<230> n main::(rmHTMLement.pl:13): print 'Removing element in file: '; DB<230> Then, I cannot ...
1 vote
1 answer
504 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 ...
  • 7,683
0 votes
1 answer
176 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
54 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
115 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
154 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
408 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 ...
  • 1
0 votes
0 answers
30 views

Why does sleep() call returns when attaching to the process with a debugger?

While debugging one C application I added a code like this: #include <unistd.h> // ... if( /* some condition violated */ ) { log(WARNING, "condition violated! run `lldb -p %d`\n", ...
0 votes
1 answer
96 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
76 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 ...
  • 579
0 votes
0 answers
27 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
120 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 ...
  • 5,481
0 votes
1 answer
354 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
184 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 ...
  • 11
3 votes
1 answer
1k 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
101 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 ...
  • 21
0 votes
1 answer
186 views

Spoofing /proc/bus/pci/devices

I have a program that requires presence of specific device in system (afaik it checks /proc/bus/pci/devices for against list of hardcoded vendor_id:device_id pairs). How could I fool this software to ...
  • 3
1 vote
1 answer
255 views

Debug character devices (mouse, keyboard, touch screen etc) and read input data

I am working on a project where I have a infrared multi-touch frame connected to the PC via USB cable, whenever an object, eg, a hand/finger, passes through it, it acts as a mouse. What I want to do ...
1 vote
1 answer
300 views

How to debug rsync's --link-dest option?

Is there some way to make rsync report why it decided to make a new copy of a file, instead of hard-linking it? (E.g. because of timestamp, or detected a change in content... etc.) (I'm creating ...
  • 325
0 votes
1 answer
77 views

Debugging "chroot: failed to load command '<executable_name>'" besides ldd and /proc/<pid>/maps

Trying to run rngd from rng-tools in a chroot environment on Raspberry Pi Zero. Running ldd with the same chroot shows that all dependencies are satisfied: pi@raspberrypi:~/rngd_chroot $ sudo chroot /...
  • 109
1 vote
1 answer
166 views

Debug messages on function

I need a function to show, only during debug, a message (the function name): #!/bin/bash debug_function(){ if [[ $DEBUG -eq 1 ]]; then echo "${FUNCNAME[1]}" else DEBUG=0 fi } ...

1
2 3 4 5
9