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
votes
0answers
14 views

Guide to debugging processes on macOs

I'm new to macOS development and was wondering how can I attach xcode debugger to a process (I don't have the source code). Xcode "attach to process" menu options are grayed out when I open xcode with ...
5
votes
2answers
2k views

How to debug an inserted kernel module?

I would like to debug a loaded kernel module I don't have the source code to; I suspect it's a virus. Is there a way to feed it into GDB for analysis?
2
votes
2answers
2k views

Disable browser logging output to console

I'm currently using Ubuntu 11.04 and I'm running into a really annoying issue while developing for web. I'm rather new to Ubuntu, coming from FreeBSD where I never encountered an issue like this, so I'...
3
votes
1answer
10k views

Kernel panic : Kernel offset disabled

I was trying to install the linux-next kernel in my system with the following steps. Copied the existing configuration file from /boot to the root of source directory Updated the .config file with ...
47
votes
5answers
109k views

How to know where a program is stuck in linux?

I am running the following command on my ubuntu server root@slot13:~# lxc-stop --name pavan --logfile=test1.txt --logpriority=trace It seems to hang indefinitely. Whenever this happened on AIX, I ...
2
votes
2answers
3k views

How to call in a kernel level function in user space [closed]

I've developed some helper functions in the kernel. They're called by other functions in the kernel. Currently, they make my custom kernel panic :( For debugging, I made them as a passive code just ...
0
votes
1answer
23 views

Passing git hub user.name through Unix variable

I am performing below operation github_nam="Aviral Vishnoi" git config --global user.name $github_nam It is saving it as user.name=Aviral I want it to store my full name as user.name=Aviral Vishnoi ...
2
votes
3answers
2k views

How to launch «gdbserver» in background?

When I run gdbserver on a device (like gdbserver :2345 myapp), gdbserver completely blocks the terminal. Neither adding an ampersand &, nor pressing ^z makes it running in background. I also ...
3
votes
2answers
3k views

How can I debug Nautilus crashes?

Is there a log file I can peruse, or settings somewhere that might give me a clue? I'm running GNOME nautilus 3.14.3 ("Files") in Ubuntu 16.04.
0
votes
1answer
25 views

NFS client locks up after EXACTLY one hour

I have a Linux system (Fedora 32, kernel 5.7-rc2) booting from NFS. After exactly one hour it locks up and doesn't respond to anything. It's perfectly reproducible and journalctl does not show ...
3
votes
2answers
2k views

How to dump the dmesg AKA Kernel logs to a single .txt file from the kernel boot?

I am trying to understand the SATA Host-Device Communication and for that I have put a lot of debug messages in the kernel driver code. Now messages are in such a huge amount that I am not able to see ...
11
votes
1answer
3k views

Any way to have a “verbose mode” or “debug mode” with sed?

Is there a way to make gnu sed be verbose about what is run and what is done ? I'd like to have something like a "debug mode" so that I can see - for each line of input - the content of the hold space ...
0
votes
0answers
23 views

Kill a hanging process which is in kernel mode

I had a process attached to a debugger session, and, by mistake, I kill the debugger. Now, I'm trying to kill the process I was debugging but I can't because it's probably in Kernel Mode now, maybe ...
0
votes
2answers
39 views

Is there a way for the Bash shell to throw a run time error when an integer variable is misused (by attempting to store a string into that variable)?

Bash 4.3 shell on Linux Mint: I realize the Bash shell is type-less, or has a very weak form of typing. But can the Bash shell be invoked (e.g. with some option) such that the shell will throw a run ...
169
votes
8answers
334k views

how can I make cron run a job right now, for testing/debugging? without changing the schedule!

I have a cron job that is scheduled to run everyday, other than changing the schedule, is there any other way to do a test run of the command right now to see if it works as intended? EDIT: (from ...
23
votes
3answers
2k views

How can I see what command was actually run in the shell, through an alias or function

I have a bash function (or alias), for instance function install() {sudo apt-get install $@}. When running the command install dicelab, what I expect will actually be run is sudo apt-get install ...
0
votes
0answers
52 views

Make Squid4 cache HTTPS GET requests

I'm following this guide for the installation with config for running sudo /usr/sbin/squid -YC --foreground -f /opt/conf/squid/squid.conf acl localnet src 10.0.0.0/8 acl localnet src 172.16.0.0/12 ...
7
votes
4answers
1k views

Adding comments using 'set -x'

Sometimes it is really handy to just add set -x to the top of your script to show all commands before they are executed. There is only one drawback creating scripts with a decent output: I don't ...
0
votes
2answers
66 views

How to find which program is executing given program?

Is there way how to find out which program is executing my script? I'm runnig I3 as my window manager and I want to use sxkhd to bynd keys instead of i3config but something keep replacing my sxkhd ...
1
vote
2answers
1k views

Files system become suddently read only; how to debug this?

My ext-4 root and home filesystem became suddently read-only. How can I find out what was the reason for this? The system is ubuntu 16.04 with systemd (installed on an ssd), where root and home ...
3
votes
1answer
3k views

Unable to use Valgrind on executable file for ARM-Linux

I'm having problem using Valgrind on "arm-linux" executable file. I downloaded Valgrind from the main page here : http://valgrind.org/downloads/. Run the following command to install it: sudo ./...
0
votes
0answers
30 views

s2ram_do: Device or resource busy

My system normally suspends to RAM with no problem. But the past few days it has not worked: s2ram -f s2ram -f -a 1 s2ram -f -a 2 s2ram -f -a 3 s2ram -f -p -m s2ram -f -p -s s2ram -f -m s2ram -f -s ...
2
votes
0answers
28 views

Reload symbol table after recompilation in gdb

Lets say I have written a simple C++ program #include <stdexcept> int main(int argc, char *argv[]) { throw std::logic_error("Error"); return 0; } This program (compiled with g++ -O0 -ggdb ...
0
votes
0answers
75 views

KernelShark BufferOverflow error for trace-cmd with “all” option

I have a simple helloworld program which prints "hello" on to the console. I have installed trace-cmd and when I run, trace-cmd record -e syscalls -F ./a.out and trace-cmd report, I get the entire ...
0
votes
0answers
15 views

How to use trace-cmd with wpa_supplicant?

I want to trace the function calls (of the wpa_supplicant source) when I connect to wireless network with wpa_supplicant. I have built wpa_supplicant with CONFIG_DEBUG_LINUX_TRACING option from ...
1
vote
1answer
1k views

Debugging a running python process

I want to debug a running python service which has threads in my Ubuntu system. I need to attach running root process and be able to place break points in python script. What would be the best way to ...
0
votes
1answer
47 views

What does single stepping an instruction means in Linux kernel?

The kprobes documentation says: #include <linux/kprobes.h> int register_kprobe(struct kprobe *kp); Sets a breakpoint at the address kp->addr. When the breakpoint is hit, Kprobes ...
0
votes
0answers
16 views

QDbus monitoring software

Is there any software for monitoring QDBus like what DFeet does for DBus? (Graphical or CLI)
7
votes
2answers
529 views

How to know the code flow of a driver module?

I am studying Linux device drivers, my main focus is on wifi drivers. I want to know how the code flows when I plugin my device. Maybe, I can do something like add a printk line in every function. ...
0
votes
0answers
35 views

why i do not debug a program in codeblocks IDE

I can not debug my c++ program in code-blocks. When i add toggle breakpoints in a line. Then click debug/continue button. The next line button do not appear. And debugger log show following message.I ...
0
votes
0answers
26 views

Copying DEB file and install - Error

I build a deb file for Apache2 from its source, also I was able to install and run successfully in the machine which I used to compile. But when I copy(SCP) that deb file to another machine and ...
6
votes
1answer
3k views

Defining a state of a failed SD cards by kernel tracing?

I'm having a series of failing/sometimes failing SD cards. They either give one of the following dmesg outputs: The completely dead ones (don't list at /dev/mmcblk0): [ +0,000010] mmc0: error -110 ...
0
votes
0answers
61 views

Crash of a 32-bit program in Debian 10 64-bit

Introduction I'm using Debian 10 - 64 bit and I'm trying to start a 32bit program but it keeps crashing due to incomprehensible reasons (for me). I searched on internet for almost a week! But I ...
1
vote
2answers
44 views

How can I find which dbgsym packages I need to obtain symbolic stack traces?

I have a core file on a Debian system. I want to obtain a complete list of all debug symbol packages needed to generate a symbolic stack trace from that core dump. By what means can I generate such a ...
1
vote
0answers
18 views

Complete trace of a program

I am trying to figure out a way to write a debugger in the kernel space. I have some user space program and when I run it, I want to see its entire execution trace that happens in the kernel space. I ...
27
votes
5answers
116k views

How to view core files for debugging purposes in Linux?

I want to view the contents of a core file while debugging a program. How can I view the contents of a core file?
0
votes
0answers
21 views

cmake policy query

Background CMake policy is documented here. One may set the policy to a cmake version with cmake_policy(version ...), or by specific policy with cmake_policy(set ...). One may query the current ...
4
votes
2answers
3k views

VirtualBox Error : Kernel Driver not installed(rc=-1908)

I am currently using Ubuntu 18.04 and VirtualBox GUI Version 5.2.18 and I faced the following bug: Kernel driver not installed (rc=-1908) The VirtualBox Linux kernel driver (vboxdrv) is either ...
0
votes
0answers
27 views

Excluding line numbers from sourced in files in KSH93 debug output

I have a number of ksh93 scripts on AIX 7.1 which print debug information using the following command to print the script/function name, time and line number when used with 'set-x': PS4='$0 @ `...
1
vote
0answers
56 views

Forking `addr2line` on shared object from application for constructing stack traces. How safe is this?

I am augmenting my applications which run on Linux to emit a backtrace when terminal signals (such as SIGSEGV, SIGABRT) are received by a process or thread. The code works very well using backtrace(...
0
votes
0answers
26 views

Mailgun script working and | tee not logging

I've got a bash script running from Windows task scheduler: Looks like this: C:\Windows\System32\bash.exe -c "sudo /root/borgbackup.sh 2>&1 | tee -a /tmp/borg.log | sudo /root/mailgun 2>&...
53
votes
3answers
89k views

How to step-into, step-over and step-out with GDB?

I typed help while I was in the GDB but didn't find anything about step-into, step-over and step-out. I put a breakpoint in an Assembly program in _start (break _start). Afterwards I typed next and it ...
0
votes
0answers
21 views

How does one log openprocess, Read/WriteProcessMemory in Wine

We are trying to get a program that does open process and tons of Read/WriteProcessMemory to work properly on wine. For that we need to log instances of that working/failing/being done, but I ...
1
vote
2answers
1k views

Uninstalling packages installed by debuginfo-install

How do I delete debug packages that are installed by debuginfo-install? When I search for them via sudo yum list installed none of the installed packages are listed, even when I enabled the debuginfo ...
2
votes
0answers
36 views

Does zsh have some kind of diagnostic mode?

I am experience some problem in my zsh configuration which is based on oh-my-zsh, which I have described at Physical buffer in terminal is getting misaligned with display in oh-my-zsh configuration. ...
1
vote
0answers
41 views
5
votes
3answers
1k views

Make systemd debug shell usable again

Specifying systemd.debug-shell=1 as kernel parameter kind of works: I can switch via Alt+F9 to a shell when systemd boot hangs. But this shell is quite impossible because an animated [ *** ] A ...
0
votes
2answers
146 views

How to troubleshoot a bash script called by a python script called by a program?

I have to troubleshoot this bash script called by a python script called by a program, all run in Ubuntu 18.04. The python script and the program are black boxes. The only information I have is that ...
0
votes
1answer
35 views

Is there a way to figure out if a touchpad is broken, even if it's unsupported by Linux?

(I asked another question here that led to this question. I'm going to repost some of the command line output that I think is relevant.) I found an old laptop in my garage (Lenovo IdeaPad U260) and ...
0
votes
0answers
591 views

How to debug WiFi problem on laptop with Linux (Fedora)?

I am using Fedora 31 (upgraded from 30, but the problem occured on 30 also) on my Dell Latitude 3580. Everything is working fine, but from time to time my network connection stops working. Pings are ...

1
2 3 4 5
8