Tagged Questions

is a process of finding and reducing the number of bugs, or defects, in a computer program, thus making it behave as expected

learn more… | top users | synonyms (1)

2
votes
1answer
51 views

Echo out lines of script before running them

Is there a way to run scripts in bash that makes it so that it prints each line of the script before executing it? This would be really useful to me for debugging... $./myscript.sh echo "Hello" ...
2
votes
1answer
35 views

set -xv behavior in ksh vs bash

Normally I like to have all of the debug output of a script go to a file, so I will have something like: exec 2> somefile set -xv This work very will in bash, but I have noticed in ksh it ...
6
votes
1answer
280 views

Is there a way to see if process listening on TCP port receives a message?

According to tcpdump, my server receives the following TCP packet: 12:52:29.603233 00:19:e2:9e:df:f0 00:16:3e:6a:25:3f, ethertype IPv4 (0x0800), length 74: 10.10.10.65.38869 192.168.215.82.22: ...
0
votes
0answers
21 views

How to display printk messages filtered by level as they come?

I wrote a hello word module that performs a printk when it is loaded in level ALERT and another printk when it is released with level INFO: #include <linux/module.h> #include ...
24
votes
3answers
1k views

How can I see the exact command line being executed inside some bash instance?

I have a long running bash instance (inside a screen session) that is executing a complex set of commands inside a loop (with each loop doing pipes, redirects, etc). The long command line was ...
2
votes
1answer
29 views

Why is my Compose key not being passed to Synergy?

The key that I assign to the compose key (right Alt) is not passed to the remote computer by Synergy. I don't know if it's a problem with Synergy or with X, but my guess is that the compose key is ...
22
votes
6answers
1k views

How to debug a bash script?

I'm having some problems with some scripts in bash, about errors and unexpected behaviors. I would like to investigate the causes of the problems so I can apply fixes. Is there a way I can turn some ...
4
votes
1answer
61 views

Can anything useful be done with a truncated core?

We have processes written in a mix of Python, Java and C++ that core dump from time to time. They allocate more memory in chunks as needed during runtime, and are known to crash when their allocation ...
0
votes
1answer
32 views

GNOME 3 - bottom panel is hiding - how to unhide it or change behaviour

After upgrading Debian Wheezy to Jessie, I experience some random unhiding behaviour of the bottom panel. It does not appear - as before - by moving the mouse into lower right corner. It seems it is ...
1
vote
2answers
71 views

Double click Linux Bash Script and debug with pause commands

I'm fairly good with windows .bat scripts and normally use the pause command while developing them so I can see things step by step as the script runs in the command prompt. I am trying to do ...
1
vote
3answers
66 views

Bash script in ( set -x ) mode does not display what “cat” command does. ( contents of it )

in this bash script.. it simply shows.. +cat as it runs. #!/bin/bash set -x cat > /test << "EOF" a b c d EOF but i rather show everything that it does . including the a b c d ...
1
vote
0answers
237 views

What does “Cannot make/remove an entry for the specified session” mean?

Instead of logging me in, PAM greets me with the message "Cannot make/remove an entry for the specified session" after I enter the password. What entry is it talking about (and what session)? The ...
3
votes
1answer
35 views

How to save the result of printf to a variable in GDB?

(gdb)printf "Hello %d", 7 Hello 7 (gdb)set $MyVar = printf "Hello %d", 7 // ??? How to save the result of printf "Hello %d", 7 to $MyVar?
3
votes
1answer
56 views

How to make gdb not ask me “y or n”?

When I use GDB command add-symbol-file to load the symbol, GDB always asks me 'y or n', like this: gdb> add-symbol-file mydrv.ko 0xa0070000 add symbol table from file "mydrv.ko" at ...
3
votes
1answer
40 views

Methods to find out which (configuration) files are read by executable when started

What are the clever ways to find out which (configuration) files are read by executable if started? For example snmpd or sshd. One option is probably to check the CONFIGURATION FILES or FILES section ...
5
votes
2answers
263 views

How to determine what instructions a process is executing?

