Tell me more ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Open a terminal and run

 mkdir a1
 mkdir a1/a2
 mkdir a1/a2/a3
 mkdir a1/a2/a3/a4
 mkdir a1/a2/a3/a4/foo-bar
 cd a1/a2/a3/a4/foo-bar
 emasc a.cpp &

Note that is emasc misspelled intentionally. For some reason, this will close the terminal with no response. This has been confirmed for me on two separate computers. It does not work on a separate shell screen Control-Alt-F2 and only with the default terminal Control-Shift-T. Is something going here that I don't know about?

This happens more often than I like, but this is the only sequence of commands that reproduces the crash(?) every time.

EDIT: A far more interesting development. Navigating to the directory and running bash getcwd() fails!

cd ~/a1/a2/a3/a4/foo-bar
bash

With the error:

shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
sh: 0: getcwd() failed: No such file or directory

Again, this only happens on Gnome terminal as far as I can tell.

EDIT2: After confirmation in the comments, I submitted a bug report

https://bugs.launchpad.net/ubuntu/+source/command-not-found/+bug/1100806

share|improve this question
3  
In the terminal, first type bash, then (in this nested bash shell) type all of these commands. Does it kill the terminal, or do you get some error messages? – Gilles Jan 16 at 22:22
@Gilles See edit. I can't even run bash in that directory (and only in that directory). – Hooked Jan 17 at 15:07
1  
mkdir -p a1/a2/a3/a4/foo-bar is quicker ;) – Rinzwind Jan 17 at 15:10
@Rinzwind I didn't know that the parent directories would be made in order - thanks! Can you reproduce the error above? – Hooked Jan 17 at 15:11
1  
@Hooked confirmed. cd a1/a2/a3/a4/foo-bar + emasc a.cpp & closes terminal. Weird thing: when using a1/foo-bar/ and a1/a2/foo-bar/ works correctly. a1/a2/a3/foo-bar/ crashes too! I consider it a bug :+ – Rinzwind Jan 17 at 15:28
show 2 more comments

closed as off topic by Lekensteyn, Anwar, Eric Carvalho, gertvdijk, Eliah Kagan Jan 18 at 2:04

Questions on Ask Ubuntu are expected to relate to Ubuntu within the scope defined in the FAQ. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about closed questions here.