3.6p2 build errors on buffer_get with latest portable/SNAP

STEWARD, Curtis (Jamestown) Curtis.Steward at goodrich.com
Thu Sep 11 02:42:57 EST 2003


Darren,

FYI, I tried a 2nd machine (this time with VMWare and 8.0)
had the same results.  The 2nd machine had identical gcc,
ssl, zlib, etc.  Here's the debug.  From what I could figure
out I could get the error on both buffer_init() 
and buffer_get().  xmalloc()?

BUFFER_INIT
# gdb -q ./sshd
(gdb) set args -t
(gdb) break buffer.c:30
Breakpoint 1 at 0x80687ce: file buffer.c, line 30.
(gdb) break buffer.c:31
Breakpoint 2 at 0x8068670: file buffer.c, line 31.
(gdb) info break
Num Type           Disp Enb Address    What
1   breakpoint     keep y   0x080687ce in buffer_init at buffer.c:30
2   breakpoint     keep y   0x08068670 in buffer_free at buffer.c:31
(gdb) run
Starting program: /root/gz/openssh/sshd -t

Breakpoint 1, buffer_init (buffer=0xbffff1f0) at buffer.c:30
30      }
(gdb) c
Continuing.
buffer_get: trying to get more bytes 1 than in buffer 0

Program exited with code 0377.
(gdb) bt
No stack.
(gdb)

BUFFER_GET
# gdb -q ./sshd
(gdb) set args -t
(gdb) break buffer.c:124
Breakpoint 1 at 0x8068896: file buffer.c, line 124.
(gdb) break buffer.c:125
Breakpoint 2 at 0x806886f: file buffer.c, line 125.
(gdb) info break
Num Type           Disp Enb Address    What
1   breakpoint     keep y   0x08068896 in buffer_get at buffer.c:124
2   breakpoint     keep y   0x0806886f in buffer_get at buffer.c:125
(gdb) run
Starting program: /root/gz/openssh/sshd -t

Breakpoint 1, buffer_get (buffer=0xbffff1f0, buf=0x0, len=1) at buffer.c:124
124                     fatal("buffer_get: trying to get more bytes %d than
in buffer %d",
(gdb) c
Continuing.
buffer_get: trying to get more bytes 1 than in buffer 0

Program exited with code 0377.
(gdb) bt
No stack.
(gdb)



Regards,

cs

-----Original Message-----
From: Darren Tucker [mailto:dtucker at zip.com.au]
Sent: Wednesday, September 10, 2003 9:14 AM
To: STEWARD, Curtis (Jamestown)
Cc: 'openssh-unix-dev at mindrot.org'
Subject: Re: 3.6p2 build errors on buffer_get with latest portable/SNAP


"STEWARD, Curtis (Jamestown)" wrote:
> 
> I took out /usr/local path's just to eliminate something
> that might be interfering.  I've tested both sshd_config and
> ssh_host_rsa_key as provided by the "make install" with
> the same errors.  Here's the debug:
> 
> # /usr/local/sbin/sshd -ddd -t
> debug2: read_server_config: filename /usr/local/etc/sshd_config
> debug1: sshd version OpenSSH_3.7p1
> buffer_get: trying to get more bytes 1 than in buffer 0

Try moving the host keys and generating new ones (particularly the SSH V1
ssh_host_key which was not shown in my debugging) for a test.  That would
be my guess.

If it's not that, you can use gdb to set a breakpoint for that line of
code, then use "bt" to get a stack trace to fund out where in the code the
failing call is coming from:

# gdb -q ./sshd
(gdb) set args -t
(gdb) break buffer.c:124
Breakpoint 1 at 0x8062bfc: file ../buffer.c, line 124.
(gdb) run
[wait for failure]
(gdb) bt

> But look at my 8.0 rpm's... ?!
> # rpm -q openssl openssl-devel zlib zlib-devel gcc glibc-devel

You could try updating those.

-- 
Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4  37C9 C982 80C7 8FF4 FA69
    Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.




More information about the openssh-unix-dev mailing list