Miquel van Smoorenburg writes:
>I've asked this before but got no replies, but I can't imagine I'm the
>only one seeing this. Every once in a while our squid server (1.1.20 novm)
>decides not to use unlinkd and does the unlinking itself. Here's part
>from an strace on a running squid:
>
>lseek(76, 0, SEEK_SET)                  = 0
>read(76, "HTTP/1.0 200 OK\r\nDate: Tue, 24"..., 8192) = 1352
>lseek(76, 0, SEEK_CUR)                  = 1352
>select(13, [11 12], [], NULL, {0, 0})   = 0 (Timeout)
>select(13, [11 12], [], NULL, {0, 0})   = 0 (Timeout)
>connect(77, {sin_family=AF_INET, sin_port=htons(8080), sin_addr=inet_addr("194
.159.73.7")}, 16) = 0
>select(13, [11 12], [], NULL, {0, 0})   = 0 (Timeout)
>unlink("/var/spool/squid/0B/65/0007D65B") = 0
>unlink("/var/spool/squid/02/EE/000A6EE2") = 0
>unlink("/var/spool/squid/0F/C0/000D0C0F") = 0
>unlink("/var/spool/squid/07/C2/0001BC27") = 0
>unlink("/var/spool/squid/02/EA/00032EA2") = 0
>unlink("/var/spool/squid/01/4A/000704A1" <unfinished ...>
>
>It shouldn't be doing this - it should write() a request to the unlinkd
>pipe .. Unlinkd is running but idle.
>
>Anyone have a clue?
It could happen if your disk usage is over the high water mark.  
Then storeGetSwapSpace gets called:
  1459      if ((i = storeGetUnusedFileno()) >= 0) {
  1460          safeunlink(storeSwapFullPath(i, NULL), 0);
  1461          if (++removed == SWAP_LRU_REMOVE_COUNT)
  1462              return;
  1463      }
Don't ask me why thats there.  I'm not sure I wrote it.  Looks like
the 'if' should maybe be a 'while'.
  1570          if (store_swap_size > store_swap_high)
  1571              safeunlink(storeSwapFullPath(e->swap_file_number, NULL), 1);
  1572          else
  1573              storePutUnusedFileno(e->swap_file_number);
Requests are only written to the unlinkd process if the unused
fileno stack is full.  If you're over the high water mark and the
stack is NOT full, then no disk space will be freed, so we call
unlink directly.
Duane W.
Received on Tue Feb 24 1998 - 08:24:36 MST
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:38:58 MST