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
2 votes
1 answer
42 views

Plugging in an external DVD drive causes ls, sudo, new SSH connections refused.... what happened?

Title says it all. But I plugged in an external DVD drive into my Raspberry Pi running Raspbian. It says its Linux compatible However when I actually plug it into the device. Everything goes wrong in ...
CalebK's user avatar
  • 121
0 votes
1 answer
17 views

How to not display the LibreOffice file picker / loader when closing any LibreOffice application?

Until today, when I closed any LibreOffice application (e.g. Writer, Calc, Draw, Impress, etc.) in Linux Mint, the expected happened: LibreOffice would close. Now, suddenly, when I close any ...
End Anti-Semitic Hate's user avatar
0 votes
1 answer
42 views

can't get permissions for debug folder with a custom program

I am running a program on kali Linux. The program uses Openssl and some other networking libraries. When I try to run the program I get the output below: Failed to open /sys/kernel/debug/ieee80211/...
umarkaa's user avatar
0 votes
1 answer
21 views

AWStats stuck, but no output on strace: How to debug?

A Perl script is stuck, root 1317478 99.8 0.0 264072 22516 ? R 04:57 478:37 /usr/bin/perl /usr/share/awstats/wwwroot/cgi-bin/awstats.pl -config=domain.tld-http -staticlinks -configdir=/...
Thomas's user avatar
  • 13
0 votes
0 answers
22 views

How to debug WINE?

I've been using WINE for years for a program called CLUEWIN. This is a pretty simple win32 application (a dictionary). It has no noteworthy features and has always worked, for around 20 years. The ...
AlphaCentauri's user avatar
0 votes
0 answers
43 views

How to debug a binary file with gdb

I currently have a binary program that usually ends locking up after some time using. I can cause it when clicking on the bar on the right side of the screen and moving it swiftly with mouse's left ...
user2752471's user avatar
0 votes
1 answer
40 views

How to enable debug messages for pam_systemd_home.so?

The manual for pam_systemd_home states that debug messages can be enabled with debug=yes, but they don't state where to put it. I tried adding the options to the relevant lines in pam.d/system-auth, ...
DarkRise's user avatar
0 votes
0 answers
55 views

XDP generic transmit packets to loopback interface dropped

I'm trying to transmit udp packets via xdp (receives work just fine) but the packets are dropped before udp processing. Kernel: Linux fedora 6.5.12-300.fc39.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Nov 20 22:...
user5199947's user avatar
0 votes
0 answers
57 views

How to debug bzImage's decompress?

I already know that vmlinux is needed when debugging the kernel through gdb. But I need to debug the decompress and EFI entrypoint of bzImage. In this case, how can I debug bzImage with gdb? Currently,...
user212942's user avatar
0 votes
1 answer
112 views

How do I find out reason of missing packets in response to `sendto` syscall?

strace ... -e sendto shows a successful (i.e. positive return value) outcome of trying to send a UDP datagram somewhere, but tcpdump -i any in that network namespace does not show anything relevant in ...
Vi.'s user avatar
  • 5,688
0 votes
0 answers
94 views

Is there a way to show the kernel panic error message on the screen?

I'm currently running EndeavourOS, and I was wondering if there was possibly a way in to, in an event of a kernel panic, show the kernel panic message on screen/in the gui, similarly to a BSOD or mac ...
Shuntex's user avatar
0 votes
0 answers
123 views

Debugging memory leakage: No backtrace saved in core dump after segmentation fault

I am working on an embedded Linux system (kernel-5.10.186), and I want to debug a memory leakage in a program. With pmap -x PID, I found the process's heap is increasing consistently. To figure out ...
wangt13's user avatar
  • 429
1 vote
0 answers
19 views

Latency on pselect caused by other user space processes

I have the following pre-condition on Linux: I'm using a process to read serial data using pselect on a serial device /dev/ttySX. Data comes in at a stable frequency of 400 Hz. To optimize latency of ...
nyquist's user avatar
  • 11
0 votes
0 answers
62 views

How do I debug code from dylib in lldb

I have a sketch of code in rust that uses dynamically linked ffmpeg library. How do I actually see the code of ffmpeg inside lldb. I've modified portfile of ffmpeg6 by adding this lines. configure....
user1685095's user avatar
0 votes
0 answers
205 views

How to debug an SSH-tunnel that doesn't work (SSH in itself works)?

I posted a question at Ask Different about SSH tunneling of VNC and SMB on MacOS because I thought it was specific for Mac, but it doesn't seem so. In short, I can SSH from my machine A to machine B (...
d-b's user avatar
  • 1,891
1 vote
1 answer
87 views

What's the successor of libgcc1-dbg in Debian 11 and onward

I previously had libgcc1-dbg (and other debug symbol packages) installed on Debian 10 "buster" to get readable stack traces in failure cases or to inspect core files. It seems, that package ...
TJahns's user avatar
  • 35
