Bug 140512

Summary: sshd blocks SIGALRM
Product: [openSUSE] SUSE LINUX 10.0 Reporter: Loic Domaigne <loic-dev>
Component: NetworkAssignee: Petr Ostadal <postadal>
Status: RESOLVED WONTFIX QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None    
Version: unspecified   
Target Milestone: ---   
Hardware: HP   
OS: SuSE Pro 9.2   
Whiteboard:
Found By: Customer Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Loic Domaigne 2005-12-21 14:25:51 UTC
Gidday everbody, 

We have just found an interesting issue regarding the sshd daemon on our
SuSE system. For some reasons, the /usr/sbin/sshd process blocks SIGALRM as
shown in the /proc/pid/status:

$ cat /proc/`cat /var/run/sshd.init.pid`/status
Name:   sshd
State:  S (sleeping)
SleepAVG:       0%
[...]
SigPnd: 0000000000000000
ShdPnd: 0000000000000000
SigBlk: 0000000000002000  <-- SIGALRM is blocked
SigIgn: 0000000000001000

As a result, any descendent processes shall inherit this mask. The bad news
is that some commands rely on SIGALRM being unmasked, e.g. those invoking
alarm() or similar. If those commands are started from a "ssh shell", then
they won't work correctly (e.g. never times out). That's really annoying. 

Do you have an idea where the problem lies?
Below you shall find the relevant information about the system. 

Thanks in advance! 
Loic. 

******************* System information ******************

* Hardware:
HP Proliant, intel PIII 1.4Ghz

* SuSE release: 
SuSE Professional v9.2

* uname -a:
Linux mucltpa04 2.6.8-24-smp #1 SMP Wed Oct 6 09:16:23 UTC 2004 i686 i686
i386 GNU/Linux

* openssh
based on the following RPMs:
openssh-3.9p1-3
openssh-askpass-3.9p1-3

* let me know if you need further information
Comment 1 Dr. Werner Fink 2005-12-21 14:43:33 UTC
Does this problem really exist within SuSE LINUX 10.0?
Comment 2 Loic Domaigne 2005-12-21 15:16:08 UTC
I don't know how this problem relates to later SuSE version.
We're currently facing this problem with SuSE Pro v9.2. 

If this is not the right place to report bug with that SuSE version, please redirect me to the appropriate place.

Thanks in advance, 
Loic. 
Comment 3 Cristian Rodríguez 2005-12-21 15:50:17 UTC
werner: No, problem does not exists on SUSE 10

Loic: get an upgrade and try again... ;-)
Comment 4 Loic Domaigne 2005-12-21 15:56:51 UTC
Unfortunately, I can't upgrade to SuSE 10 because the system is not tested against that version. 

Any other suggestions?

Thanks,
Loic. 
Comment 5 Petr Ostadal 2006-01-02 17:35:16 UTC
In Suse openssh we have patch, which blocks sigalarm, when something is writing to log by syslog (see openssh-3.9p1-blocksigalrm.diff)

//snip
+       /* Prevent a race between the grace_alarm
+        * which writes a log message and terminates
+        * and main sshd code that leads to deadlock 
+        * as syslog is not async safe.
+        */ 

but after writting we reverted it back to old state.

Comment 6 Petr Ostadal 2006-02-16 13:14:43 UTC
could you please try fixed openssh from  http://beta.suse.com/private/postadal/bug140512/
Comment 7 Petr Ostadal 2006-04-18 10:06:03 UTC
no respond for a long time, I will add this patch with next security update
Comment 8 Stephan Kulow 2008-06-25 09:34:27 UTC
mass reopening all SuSE Linux bugs that are set to REMIND+LATER to change the resolution to WONTFIX (adapting to new policy)
Comment 9 Stephan Kulow 2008-06-25 09:36:35 UTC
mass reopening all SuSE Linux bugs that are set to REMIND+LATER to change the resolution to WONTFIX (adapting to new policy)
Comment 10 Stephan Kulow 2008-06-25 09:41:45 UTC
mass reopening all SuSE Linux bugs that are set to REMIND+LATER to change the resolution to WONTFIX (adapting to new policy)
Comment 11 Stephan Kulow 2008-06-25 09:53:12 UTC
Closing old LATER+REMIND bugs as WONTFIX - if you still plan to work on it, feel free to reopen and set to ASSIGNED.

In case the report saw repeated reopen comments, it's due to bugzilla timing out on the huge request ;(