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
0
votes
0answers
19 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 ...
0
votes
0answers
21 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 @ `...
0
votes
0answers
19 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
24 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>&...
0
votes
0answers
14 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 ...
2
votes
0answers
29 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
34 views

How to debug the problom? An elf file cannot be run, but the printing from the ldd and file seems no problem

some command printing: $ ./omnetpp ...
0
votes
2answers
39 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 ...
2
votes
0answers
41 views

Tracking down an error from gnome-shell

I'm seeing the following in my system log a couple of times per second: Nov 10 17:01:21 madhatter gnome-shell[2949]: Object St.Button (0x55b4087421b0), has been already deallocated — impossible to ...
0
votes
1answer
29 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
241 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 ...
2
votes
0answers
40 views

A process is being stopped by SIGTTIN. Is there a good way of tracing what process (or kernel) sent this and why?

One of my Java processes is being stopped because it receives a SIGTTIN when processing a request. I can reproduce this issue. But I am unable to figure out why this is happening. I tried running ...
0
votes
0answers
29 views

How can I diagnose hardware NIC problems in Linux?

I have one Dell PowerEdge R640 out of 22 losing packets regularly (once every about 3 minutes). I have checked: the cable (used a different cable still the same behavior) the switches and all the ...
1
vote
0answers
41 views

Beagle bone black - no boot text

I'm working with a beaglebone black with an image based off the base debian image for these boards. When I plug this into a monitor via the onboard HDMI and boot it, I get the linux penguine (Tux) in ...
0
votes
1answer
68 views

Systemtap can not resolve probe point although it is shown in probe list

I'm trying to debug netfilter synproxy module with systemtap. This is probe point I'm trying to add. # stap -l 'module("ipt_SYNPROXY").statement("*")' | grep send_client_synack module("ipt_SYNPROXY")...
0
votes
0answers
11 views

Running a script as if through cron [duplicate]

I find that a certain script works when run from a shell but not when run as a cronjob. How should debug this without having to wait for the next whole minute every time I want to see its output?
0
votes
1answer
29 views

Debug System Slow-downs and freeze

I have an Arch laptop where sometimes (daily and more) I experience freezes that start with software slowing down and then slowly extends to the whole system until it's unusable and I have to alt+prt+(...
0
votes
0answers
104 views

MATE Desktop - Change mouse right click settings?

I'm using opensuse MATE v1.22.1 and I am having issues right clicking. When I right click on the desktop or a folder inside of the file explorer, caja (which I believe is the MATE equivalent of ...
1
vote
1answer
45 views

zsh: Variable gets unset without reason

Somehow v gets unset after calling f. $ zsh -xc 'v=1; f() { local v; v=2 true; }; f; typeset -p v' +zsh:1> v=1 +zsh:1> f +f:0> local v +f:0> v=2 +f:0> true +zsh:1> typeset -p v zsh:...
1
vote
1answer
30 views

How to debug a program hanging when launched?

I've upgraded my Slackware 14.2 install and Scribus stopped working : when I launch it in a terminal, it just hangs, nothing happen — even when just querying help or version (scribus -h or scribus -v)....
1
vote
1answer
59 views

How to debug the script in logs for shell script? [duplicate]

I am having a script which i have set in the debug mode: set -x #!/bin/sh ALLCIRCLS="/var/tmp/release/ALLCIRCLS.txt" NONRBTIPS="/var/tmp/release/NONRBTIP.txt" RBTIPS="/var/tmp/release/RBTIPS.txt" ...
5
votes
2answers
112 views

Linux: write tail -f output, plus comments, to a separate text file

The command tail -f command is great for tracing, and in terminal it's very helpful to be able to, for example, hit enter, and type a comment like -- after xyz change... -- For record purposes, I ...
1
vote
0answers
159 views

Source code line from BUG: unable to handle kernel NULL pointer dereference at

I am debugging a custom system call I wrote, and I keep seeing this error in the kernel log: "BUG: unable to handle kernel NULL pointer dereference at (number)". Is there a way to derive the source ...
2
votes
1answer
74 views

I have a tab completion that hangs, is it possible to use strace to find out what is going on?

In my example I start typing sudo su dkay...<tab>... and the command hangs for about a minute before tab completing to sudo su dkayton. I got advised to use strace to find out what is happening....
0
votes
1answer
99 views

Question about debug trap

I have a script as below: function dbgtrap { echo "badvar is $badvar" } badvar=0 function some_func { badvar=1 badvar=2 badvar=3 } set -o functrace trap dbgtrap DEBUG some_func ...
0
votes
1answer
330 views

How to debug/trace incoming SFTP conversations?

My application (JetBrains CLion) connects to my remote server by SFTP and places files to there. Unfortunately, files are appearing filled with zero bytes. I want to trace, what goes wrong. Can I run ...
2
votes
3answers
435 views

How to debug/trace bash function?

I have a bash script myscript.sh, which has a bunch of functions inside. To run one function, I would write source myscript.sh; myfunction How debug such a function?
6
votes
2answers
683 views

Upgrading to Fedora 30 causes router crash, by packets larger than MTU. I need to report a bug - but what software caused this?

The issue After installing Fedora 30 (KDE) on my laptop my router would crash shortly after I connected to it. This happened both when I connected through wired Ethernet and Wi-Fi. Fortunately, the ...
-1
votes
1answer
87 views

Error EOF Syntax Error

-bash: /Users/tj/.bash_profile: line 17: syntax error: unexpected end of file This is currently at the top of my terminal window. I need to fix this error. I have deleted the last line out of my bash ...
0
votes
0answers
18 views

does logging off remove contents of gdb.txt

This is in reference to an earlier question I asked here. What was not clear from that question is what does logging off do when you run that command. Is it just a 'state' of gdb or does it actually ...
5
votes
2answers
103 views

Direct xtrace output elsewhere than stderr in zsh

In zsh, is it possible to direct the trace output from set -x (set -o xtrace) to a file descriptor other than stderr? I'm looking for an equivalent of $BASH_XTRACEFD or a way to emulate the same ...
1
vote
0answers
81 views

Debug log for WiFi processing

I am trying to integrate WPA2 into open network in AP side, and I managed through quite good so far, I am now able to encrypt and decrypt live traffic. However, stations are ignoring my messages, ...
5
votes
1answer
442 views

Change format of syscall event trace output to ftrace

I enabled ftrace event tracing for sys_enter_openat syscall. The respective output format given at events/syscalls/sys_enter_openat/format is print fmt: "dfd: 0x%08lx, filename: 0x%08lx, flags: 0x%...
4
votes
2answers
2k 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 ...
1
vote
1answer
27 views

Is it possible to view the bytes I sent over a network connection?

I'm on Ubuntu 18.04. I'm debugging an application that communicates with a remote server and I'd like to be able to directly view the bytes sent from my machine (rather than relying on debug output). ...
2
votes
1answer
355 views

Who is eating data? Xargs?

I am trying to parse a recursive directory of PHP files using the built in PHP linter, which works like this: $ php -l good.php No syntax errors detected in good.php $ php -l bad.php PHP Parse error:...
0
votes
2answers
639 views

Debugging boot performance issues in grub / before kernel logging starts

My PC takes a long time booting. I have reason to believe it is caused by delays after grub, but before kernel logging starts (booting takes 30 seconds, but dmesg messages have time stamps between 0....
0
votes
0answers
170 views

Debugging android kernel goldifish emulator under Mac OS Mojave

I need to debug android kernel goldfish under MacOS Mojave. So i cloned android-goldfish-3.18 and android-aosp-9.0.0_r22. I built aosp under macos while the kernel under debian. Obviously I built ...
1
vote
0answers
84 views

Can I replace bzImage and ko files in installed modules separately?

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 ...
1
vote
0answers
414 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
1k 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
273 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
1answer
61 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
115 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 ...
7
votes
1answer
2k 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
162 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
161 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
190 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 ...
5
votes
3answers
777 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 ...
4
votes
1answer
4k 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 ...