zlib issue

988 views
Skip to first unread message

Michael Irwin

unread,
May 4, 2008, 3:39:25 PM5/4/08
to Capistrano
Using 2.3.0, deploying from OS X 10.5.2 to FreeBSD 6.2-STABLE, I keep
getting the following notice after a task has run:

zlib(finalizer): the stream was freed prematurely.

It seemed to appear only after upgrading to 2.3.0, or at least I
didn't notice it before. The tasks do seem to be working properly in
spite of this notice.

Anyone else seeing this or have ideas on how to fix it?

Jamis Buck

unread,
May 4, 2008, 4:27:52 PM5/4/08
to capis...@googlegroups.com
I've seen that message appear in the Net::SSH unit tests, but because
they never appeared "in practice", I figured it was an artifact of the
tests. What version of Ruby do you have installed locally?

- Jamis

Michael Irwin

unread,
May 4, 2008, 10:12:10 PM5/4/08
to Capistrano
It's the default Ruby that comes w/ Leopard:

ruby 1.8.6 (2007-09-24 patchlevel 111) [universal-darwin9.0]

Jamis Buck

unread,
May 5, 2008, 11:51:53 PM5/5/08
to capis...@googlegroups.com
I can't seem to duplicate this...though to be honest I'm on 1.8.6
patchlevel 110 at the moment. Has anyone else seen this since
upgrading to 2.3?

I wonder if your server is enabling zlib by default. Does adding this
to your recipes help at all?

ssh_options[:compression] = "none"

If not, what ssh server software are you connecting to?

- Jamis

Michael Irwin

unread,
May 6, 2008, 11:21:37 AM5/6/08
to Capistrano
Yep, adding that removes the notice. I've had compression enabled in
~/.ssh/config for some time, so it seems 2.3.0 just started noticing
it.

Thanks for your help, Jamis.

Jamis Buck

unread,
May 6, 2008, 9:59:18 PM5/6/08
to capis...@googlegroups.com
Thanks for working with me to narrow that down. I'll start playing
with Net::SSH and compression and see if I can figure out what that
message is all about.

- Jamis

Jamis Buck

unread,
May 6, 2008, 11:07:09 PM5/6/08
to capis...@googlegroups.com
Interestingly, I can no longer duplicate this, even in the tests. If I
enable compression thus:

Net::SSH.start('localhost', 'jamis', :compression => "zl...@openssh.com
") do |ssh|
ssh.exec "hostname"
ssh.loop
end

It starts and finishes just fine. Enabling debugging output shows that
zlib is enabled...but I don't get that bizarre message. Maybe it's a
function of the zlib library you have installed? Maybe something else?

Has anyone else encountered this?

- Jamis

On May 6, 2008, at 9:21 AM, Michael Irwin wrote:

Michael Irwin

unread,
May 7, 2008, 8:35:14 AM5/7/08
to Capistrano
For curiosity's sake, I just tried deploying to a different server
(Linux this time) and I get the same message if I remove
ssh_options[:compression] = "none", so it would seem to be something
on the machine I'm deploying from. I'm not sure yet what it might
be. I'll try looking into it more when I get a chance.

Thanks for your help.

On May 6, 11:07 pm, Jamis Buck <ja...@37signals.com> wrote:
> Interestingly, I can no longer duplicate this, even in the tests. If I  
> enable compression thus:
>
>    Net::SSH.start('localhost', 'jamis', :compression => "z...@openssh.com

Fotograf

unread,
Jul 1, 2008, 12:11:26 PM7/1/08
to Capistrano
Hi,

> zlib(finalizer): the stream was freed prematurely.
>
> It seemed to appear only after upgrading to 2.3.0, or at least I
> didn't notice it before.  The tasks do seem to be working properly in
> spite of this notice.
>
> Anyone else seeing this or have ideas on how to fix it?

I'm having exactly the same problem:

** keeping 5 of 6 deployed releases
* executing "rm -rf /opt/infopark/deploy/releases/20080628131243"
servers: ["my.server.com"]
[my.server.com] executing command
command finished
zlib(finalizer): the stream was freed prematurely.

Appearing at the end of the deploy process.

F.

Jamis Buck

unread,
Jul 1, 2008, 12:16:40 PM7/1/08
to capis...@googlegroups.com
You can work around it by disabling compression:

ssh_options[:compression] = false

You might need to disable compression in your ~/.ssh/config, if you
have it set there.

- Jamis

Reply all
Reply to author
Forward
0 new messages