Bug 837621
Summary: | sa -u cause Segmentation fault | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Branislav Náter <bnater> |
Component: | psacct | Assignee: | Jaromír Cápík <jcapik> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Branislav Náter <bnater> |
Severity: | high | Docs Contact: | |
Priority: | high | ||
Version: | 6.3 | CC: | jpallich, ovasik |
Target Milestone: | rc | Keywords: | ZStream |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2013-11-14 10:41:11 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 838998 |
Description
Branislav Náter
2012-07-04 12:09:56 UTC
rec->ac_uid is invalid for some reason ... needs a deeper analysis. Some parts of the code are really very strange ... ---------------------------------------------------- #if __BYTE_ORDER == __BIG_ENDIAN # define ACCT_BYTEORDER 0x80 /* Accounting file is big endian. */ #else # define ACCT_BYTEORDER 0x00 /* Accounting file is little endian. */ #endif ... ... if ((version % ACCT_BYTEORDER) != 3) { ---------------------------------------------------- Anything modulo 0 must throw SIGFPE ... Fortunately the structure seems to be BIG ENDIAN even on LITTLE_ENDIAN architectures ... this has been redesigned in the new upstream version. It seems I've found the issue. The ac_uid field needs to be read from the rec_v3 variable in case of acct_v3 structures. The acct structure version detection is a bit nonsense, but it doesn't cause the trouble. It was a human factor ... a cut'n'paste issue. Gonna test that on other architectures. |