Free the Bugs: Disclosing Blocking Violations in Reactive Programming

Felix Dobslaw, Morgan Vallin, Robin Sundström
{"title":"Free the Bugs: Disclosing Blocking Violations in Reactive Programming","authors":"Felix Dobslaw, Morgan Vallin, Robin Sundström","doi":"10.1109/SCAM51674.2020.00025","DOIUrl":null,"url":null,"abstract":"In programming, concurrency allows threads to share processing units interleaving and seemingly simultaneous to improve resource utilization and performance. Previous research has found that concurrency faults are hard to avoid, hard to find, often leading to undesired and unpredictable behavior. Further, with the growing availability of multi-core devices and adaptation of concurrency features in high-level languages, concurrency faults occur reportedly often, which is why countermeasures must be investigated to limit harm. Reactive programming provides an abstraction to simplify complex concurrent and asynchronous tasks through reactive language extensions such as the RxJava and Project Reactor libraries for Java. Still, blocking violations are possibly resulting in concurrency faults with no Java compiler warnings. BlockHound is a tool that detects incorrect blocking by wrapping the original code and intercepting blocking calls to provide appropriate runtime errors. In this study, we seek an understanding of how common blocking violations are and whether a tool such as BlockHound can give us insight into the root-causes to highlight them as pitfalls to developers. The investigated Softwares are Java-based open-source projects using reactive frameworks selected based on high star ratings and large fork quantities that indicate high adoption. We activated BlockHound in the project’s test-suites and analyzed log files for common patterns to reveal blocking violations in 7/29 investigated open-source projects with 5024 stars and 1437 forks. A small number of system calls could be identified as root-causes. We here present countermeasures that successfully removed the uncertainty of blocking violations. The code’s intentional logic was retained in all validated projects through passing unit-tests.","PeriodicalId":410351,"journal":{"name":"2020 IEEE 20th International Working Conference on Source Code Analysis and Manipulation (SCAM)","volume":"31 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2020-09-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"1","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2020 IEEE 20th International Working Conference on Source Code Analysis and Manipulation (SCAM)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/SCAM51674.2020.00025","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 1

Abstract

In programming, concurrency allows threads to share processing units interleaving and seemingly simultaneous to improve resource utilization and performance. Previous research has found that concurrency faults are hard to avoid, hard to find, often leading to undesired and unpredictable behavior. Further, with the growing availability of multi-core devices and adaptation of concurrency features in high-level languages, concurrency faults occur reportedly often, which is why countermeasures must be investigated to limit harm. Reactive programming provides an abstraction to simplify complex concurrent and asynchronous tasks through reactive language extensions such as the RxJava and Project Reactor libraries for Java. Still, blocking violations are possibly resulting in concurrency faults with no Java compiler warnings. BlockHound is a tool that detects incorrect blocking by wrapping the original code and intercepting blocking calls to provide appropriate runtime errors. In this study, we seek an understanding of how common blocking violations are and whether a tool such as BlockHound can give us insight into the root-causes to highlight them as pitfalls to developers. The investigated Softwares are Java-based open-source projects using reactive frameworks selected based on high star ratings and large fork quantities that indicate high adoption. We activated BlockHound in the project’s test-suites and analyzed log files for common patterns to reveal blocking violations in 7/29 investigated open-source projects with 5024 stars and 1437 forks. A small number of system calls could be identified as root-causes. We here present countermeasures that successfully removed the uncertainty of blocking violations. The code’s intentional logic was retained in all validated projects through passing unit-tests.
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
释放bug:揭露响应式编程中的阻塞违规
在编程中,并发性允许线程共享处理单元,这些处理单元相互交错,似乎同时进行,以提高资源利用率和性能。以前的研究发现并发错误很难避免,很难发现,常常导致不希望的和不可预测的行为。此外,随着多核设备的日益可用性和高级语言中并发特性的适应,据报道并发错误经常发生,这就是为什么必须研究对策以限制危害的原因。响应式编程提供了一种抽象,通过响应式语言扩展(如Java的RxJava和Project Reactor库)来简化复杂的并发和异步任务。但是,阻塞违规可能会导致并发错误,而Java编译器没有警告。BlockHound是一种工具,它通过包装原始代码和拦截阻塞调用来检测不正确的阻塞,以提供适当的运行时错误。在本研究中,我们试图了解阻塞违规的常见程度,以及BlockHound等工具是否可以让我们深入了解根本原因,从而突出它们作为开发人员的陷阱。所调查的软件是基于java的开源项目,使用响应式框架,这些框架是根据高星级和高分叉数量选择的,这表明它们的采用率很高。我们在项目的测试套件中激活了BlockHound,并分析了常见模式的日志文件,以揭示7/29中5024颗星和1437个分叉的阻塞违规行为。少数系统调用可以确定为根本原因。我们在这里提出的对策成功地消除了封锁违规的不确定性。通过单元测试,代码的意图逻辑保留在所有经过验证的项目中。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
Failure of One, Fall of Many: An Exploratory Study of Software Features for Defect Prediction MUTAMA: An Automated Multi-label Tagging Approach for Software Libraries on Maven DroidXP: A Benchmark for Supporting the Research on Mining Android Sandboxes Techniques for Efficient Automated Elimination of False Positives Towards Detecting Inconsistent Comments in Java Source Code Automatically
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1