[Date Prev][Date Next] [Chronological] [Thread] [Top]

ldapsearch hangs on Linux Alpha



Hello,

Some time ago, I compiled OpenLDAP 2.1.8 on an AlphaServer running SuSE
Linux 7.1. The software compiled fine and then hung on the "make test".
I tried to run down the problem, but without success. Since I had
another server that was x86 based and running OpenLDAP 2.1.7, I just
used it.

Now, I need this server to run LDAP, and I downloaded 2.1.12 and it
compiled fine, but it has the same problem -- hangs on the "make test".
By setting up an ssh tunnel on port 9009 between the x86 machine and the
AlphaServer, I have determined that the problem is in the ldapsearch
tool. With slapd running on the AlphaServer using the test-000 setup, I
can use ldapsearch from the x86 machine hundreds of times successfully
in a while loop. With slapd running on either machine, the ldapsearch
from the AlphaServer hangs 9 out of 10 times (about).

Using gdb:

myhost:/usr/local/src/openldap-2.1.12/tests # cat ldap_test_client
../clients/tools/ldapsearch -P 3 -x -LLL -b  -s base -h localhost -p
9009 +extensibleObject
myhost:/usr/local/src/openldap-2.1.12/tests # gdb
../clients/tools/ldapsearch
GNU gdb 5.0
This GDB was configured as "alpha-suse-linux"...
(gdb) set args -P 3 -x -LLL -b '' -s base -h localhost -p 9009
+extensibleObject
(gdb) run
Starting program:
/usr/local/src/openldap-2.1.12/tests/../clients/tools/ldapsearch -P 3 -x
-LLL -b '' -s base -h localhost -p 9009 +extensibleObject

__________Sometimes it works:

(gdb) run
Starting program:
/usr/local/src/openldap-2.1.12/tests/../clients/tools/ldapsearch -P 3 -x
-LLL -b '' -s base -h localhost -p 9009 +extensibleObject

dn:
objectClass: top
objectClass: OpenLDAProotDSE
structuralObjectClass: OpenLDAProotDSE
namingContexts: o=OpenLDAP Project,l=Internet
supportedControl: 2.16.840.1.113730.3.4.2
supportedControl: 1.3.6.1.4.1.4203.1.10.2
supportedControl: 1.2.826.0.1.334810.2.3
supportedExtension: 1.3.6.1.4.1.4203.1.11.3
supportedExtension: 1.3.6.1.4.1.4203.1.11.1
supportedExtension: 1.3.6.1.4.1.1466.20037
supportedFeatures: 1.3.6.1.4.1.4203.1.5.1
supportedFeatures: 1.3.6.1.4.1.4203.1.5.2
supportedFeatures: 1.3.6.1.4.1.4203.1.5.3
supportedFeatures: 1.3.6.1.4.1.4203.1.5.4
supportedFeatures: 1.3.6.1.4.1.4203.1.5.5
supportedLDAPVersion: 3
supportedSASLMechanisms: OTP
supportedSASLMechanisms: DIGEST-MD5
supportedSASLMechanisms: CRAM-MD5
vendorName: The OpenLDAP Project <http://www.openldap.org/>
subschemaSubentry: cn=Subschema


Program exited normally.
(gdb)

__________but most of the times it doesnt:

(gdb) break sb_stream_read
Breakpoint 1 at 0x12004ccb4
(gdb) run
Starting program:
/usr/local/src/openldap-2.1.12/tests/../clients/tools/ldapsearch -P 3 -x
-LLL -b '' -s base -h localhost -p 9009 +extensibleObject

Breakpoint 1, 0x12004ccb4 in sb_stream_read ()
(gdb) continue
Continuing.

