Hello
All,
I have problem in testing openldap 2.0.27 64 bit build.The platform is HP-UX 11.11. The problem is,Ldap client ldapadd,ldapsearch cannot contact slapd server.In 32 bit build it is working correctly. The same problem also in openldap 2.1.21 version 64 bit build,but in 32 bit build it is working fine. we are currently using openldap 2.0.27 version 32 bit build , we need to build 64 bit build either 2.0.27 or 2.1.21(latest one). Is openldap support 64 bit build in HP-UX 11.11 platform? The gcc that i used to build is, # /usr/local/pa20_64/bin/gcc --version gcc (GCC) 3.2 20020708 (experimental) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. I attached detailed debug information in attached file. Regards,
-Shaick --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.497 / Virus Database: 296 - Release Date: 7/4/2003 |
2. Using GDB: ============ # gdb HP gdb 3.1.1 for PA-RISC 1.1 or 2.0 (narrow), HP-UX 11.00. Copyright 1986 - 2001 Free Software Foundation, Inc. Hewlett-Packard Wildebeest 3.1.1 (based on GDB) is covered by the GNU General Public License. Type "show copying" to see the conditions to change it and/or distribute copies. Type "show warranty" for warranty/support. (gdb) file slapd Detected 64-bit executable. Invoking /opt/langtools/bin/gdb64. Use "run" to continue execution. warning: File not processed by pxdb--about to process now. . Procedures: 5 (gdb) file slapf slapf: No such file or directory. (gdb) file slapd Load new symbol table from "slapd"? (y or n) y Reading symbols from slapd...done. (gdb) r slapd Starting program: ./slapd slapd [New process 11713] warning: reading `r3' register: No data warning: reading `r3' register: No data Detaching after fork from process 11713 Program exited normally. (gdb) file ../../clients/tools/ldapadd warning: File not processed by pxdb--about to process now. . Procedures: 5 Load new symbol table from "../../clients/tools/ldapadd"? (y or n) y Reading symbols from ../../clients/tools/ldapadd...done. (gdb) r -f /var/mydomain.ldif -xv -D "cn=Manager,dc=mydomain,dc=com" -w secret -h 127.0.0.1:389 Starting program: ./ldapadd -f /var/mydomain.ldif -xv -D "cn=Manager,dc=mydomain,dc=com" -w secret -h 127.0.0.1:389 ldap_init( 127.0.0.1:389, 0 ) ldap_bind: Can't contact LDAP server Program exited with code 01. (gdb) b main Breakpoint 1 at 0x400000000000eab0: file ldapmodify.c, line 146. (gdb) r -f /var/mydomain.ldif -xv -D "cn=Manager,dc=mydomain,dc=com" -w secret -h 127.0.0.1:389 Starting program: ./ldapadd -f /var/mydomain.ldif -xv -D "cn=Manager,dc=mydomain,dc=com" -w secret -h 127.0.0.1:389 Breakpoint 1, main (argc=10, argv=0x800003ffff7f06d0) at ldapmodify.c:146 146 if (( prog = strrchr( argv[ 0 ], *LDAP_DIRSEP )) == NULL ) { (gdb) n 140 { (gdb) n 146 if (( prog = strrchr( argv[ 0 ], *LDAP_DIRSEP )) == NULL ) { (gdb) n 149 ++prog; (gdb) n 153 if( argc < 2 ) usage( prog ); (gdb) n 155 ldapadd = ( strcmp( prog, "ldapadd" ) == 0 ); (gdb) n 159 authmethod = -1; (gdb) n 155 ldapadd = ( strcmp( prog, "ldapadd" ) == 0 ); (gdb) n 157 infile = NULL; (gdb) n 155 ldapadd = ( strcmp( prog, "ldapadd" ) == 0 ); (gdb) n 158 not = verbose = want_bindpw = debug = manageDSAit = referrals = 0; (gdb) n 155 ldapadd = ( strcmp( prog, "ldapadd" ) == 0 ); (gdb) n 158 not = verbose = want_bindpw = debug = manageDSAit = referrals = 0; (gdb) n 155 ldapadd = ( strcmp( prog, "ldapadd" ) == 0 ); (gdb) n 158 not = verbose = want_bindpw = debug = manageDSAit = referrals = 0; (gdb) n 155 ldapadd = ( strcmp( prog, "ldapadd" ) == 0 ); (gdb) n 158 not = verbose = want_bindpw = debug = manageDSAit = referrals = 0; (gdb) n 162 while (( i = getopt( argc, argv, "acrf:F" (gdb) n 158 not = verbose = want_bindpw = debug = manageDSAit = referrals = 0; (gdb) n 162 while (( i = getopt( argc, argv, "acrf:F" (gdb) n 160 version = -1; (gdb) n 162 while (( i = getopt( argc, argv, "acrf:F" (gdb) n 165 switch( i ) { (gdb) n 174 if( infile != NULL ) { (gdb) n 178 infile = strdup( optarg ); (gdb) n 179 break; (gdb) n 162 while (( i = getopt( argc, argv, "acrf:F" (gdb) n 165 switch( i ) { (gdb) n 473 if( authmethod != -1 && authmethod != LDAP_AUTH_SIMPLE ) { (gdb) n 162 while (( i = getopt( argc, argv, "acrf:F" (gdb) n 165 switch( i ) { (gdb) n 432 verbose++; (gdb) n 297 break; (gdb) n 433 break; (gdb) n 162 while (( i = getopt( argc, argv, "acrf:F" (gdb) n 165 switch( i ) { (gdb) n 192 if( binddn != NULL ) { (gdb) n 196 binddn = strdup( optarg ); (gdb) n 504 break; (gdb) n 162 while (( i = getopt( argc, argv, "acrf:F" (gdb) n 165 switch( i ) { (gdb) n 435 passwd.bv_val = strdup( optarg ); (gdb) n 439 for( p = optarg; *p != '\0'; p++ ) { (gdb) n 440 *p = '\0'; (gdb) n 439 for( p = optarg; *p != '\0'; p++ ) { (gdb) n 443 passwd.bv_len = strlen( passwd.bv_val ); (gdb) n 444 break; (gdb) n 162 while (( i = getopt( argc, argv, "acrf:F" (gdb) n 165 switch( i ) { (gdb) n 199 if( ldapuri != NULL ) { (gdb) n 203 if( ldaphost != NULL ) { (gdb) n 207 ldaphost = strdup( optarg ); (gdb) n 208 break; (gdb) n 504 break; (gdb) n 162 while (( i = getopt( argc, argv, "acrf:F" (gdb) n 527 if (version == -1) { (gdb) n 528 version = LDAP_VERSION3; (gdb) n 530 if (authmethod == -1 && version > LDAP_VERSION2) { (gdb) n 541 if ( infile != NULL ) { (gdb) n 542 if (( fp = fopen( infile, "r" )) == NULL ) { (gdb) n 550 if ( debug ) { (gdb) n 561 (void) SIGNAL( SIGPIPE, SIG_IGN ); (gdb) n 564 if ( !not ) { (gdb) n 565 if( ( ldaphost != NULL || ldapport ) && ( ldapuri == NULL ) ) { (gdb) n 566 if ( verbose ) { (gdb) n 567 fprintf( stderr, "ldap_init( %s, %d )\n", (gdb) n ldap_init( 127.0.0.1:389, 0 ) 572 ld = ldap_init( ldaphost, ldapport ); (gdb) n 573 if( ld == NULL ) { (gdb) n 572 ld = ldap_init( ldaphost, ldapport ); (gdb) n 573 if( ld == NULL ) { (gdb) n 593 if( ldap_set_option( ld, LDAP_OPT_REFERRALS, (gdb) n 602 if (version == -1 ) { (gdb) n 606 if( ldap_set_option( ld, LDAP_OPT_PROTOCOL_VERSION, &version ) (gdb) n 614 if ( use_tls && ( ldap_start_tls_s( ld, NULL, NULL ) != LDAP_SUCCESS )) { (gdb) n 621 if (want_bindpw) { (gdb) n 626 if ( authmethod == LDAP_AUTH_SASL ) { (gdb) n 664 if ( ldap_bind_s( ld, binddn, passwd.bv_val, authmethod ) (gdb) n 666 ldap_perror( ld, "ldap_bind" ); (gdb) n ldap_bind: Can't contact LDAP server 667 return( EXIT_FAILURE ); (gdb) n 487 fprintf( stderr, "%s: -X incompatible with LDAPv%d\n", (gdb) n 489 return EXIT_FAILURE; (gdb) n 717 } (gdb) n 0xc0000000000218b0 in $START$+0xa0 () from /usr/lib/pa20_64/dld.sl (gdb) n Single stepping until exit from function $START$, which has no line number information. 0xc000000000018608 in exit+0 () from /usr/lib/pa20_64/dld.sl (gdb) n Single stepping until exit from function exit, which has no line number information. 0xc000000000017808 in UT_exit+0 () from /usr/lib/pa20_64/dld.sl (gdb) n Single stepping until exit from function UT_exit, which has no line number information. warning: Cannot insert breakpoint 0: warning: Temporarily disabling shared library breakpoints: warning: breakpoint #0 warning: Cannot insert breakpoint 0: warning: Temporarily disabling shared library breakpoints: warning: breakpoint #0 warning: Cannot insert breakpoint 0: warning: Temporarily disabling shared library breakpoints: warning: breakpoint #0 warning: Cannot insert breakpoint 0: warning: Temporarily disabling shared library breakpoints: warning: breakpoint #0 warning: Cannot insert breakpoint 0: warning: Temporarily disabling shared library breakpoints: warning: breakpoint #0 warning: Cannot insert breakpoint 0: warning: Temporarily disabling shared library breakpoints: warning: breakpoint #0 warning: Cannot insert breakpoint 0: warning: Temporarily disabling shared library breakpoints: warning: breakpoint #0 Program exited with code 01. (gdb)
1. Using TUSC: ============== For slapd: --------- tusc ./slapd -d 1 ... ... ... listen(6, 10) ......................................................................................... = 0 time(0x800003ffff59fd38) .............................................................................. = 1057646103 _lwp_wait(157571, NULL) ............................................................................... [sleeping] select(7, 0x800003ffff59f140, 0x800003ffff59f240, NULL, NULL) ......................................... [sleeping] Note : There is no information is logged while trying ldapadd. For ldapadd: ----------- tusc ./ldapadd -f /var/mydomain.ldif -xv -D "cn=Manager,dc=mydomain,dc=com" -w secret -h 127.0.0.1:389 execve("./ldapadd", 0x7f7f0690, 0x7f7f06bc) .................................. = 0 [64-bit] ... ... getgid() .............................................................................................. = 3 (3) open("/lib/pa20_64/libkrb5.sl", O_RDONLY|O_LARGEFILE, 0154) ........................................... = 3 fstat(3, 0x800003ffff7f1060) .......................................................................... = 0 read(3, "7fE L F 0202010101\0\0\0\0\0\0\0", 16) ....................................................... = 16 close(3) .............................................................................................. = 0 open("/lib/pa20_64/libkrb5.sl", O_RDONLY|O_LARGEFILE, 01) ............................................. = 3 fstat(3, 0x800003ffff7f0e58) .......................................................................... = 0 read(3, "7fE L F 0202010101\0\0\0\0\0\0\0".., 64) ..................................................... = 64 lseek(3, 64, SEEK_SET) ................................................................................ = 64 read(3, "\0\0\006\0\0\004\0\0\0\0\0\0\0@ ".., 392) .................................................... = 392 mmap(NULL, 452552, PROT_READ|PROT_EXEC, MAP_SHARED|MAP_SHLIB, 3, NULL) ................................ = 0xc000000000040000 mmap(NULL, 30248, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_SHLIB, 3, 0x6f000) ............................ = 0x800003ffff7e3000 close(3) .............................................................................................. = 0 getuid() .............................................................................................. = 0 (0) getuid() .............................................................................................. = 0 (0) getgid() .............................................................................................. = 3 (3) getgid() .............................................................................................. = 3 (3) open("/lib/pa20_64/libk5crypto.sl", O_RDONLY|O_LARGEFILE, 0154) ....................................... = 3 fstat(3, 0x800003ffff7f1060) .......................................................................... = 0 read(3, "7fE L F 0202010101\0\0\0\0\0\0\0", 16) ....................................................... = 16 close(3) .............................................................................................. = 0 open("/lib/pa20_64/libk5crypto.sl", O_RDONLY|O_LARGEFILE, 01) ......................................... = 3 fstat(3, 0x800003ffff7f0e58) .......................................................................... = 0 read(3, "7fE L F 0202010101\0\0\0\0\0\0\0".., 64) ..................................................... = 64 lseek(3, 64, SEEK_SET) ................................................................................ = 64 read(3, "\0\0\006\0\0\004\0\0\0\0\0\0\0@ ".., 392) .................................................... = 392 mmap(NULL, 70744, PROT_READ|PROT_EXEC, MAP_SHARED|MAP_SHLIB, 3, NULL) ................................. = 0xc0000000000b0000 mmap(NULL, 9140, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_SHLIB, 3, 0x12000) ............................. = 0x800003ffff7e0000 close(3) .............................................................................................. = 0 getuid() .............................................................................................. = 0 (0) getuid() .............................................................................................. = 0 (0) getgid() .............................................................................................. = 3 (3) getgid() .............................................................................................. = 3 (3) open("/lib/pa20_64/libcom_err.sl", O_RDONLY|O_LARGEFILE, 0154) ........................................ = 3 fstat(3, 0x800003ffff7f1060) .......................................................................... = 0 read(3, "7fE L F 0202010101\0\0\0\0\0\0\0", 16) ....................................................... = 16 close(3) .............................................................................................. = 0 open("/lib/pa20_64/libcom_err.sl", O_RDONLY|O_LARGEFILE, 01) .......................................... = 3 fstat(3, 0x800003ffff7f0e58) .......................................................................... = 0 read(3, "7fE L F 0202010101\0\0\0\0\0\0\0".., 64) ..................................................... = 64 lseek(3, 64, SEEK_SET) ................................................................................ = 64 read(3, "\0\0\006\0\0\004\0\0\0\0\0\0\0@ ".., 392) .................................................... = 392 mmap(NULL, 5280, PROT_READ|PROT_EXEC, MAP_SHARED|MAP_SHLIB, 3, NULL) .................................. = 0xc000000000023000 mmap(NULL, 464, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_SHLIB, 3, 0x2000) ............................... = 0x800003ffff7df000 close(3) .............................................................................................. = 0 getuid() .............................................................................................. = 0 (0) getuid() .............................................................................................. = 0 (0) getgid() .............................................................................................. = 3 (3) getgid() .............................................................................................. = 3 (3) open("/lib/pa20_64/libnsl.1", O_RDONLY|O_LARGEFILE, 0154) ............................................. = 3 fstat(3, 0x800003ffff7f1060) .......................................................................... = 0 read(3, "7fE L F 0202010101\0\0\0\0\0\0\0", 16) ....................................................... = 16 close(3) .............................................................................................. = 0 open("/lib/pa20_64/libnsl.1", O_RDONLY|O_LARGEFILE, 01) ............................................... = 3 ... ... open("/usr/lib/pa20_64/libdl.1", O_RDONLY|O_LARGEFILE, 0154) .......................................... = 3 fstat(3, 0x800003ffff7f1060) .......................................................................... = 0 read(3, "7fE L F 0202010101\0\0\0\0\0\0\0", 16) ....................................................... = 16 close(3) .............................................................................................. = 0 open("/usr/lib/pa20_64/libdl.1", O_RDONLY|O_LARGEFILE, 01) ............................................ = 3 fstat(3, 0x800003ffff7f0e58) .......................................................................... = 0 read(3, "7fE L F 0202010101\0\0\0\0\0\0\0".., 64) ..................................................... = 64 lseek(3, 64, SEEK_SET) ................................................................................ = 64 read(3, "\0\0\006\0\0\004\0\0\0\0\0\0\0@ ".., 392) .................................................... = 392 mmap(NULL, 13644, PROT_READ|PROT_EXEC, MAP_SHARED|MAP_SHLIB, 3, NULL) ................................. = 0xc000000000028000 mmap(NULL, 608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_SHLIB, 3, 0x4000) ............................... = 0x800003ffff7ac000 close(3) .............................................................................................. = 0 open("/opt/graphics/OpenGL/lib/pa20_64/libogltls.sl", O_RDONLY|O_LARGEFILE, 0) ........................ ERR#2 ENOENT mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, NULL) ........................... = 0x800003ffff7aa000 mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, NULL) ........................... = 0x800003ffff7a8000 sigsetreturn(0x800003ffff7baae0, 0x6211988, 1616) ..................................................... = 0 sysconf(_SC_CPU_VERSION) .............................................................................. = 532 brk(0x8000000100025898) ............................................................................... = 0 brk(0x8000000100029880) ............................................................................... = 0 brk(0x800000010002b000) ............................................................................... = 0 open("mydomain.ldif", O_RDONLY|O_LARGEFILE, 0666) ..................................................... = 3 sigsetreturn(0x800003ffff7baae0, 0x6211988, 1616) ..................................................... = 0 sigaction(SIGPIPE, 0x800003ffff7f0a30, 0x800003ffff7f0a60) ............................................ = 0 ldap_iniwrite(2, "l d a p _ i n i ", 8) ....................................................................... = 8 twrite(2, "t ", 1) ..................................................................................... = 1 ( 127.0.write(2, "( 1 2 7 . 0 . ", 8) ....................................................................... = 8 0.1:389write(2, "0 . 1 : 3 8 9 ", 7) ......................................................................... = 7 , 0 ) write(2, ", 0 ) \n", 6) ........................................................................... = 6 utssys(0x800003ffff7f0bb0, 64, 5) ..................................................................... = 0 brk(0x800000010002c000) ............................................................................... = 0 open("/etc/nsswitch.conf", O_RDONLY|O_LARGEFILE, 0666) ................................................ = 4 brk(0x800000010002e000) ............................................................................... = 0 ioctl(4, TCGETA, 0x800003ffff7f1578) .................................................................. ERR#25 ENOTTY read(4, "# \n# / e t c / n s s w i t c ".., 8192) ................................................... = 597 brk(0x800000010002f000) ............................................................................... = 0 read(4, 0x800000010002b518, 8192) ..................................................................... = 0 close(4) .............................................................................................. = 0 open("/usr/lib/pa20_64/libnss_files.1", O_RDONLY|O_LARGEFILE, 0) ...................................... = 4 fstat(4, 0x800003ffff7f1aa8) .......................................................................... = 0 close(4) .............................................................................................. = 0 open("/usr/lib/pa20_64/libnss_files.1", O_RDONLY|O_LARGEFILE, 0) ...................................... = 4 fstat(4, 0x800003ffff7f1b88) .......................................................................... = 0 read(4, "7fE L F 0202010101\0\0\0\0\0\0\0".., 64) ..................................................... = 64 lseek(4, 64, SEEK_SET) ................................................................................ = 64 read(4, "\0\0\006\0\0\004\0\0\0\0\0\0\0@ ".., 392) .................................................... = 392 mmap(NULL, 34412, PROT_READ|PROT_EXEC, MAP_SHARED|MAP_SHLIB, 4, NULL) ................................. = 0xc00000000002c000 mmap(NULL, 3523, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_SHLIB, 4, 0x9000) .............................. = 0x800003ffff7a7000 close(4) .............................................................................................. = 0 open("/etc/hosts", O_RDONLY|O_LARGEFILE, 0666) ........................................................ = 4 brk(0x8000000100031000) ............................................................................... = 0 ioctl(4, TCGETA, 0x800003ffff7f16a8) .................................................................. ERR#25 ENOTTY read(4, "# @ ( # ) B . 1 1 . 1 1 _ L R ".., 8192) ................................................... = 721 lseek(4, 18446744073709551422, SEEK_CUR) .............................................................. = 527 close(4) .............................................................................................. = 0 sysconf(_SC_OPEN_MAX) ................................................................................. = 60 open("/etc/openldap/ldap.conf", O_RDONLY|O_LARGEFILE, 0666) ........................................... = 4 ioctl(4, TCGETA, 0x800003ffff7f10b8) .................................................................. ERR#25 ENOTTY read(4, "# $ O p e n L D A P : p k g ".., 8192) ................................................... = 362 read(4, 0x800000010002b408, 8192) ..................................................................... = 0 close(4) .............................................................................................. = 0 open("//ldaprc", O_RDONLY|O_LARGEFILE, 0666) .......................................................... ERR#2 ENOENT open("//.ldaprc", O_RDONLY|O_LARGEFILE, 0666) ......................................................... ERR#2 ENOENT open("ldaprc", O_RDONLY|O_LARGEFILE, 0666) ............................................................ ERR#2 ENOENT stat("/usr/lib/sasl", 0x800003ffff7f1e58) ............................................................. ERR#2 ENOENT socket(AF_INET, SOCK_STREAM, 0) ....................................................................... = 4 fcntl(4, F_GETFL, 4611686018427608356) ................................................................ = 2 fcntl(4, F_SETFL, 65538) .............................................................................. = 0 connect(4, 0x800000010002bbd0, 16) .................................................................... = 0 fcntl(4, F_GETFL, 4611686018427608376) ................................................................ = 65538 fcntl(4, F_SETFL, 2) .................................................................................. = 0 getpeername(4, 0x800003ffff7f1130, 0x800003ffff7f1180) ................................................ = 0 brk(0x8000000100033000) ............................................................................... = 0 time(NULL) ............................................................................................ = 1057645826 write(4, "0 0 020101` + 020103041ec n = M ".., 50) .................................................... = 50 select(60, 0x800000010002b968, 0x800000010002ba68, NULL, NULL) ........................................ = 1 read(4, 0x800000010002e018, 16384) .................................................................... = 0 ldap_bindwrite(2, "l d a p _ b i n d ", 9) ..................................................................... = 9 : Can't write(2, ": C a n ' t ", 8) ....................................................................... = 8 contact write(2, "c o n t a c t ", 8) ....................................................................... = 8 LDAP serwrite(2, "L D A P s e r ", 8) ....................................................................... = 8 verwrite(2, "v e r ", 3) ................................................................................. = 3 write(2, "\n", 1) ..................................................................................... = 1 exit(1) ............................................................................................... WIFEXITED(1)