0 votes
1 answer
88 views

How to report a randomly occurring system freeze?

I'm running debian sid (unstable), and have had a few situations where the system freezes, becoming unresponsive and forcing me to reboot the system. This has happened during work video calls (but not ...
Laurent S's user avatar
  • 111
0 votes
0 answers
106 views

How can I diagnose a software "stuck" mouse button?

I'm running arch on a Lenovo X1 Carbon. I can go about using it mornally, usually for a day or two but at some point my mouse buttons become "stuck" in the software (though I suppose it ...
user1794469's user avatar
  • 4,067
0 votes
0 answers
105 views

tmux continues using variables that are no longer defined in .bashrc

I am trying to reset my .bashrc, because it has become bloated and it takes long to start a console. For this I did the following: cp /etc/skel/.bashrc ~/.bashrc This worked for the normal login bash ...
packoman's user avatar
  • 151
0 votes
0 answers
196 views

vscode on wsl2: Run and Debug error: Starting directory does not exist

I want to program an STM32 board. My compiled C++ code is called firmwar.elf. The development board has an stlink built in. So this is my prefered debugger. I am using a WSL2 system to run Ubuntu. I ...
Sebastian's user avatar
1 vote
1 answer
225 views

quick-swap TUI mode while using vi keybindings in GDB

In the default mode of gdb, pressing ctrl+x a turns on and off the UI, and ctrl+x 2 cycles through different split views. There are a number of similar useful shortcuts. I can turn on vi emulation ...
Fraser's user avatar
  • 111
0 votes
1 answer
2k views

How to clear the /sys/kernel/debug/tracing/trace_pipe quickly?

I am using the bpf_printk() helper to print to the kernel debug to trace some BPF programs. The usage is as follows: #include <stdio.h> #include <linux/bpf.h> #include <sys/socket.h>...
diviquery's user avatar
  • 115
0 votes
0 answers
221 views

Run GDB on background

I'm working on a program where I have 2 ncurses window, one displaying my custom shell implemented with fork+exec and on the other I want show some info about command ran on my shell. For that, I'm ...
brunos098's user avatar
1 vote
0 answers
39 views

Is is possible to configure cppcheck as your linter for nano?

Good debugging tools can save you a lot of time when you are writing code. In nano, it's nice that with bash scripts, you can just hit alt+b to find syntax errors before you try running it. However, I ...
thinksinbinary's user avatar
0 votes
0 answers
314 views

Unable to boot custom built kernel (modified kconfig kernel) in QEMU

I have built a kernel from defconfig and booted it in QEMU and it worked fine. But when I tried to boot my custom built kernel in QEMU it dropped some error : [ 1.039137] /dev/root: Can't open ...
Motti Kumar's user avatar
0 votes
1 answer
526 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 ...
a coder's user avatar
  • 3,253
0 votes
1 answer
525 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 ...
Lakshay Rohila's user avatar
3 votes
1 answer
8k 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:...
Bog's user avatar
  • 999
0 votes
1 answer
181 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 (&...
kjo's user avatar
  • 15.3k
0 votes
1 answer
812 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?
rgov's user avatar
  • 213
0 votes
1 answer
456 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 ...
Franc's user avatar
  • 289
4 votes
1 answer
118 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] [ ...
Ole Tange's user avatar
  • 35.6k
-2 votes
1 answer
94 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....
David Conway's user avatar
11 votes
3 answers
2k 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 ...
Ken Williams's user avatar
0 votes
0 answers
70 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 ...
nikhilweee's user avatar
1 vote
0 answers
35 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 ...
donaastor's user avatar
  • 214
1 vote
1 answer
282 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*$' ...
JakePaul's user avatar
0 votes
2 answers
2k 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 ...
Enlico's user avatar
  • 1,586
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 ...
Cestarian's user avatar
  • 2,051
5 votes
3 answers
902 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() ...
zomega's user avatar
  • 972
0 votes
1 answer
2k 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 ...
ObiBabobi's user avatar
0 votes
0 answers
353 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 ...
Yves Daoust's user avatar
2 votes
0 answers
130 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 ...
guronanak's user avatar
0 votes
1 answer
146 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 ...
Daku's user avatar
  • 99
0 votes
0 answers
172 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 ...
Attilio's user avatar
  • 355
1 vote
1 answer
162 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 ...
E.M.'s user avatar
  • 21
1 vote
0 answers
3k 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 ...
flood's user avatar
  • 298
3 votes
2 answers
3k 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. ...
Noumeno's user avatar
  • 183
0 votes
1 answer
191 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: ...
Daku's user avatar
  • 99
0 votes
1 answer
3k 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 { ...
Sollosa's user avatar
  • 1,929

1
2 3 4 5
10