[OpenAFS] RHEL4 x86_64 1.4.0-rc5 RPM install aklog segfault
Karl E. Kelley
kekelley@iastate.edu
Tue, 01 Nov 2005 09:31:06 -0600
This is a multipart MIME message.
--==_Exmh_1130858991_189950
Content-Type: text/plain; charset=us-ascii
>>>Derek Atkins said:
> What does "uname -r" return? Running the rpmbuild on an x86_64 should
> build the userspace RPMS and a kernel module/rpm for the currently running
> kernel. If it's an SMP kernel, then it should be an SMP module.
>
> -derek
>
> Quoting Lee Damon <nomad@crow.ee.washington.edu>:
>
> > This was all compiled in one rpmbuild -ba operation so hopefully it
> > was all done with the same compiler.
> >
> > Turns out the rpmbuild didn't build modules for SMP kernel (even when
> > compiled while a 2.6.9-22.ELsmp kernel was running) so I'm back to
> > playing with colorful blocks for a while until I learn more about
> > building RPMs (in my CFT).
> >
> > nomad
> >
> > lamont@scriptkiddie.org wrote:
> >>
> >> I had problems like this when I compiled aklog with a different
> >> compiler (gcc-2.95.3) from the one that I used with openafs
> >> (gcc-3.2.3) awhile back. Hopefully with them integrated together
> >> there's no way for it to pick up different compilers, but you never
> >> know...
> >>
> >> On Mon, 31 Oct 2005, Lee Damon wrote:
> >>
> >>> Derek,
> >>>
> >>> In the now successfully rebuilt 1.4.0rc5 SRPM-based RPM for x86_64
> >>> everything seems to work except for aklog. It segfaults.
> >>>
> >>> : || nomad@noddy ~ [15] ; which aklog
> >>> /usr/bin/aklog
> >>> : || nomad@noddy ~ [16] ; rpm -qf /usr/bin/aklog
> >>> openafs-krb5-1.4.0rc5-1.1
> >>> : || nomad@noddy ~ [17] ; /usr/bin/aklog
> >>> Segmentation fault
> >>>
> >>> the tail end of an strace says:
> >>>
> >>> open("/usr/vice/etc/ThisCell", O_RDONLY) = 3
> >>> fstat(3, {st_mode=S_IFREG|0444, st_size=18, ...}) = 0
> >>> mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
> >>> -1, 0) = 0x2a9556c000
> >>> read(3, "ee.washington.edu\n", 4096) = 18
> >>> close(3) = 0
> >>> munmap(0x2a9556c000, 4096) = 0
> >>> stat("/usr/vice/etc/CellServDB", {st_mode=S_IFREG|0444,
> >>> st_size=20765, ...}) = 0
> >>> open("/usr/vice/etc/CellServDB", O_RDONLY) = 3
> >>> fstat(3, {st_mode=S_IFREG|0444, st_size=20765, ...}) = 0
> >>> mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
> >>> -1, 0) = 0x2a9556c000
> >>> read(3, ">ee.washington.edu\t#Nikola\n128.2"..., 4096) = 4096
> >>> read(3, "ysics, university Mainz, Germany"..., 4096) = 4096
> >>> read(3, " #cpeven.physi"..., 4096) = 4096
> >>> read(3, " #ccafsdb3.in2p3.fr"..., 4096) = 4096
> >>> read(3, "#The Slackers\' Network\n63.201.48"..., 4096) = 4096
> >>> read(3, "Manchester HEP\n194.36.2.3 "..., 4096) = 285
> >>> read(3, "", 4096) = 0
> >>> close(3) = 0
> >>> munmap(0x2a9556c000, 4096) = 0
> >>> open("/usr/vice/etc/CellAlias", O_RDONLY) = -1 ENOENT (No such file
> >>> or directory)
> >>> open("/usr/vice/etc/KeyFile", O_RDONLY) = -1 ENOENT (No such file
> >>> or directory)
> >>> stat("/usr/vice/etc/CellServDB", {st_mode=S_IFREG|0444,
> >>> st_size=20765, ...}) = 0
> >>> stat("/usr/vice/etc/CellServDB", {st_mode=S_IFREG|0444,
> >>> st_size=20765, ...}) = 0
> >>> stat("/etc/krb5.conf", {st_mode=S_IFREG|0444, st_size=1349, ...}) = 0
> >>> stat("/etc/krb5.conf", {st_mode=S_IFREG|0444, st_size=1349, ...}) = 0
> >>> stat("/etc/krb5.conf", {st_mode=S_IFREG|0444, st_size=1349, ...}) = 0
> >>> --- SIGSEGV (Segmentation fault) @ 0 (0) ---
> >>> +++ killed by SIGSEGV +++
> >>> Process 21860 detached
> >>>
> >>>
> >>> nomad
> >>> ----------- - Lee "nomad" Damon - \
> >>> work: nomad@ee.washington.edu \
> >>> play: nomad@castle.org or castle!nomad \
> >>> /\
> >>> Sr. Systems Admin, UWEE SSLI Lab / \
> >>> "Celebrate Diversity" / \
> >>> _______________________________________________
> >>> OpenAFS-info mailing list
> >>> OpenAFS-info@openafs.org
> >>> https://lists.openafs.org/mailman/listinfo/openafs-info
> >>>
> > _______________________________________________
> > OpenAFS-info mailing list
> > OpenAFS-info@openafs.org
> > https://lists.openafs.org/mailman/listinfo/openafs-info
> >
>
>
>
> --
> Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
> Member, MIT Student Information Processing Board (SIPB)
> URL: http://web.mit.edu/warlord/ PP-ASEL-IA N1NWH
> warlord@MIT.EDU PGP key available
>
> _______________________________________________
> OpenAFS-info mailing list
> OpenAFS-info@openafs.org
> https://lists.openafs.org/mailman/listinfo/openafs-info
>
I had the segfault in aklog when I built 1.4.0-rc8 with the openafs spec
file from 1.4.0-rc5, it seemed identical to a problem I had back when I
was building openafs 1.3.83 for x86_64, and I had a patch for it. I happens
when krb5_build_principal_xxx() is called using a "0" for an argument, which
is supposed to be a pointer, this ends up passing an invalid pointer
to krb5_build_principal(), and causes the segmentation fault.
This is fixed in the aklog in the openafs source, but it isn't built
on the x86_64 platform, and the spec file builds the afs-krb5 package instead,
which has this problem.
I'm attaching a patch that fixes this problem and similar problems in other
programs in the afs-krb5 package.
Karl Kelley
--
--==_Exmh_1130858991_189950
Content-Type: application/x-patch ; name="afs-krb5-2.0-64bit.build_principal.null.patch"
Content-Description: afs-krb5-2.0-64bit.build_principal.null.patch
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="afs-krb5-2.0-64bit.build_principal.null.patch"
LS0tIGFmcy1rcmI1L3NyYy9rZXlmaWxlX2R1bXAuYy42NGJpdC5idWlsZF9wcmluY2lwYWwu
bnVsbAkyMDAzLTAzLTE2IDE5OjEzOjM0LjAwMDAwMDAwMCAtMDYwMAorKysgYWZzLWtyYjUv
c3JjL2tleWZpbGVfZHVtcC5jCTIwMDUtMTAt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19wYXJhbS5jLjY0Yml0LmJ1aWxkX3ByaW5jaXBhbC5udWxsCTE5OTktMDUtMjUg
MTM6MjQ6MzguMDAwMDAwMDAwIC0wNTAwCisrKyBhZnMta3JiNS9zcmMvYWtsb2dfcGFyYW0u
YwkyMDA1LTEwLTMxIDExOjQwOjIzLjAwMDAwMDAwMCAtMDYwMApAQCAtOTYsOCArOTYsOCBA
QAogICAgIGlmICgociA9IGtyYjVfYnVpbGRfcHJpbmNpcGFsKGNvbnRleHQsICZpbmNyZWRz
LnNlcnZlciwKICAgICAgICAgICAgICAgICAgICAgIHN0cmxlbihyZWFsbSksIHJlYWxtLAog
ICAgICAgICAgICAgICAgICAgICAgbmFtZSwKLSAgICAgICAgICAgKGluc3QgJiYgc3RybGVu
KGluc3QpKSA/IGluc3QgOiAwLAotICAgICAgICAgICAgICAgICAgICAgMCkpKSB7CisgICAg
ICAgICAgIChpbnN0ICYmIHN0cmxlbihpbnN0KSkgPyBpbnN0IDogKHZvaWQqKU5VTEwsCisg
ICAgICAgICAgICAgICAgICAgICAodm9pZCopTlVMTCkpKSB7CiAgICAgICAgIHJldHVybigo
aW50KXIpOwogICAgIH0KIAo=
--==_Exmh_1130858991_189950
Content-Type: text/plain; charset=us-ascii
Karl E. Kelley <kekelley@iastate.edu>
Systems Programmer
Iowa State University Information Technology Services Phone (515) 294-0005
Ames, Iowa 50011
--==_Exmh_1130858991_189950--