Bug 149475 - ssh-agent started before gnome-session dies
ssh-agent started before gnome-session dies
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: openssh (Show other bugs)
3
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Tomas Mraz
Brian Brock
:
Depends On: 134494
Blocks:
  Show dependency treegraph
 
Reported: 2005-02-23 09:38 EST by Michael Hoffman
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-04-06 12:00:13 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Michael Hoffman 2005-02-23 09:38:36 EST
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 04:07:22 EST
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 06:25:21 EST
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 07:58:07 EST
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 12:20:03 EST
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 03:19:06 EST
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 12:28:37 EST
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 13:13:20 EST
Michael, did the xinitrc 4.0.15 from rawhide help?
Comment 8 Michael Hoffman 2005-04-06 10:52:31 EDT
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 12:00:13 EDT
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.


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