From owner-freebsd-bugs Sat Jul 3 6:10: 6 1999 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id C1BBD14E59 for ; Sat, 3 Jul 1999 06:10:02 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id GAA69127; Sat, 3 Jul 1999 06:10:02 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from david.siemens.de (david.siemens.de [192.35.17.14]) by hub.freebsd.org (Postfix) with ESMTP id EC4E014DA8 for ; Sat, 3 Jul 1999 06:03:22 -0700 (PDT) (envelope-from andre.albsmeier@mchp.siemens.de) Received: from mail2.siemens.de (mail2.siemens.de [139.25.208.14]) by david.siemens.de (8.9.3/8.9.3) with ESMTP id PAA00205 for ; Sat, 3 Jul 1999 15:03:17 +0200 (MET DST) Received: from curry.mchp.siemens.de (curry.mchp.siemens.de [139.25.42.7]) by mail2.siemens.de (8.9.3/8.9.3) with ESMTP id PAA03615 for ; Sat, 3 Jul 1999 15:03:16 +0200 (MET DST) Received: (from daemon@localhost) by curry.mchp.siemens.de (8.9.3/8.9.3) id PAA70936 for ; Sat, 3 Jul 1999 15:03:16 +0200 (CEST) Message-Id: <199907031303.PAA04178@internal> Date: Sat, 3 Jul 1999 15:03:14 +0200 (CEST) From: Andre Albsmeier To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: bin/12496: yppush broken when pushing to 2 or more slaves Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 12496 >Category: bin >Synopsis: yppush broken when pushing to 2 or more slaves >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Jul 3 06:10:01 PDT 1999 >Closed-Date: >Last-Modified: >Originator: Andre Albsmeier >Release: FreeBSD 3.2-STABLE i386 >Organization: >Environment: One NIS master server running 3.2-STABLE and two or more NIS slaves running 3.2-STABLE as well. >Description: We have a NIS master called "server" and two NIS slaves called "paul" and "printfix". On the NIS master we run yppush manually. The normal output would be: root@server:/var/yp>yppush -vvv mail.aliases yppush: initiating transfer: mail.aliases -> printfix.ofw.tld (transid = 928055141) yppush: printfix.ofw.tld has been called yppush: checking return status: transaction ID: 928055141 yppush: transfer of map mail.aliases to server printfix.ofw.tld failed yppush: status returned by ypxfr: Master's version not newer yppush: initiating transfer: mail.aliases -> paul.ofw.tld (transid = 928055142) yppush: paul.ofw.tld has been called yppush: all jobs dispatched yppush: paul.ofw.tld has not responded yppush: printfix.ofw.tld has responded yppush: 1 transfer still pending yppush: checking return status: transaction ID: 928055142 yppush: transfer of map mail.aliases to server paul.ofw.tld failed yppush: status returned by ypxfr: Master's version not newer yppush: paul.ofw.tld has responded yppush: printfix.ofw.tld has responded yppush: all transfers complete If we use a libexec/rtld-elf/rtld.c with version 1.13.2.8 or 1.13.2.9, yppush fails in a way that it timeouts when waiting for the ack callback from the second slave. Here is the ouput: root@server:/var/yp>yppush -vvv mail.aliases yppush: initiating transfer: mail.aliases -> printfix.ofw.tld (transid = 928055178) yppush: printfix.ofw.tld has been called yppush: checking return status: transaction ID: 928055178 yppush: transfer of map mail.aliases to server printfix.ofw.tld failed yppush: status returned by ypxfr: Master's version not newer yppush: initiating transfer: mail.aliases -> paul.ofw.tld (transid = 928055179) yppush: paul.ofw.tld has been called yppush: all jobs dispatched yppush: paul.ofw.tld has not responded yppush: printfix.ofw.tld has responded yppush: 1 transfer still pending /***** here we wait about 5 Minutes *****/ yppush: timed out yppush: warning: exiting with transfer to paul.ofw.tld (transid = 928055179) still pending One of the changes that were brought into libexec/rtld-elf/rtld.c with version 1.13.2.8 is the following part of the code: @@ -287,6 +285,10 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_ if (do_copy_relocations(obj_main) == -1) die(); + dbg("initializing key program variables"); + set_program_var("__progname", argv[0] != NULL ? basename(argv[0]) : ""); + set_program_var("environ", env); + dbg("calling _init functions"); call_init_functions(obj_main->next); If we remove one or both of the set_program_var lines it works again. We can also add a third line so the code looks like: + set_program_var("__progname", argv[0] != NULL ? basename(argv[0]) : ""); + set_program_var("environ", "dummy"); + set_program_var("environ", env); This also will work. I had an excessive private email exchange with John Polstra about this and he finally came to the point that there must be something wrong with yppush which hits depending of what is left in the memory by rtld.c. In the meantime we are at a libexec/rtld-elf/rtld.c with version 1.13.2.11. Here the things are reversed: It works with the original rtld.c and breaks with the set_program_var("environ", "dummy"); line added. >How-To-Repeat: See above. Try with a libexec/rtld-elf/rtld.c with version 1.13.2.8. >Fix: Currently unknown. If anyone wants to dig into it I can supply the mails exchanged between John Polstra and me (yes, he agreed to it). I will also happily run any tests or try out suggestions. >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message