I know about strace and ltrace, but that only tells me what system calls and library calls a process is executing, respectively. I would like to know exactly what instructions a process is executing. ...
2
votes
2answers
63 views

How can I remotely debug a broken initrd?

Background I have a system that runs Linux. It's a NAS, and does not have any monitor, keyboard, or serial port. It does have a network port. I'm not happy with the software running on it, and am ...
35
votes
2answers
693 views

How did `git pull` eat my homework?

I feel like a kid in the principal's office explaining that the dog ate my homework the night before it was due, but I'm staring some crazy data loss bug in the face and I can't figure out how it ...
3
votes
0answers
39 views

Kernel bisect: when a patch is failing for a reason other than original bisect purpose, what do you do? [closed]

Let's say you're trying to find the cause of a bug between 3.11.0 and 3.12.0. The bug is really difficult to catch, because it may or may not manifest itself over several days of regular workload ...
9
votes
4answers
323 views

How can I tell if the currently executing bash script has been invoked with -x for debugging?

I have a script launch.sh that executes itself as another user so as to create files with the correct owner. I want to pass -x to this invocation if it was originally passed to the script if [ ...
4
votes
3answers
175 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 ...
13
votes
2answers
808 views

How to find out what process is writing to STDOUT?

I have two instances of a process running. One of them is "frEAkIng oUT!" and printing errors non stop to STDOUT. I want to kill the broken process but I have to make sure I don't terminate the wrong ...
4
votes
1answer
198 views

How to dump USB traffic?

I got an USB gamepad and I would like to see and inspect the signals and commands that this peripherals is actually sending to my PC/kernel: how I can do that ? I was assuming that something like ...
1
vote
1answer
81 views

SystemTap simple demo fails

Started learning SystemTap using RedHat's manual. Here is the example I'm trying to run. While executing stap open.stp I got the error: [root@ror6ax ~]# stap open.stp semantic error: while resolving ...
2
votes
0answers
83 views

An obscure autotools error with Epson iscan project

I'm seeing the following error when attempting to build iscan using the master branch on Debian wheezy. This project provides support for Epson scanners, in cases when SANE doesn't. This project ...
16
votes
2answers
2k views

Running application ends with “Segmentation Fault”

I have a command line application that when run does not do what it is supposed to do and at a certain point leaves the message: Segmentation fault What does this mean? What should I do?
1
vote
1answer
75 views

What's a good way to debug issues with X forwarding over ssh where just some applications won't run?

As far as I understand it, X forwarding is usually pretty simple. Once I can run some things like xeyes or gimp over ssh, complex applications like firefox/iceweasel should also be able to run. ...
5
votes
1answer
221 views

How do I view executables run by a program?

Is there a way to view or get a list of executables that a program uses? A particular example is file-roller. Is there a way to see which executables it uses, if there is more than one executable it ...
1
vote
1answer
445 views

Is there a GUI debugger for shell scripts

Debugging bash scripts on command line is complicated. Is there a good GUI based debugger available for debugging bash scripts?
0
votes
1answer
330 views

How to enable printk selectively?

I want to print some statements from kernel but not all. So can I use printk selectively? By selectively I mean I want to enable printk only at particular places and disable it everywhere else. ...
1
vote
1answer
101 views

How to extract running Apache configuration from core dump?

Apache is loading the configuration from files into its memory. If the config files are changing the Apache process won't activate it until a reload/restart happens. Now I have to debug the current ...
1
vote
2answers
110 views

Why does Linux print a lot of debugging messages on boot/shutdown?

Why does Linux print a lot of debugging messages during the boot and shutdown processes? The boot/shutdown processes usually have no error. Why not hide the debugging messages, and show them only ...
0
votes
0answers
72 views

Can I use lldb to remotely debug the Linux kernel?

With GDB, I can remotely debug the Linux kernel. lldb, which promises to completely replace GDB, should be able to remotely debug the Linux kernel too. However, I cannot find any tutorial about this ...
0
votes
2answers
61 views

Emacs how do I interpret this Lisp debugger report

I am trying to make up a .emacs file on my new Fedora 20 computer, and get this line when I use emacs -debug-init &. I expect it to be a trivial mistake, but I find the help on this too detailed ...
0
votes
1answer
44 views

Script in C shell skipping over last else statement?

This is a C shell script that checks the number of arguments and if the file/directory exists. When the arguments are valid, it should go to the last else statement and print "hi", but when I run this ...
0
votes
2answers
133 views

System too slow [closed]

My linux system is responding very slowly.I should wait to get the result of my command. How can i investigate to know the problem of his behavior?
2
votes
1answer
113 views

Best practices for maintaining error logs (system, device driver & application)

I have many Pandaboards with Ubuntu armhf and one PC server networked with Wi-Fi. On each embedded board I have a real-time application running constantly. I don't know how to reasonably maintain the ...
1
vote
3answers
678 views

Monodevelop doesn't run the project. When I try to run nothing happens

I've been trying to get Monodevelop up and running for almost a week now, first on my redhat and now on my fedora. The debugger doesn't work, when trying to debug I get this error: I tried ...
2
votes
0answers
81 views

“Debugging” with bashdb: why do I lose command echo after stepping into a simple script?

I heard about the bash debugger ( bashdb ) after reading a comment so I thought I should try it out and see if it can help me analyze bash scripts or more generally the execution of commands. There ...
7
votes
2answers
841 views

How exactly does printk work internally?

I know printf needs help from the OS to do its job. I also know printf does not work in the Linux source code as there is no library. And so we have printk for debugging. How does printk work ...
2
votes
2answers
56 views

How to tell which files have been created by an application?

I want to find out what files an application has created or modified. In the old days it was easy. cc foo.c created a.out, cc -o foo foo.c created foo, cc -c foo.x created foo.o. Now applications ...
1
vote
0answers
87 views

Why is the service unavailable the second time?

How can this happen? /volume1/homes/me $ tdtool --list /volume1/homes/me $ tdtool -e 44 Learning device: 44 - Could not connect to the Telldus Service /volume1/homes/me $ tdtool --list Error fetching ...
4
votes
1answer
60 views

Methods to diagnose why an application works for local user account but fails on a network user account?

I have setup a CentOS 6.5 machine that is attached to my company's domain. The OS is configured to allow Active Directory authentication so we do not have to have separate usernames and passwords to ...
2
votes
0answers
87 views

Is there an equivalent of addr2line on AIX system?

I'd like to debug proftpd on AIX and according to the documentation, addr2line is a usefull binary to identify what is not working. Extract of proftpd debugging documentation: The key here for ...
1
vote
1answer
46 views

sysrq-trigger doesn't accept parameter 'g'

I'm trying to debug the kernel. But I couldn't trigger kgdb with echo g > /proc/sysrq-trigger, it just prints help message. I have enabled kernel debugging, kgdb over serial, frame pointer etc. ...
2
votes
1answer
308 views

How can we trace problems of crashing programs in Linux?

If an application crashes in Windows we can check the Event Viewer in the Administration tools to see what has crashed. Sometimes it has useful information others not, but it is a start. In linux if ...
1
vote
1answer
299 views

Resolving executable user stack trace addresses in ftrace

I'm trying to obtain a user stack trace in ftrace, but for some reason, only my user program cannot resolve the addresses to symbols. First, the OS I'm using is: $ uname -a Linux mypc ...
10
votes
2answers
845 views

Observing a hard-disk write in kernel space (with drivers/modules)

Apologies in advance if this post is a bit dense/messy, but I'm having a hard time formulating it better... Basically, I would like to study what happens upon a hard disk write, and I'd like to know: ...
2
votes
0answers
226 views

How should I enable the trace log for ALSA hda_unsol_event?

I have reported an ALSA kernel bug and have been asked to "enable tracepoints" and "check the response of hda_unsol_event". I was directed to the kernel docs for instruction, which say: Except ...
1
vote
1answer
397 views

Bash option to get resolved executable path?

Bash is able to trace execution script commands with the -x command line option. Each command is then output to stderr, prefixed by PS4 as stated in the man page. -x After expanding each ...