2

Open Bash, run Top, and about 1/3 times, bash just closes. The other 2/3 times, it runs properly. The same thing occurs with other commands like "clear" or "/sbin/ifconfig"

Any ideas what may be causing this or how I can start investigating for the cause? I'm running Ubuntu 14.04 LTS

1
  • 2
    Have you tried running bash inside a bash to test whether only the inner bash crashes and not the whole terminal? Have you tried an other shell, e.g. dash?
    – Perseids
    Commented Sep 26, 2014 at 8:02

1 Answer 1

4

To investigate that problem, you could log in on a text console and run another bash instance there with your common program. The idea is that, if the bash instance terminates abnormally, you get a message printed to the console telling you why that happened.

If you cannot reproduce the error that way, you could open a terminal emulator and then open another terminal emulator from the terminal you just opened. Then, you can run the commands in the second terminal window and, if it gets closed abnormally, you may get a message telling you why that happened in the first terminal window.

Alternatively, you could run your common command in a shell other than bash to see, whether you can then reproduce the error, too.

If you have found the program that may cause the crash, you could install the debug information for it (if available) and then run that program within a debugger to get the location that causes the program to crash.

1
  • 2
    Also worth a shot: Running bash inside gdb.
    – Perseids
    Commented Sep 26, 2014 at 8:06

Not the answer you're looking for? Browse other questions tagged .