Bug 411441
Summary: | cronolog -l fails to update its symlink when log is deleted or too big | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora EPEL | Reporter: | Arenas Belon, Carlo Marcelo <carenas> | ||||||
Component: | cronolog | Assignee: | jafo-redhat | ||||||
Status: | CLOSED EOL | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||
Severity: | high | Docs Contact: | |||||||
Priority: | low | ||||||||
Version: | el5 | CC: | ktdreyer | ||||||
Target Milestone: | --- | ||||||||
Target Release: | --- | ||||||||
Hardware: | All | ||||||||
OS: | Linux | ||||||||
URL: | http://www.cronolog.org/ | ||||||||
Whiteboard: | ActualBug | ||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | |||||||||
: | 1279952 (view as bug list) | Environment: | |||||||
Last Closed: | 2017-04-06 10:28:04 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
Arenas Belon, Carlo Marcelo
2007-12-05 02:57:16 UTC
Created attachment 277591 [details]
removes stat calls (which can fail) and use unchecked calls directly
Comment on attachment 277591 [details]
removes stat calls (which can fail) and use unchecked calls directly
disregard this patch, the logic got mixed up by excesive refactoring, but the
principle is still valid (stat calls are not valid when testing for the
existence of symlinks and since there is no error checking they are irrelevant
anyway when unlink could be called instead and the error ignored)
Created attachment 279871 [details]
remove stat calls for the links and use unlink directly
essentially the same patch posted before, and even if it looks confusing
because of the unified patch format has been validated to be correct with all
combination of affected flags "-S, -H, -l, -P" and for both cases reported.
upstreamed patch (or suggestion for a patch) also covers both cases out of luck
and the fact that there is no error checking in that function, but the logic is
incorrect as it still stats the linked file and not the link for prevlinkname
(-P) and relies on the fact that even when that fails the link is overwritten
by the following rename call.
for a test case do (in a system with more than 2GB of memory, or a very fast
disk with ample free disk space)
cat /dev/zero | cronolog -l log %Y%m%d%H%M.log
upstream is back online with the following being a report of this bug which was never resolved (from the "Known Bugs" page in http://cronolog.org/bugs.html) : http://cronolog.org/mailing-list/msg00259.html and this being the proposed fix which is the one that was referenced on that old cached record : http://cronolog.org/patches/cronolog-missing-symlink-patch.txt the jumbo patch (all patches are linked into the "patches" page in http://cronolog.org/patches/index.html) and that was meant to be part of release 1.7.0 which never got out of beta, has a different implementation of this solution which extends the original fix to also uses lstat for prevlinkname (because using stat is logically incorrect as I mentioned earlier) and as can be seen in : http://cronolog.org/patches/cronolog-jumbo-patch.txt a similar fix was re-implemented while looking for a solution to this bug and later discarded and replaced by the proposed fix, because even though it adds a little more error checking and is logically correct it is not portable (and portability for it wasn't checked at "configure" time) and the final solution is more complex and still missing error checking for the other calls (rename and unlink) and therefore not complete. cronolog.org is no more. You might want to submit these patches to the new GitHub upstream repo: https://github.com/fordmason/cronolog FYI EPEL 5 is going EOL soon: https://lists.fedoraproject.org/archives/list/epel-devel@lists.fedoraproject.org/message/PFGUA4UNOCICASB6W7JLNBL7EJ6L4J2X/ Fedora EPEL 5 changed to end-of-life (EOL) status on 2017-03-31. Fedora EPEL 5 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora or Fedora EPEL, please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed. |