Full Text:   <2873>

CLC number: TP311

On-line Access: 2024-08-27

Received: 2023-10-17

Revision Accepted: 2024-05-08

Crosschecked: 2014-07-16

Cited: 0

Clicked: 6623

Citations:  Bibtex RefMan EndNote GB/T7714

-   Go to

Article info.
1. Reference List
Open peer comments

Journal of Zhejiang University SCIENCE C 2014 Vol.15 No.8 P.622-635

http://doi.org/10.1631/jzus.C1300352


Automatic recovery from resource exhaustion exceptions by collecting leaked resources


Author(s):  Zi-ying Dai, Xiao-guang Mao, Li-qian Chen, Yan Lei

Affiliation(s):  College of Computer, National University of Defense Technology, Changsha 410073, China; more

Corresponding email(s):   ziyingdai@nudt.edu.cn, xgmao@nudt.edu.cn

Key Words:  Failure avoidance, Resource leaks, Resource collection, Exception handling, Reliability


Zi-ying Dai, Xiao-guang Mao, Li-qian Chen, Yan Lei. Automatic recovery from resource exhaustion exceptions by collecting leaked resources[J]. Journal of Zhejiang University Science C, 2014, 15(8): 622-635.

@article{title="Automatic recovery from resource exhaustion exceptions by collecting leaked resources",
author="Zi-ying Dai, Xiao-guang Mao, Li-qian Chen, Yan Lei",
journal="Journal of Zhejiang University Science C",
volume="15",
number="8",
pages="622-635",
year="2014",
publisher="Zhejiang University Press & Springer",
doi="10.1631/jzus.C1300352"
}

%0 Journal Article
%T Automatic recovery from resource exhaustion exceptions by collecting leaked resources
%A Zi-ying Dai
%A Xiao-guang Mao
%A Li-qian Chen
%A Yan Lei
%J Journal of Zhejiang University SCIENCE C
%V 15
%N 8
%P 622-635
%@ 1869-1951
%D 2014
%I Zhejiang University Press & Springer
%DOI 10.1631/jzus.C1300352

TY - JOUR
T1 - Automatic recovery from resource exhaustion exceptions by collecting leaked resources
A1 - Zi-ying Dai
A1 - Xiao-guang Mao
A1 - Li-qian Chen
A1 - Yan Lei
J0 - Journal of Zhejiang University Science C
VL - 15
IS - 8
SP - 622
EP - 635
%@ 1869-1951
Y1 - 2014
PB - Zhejiang University Press & Springer
ER -
DOI - 10.1631/jzus.C1300352


Abstract: 
Despite the availability of garbage collectors, programmers must manually manage non-memory finite system resources such as file descriptors. resource leaks can gradually consume all available resources and cause programs to raise resource exhaustion exceptions. However, programmers commonly provide no effective recovery approach for resource exhaustion exceptions, which often causes programs to halt without completing their tasks. In this paper, we propose to automatically recover programs from resource exhaustion exceptions caused by resource leaks. We transform programs to catch resource exhaustion exceptions, collect leaked resources, and then retry the failure code. A resource collector is designed to identify leaked resources and safely release them. We implement our approach for Java programs. Experimental results show that our approach can successfully handle resource exhaustion exceptions caused by reported resource leaks and allow programs to complete their tasks with an average execution time increase of 2.52% and negligible bytecode size increase.

Darkslateblue:Affiliate; Royal Blue:Author; Turquoise:Article

Reference

[1]Allan, C., Avgustinov, P., Christensen, A.S., et al., 2005. Adding trace matching with free variables to Aspectj. ACM SIGPLAN Not., 40(10):345-364.

[2]Arnold, M., Fink, S., Grove, D., et al., 2000. Adaptive optimization in the Jalapeno JVM. Proc. 15th ACM SIGPLAN Conf. on Object-Oriented Programming, Systems, Languages, and Applications, p.47-65.

[3]Arnold, M., Vechev, M., Yahav, E., 2011. QVM: an efficient runtime for detecting defects in deployed systems. ACM Trans. Softw. Eng. Methodol., 21(1):2:1-2:35.

[4]Blackburn, S.M., Cheng, P., McKinley, K.S., 2004. Oil and water? High performance garbage collection in Java with MMTK. Proc. 26th Int. Conf. on Software Engineering, p.137-146.

[5]Blackburn, S.M., Garner, R., Hoffmann, C., et al., 2006. The DaCapo benchmarks: Java benchmarking development and analysis. Proc. 21st Annual ACM SIGPLAN Conf. on Object-Oriented Programming Systems, Languages, and Applications, p.169-190.

[6]Boehm, H.J., 2003. Destructors, finalizers, and synchronization. Proc. 30th ACM SIGPLAN-SIGACT Symp. on Principles of Programming Languages, p.262-272.

[7]Bond, M.D., McKinley, K.S., 2008. Tolerating memory leaks. Proc. 23rd ACM SIGPLAN Conf. on Object-Oriented Programming Systems Languages and Applications, p.109-126.

[8]Cabral, B., Marques, P., 2007. Exception handling: a field study in Java and .NET. LNCS, 4609:151-175.

