bug # 1465

From: Dan Thomson <thomson.dan@dont-contact.us>
Date: Wed, 17 May 2006 10:27:25 -0700

Hey all,

I've recently been playing with squid 3 trying to figure out this
n->write_pending problem in mem_node.cc.

I've noticed that whenever memNodeWriteComplete is called and
n->write_pending is still set (causing assert to abort), the actual
mem_node object isn't holding any data (n->dataRange()) gives nothing.

I've also noticed a few conditions where a file will be written to
disk and then unlinked before mem_node::memNodeWriteComplete gets the
chance to run. This doesn't seem to happen every time the assert
fails, but it has happened quiet often in my experience.

I've made a small fix for myself by editing the assert as follows:

assert(n->write_pending || (n->end() - n->start()) == 0);

The problem seems to have dissapeared. I'm aware that this isn't a
proper fix, but I'm hoping that some of this info might help shed some
light on the core problem to those of you that know the code a lot
better than I do.

Thanks!

Dan Thomson
Systems Engineer
Peer1 Network
1600 555 West Hastings
Vancouver, BC
V6B 4N5
866-683-7747
http://www.peer1.com
Received on Wed May 17 2006 - 15:51:32 MDT

This archive was generated by hypermail pre-2.1.9 : Thu Jun 01 2006 - 12:00:04 MDT