Bug 175036 - shell escape reads from stdin even while in pdb
shell escape reads from stdin even while in pdb
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: anaconda (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: David Cantrell
Mike McLean
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-12-05 16:05 EST by Patrick Mansfield
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-01-31 15:44:21 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Patrick Mansfield 2005-12-05 16:05:23 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050922 Fedora/1.0.7-1.1.fc4 Firefox/1.0.7

Description of problem:
While running some testing of anaconda changes based on 10.90.8-1 (via --test argument), the installer hit a python problem and dropped into pdb.

But, with the new feature to hit "enter" to get a shell, anaconda appears to fork two programs (bash and pdb) that are reading stdin at the same time.

This makes it hard to use either program :)

Version-Release number of selected component (if applicable):
anaconda-10.90.8-1

How reproducible:
Always

Steps to Reproduce:
1. start install
2. hit anconda/python failure and select "debug"
3. try to run a pdb command

Actual Results:  The input seems to alternate between programs reading stdin.

Expected Results:  Only one of pdb or the bash should be reading stdin.

Additional info:
Comment 1 David Cantrell 2005-12-06 14:13:59 EST
I'm trying to reproduce this error here, but I need some more information. 
When/where are you pressing enter to spawn a shell?  What python error is
happening where you click debug to go to pdb?  Log file(s) and/or screen shots
could help me a bit.
Comment 2 Patrick Mansfield 2005-12-06 14:24:16 EST
I'm working on additions to anaconda for iscsi, and hit a bug in my development
python code.

Any exception hit in python that causes us to enter pdb will have a problem. I
don't know if there other programs spawned by anaconda that read stdin, I doubt it.

I am hitting "enter" to input data to pdb, not to the shell, but the shell is
grabbing parts of the input.

Hopefully, this output explains any missing details. I finally typed something
like "bbtt<enter>enter" to get the backtrace at the end.

  File "/usr/lib/anaconda/iw/iscsi_gui.py", line 60, in getNext
    self.iscsi.startup()
  File "/usr/lib/anaconda/iscsi.py", line 92, in startup
    os.unlink(INITIATOR_FILE)
OSError: [Errno 2] No such file or directory: '/etc/initiatorname.iscsi'

> /usr/lib/anaconda/iscsi.py(92)startup()
-> os.unlink(INITIATOR_FILE)
(Pdb) bt
sh: bt: command not found
sh-3.00# *** NameError: name 't' is not defined
(Pdb) bt
sh: bt: command not found
sh-3.00# *** NameError: name 't' is not defined
(Pdb) btt
sh: btt: command not found
sh-3.00# (Pdb)
sh-3.00# (Pdb)
sh-3.00# (Pdb) bt
sh: bt: command not found
sh-3.00#   /usr/bin/anaconda(1198)?()
-> intf.run(id, dispatch)
  /usr/lib/anaconda/gui.py(822)run()
-> self.icw.run (self.runres)
  /usr/lib/anaconda/gui.py(1386)run()
-> gtk.main()
  /usr/lib/anaconda/gui.py(923)nextClicked()
-> return
  /usr/lib/anaconda/iw/iscsi_gui.py(60)getNext()
-> self.iscsi.startup()
> /usr/lib/anaconda/iscsi.py(92)startup()
-> os.unlink(INITIATOR_FILE)
Comment 3 David Cantrell 2005-12-07 11:47:53 EST
OK, I definitely see what you're talking about now.  I've been trying to
recreate this problem here using the latest rawhide anaconda and it's not happening.

Can I see your iscsi_gui.py and associated changes to anaconda and see if I can
trigger the problem that way?
Comment 4 Patrick Mansfield 2005-12-07 11:59:41 EST
I have a whole set of changes, I can send them all, but I already fixed my
problem(s).

It would be easier to add a syntax error in something like
packages.py:betaNagScreen() or such, that will allow you to immediately hit an
exception and reproduce the problem.
Comment 5 David Cantrell 2005-12-07 13:43:36 EST
I assume you were planning on sending in the anaconda changes.  Jeremy is
probably a better contact for that, but feel free to send them to me via email.

I did exactly what you suggested: threw in a syntax error, got the exception
window, clicked debug, and was in pdb.  But it worked fine.  I was not getting
the behavior you described.  Which is why I was interested in seeing your
changes.  I don't want to close this until I see your changes because right now
the only thing I have to go on is closing it as WORKSFORME.
Comment 6 David Cantrell 2005-12-14 15:01:55 EST
I have fixed this problem in rawhide, but introduced a new problem.  Once you
drop in to Pdb, keyboard echo is gone.  I'm working on that and once it's
finished, I'll close this bug.

This comment is mostly for record keeping anyway.
Comment 7 Jeremy Katz 2006-01-31 15:44:21 EST
Fixed now.

Note You need to log in before you can comment on or make changes to this bug.