Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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

1
vote
0answers
7 views

can I replace bzImage and ko files in installed modules seperately?

I'm currently trying to debug a kernel module, after installing the kernel, I'm trying to change the kernel a little and a single module a little and see how things work. when I changed the kernel ...
0
votes
0answers
15 views

Qemu-user : get memory maps while debugging remotely

I am trying to get the memory map of a process I am debugging remotely (peda pull request link), the process is ran with qemu-user, for example: qemu-arm -L /usr/arm-linux-gnueabihf/ -g 1234 ./ch47 ...
1
vote
1answer
683 views

How to disable kernel system request debugging?

I need to disable the kernel system request debugging on an Ubuntu computer, but have not been able to find a way of how to do this.
0
votes
2answers
47 views

How can I configure a running kernel to output dmesg info directly to the tty, without involving any userspace programs?

There are a large variety of questions floating around the 'net from people who want to watch the output of dmesg in real time. All the suggestions and answers involve using dmesg -w, tail, journalctl ...
0
votes
0answers
12 views

functions folder in trace_stat folder of ftrace

I am learning ftrace, I read from the following link that I can enable function profiling using the 'function_profile_enabled' file. mount -t tracefs nodev /sys/kernel/tracing cd /sys/kernel/tracing ...
4
votes
3answers
70 views

Define bash function which does not show up in xtrace (set -x)

In a bash script I have a log() function that is used in several places, as well as a logs() function that diverts lots of line to log(). When I run parts of the script with set -x, obviously all ...
6
votes
1answer
105 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
1answer
50 views

No desktop up to 15 seconds after login

I was worried that my computer could be compromised and my login session is being hijacked by some malicious hook. In .xsession executed by xdm, I capture a pstree snapshot a file to debug this ...
0
votes
0answers
41 views

Is there an Ansible command to check all essential logs of a web server environment?

I use Debian stable and Apache 2.4. In the past I wrote a script with 3 different commands to read all logs of my webserver. Like: #!/bin/bash nginx -t && echo;echo;echo tail /var/log/...
1
vote
0answers
67 views

How to dump stack trace for all processes in Linux?

I am trying to track down a bug on an Android device that involves IPC between several native processes. At a given point in time I would like to dump native stack traces for all threads in some or ...
3
votes
2answers
131 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 ...
1
vote
1answer
322 views

set -eux instead set -x in Bash profile for global debugging [closed]

When I work with Bash I love to do so with prominent debug mode, so each time I get a new machine I add to the end of ~/.profile the code set -x. I consider adding eu as well, so to have set -eux as ...
0
votes
0answers
13 views

cruft-ng and docker overlayfs

I have been trying out cruft-ng - The man-page says cruft-ng - Check the filesystem for cruft (missing and unexplained files) and cruft-ng is a program that goes over the Debian packaging ...
2
votes
1answer
58 views

debugging a statement in a Makefile on OpenBSD

It is not clear to me, where the error comes from, the Makefile code follows: platform_id = $$( uname -s ) platform = $$( \ case $(platform_id) in \ Linux | FreeBSD | OpenBSD | NetBSD ) ...
0
votes
1answer
49 views

lldb hangs when opening a dump

lldb-3.9 hangs when I try to open a dump from a dotnet application. The process gets completely stuck, without consuming CPU. $ gdb -v GNU gdb (Ubuntu 8.1-0ubuntu3) 8.1.0.20180409-git $ lldb-3.9 -v ...
1
vote
0answers
18 views

CIFS debugging - not enough information

I am using RedHat RHEL 6. The goal is to identify whether an application running on the local server is setting 'HIDDEN' file attribute on the remote CIFS share. I have first enabled the logging in ...
0
votes
0answers
21 views

Using `ipdb` to debug Python scripts run as Slurm jobs

I sometimes use import ipdb; ipdb.set_trace() in order to debug Python code with iPython (as described here: Step-by-step debugging with IPython). I also sometimes submit jobs to a computing cluster ...
2
votes
1answer
113 views

Debian: Find binary and debug files by build-id

