Bug 623684

Summary: condor_userlog core dumps when unable to open log file r/o
Product: Red Hat Enterprise MRG Reporter: Jon Thomas <jthomas>
Component: condorAssignee: Matthew Farrellee <matt>
Status: CLOSED ERRATA QA Contact: Martin Kudlej <mkudlej>
Severity: medium Docs Contact:
Priority: medium    
Version: 1.2CC: matt, mkudlej
Target Milestone: 1.3   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
The 'condor_userlog' returned a segmentation fault when having read files with no 'rw' permissions available for a user. With this update, the segmentation fault no longer occurs when trying to read from a user event log that is not writable.
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-10-14 16:14:06 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:
Attachments:
Description Flags
patch for userlog problem none

Description Jon Thomas 2010-08-12 14:17:05 UTC
condor_userlog core dumps reading files not rw available to user. This can mean for files with the default log file mask "-rw-rw-r--".

really two problems:

1) can't open a file read-only

2) coredumps when it can't

repro is simply run condor_userlog on a log file that is read only for you. It will core. 

What should happen is 

- not core for any reason
- if it's readable, then output the log

Adding a patch for this

Comment 1 Jon Thomas 2010-08-12 14:18:26 UTC
Created attachment 438452 [details]
patch for userlog problem

Comment 2 Matthew Farrellee 2010-08-23 15:28:31 UTC
$ condor_version 
$CondorVersion: 7.4.4 Aug  9 2010 BuildID: RH-7.4.4-0.9.el5 PRE-RELEASE $
$CondorPlatform: X86_64-LINUX_F13 $
$ touch log
$ condor_userlog log
Host/Job        Wall Time Good Time CPU Usage Avg Alloc  Avg Lost Goodput  Util.
Total             0+00:00   0+00:00   0+00:00   0+00:00   0+00:00    0.0%   0.0%
$ chmod a-w log 
$ condor_userlog log
zsh: segmentation fault (core dumped)  condor_userlog log

Comment 3 Matthew Farrellee 2010-08-23 15:45:29 UTC
Headed upstream as...

commit 7dd4c31a9e6c34c2f4334ad8aa6f458693882d09
Author: Jon Thomas <jthomas@redhat>
Date:   Mon Aug 23 11:44:05 2010 -0400

    Fixed core dump in condor_userlog when trying to read from a user event log that is not writable

Comment 4 Matthew Farrellee 2010-08-23 15:58:03 UTC
Built in 7.4.4-0.10

Comment 5 Martin Kudlej 2010-09-09 12:45:32 UTC
Tested with condor-7.4.4-0.9 on RHEL 4.8/5.5 x i386/x86_64 and there are coredumps on RHEL 5.5 and it hold on RHEL 4.8.
Retested with condor-7.4.4-0.10 on RHEL 4.8/5.5 x i386/x86_64 and it works. --> VERIFIED

Comment 6 Martin Prpič 2010-10-07 16:10:38 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
The 'condor_userlog' returned a segmentation fault when having read files with no 'rw' priviliges available for a user. With this update, the segmentation fault no longer occurs when trying to read from a user event log that is not writable.

Comment 7 Martin Prpič 2010-10-07 16:21:56 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1 +1 @@
-The 'condor_userlog' returned a segmentation fault when having read files with no 'rw' priviliges available for a user. With this update, the segmentation fault no longer occurs when trying to read from a user event log that is not writable.+The 'condor_userlog' returned a segmentation fault when having read files with no 'rw' permissions available for a user. With this update, the segmentation fault no longer occurs when trying to read from a user event log that is not writable.

Comment 9 errata-xmlrpc 2010-10-14 16:14:06 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2010-0773.html