Bug 90092
Summary: | building db-4.1.25 and openldap-2.1.17 breaks with glibc-2.3.2-4 | ||||||
---|---|---|---|---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | Gerald Carter <jerry> | ||||
Component: | db4 | Assignee: | Nalin Dahyabhai <nalin> | ||||
Status: | CLOSED RAWHIDE | QA Contact: | David Lawrence <dkl> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 8.0 | ||||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | i686 | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2003-12-13 22:51:26 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
Gerald Carter
2003-05-02 12:55:18 UTC
write() is a wrapper around a system call. There cannot be anything wrong with it. Since the code is using O_DIRECT my guess is that this feature is used incorrectly. Run strace on the program which fails and attach the output to this bug. Created attachment 91597 [details]
strace output from failed slapadd
Reproduced on RH 9 system with 2.4.20 kernel from kernel.org (no patches). New kernel due to ptrace problems with RH 9 one. garion:/var/ldap/garion# uname -a Linux garion 2.4.20 #1 Fri May 9 14:03:58 CDT 2003 i686 i686 i386 GNU/Linux # rpm -qa | egrep '(kernel|glibc)' glibc-2.3.2-11.9 kernel-2.4.20-8 glibc-kernheaders-2.4-8.10 glibc-devel-2.3.2-11.9 kernel-pcmcia-cs-3.1.31-13 glibc-common-2.3.2-11.9 kernel-source-2.4.20-8 open("/var/ldap/garion/__db.001", O_RDWR|O_CREAT|O_DIRECT|O_LARGEFILE, 0600) = 6 fcntl64(6, F_SETFD, FD_CLOEXEC) = 0 _llseek(6, 0, [0], SEEK_END) = 0 _llseek(6, 8192, [8192], SEEK_CUR) = 0 write(6, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 8192) = -1 EINVAL (Invalid argument) The problem is indeed in use of O_DIRECT: open("/opt/mail/db/__db.001", O_RDWR|O_CREAT|O_DIRECT|O_LARGEFILE, 0600) = 5 fcntl64(4, F_SETFD, FD_CLOEXEC) = 0 open("/opt/mail/db/__db.001", O_RDWR|O_CREAT|O_DIRECT|O_LARGEFILE, 0600) = 5 fcntl64(5, F_SETFD, FD_CLOEXEC) = 0 _llseek(5, 0, [0], SEEK_END) = 0 _llseek(5, 8192, [8192], SEEK_CUR) = 0 write(0x5, 0xbff26bf0, 0x2000) = -1 (errno 22) In Linux it adds mandatory requirement for the write to happen out from PAGE ALIGNED memory area. Apparently the lattest version of rawhide db4-4.1.25-3 SRC package has an autoconfig test that recognizes this issue, and _in_the_compile_machine_ does see if O_DIRECT does work as BSD expects it to (FreeBSD man pages are "somewhat" vague about it, so is Linux man-page). Now if compilations are done at a machine with older kernel (and/or libraries), then very likely kernel just ignores the option, and a binary is produced, which will use O_DIRECT option --> resulting binary RPM package fails to function. db4 problem. O_DIRECT isn't used in recent versions anymore AFAIK. Fixed in db-4.2.52, which disables O_DIRECT on linux. |