Breakpoint 1, 0x12004ccb4 in sb_stream_read ()
(gdb) continue
Continuing.
dn:
objectClass: top
objectClass: OpenLDAProotDSE
structuralObjectClass: OpenLDAProotDSE
namingContexts: o=OpenLDAP Project,l=Internet
supportedControl: 2.16.840.1.113730.3.4.2
supportedControl: 1.3.6.1.4.1.4203.1.10.2
supportedControl: 1.2.826.0.1.334810.2.3
supportedExtension: 1.3.6.1.4.1.4203.1.11.3
supportedExtension: 1.3.6.1.4.1.4203.1.11.1
supportedExtension: 1.3.6.1.4.1.1466.20037
supportedFeatures: 1.3.6.1.4.1.4203.1.5.1
supportedFeatures: 1.3.6.1.4.1.4203.1.5.2
supportedFeatures: 1.3.6.1.4.1.4203.1.5.3
supportedFeatures: 1.3.6.1.4.1.4203.1.5.4
supportedFeatures: 1.3.6.1.4.1.4203.1.5.5
supportedLDAPVersion: 3
supportedSASLMechanisms: OTP
supportedSASLMechanisms: DIGEST-MD5
supportedSASLMechanisms: CRAM-MD5
vendorName: The OpenLDAP Project <http://www.openldap.org/>
subschemaSubentry: cn=Subschema

Breakpoint 1, 0x12004ccb4 in sb_stream_read ()
(gdb) nexti
0x12004ccb8 in sb_stream_read ()
(gdb) nexti
0x12004ccbc in sb_stream_read ()
(gdb) nexti
0x12004ccc0 in sb_stream_read ()
(gdb) nexti
0x12004ccc4 in sb_stream_read ()
(gdb) nexti
0x12004ccc8 in sb_stream_read ()
(gdb) nexti
0x12004ccec in sb_stream_read ()
(gdb) nexti
0x12004ccf0 in sb_stream_read ()
(gdb) nexti
0x12004ccf4 in sb_stream_read ()
(gdb) nexti
0x12004ccf8 in sb_stream_read ()
(gdb) nexti
0x12004ccfc in sb_stream_read ()
(gdb) nexti
0x12004cd00 in sb_stream_read ()
(gdb) nexti
0x12004cd04 in sb_stream_read ()
(gdb) nexti
0x12004cd08 in sb_stream_read ()
(gdb) nexti
0x12004cd2c in sb_stream_read ()
(gdb) nexti
0x12004cd30 in sb_stream_read ()
(gdb) nexti
0x12004cd34 in sb_stream_read ()
(gdb) nexti
0x12004cd38 in sb_stream_read ()
(gdb) nexti
0x12004cd3c in sb_stream_read ()
(gdb) nexti
0x12004cd40 in sb_stream_read ()
(gdb) nexti
0x12004cd44 in sb_stream_read ()
(gdb) nexti
0x12004cd48 in sb_stream_read ()
(gdb) nexti

__________ldapsearch hangs here

^C
Program received signal SIGINT, Interrupt.
0x20000443da0 in __libc_read () at __libc_read:2
2       __libc_read: No such file or directory.
(gdb) backtrace
#0  0x20000443da0 in __libc_read () at __libc_read:2
#1  0x12004cd4c in sb_stream_read ()
#2  0x12004d310 in sb_rdahead_read ()
#3  0x12004dc00 in sb_debug_read ()
#4  0x12004cae8 in ber_int_sb_read ()
#5  0x120047f34 in ber_get_next ()
#6  0x12000e9b4 in try_read1msg ()
#7  0x12000e4d4 in wait4msg ()
#8  0x12000de40 in ldap_result ()
#9  0x1200078b0 in dosearch ()
#10 0x1200074dc in main ()
#11 0x200003896ac in __libc_start_main () from /lib/libc.so.6.1
(gdb) 


I am a gdb pre-novice. How do I compile OpenLDAP so that I know which
command the "nexti" is executing, or how do I transform the hex code to
the instruction being executed.

This seems to be a problem in the call to __libc_read from libc6.1 on
the Alpha. I suspect that it is this line from
libraries/liblber/sockbuf.c:
	return read( sbiod->sbiod_sb->sb_fd, buf, len );  (line 490)

Can someone more versed in this kind of troubleshooting tell me how to
proceed?

Thanks, Mike.