Bug 623684 - condor_userlog core dumps when unable to open log file r/o
condor_userlog core dumps when unable to open log file r/o
Status: CLOSED ERRATA
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: condor (Show other bugs)
1.2
All Linux
medium Severity medium
: 1.3
: ---
Assigned To: Matthew Farrellee
Martin Kudlej
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-08-12 10:17 EDT by Jon Thomas
Modified: 2010-10-14 12:14 EDT (History)
2 users (show)

See Also:
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 12:14:06 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Jon Thomas 2010-08-12 10:17:05 EDT
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 10:18:26 EDT
Created attachment 438452 [details]
patch for userlog problem
Comment 2 Matthew Farrellee 2010-08-23 11:28:31 EDT
$ 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 11:45:29 EDT
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 11:58:03 EDT
Built in 7.4.4-0.10
Comment 5 Martin Kudlej 2010-09-09 08:45:32 EDT
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 12:10:38 EDT
    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 12:21:56 EDT
    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 12:14:06 EDT
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.