On Thu, 24 Apr 2014, Andrew Deason via RT wrote:
>
> <URL: https://rt.central.org/rt/Ticket/Display.html?id=131852 >
>
> On Thu, 24 Apr 2014 12:37:23 -0400
> Eric Sturdivant via RT <openafs-bugs@openafs.org> wrote:
>
>> error_string = 0x27571598 "keytab /usr/afs/etc/rxkad.keytab open failed:
>> Error 0", error_code = 0,
>
> Pretty bizarre; yeah, that would do it. Heimdal maybe redeclaring errno
> masking the 'real' one? Or 'open' getting defined to something that
> clears errno? Just guessing.
>
> Can you provide the output of:
>
> (gdb) disassemble fkt_start_seq_get_int
>
> Did you build this heimdal yourself, or get it from somewhere?
>
> (And yeah, I realize this is a heimdal bug, but I think OpenAFS would
> still like to know how common it is, and if I can reproduce it
> non-artificially, etc...)
>
>
Dump of assembler code for function fkt_start_seq_get_int:
0xff150dbc <+0>: save %sp, -112, %sp
0xff150dc0 <+4>: sethi %hi(0x4e800), %l7
0xff150dc4 <+8>: add %l7, 0x2d8, %l7 ! 0x4ead8
<fs_stateReadV+52>
0xff150dc8 <+12>: call 0xff115f3c <__sparc_get_pc_thunk.l7>
0xff150dcc <+16>: nop
0xff150dd0 <+20>: st %i0, [ %fp + 0x44 ]
0xff150dd4 <+24>: st %i1, [ %fp + 0x48 ]
0xff150dd8 <+28>: st %i2, [ %fp + 0x4c ]
0xff150ddc <+32>: st %i3, [ %fp + 0x50 ]
0xff150de0 <+36>: st %i4, [ %fp + 0x54 ]
0xff150de4 <+40>: ld [ %fp + 0x48 ], %g1
0xff150de8 <+44>: ld [ %g1 + 0x2c ], %g1
0xff150dec <+48>: st %g1, [ %fp + -4 ]
0xff150df0 <+52>: ld [ %fp + -4 ], %g1
0xff150df4 <+56>: ld [ %g1 ], %g1
0xff150df8 <+60>: mov %g1, %o0
0xff150dfc <+64>: ld [ %fp + 0x4c ], %o1
0xff150e00 <+68>: call 0xff1a0930 <open64@plt>
0xff150e04 <+72>: nop
0xff150e08 <+76>: mov %o0, %g2
0xff150e0c <+80>: ld [ %fp + 0x54 ], %g1
0xff150e10 <+84>: st %g2, [ %g1 ]
0xff150e14 <+88>: ld [ %fp + 0x54 ], %g1
0xff150e18 <+92>: ld [ %g1 ], %g1
0xff150e1c <+96>: cmp %g1, 0
0xff150e20 <+100>: bge %icc, 0xff150e88 <fkt_start_seq_get_int+204>
0xff150e24 <+104>: nop
0xff150e28 <+108>: sethi %hi(0), %g1
0xff150e2c <+112>: xor %g1, 0x50, %g1
0xff150e30 <+116>: ld [ %l7 + %g1 ], %g1
0xff150e34 <+120>: ld [ %g1 ], %g1
0xff150e38 <+124>: st %g1, [ %fp + -8 ]
0xff150e3c <+128>: ld [ %fp + -4 ], %g1
0xff150e40 <+132>: ld [ %g1 ], %i5
0xff150e44 <+136>: ld [ %fp + -8 ], %o0
0xff150e48 <+140>: call 0xff1a00fc <strerror@plt>
0xff150e4c <+144>: nop
0xff150e50 <+148>: mov %o0, %g2
0xff150e54 <+152>: ld [ %fp + 0x44 ], %o0
0xff150e58 <+156>: ld [ %fp + -8 ], %o1
0xff150e5c <+160>: sethi %hi(0x18000), %g1
0xff150e60 <+164>: xor %g1, -456, %g1
0xff150e64 <+168>: add %l7, %g1, %g1
0xff150e68 <+172>: mov %g1, %o2
0xff150e6c <+176>: mov %i5, %o3
0xff150e70 <+180>: mov %g2, %o4
0xff150e74 <+184>: call 0xff19f9f4 <krb5_set_error_message@plt>
0xff150e78 <+188>: nop
0xff150e7c <+192>: ld [ %fp + -8 ], %g1
0xff150e80 <+196>: b %xcc, 0xff151160 <fkt_start_seq_get_int+932>
0xff150e84 <+200>: nop
0xff150e88 <+204>: ld [ %fp + 0x54 ], %g1
0xff150e8c <+208>: ld [ %g1 ], %g1
0xff150e90 <+212>: mov %g1, %o0
0xff150e94 <+216>: call 0xff1a01bc <rk_cloexec@plt>
0xff150e98 <+220>: nop
0xff150e9c <+224>: ld [ %fp + 0x54 ], %g1
0xff150ea0 <+228>: ld [ %g1 ], %g2
0xff150ea4 <+232>: ld [ %fp + -4 ], %g1
0xff150ea8 <+236>: ld [ %g1 ], %g1
0xff150eac <+240>: ld [ %fp + 0x44 ], %o0
0xff150eb0 <+244>: mov %g2, %o1
0xff150eb4 <+248>: ld [ %fp + 0x50 ], %o2
0xff150eb8 <+252>: mov %g1, %o3
0xff150ebc <+256>: call 0xff1a0c18 <_krb5_xlock@plt>
0xff150ec0 <+260>: nop
0xff150ec4 <+264>: st %o0, [ %fp + -8 ]
0xff150ec8 <+268>: ld [ %fp + -8 ], %g1
0xff150ecc <+272>: cmp %g1, 0
0xff150ed0 <+276>: be %icc, 0xff150ef8 <fkt_start_seq_get_int+316>
0xff150ed4 <+280>: nop
0xff150ed8 <+284>: ld [ %fp + 0x54 ], %g1
0xff150edc <+288>: ld [ %g1 ], %g1
0xff150ee0 <+292>: mov %g1, %o0
0xff150ee4 <+296>: call 0xff1a01d4 <close@plt>
0xff150ee8 <+300>: nop
0xff150eec <+304>: ld [ %fp + -8 ], %g1
0xff150ef0 <+308>: b %xcc, 0xff151160 <fkt_start_seq_get_int+932>
0xff150ef4 <+312>: nop
0xff150ef8 <+316>: ld [ %fp + 0x54 ], %g1
0xff150efc <+320>: ld [ %g1 ], %g1
0xff150f00 <+324>: mov %g1, %o0
0xff150f04 <+328>: call 0xff1a0cf0 <krb5_storage_from_fd@plt>
0xff150f08 <+332>: nop
0xff150f0c <+336>: mov %o0, %g2
0xff150f10 <+340>: ld [ %fp + 0x54 ], %g1
0xff150f14 <+344>: st %g2, [ %g1 + 4 ]
0xff150f18 <+348>: ld [ %fp + 0x54 ], %g1
0xff150f1c <+352>: ld [ %g1 + 4 ], %g1
0xff150f20 <+356>: cmp %g1, 0
0xff150f24 <+360>: bne %icc, 0xff150f84 <fkt_start_seq_get_int+456>
0xff150f28 <+364>: nop
0xff150f2c <+368>: ld [ %fp + 0x54 ], %g1
0xff150f30 <+372>: ld [ %g1 ], %g1
0xff150f34 <+376>: ld [ %fp + 0x44 ], %o0
0xff150f38 <+380>: mov %g1, %o1
0xff150f3c <+384>: call 0xff1a0c24 <_krb5_xunlock@plt>
0xff150f40 <+388>: nop
0xff150f44 <+392>: ld [ %fp + 0x54 ], %g1
0xff150f48 <+396>: ld [ %g1 ], %g1
0xff150f4c <+400>: mov %g1, %o0
0xff150f50 <+404>: call 0xff1a01d4 <close@plt>
0xff150f54 <+408>: nop
0xff150f58 <+412>: ld [ %fp + 0x44 ], %o0
0xff150f5c <+416>: mov 0xc, %o1
0xff150f60 <+420>: sethi %hi(0x18000), %g1
0xff150f64 <+424>: xor %g1, -832, %g1
0xff150f68 <+428>: add %l7, %g1, %g1
0xff150f6c <+432>: mov %g1, %o2
0xff150f70 <+436>: call 0xff19f9f4 <krb5_set_error_message@plt>
0xff150f74 <+440>: nop
0xff150f78 <+444>: mov 0xc, %g1 ! 0xc
0xff150f7c <+448>: b %xcc, 0xff151160 <fkt_start_seq_get_int+932>
0xff150f80 <+452>: nop
0xff150f84 <+456>: ld [ %fp + 0x54 ], %g1
0xff150f88 <+460>: ld [ %g1 + 4 ], %g1
0xff150f8c <+464>: mov %g1, %o0
0xff150f90 <+468>: sethi %hi(0x96c73800), %g1
0xff150f94 <+472>: or %g1, 0x2b6, %o1 ! 0x96c73ab6
0xff150f98 <+476>: call 0xff1a0c9c <krb5_storage_set_eof_code@plt>
0xff150f9c <+480>: nop
0xff150fa0 <+484>: ld [ %fp + 0x54 ], %g1
0xff150fa4 <+488>: ld [ %g1 + 4 ], %g2
0xff150fa8 <+492>: add %fp, -9, %g1
0xff150fac <+496>: mov %g2, %o0
0xff150fb0 <+500>: mov %g1, %o1
0xff150fb4 <+504>: call 0xff1a0cfc <krb5_ret_int8@plt>
0xff150fb8 <+508>: nop
0xff150fbc <+512>: st %o0, [ %fp + -8 ]
0xff150fc0 <+516>: ld [ %fp + -8 ], %g1
0xff150fc4 <+520>: cmp %g1, 0
0xff150fc8 <+524>: be %icc, 0xff151028 <fkt_start_seq_get_int+620>
0xff150fcc <+528>: nop
0xff150fd0 <+532>: ld [ %fp + 0x54 ], %g1
0xff150fd4 <+536>: ld [ %g1 + 4 ], %g1
0xff150fd8 <+540>: mov %g1, %o0
0xff150fdc <+544>: call 0xff19fc64 <krb5_storage_free@plt>
0xff150fe0 <+548>: nop
0xff150fe4 <+552>: ld [ %fp + 0x54 ], %g1
0xff150fe8 <+556>: ld [ %g1 ], %g1
0xff150fec <+560>: ld [ %fp + 0x44 ], %o0
0xff150ff0 <+564>: mov %g1, %o1
0xff150ff4 <+568>: call 0xff1a0c24 <_krb5_xunlock@plt>
0xff150ff8 <+572>: nop
0xff150ffc <+576>: ld [ %fp + 0x54 ], %g1
0xff151000 <+580>: ld [ %g1 ], %g1
0xff151004 <+584>: mov %g1, %o0
0xff151008 <+588>: call 0xff1a01d4 <close@plt>
0xff15100c <+592>: nop
0xff151010 <+596>: ld [ %fp + 0x44 ], %o0
0xff151014 <+600>: call 0xff19f9b8 <krb5_clear_error_message@plt>
0xff151018 <+604>: nop
0xff15101c <+608>: ld [ %fp + -8 ], %g1
0xff151020 <+612>: b %xcc, 0xff151160 <fkt_start_seq_get_int+932>
0xff151024 <+616>: nop
0xff151028 <+620>: ldub [ %fp + -9 ], %g1
0xff15102c <+624>: sll %g1, 0x18, %g1
0xff151030 <+628>: sra %g1, 0x18, %g1
0xff151034 <+632>: cmp %g1, 5
0xff151038 <+636>: be %icc, 0xff15109c <fkt_start_seq_get_int+736>
0xff15103c <+640>: nop
0xff151040 <+644>: ld [ %fp + 0x54 ], %g1
0xff151044 <+648>: ld [ %g1 + 4 ], %g1
0xff151048 <+652>: mov %g1, %o0
0xff15104c <+656>: call 0xff19fc64 <krb5_storage_free@plt>
0xff151050 <+660>: nop
0xff151054 <+664>: ld [ %fp + 0x54 ], %g1
0xff151058 <+668>: ld [ %g1 ], %g1
0xff15105c <+672>: ld [ %fp + 0x44 ], %o0
0xff151060 <+676>: mov %g1, %o1
0xff151064 <+680>: call 0xff1a0c24 <_krb5_xunlock@plt>
0xff151068 <+684>: nop
0xff15106c <+688>: ld [ %fp + 0x54 ], %g1
0xff151070 <+692>: ld [ %g1 ], %g1
0xff151074 <+696>: mov %g1, %o0
0xff151078 <+700>: call 0xff1a01d4 <close@plt>
0xff15107c <+704>: nop
0xff151080 <+708>: ld [ %fp + 0x44 ], %o0
0xff151084 <+712>: call 0xff19f9b8 <krb5_clear_error_message@plt>
0xff151088 <+716>: nop
0xff15108c <+720>: sethi %hi(0x96c73800), %g1
0xff151090 <+724>: or %g1, 0x2d5, %g1 ! 0x96c73ad5
0xff151094 <+728>: b %xcc, 0xff151160 <fkt_start_seq_get_int+932>
0xff151098 <+732>: nop
0xff15109c <+736>: ld [ %fp + 0x54 ], %g1
0xff1510a0 <+740>: ld [ %g1 + 4 ], %g2
0xff1510a4 <+744>: add %fp, -10, %g1
0xff1510a8 <+748>: mov %g2, %o0
0xff1510ac <+752>: mov %g1, %o1
0xff1510b0 <+756>: call 0xff1a0cfc <krb5_ret_int8@plt>
0xff1510b4 <+760>: nop
0xff1510b8 <+764>: st %o0, [ %fp + -8 ]
0xff1510bc <+768>: ld [ %fp + -8 ], %g1
0xff1510c0 <+772>: cmp %g1, 0
0xff1510c4 <+776>: be %icc, 0xff151124 <fkt_start_seq_get_int+872>
0xff1510c8 <+780>: nop
0xff1510cc <+784>: ld [ %fp + 0x54 ], %g1
0xff1510d0 <+788>: ld [ %g1 + 4 ], %g1
0xff1510d4 <+792>: mov %g1, %o0
0xff1510d8 <+796>: call 0xff19fc64 <krb5_storage_free@plt>
0xff1510dc <+800>: nop
0xff1510e0 <+804>: ld [ %fp + 0x54 ], %g1
0xff1510e4 <+808>: ld [ %g1 ], %g1
0xff1510e8 <+812>: ld [ %fp + 0x44 ], %o0
0xff1510ec <+816>: mov %g1, %o1
0xff1510f0 <+820>: call 0xff1a0c24 <_krb5_xunlock@plt>
0xff1510f4 <+824>: nop
0xff1510f8 <+828>: ld [ %fp + 0x54 ], %g1
0xff1510fc <+832>: ld [ %g1 ], %g1
0xff151100 <+836>: mov %g1, %o0
0xff151104 <+840>: call 0xff1a01d4 <close@plt>
0xff151108 <+844>: nop
0xff15110c <+848>: ld [ %fp + 0x44 ], %o0
0xff151110 <+852>: call 0xff19f9b8 <krb5_clear_error_message@plt>
0xff151114 <+856>: nop
0xff151118 <+860>: ld [ %fp + -8 ], %g1
0xff15111c <+864>: b %xcc, 0xff151160 <fkt_start_seq_get_int+932>
0xff151120 <+868>: nop
0xff151124 <+872>: ldub [ %fp + -10 ], %g1
0xff151128 <+876>: sll %g1, 0x18, %g1
0xff15112c <+880>: sra %g1, 0x18, %g2
0xff151130 <+884>: ld [ %fp + 0x48 ], %g1
0xff151134 <+888>: st %g2, [ %g1 + 0x30 ]
0xff151138 <+892>: ld [ %fp + 0x54 ], %g1
0xff15113c <+896>: ld [ %g1 + 4 ], %g2
0xff151140 <+900>: ld [ %fp + 0x48 ], %g1
0xff151144 <+904>: ld [ %g1 + 0x30 ], %g1
0xff151148 <+908>: ld [ %fp + 0x44 ], %o0
0xff15114c <+912>: mov %g2, %o1
0xff151150 <+916>: mov %g1, %o2
0xff151154 <+920>: call 0xff150d00 <storage_set_flags>
0xff151158 <+924>: nop
0xff15115c <+928>: clr %g1 ! 0x0
0xff151160 <+932>: mov %g1, %i0
0xff151164 <+936>: rett %i7 + 8
0xff151168 <+940>: nop
We built it locally, but the only patches we have applied relate to
password quality checks and password lifetime, nothing that should have an
impact on this.
--
Eric Sturdivant
University of Maryland
Division of Information Technology
Enterprise Unix Services