博客首页 注册 建议与交流 排行榜 加入友情链接
推荐 投诉 搜索: 帮助

剑心通明的资料库

文章均为转载,本人不负因参考它所导致的一切后果,请谨慎参考!如您的文章不愿被转载,请点击此处联系本人!
  jxtm.cublog.cn

关于作者
姓名:剑心通明
职业:高级工程师(专修灵魂^_^)
年龄:20出头30不到
位置:网络上一节点
个性介绍:努力学习每一天!
倾心打造:http://www.bsdlover.cn
http://bbs.bsdlover.cn
BSD爱好者的乐园!
|| << >> ||
我的分类


When seekdir() Won't Seek to the Right Position
Contributed by sean 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.

 原文地址 http://undeadly.org/cgi?action=article&sid=20080508193255
发表于: 2008-05-09,修改于: 2008-05-09 07:53,已浏览300次,有评论0条 推荐 投诉


网友评论
 发表评论