This is the mail archive of the cygwin-developers mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Request for help debugging screen problem


Hi,

On 8/02/2010 12:09 PM, Shaddy Baddah wrote:
Hi,

On 8/02/2010 11:52 AM, Corinna Vinschen wrote:
<snip>

Did you notice the how-to-debug-cygwin.txt file in the winsup/cygwin dir? You should build Cygwin with the -DDEBUGGING flag and then you have a couple of options using GDB rather than strace.

No, I didn't notice. I can get a little to eager at times, and miss important steps. Plus I can only devote sporadic time to the issues. I'll read through it and give it a try.

I haven't yet got deep into debugging, but just a new observation. On a hunch, I tried the following to find that I am able to:

a) establish a scratch screen session from an ssh login (this was
   always the case. I just cant reattach to an existing session,
   including one I have just detached).
b) run an strace, like strace ls, from within the screen session
   without it giving me the "fatal error - couldn't initialize fd 0
   for /dev/tty2" type error. I expected this, because permissions to
   the tty master should be fine by self ownership of the screen
   session process.
c) Interestingly, I am then also able to attach to an earlier screen
   session, from within that screen session. This indicates to me that
   the screen attach problem really is linked into the strace
   issue. ie. of not being able to attach to the tty master via the
   cyg_server owned sshd loging sesion process.

c) gives us a handy workaround in the interim (tested). ie. Run a temp
screen session, resume the original session. Do whatever you want to
do with that original session. If it is to be kept running, then
detach (which detaches the temp session). Tidy up by detaching the
original session (screen -d <id>), then run a second temp
session. Reattach to the first temp screen session, then exit it to
return to the second temp screen session. Exit it, and you are nice
and tidy again.

I still intend to do some debugging and give a definitive root cause,
but at least I have a pointer where to look.

Regards,
Shaddy


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]