Hi,
The RPM version is 4.4.2.3 - I selected it primarily because it matches the version that is distributed with RHEL 5.x (we are using the standard vendor-supplied RPM with Linux). Not really sure about patch level of RPM itself - I got the source from a tape archive directly from the development site. Is there a way I can tell by looking at the source files?
Below is a capture of the truss(1) output from yum (first), then rpm(second).
-j
Yum
-------
As seen before, the file is opened and written by the parent:
3317: 4.4780 stat64("/var/local/tmp", 0xFFBFE358) = 0
3317: 4.4781 time() = 1258046853
3317: 4.4784 open64("/var/local/tmp/rpm-tmp.21622", O_RDWR|O_CREAT|O_TRUNC|O_EXCL, 0666) = 29
3317: 4.4790 fcntl(29, F_SETFD, 0x00000001) = 0
3317: 4.4791 stat64("/var/local/tmp/rpm-tmp.21622", 0xFFBFE500) = 0
3317: 4.4796 fstat64(29, 0xFFBFE468) = 0
3317: 4.4797 pollsys(0xFFBFE4E8, 1, 0xFFBFE480, 0x00000000) = 1
3317: 4.4799 write(29, " c a s e ` u n a m e ".., 418) = 418
3317: 4.4804 close(29) = 0
3317: 4.4805 dup(1) = 29
..
Then the child is forked to handle it:
3317: 4.4835 fork1() = 3318
3317: 4.4892 lwp_sigmask(SIG_SETMASK, 0x00020000, 0x00000000) = 0xFFBFFEFF [0x0000FFFF]
3318: 4.4835 fork1() (returning as child ...) = 3317
3318: 4.4896 getpid() = 3318 [3317]
3318: 4.4897 lwp_self() = 1
3318: 4.4899 lwp_sigmask(SIG_SETMASK, 0x00020000, 0x00000000) = 0xFFBFFEFF [0x0000FFFF]
3318: 4.4911 close(31) = 0
---
Right after child is forked.. Parent just removes file without hearing back from child and before it coould be processed:
3317: 4.5071 close(29) = 0
3318: 4.5071 chdir("/") = 0
3318: 4.5075 getpid() = 3318 [3317]
3317: 4.5074 unlink("/var/local/tmp/rpm-tmp.21622") = 0
For just plain rpm
-------------------------
Essentially same initial code as yum
4420: stat64("/var/local/tmp", 0xFFBFEC48) = 0
4420: time() = 1258050068
4420: open64("/var/local/tmp/rpm-tmp.24041", O_RDWR|O_CREAT|O_TRUNC|O_EXCL, 0666) = 19
4420: fcntl(19, F_SETFD, 0x00000001) = 0
4420: stat64("/var/local/tmp/rpm-tmp.24041", 0xFFBFEDF0) = 0
4420: fstat64(19, 0xFFBFED58) = 0
4420: pollsys(0xFFBFEDD8, 1, 0xFFBFED70, 0x00000000) = 1
4420: write(19, " c a s e ` u n a m e ".., 418) = 418
4420: close(19) = 0
4420: dup(1) = 19
--
Then child is forked and the parent actually yields:
4421: fork1() (returning as child ...) = 4420
4421: getpid() = 4421 [4420]
4420: lwp_sigmask(SIG_SETMASK, 0x00000000, 0x00000000) = 0xFFBFFEFF [0x0000FFFF]
4420: lwp_sigmask(SIG_SETMASK, 0x00020000, 0x00000000) = 0xFFBFFEFF [0x0000FFFF]
4420: close(20) = 0
4420: close(21) = 0
4420: lwp_sigmask(SIG_SETMASK, 0x00000000, 0x00000000) = 0xFFBFFEFF [0x0000FFFF]
4420: yield() = 0
..
The child does it's business, chmod is very end of %post, then the parent receives the signal from child and goes along
…
4437: chmod("/etc/yum.repos.d/gwmt-dev.repo", 0644) = 0
4437: pathconf("/etc/yum.repos.d/gwmt-dev.repo", 20) = 1
4437: acl("/etc/yum.repos.d/gwmt-dev.repo", GETACLCNT, 0, 0x00000000) = 4
4437: _exit(0)
4421: waitid(P_PID, 4437, 0xFFBFF920, WEXITED|WTRAPPED|WNOWAIT) = 0
4421: ioctl(0, TIOCGPGRP, 0xFFBFF93C) Err#22 EINVAL
4421: getpgid(4437) = 4418
4421: ioctl(0, TIOCGPGRP, 0xFFBFF93C) Err#22 EINVAL
4421: waitid(P_PID, 4437, 0xFFBFF920, WEXITED|WTRAPPED) = 0
4421: read(19, 0x00039610, 128) = 0
4421: ioctl(19, TCGETA, 0xFFBFF7CC) Err#25 ENOTTY
4421: ioctl(19, TCGETA, 0xFFBFF82C) Err#25 ENOTTY
4421: close(19) = 0
4421: _exit(0)
4420: Received signal #18, SIGCLD, in lwp_park() [caught]
4420: siginfo: SIGCLD CLD_EXITED pid=4421 status=0x0000
4420: lwp_park(0x00000000, 0) Err#4 EINTR
4420: lwp_sigmask(SIG_SETMASK, 0x00020000, 0x00000000) = 0xFFBFFEFF [0x0000FFFF]
4420: getpgid(0) = 4418
..
then removes the file
4420: lwp_sigmask(SIG_SETMASK, 0x00000000, 0x00000000) = 0xFFBFFEFF [0x0000FFFF]
4420: sigaction(SIGCLD, 0xFFBFED70, 0x00000000) = 0
4420: close(19) = 0
4420: unlink("/var/local/tmp/rpm-tmp.24041") = 0
--- On Fri, 11/13/09, Seth Vidal <skvidal@xxxxxxxxxxxxxxxxx> wrote:
From: Seth Vidal <skvidal@xxxxxxxxxxxxxxxxx> Subject: Re: YUM install [package.rpm] fails on Solaris, reports success To: "Yellowdog Updater, Modified" <yum@xxxxxxxxxxxxxxxxx> Date: Friday, November 13, 2009, 12:04 PM
On Fri, 13 Nov 2009, Joshua Burns wrote: > Hi, > > Thanks for the suggestions. We have placed all environment variables that exist when rpm runs into both %post, and have > exported them before running yum. We are still getting the same error. > > Also, %post has been stripped down to just /usr/bin/echo blah > /tmp/file - it doesn't look like it even gets executed - > the truss(1) output seems to show that the file is unlink()
'ed by a PPID before it is executed. Where have I heard this before? Arghh.. I know there was an ordering problem.... Is the version of rpm on rhel and solaris the same? W/the same set of patches? -sv _______________________________________________ Yum mailing list Yum@xxxxxxxxxxxxxxxxxhttp://lists.baseurl.org/mailman/listinfo/yum
|