Bug 623684 - condor_userlog core dumps when unable to open log file r/o
Summary: condor_userlog core dumps when unable to open log file r/o
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: condor
Version: 1.2
Hardware: All
OS: Linux
medium
medium
Target Milestone: 1.3
: ---
Assignee: Matthew Farrellee
QA Contact: Martin Kudlej
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-08-12 14:17 UTC by Jon Thomas
Modified: 2018-10-27 13:32 UTC (History)
2 users (show)

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.
Clone Of:
Environment:
Last Closed: 2010-10-14 16:14:06 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
patch for userlog problem (1.21 KB, patch)
2010-08-12 14:18 UTC, Jon Thomas
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2010:0773 0 normal SHIPPED_LIVE Moderate: Red Hat Enterprise MRG Messaging and Grid Version 1.3 2010-10-14 15:56:44 UTC

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


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