Bug 149475

Summary: ssh-agent started before gnome-session dies
Product: [Fedora] Fedora Reporter: Michael Hoffman <hoffman+redhat>
Component: opensshAssignee: Tomas Mraz <tmraz>
Status: CLOSED NOTABUG QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 3CC: mharris
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-04-06 16:00:13 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 134494    
Bug Blocks:    

Description Michael Hoffman 2005-02-23 14:38:36 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5)
Gecko/20041111 Firefox/1.0

Description of problem:
An ssh-agent runs before my GNOME session starts, but it keeps dying
mysteriously and I get this:

hoffman damiana ~
$ ssh-add
Could not open a connection to your authentication agent.

hoffman damiana ~ [2]
$ echo $SSH_AGENT_PID
19484

hoffman damiana ~
$ ps 19484
  PID TTY      STAT   TIME COMMAND

I have been running ssh-agent -d separately and copying the
SSH_AUTH_SOCK variable into a bash session before running startx
(which eventually calls gnome-session). This ssh-agent runs for days
without incident.

Version-Release number of selected component (if applicable):
openssh-3.9p1-7

How reproducible:
Sometimes

Steps to Reproduce:
1. Log into GNOME and wait from minutes to hours
2. Check that $SSH_AGENT_PID and $SSH_AUTH_SOCK are already set
3. Try running ssh-add

Actual Results:  hoffman damiana ~
$ ssh-add
Could not open a connection to your authentication agent.

hoffman damiana ~ [2]
$ echo $SSH_AGENT_PID
19484

hoffman damiana ~
$ ps 19484
  PID TTY      STAT   TIME COMMAND

Expected Results:  Should have been asked for my pass phrase. Should
have seen that the process with PID $SSH_AGENT_PID was still running.

Additional info:

Comment 1 Tomas Mraz 2005-02-25 09:07:22 UTC
I cannot reproduce the ssh-agent crash neither when I start X session
from gdm nor using startx. Have you changed anything in your X startup
scripts?


Comment 2 Michael Hoffman 2005-02-25 11:25:21 UTC
It only happens when I use gdm.

I have changed things in my X startup scripts in an attempt to get it
to work, but it never worked to start with. Commonly the ssh-agent
process will live for minutes or hours, and then die without warning.
I never have this problem when starting ssh-agent manually.

Is there any way I can provide additional debugging information?

Comment 3 Tomas Mraz 2005-02-25 12:58:07 UTC
Hmm so it crashes only after some time?
What ps -efa | grep ssh-agent gives you when it's still running?
Also could you post here the exact commandline it's started with?

The most interesting thing would be to find out at what exact
conditions it dies, also if it dies by SEGFAULT or other means.


Comment 4 Michael Hoffman 2005-03-18 17:20:03 UTC
I started the following script in a full-screen terminal:

while true; do
    date
    ps -efa | grep [s]sh-agent
    sleep 1
done

Then I logged in. The results:

Wed Mar  9 15:09:25 GMT 2005
Wed Mar  9 15:09:26 GMT 2005
Wed Mar  9 15:09:27 GMT 2005
hoffman   5096     1  0 15:09 ?        00:00:00 ssh-agent -s
Wed Mar  9 15:09:28 GMT 2005
hoffman   5096     1  0 15:09 ?        00:00:00 ssh-agent -s
[...]
Wed Mar  9 15:46:08 GMT 2005
hoffman   5096     1  0 15:09 ?        00:00:00 ssh-agent -s
Wed Mar  9 15:46:09 GMT 2005
hoffman   5096     1  0 15:09 ?        00:00:00 ssh-agent -s
Wed Mar  9 15:46:10 GMT 2005
Wed Mar  9 15:46:11 GMT 2005
Wed Mar  9 15:46:12 GMT 2005

So it just died 37 minutes later for no apparent reason. I wasn't doing anything
ssh related at the time.

Comment 5 Tomas Mraz 2005-03-21 08:19:06 UTC
Because I cannot reproduce it here it would help if you could find out how it
dies - if it gets SIGSEGV or simply exits or what exactly happens with it. Also
it would help if you could try to reproduce the behaviour with keys which would
be generated specially for this purpose -> not security sensitive so you could
attach them to the bug report.


Comment 6 Mike A. Harris 2005-03-21 17:28:37 UTC
I've updated xinitrc to 4.0.15 in rawhide.  You may want to test with that
to see if it has any effect on this problem.

Comment 7 Tomas Mraz 2005-03-21 18:13:20 UTC
Michael, did the xinitrc 4.0.15 from rawhide help?


Comment 8 Michael Hoffman 2005-04-06 14:52:31 UTC
I tried the new xinitrc and it didn't change anything. I also tried OpenSSH
4.0p1, no change. I tried stracing the ssh-agent process and this is what I get
when it dies:

select(4, [3], [], NULL, NULL)          = ? ERESTARTNOHAND (To be restarted)
--- SIGTERM (Terminated) @ 0 (0) ---
unlink("/tmp/ssh-UCbLh23175/agent.23175") = 0
rmdir("/tmp/ssh-UCbLh23175")            = 0
exit_group(2)                           = ?
Process 23176 detached



Comment 9 Tomas Mraz 2005-04-06 16:00:13 UTC
Hmmm nice - so the ssh-agent is getting SIGTERM. Definitely not a bug in
ssh-agent that it exits then.

Now, you must find who/which evil process is sending the SIGTERM signal to the
ssh-agent. If this process is from the openssh package, then reopen this bug,
otherwise open a new bug on the package from which it is.