When seekdir() Won't Seek to the Right Positi…

2009-05-13 14:00:04来源:未知 阅读 ()

新老客户大回馈,云服务器低至5折

Contributed by
[url=http://undeadly.org/I%20don't%20work%20here.]sean[/url]
on Thu May 8 19:20:09 2008 (GMT)
from the and-another-bug-bites-the-dust dept.
Some bugs are so ornery that they remain hidden for a very long time.
There are some that happen in such weird edge cases that they go unexposed and are very hard to repeat.
Marc Balmer (mbalmer@)
investigated a bug
that was exposed by
Samba
. This bug had to do with a corner case with respect to the life of a directory listing. It seems to be the case that iterating through a directory (as provided by seekdir()/readdir()) can return invalid results when the directory is modified (specifically when items are removed) during the list iteration.
In Marc's personal blog, he
explains the bug
(and the solution) in better detail and notes how this bug has existed for far longer than OpenBSD has been around. I'm personally convinced I've seen this issue on some really high traffic OpenBSD and FreeBSD file servers but being a relative Luddite, blamed it on Samba (of which I'm not a huge fan but tolerate out of necessity).
Congratulations Marc on finding and squashing this beast.
As well, the other postings on
his blog
are equally good reading.


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/4206/showart_681621.html

标签:

版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

上一篇:carp参数解释

下一篇:Using SSL Certificates with JBoss 4 and Tomcat 5