[9]Cabral, B., Marques, P., 2008. A case for automatic exception handling. IEEE/ACM Int. Conf. on Automated Software Engineering, p.403-406.

[10]Carzaniga, A., Gorla, A., Mattavelli, A., et al., 2013. Automatic recovery from runtime failures. Proc. Int. Conf. on Software Engineering, p.782-791.

[11]Chang, H., Mariani, L., Pezze, M., 2009. In-field healing of integration problems with COTS components. Proc. 31st Int. Conf. on Software Engineering, p.166-176.

[12]Chen, F., Rosu, G., 2007. MOP: an efficient and generic runtime verification framework. Proc. 22nd Annual ACM SIGPLAN Conf. on Object-Oriented Programming Systems and Applications, p.569-588.

[13]Dai, Z., Mao, X., Lei, L., et al., 2013. Resco: automatic collection of leaked resources. IEICE Trans. Inform. Syst., E96-D(1):28-39.

[14]DeLine, R., Fähndrich, M., 2001. Enforcing high-level protocols in low-level software. Proc. ACM SIGPLAN Conf. on Programming Language Design and Implementation, p.59-69.

[15]Dobolyi, K., Weimer, W., 2008. Changing Java’s semantics for handling null pointer exceptions. 19th Int. Symp. on Software Reliability Engineering, p.47-56.

[16]Dybvig, R.K., Bruggeman, C., Eby, D., 1993. Guardians in a generation-based garbage collector. Proc. ACM SIGPLAN Conf. on Programming Language Design and Implementation, p.207-216.

[17]Fetzer, C., Felber, P., Hogstedt, K., 2004. Automatic detection and masking of nonatomic exception handling. IEEE Trans. Softw. Eng., 30(8):547-560.

[18]Friedrich, G., Fugini, M., Mussi, E., et al., 2010. Exception handling for repair in service-based processes. IEEE Trans. Softw. Eng., 36(2):198-215.

[19]Guyer, S.Z., McKinley, K.S., Frampton, D., 2006. Free-me: a static analysis for automatic individual object reclamation. Proc. ACM SIGPLAN Conf. on Programming Language Design and Implementation, p.364-375.

[20]Hejlsberg, A., Golde, P., Wiltamuth, S., 2003. C# Language Specification. Addison Wesley.

[21]Herlihy, M., Luchangco, V., Moir, M., 2006. A flexible framework for implementing software transactional memory. ACM SIGPLAN Not., 41(10):253-262.

[22]Lei, Y., Mao, X.G., Dai, Z.Y., et al., 2012. Effective fault localization approach using feedback. IEICE Trans. Inform. Syst., E95.D(9):2247-2257.

[23]Martin, M., Livshits, B., Lam, M.S., 2005. Finding application errors and security flaws using PQL: a program query language. Proc. 20th Annual ACM SIGPLAN Conf. on Object-Oriented Programming, Systems, Languages, and Applications, p.365-383.

[24]Park, D.A., Rice, S.V., 2006. A framework for unified resource management in Java. Proc. 4th Int. Symp. on Principles and Practice of Programming in Java, p.113-122.

[25]Qi, Y.H., Mao, X.G., Wen, Y.J., et al., 2012. More efficient automatic repair of large-scale programs using weak recompilation. Sci. China Inform. Sci., 55(12):2785-2799.

[26]Shah, H.B., Gorg, C., Harrold, M.J., 2010. Understanding exception handling: viewpoints of novices and experts. IEEE Trans. Softw. Eng., 36(2):150-161.

[27]Sinha, S., Shah, H., Görg, C., et al., 2009. Fault localization and repair for Java runtime exceptions. Proc. 18th Int. Symp. on Software Testing and Analysis, p.153-164.

[28]Torlak, E., Chandra, S., 2010. Effective interprocedural resource leak detection. Proc. 32nd ACM/IEEE Int. Conf. on Software Engineering, p.535-544.

[29]Vallée-Rai, R., Co, P., Gagnon, E., et al., 1999. SOOT—a Java bytecode optimization framework. Proc. Conf. Centre for Advanced Studies on Collaborative Research, p.13.

[30]Walsh, J.D., Bordeleau, F., Selic, B., 2007. Domain analysis of dynamic system reconfiguration. Softw. Syst. Model, 6(4):355-380.

[31]Weimer, W., Necula, G.C., 2005. Mining temporal specifications for error detection. LNCS, 3440:461-476.

[32]Weimer, W., Necula, G.C., 2008. Exceptional situations and program reliability. ACM Trans. Program. Lang. Syst., 30(2):8:1-8:51.

[33]Wu, Q., Liang, G.T., Wang, Q.X., et al., 2011. Iterative mining of resource-releasing specifications. Proc. 26th IEEE/ACM Int. Conf. on Automated Software Engineering, p.233-242.

Open peer comments: Debate/Discuss/Question/Opinion

<1>

Please provide your name, email address and a comment





Journal of Zhejiang University-SCIENCE, 38 Zheda Road, Hangzhou 310027, China
Tel: +86-571-87952783; E-mail: cjzhang@zju.edu.cn
Copyright © 2000 - 2024 Journal of Zhejiang University-SCIENCE