Assuming I have a core dump from a Debian system, where I know the build-ids of the libraries used in the dump, but don't know the exact versions, is there a way to find those files? For example, the ...
3
votes
1answer
112 views

Why some libraries and other parts get repeated in the linux virtual memory with gdb?

This is the result of looking at virtual memory of a process in gdb; I have some questions regarding this: Why are some parts of the virtual memory are repeated? For example, our program (stack6) and ...
0
votes
2answers
55 views

bash & using a variable to decide when to use 'set'? [closed]

Looking to ascertain why when I do something like; [ ${debug:=0} -gt 0 ] && set -x || set +x regardless of the conditional set -x is enabled. The issue is that I am unable to use ${debug} to ...
1
vote
2answers
26 views

List/find the programm(s) that has accessed (in the past! No fuser!) a specific given file (IOW: from a specific file 2 an unknown tool)

I have a javascript file that is used on just one occasion -> if the home folder is deleted and i login the next time. I want to find the mechanism/tool/programm/application which has accessed/used (...
1
vote
1answer
107 views

lldb hangs on Alpine Linux

I'm trying to run lldb on Alpine Linux V3.8, but when trying to debug any program, it hangs. I'm using lldb 5.0.1-r0 from the edge/testing repository, which is the only version available currently in ...
1
vote
0answers
17 views

How to figure out why executable crashes (I don't have the source code) [duplicate]

I'm trying to install PowerPanel Business Edition on Apple OS X.13. The server starts and exits (quits) - no log file, no error message. It works fine on my other OS Apple machines but on this High ...
0
votes
1answer
49 views

How to install debug symbols for corosync package on CentOS?

I got a crash in corosync which I would like to view in gdb. However, currently the core dump shows me only this much info Debug logs for core.1385 (Generated on Jul 26 10:17 BST) [Thread debugging ...
2
votes
1answer
236 views

Install a Linux kernel with debug symbols and without optimizations

My system is Ubuntu 18.04. How do I install a Linux kernel with debug symbols and without optimizations? I would like to trace it with SystemTap.
7
votes
2answers
390 views

function's calling context in zsh: equivalent of bash `caller`

In bash, I can write: caller 0 and receive the caller context's: Line number Function Script name This is extremely useful for debugging. Given: yelp () { caller 0; } I can then write yelp to ...
0
votes
0answers
240 views

pstack outputs nothing. What does it mean?

Most of the time, pstack prints the stack nicely. Once in a while, I run pstack 1234 against a process 1234, and it outputs NOTHING. I can run it again, and again it outputs nothing. Once it goes ...
6
votes
1answer
880 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 ...
7
votes
1answer
5k views

ACPI BIOS Error / AE_NOT_FOUND

I'm getting these error messages every single time I reboot my desktop (and a couple of more I don't know how to retain when it's shutting down, but those are not relevant to this question so far): [...
3
votes
2answers
111 views

sh is evaluating bash code from parent shell, and breaking down

I have this code in a bash script: r2g(){ echo "executable is: $0" # "/bin/bash" ( set -e; r2g_internal "$@" \ 2> >( while read line; do echo "r2g error: $line"; done ...
0
votes
0answers
18 views

Process memory usage right before executing of its first instruction

How can I get the size of a process right before its execution without executing the program with any particular input? I was thinking maybe a debugger can do so. I have IDA pro if that helps.
0
votes
1answer
31 views

Debug possible SSL/TLS problem?

I'm running into a couple networking issues which I suspect could be related to SSL/TLS, but I'm not sure how to go about confirming that that's the case. The main problem I'm having is I'm unable to ...
1
vote
0answers
166 views

Crashkernel not starting after crash

I am trying to start a crash kernel using Linux's Kernel Crash Dump. Both of the host and crash kernel are compiled linux-4.13.16 kernel. Unfortunately, the crash kernel fails to start after the crash ...
1
vote
0answers
225 views

How to debug a completely stuck kernel?

Running kernel 4.15 here from F27. Since I moved a week ago from 4.13 to 4.15, a highly threaded app I have been developing started to hang the kernel. Not always, but most of the times. I have an i7 ...
0
votes
0answers
276 views

LLDB Failed to connect port.Under Vmware, CentOS, Android Studio

I trying to debug jni code in android studio which run under VM Workstartion + CentOS 7 the error message is: Failed to connect port com.jetbrains.cidr.execution.debugger.backend.lldb....
0
votes
0answers
241 views

How can I run nvidia nsight profiler in arch linux?

I really need to profile an opengl application and nvidia nsight seems like the best possible solution. It's available for a lot of distributions but not arch (not even in the AUR). Can I somehow run ...
0
votes
0answers
38 views

Can I send signal to wake up gdb inside guest VM

I'm debugging Linux kernel with qemu-kvm & gdb. I want to send signal to wake up gdb, so I can debug kernel from somewhere I like. Something like pdb.set_trace() for Python ( Just to clarify my ...
1
vote
0answers
26 views

Is there a way in which we can notify the tracer (parent process) when the tracee (child process) executes a branch instruction?

As we know, the ptrace system call is one of the most powerful system calls in unix-like systems. All debugging software use ptrace for monitoring and manipulating another process, i.e. tracee. Using ...
3
votes
1answer
164 views

set -x: tab completion results in messy output when working in debug mode

I understand that set -x gets a Bash user into debug mode and I feel that working full time in debug mode will help me handle possible problems better in Bash. I experience a problem when working ...
0
votes
3answers
257 views

Why does a UDP client send 1Gbit speed to 100Mbit server?

I've just found out that in a simple UDP client/server application I wrote on Linux userspace, the UDP client (1 Gbit Ethernet interface) sends the data with 1 Gbit speed to a UDP server which has ...
3
votes
1answer
398 views

Toggle bash script between run commands and print commands

I found a script which used this "trick" to achieve a toggle between running and printing commands: echo_prefix="echo" rm_cmd="rm file1 file2" $echo_prefix $rm_cmd This allows the user to dry run ...
0
votes
2answers
58 views

how to selectively silence rsync

When rsyncing a folder with a million files, a million lines are output to stduot/stderr, containing the file names. (I'm using Travis CI, and this trips it up because their log files can be max 4MB)...
0
votes
1answer
24 views

How to debug time dependent issue

I think one of my cronjobs failed when it ran at 00:00:00 2018-01-01. How can I debug that? Changing the system clock is clearly the wrong way to go, since it would disrupt the whole system and also ...
2
votes
1answer
46 views

Use of __rb_rotate_left()

I have a kernel crash on this function: __rb_rotate_left().  Can someone explain what this function is meant for in simple terms? PC is at __rb_rotate_left+0x24/0x78 LR is at rb_insert_color+0x108/...
2
votes
1answer
1k views

What is `bash -x`

A colleague recently introduced me to bash -x for debugging my bash scripts without taking the echo $foo route. $ bash -x hello-world.sh + echo 'Hello World' Hello World Internally -- how does ...
2
votes
1answer
239 views

Analysing crash dump

On the customer unit, I see this crash and after the crash, the unit goes into hung state. Only hard reboot brings it back to the normal state. Below log shows many register values and memory ...
1
vote
0answers
172 views

Trace sequence of scripts/commands executed upon ssh

I am executing ssh myuser@myserver. Is there any way to trace all actions performed and the names of files being sourced? (similarly as with bash -x) PS: I executed bash -x at the command prompt ...
1
vote
1answer
47 views

How to improve linux debugging ability and be proficient in using linux [closed]

how can I improve myself to be like a professional, especially what kind of materials can I read if any?
0
votes
2answers
27 views

Program to instantly host a mysql database from a dump file [closed]

I'm looking for a utility program which can take a dump of a mysql database and basically host a "fake" or minimal mysql server with that data for testing another program which requires it. Has ...
0
votes
0answers
270 views

(Installing DDD) missingX11 + configure: error: C compiler cannot create executables

I am trying to install DDD V3.3.12. While running (./configure&& make) I am getting following error: **configure: error: The X11 library '-lX11' could not be found. Please ...