使用QuickCheck测试数据库的竞争条件

John Hughes, Hans Bolinder
{"title":"使用QuickCheck测试数据库的竞争条件","authors":"John Hughes, Hans Bolinder","doi":"10.1145/2034654.2034667","DOIUrl":null,"url":null,"abstract":"In 2009, Claessen et al. presented a way of testing for race conditions in Erlang programs, using QuickCheck to generate parallel tests, a randomizing scheduler to provoke races, and a sequential consistency condition to detect failures of atomicity [1]. That work used a small industrial prototype as the main example, showing how two race conditions could be detected and diagnosed. In this paper, we apply the same methods to dets, a vital component of the mnesia database system, and more than an order of magnitude larger. dets is known to fail occasionally in production, making it a promising candidate for a race condition hunt. We found five race conditions with relatively little effort, two of which may account for the observed failures in production. We explain how the testing was done, present most of the QuickCheck specification used, and describe the problems we discovered and their causes.","PeriodicalId":331264,"journal":{"name":"Proceedings of the 10th ACM SIGPLAN workshop on Erlang","volume":"7 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2011-09-23","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"16","resultStr":"{\"title\":\"Testing a database for race conditions with QuickCheck\",\"authors\":\"John Hughes, Hans Bolinder\",\"doi\":\"10.1145/2034654.2034667\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"In 2009, Claessen et al. presented a way of testing for race conditions in Erlang programs, using QuickCheck to generate parallel tests, a randomizing scheduler to provoke races, and a sequential consistency condition to detect failures of atomicity [1]. That work used a small industrial prototype as the main example, showing how two race conditions could be detected and diagnosed. In this paper, we apply the same methods to dets, a vital component of the mnesia database system, and more than an order of magnitude larger. dets is known to fail occasionally in production, making it a promising candidate for a race condition hunt. We found five race conditions with relatively little effort, two of which may account for the observed failures in production. We explain how the testing was done, present most of the QuickCheck specification used, and describe the problems we discovered and their causes.\",\"PeriodicalId\":331264,\"journal\":{\"name\":\"Proceedings of the 10th ACM SIGPLAN workshop on Erlang\",\"volume\":\"7 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2011-09-23\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"16\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Proceedings of the 10th ACM SIGPLAN workshop on Erlang\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1145/2034654.2034667\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 10th ACM SIGPLAN workshop on Erlang","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/2034654.2034667","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 16

摘要

2009年,Claessen等人提出了一种在Erlang程序中测试竞争条件的方法,使用QuickCheck生成并行测试,使用随机调度程序引发竞争,使用顺序一致性条件检测原子性失败[1]。这项工作使用了一个小型工业原型作为主要例子,展示了如何检测和诊断两种竞争状态。在本文中,我们将相同的方法应用于记忆缺失数据库系统的重要组成部分dets,并且要大一个数量级。众所周知,Dets在生产中偶尔会失败,这使其成为竞争条件搜索的理想候选者。我们用相对较少的努力找到了五个竞态条件,其中两个可以解释在生产中观察到的失败。我们解释了测试是如何完成的,展示了使用的大部分QuickCheck规范,并描述了我们发现的问题及其原因。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
Testing a database for race conditions with QuickCheck
In 2009, Claessen et al. presented a way of testing for race conditions in Erlang programs, using QuickCheck to generate parallel tests, a randomizing scheduler to provoke races, and a sequential consistency condition to detect failures of atomicity [1]. That work used a small industrial prototype as the main example, showing how two race conditions could be detected and diagnosed. In this paper, we apply the same methods to dets, a vital component of the mnesia database system, and more than an order of magnitude larger. dets is known to fail occasionally in production, making it a promising candidate for a race condition hunt. We found five race conditions with relatively little effort, two of which may account for the observed failures in production. We explain how the testing was done, present most of the QuickCheck specification used, and describe the problems we discovered and their causes.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信