Re: race conditions in VolumeServiceImpl.createBaseImageAsync() creates NPE

2013-10-31 Thread Min Chen
: Darren Shepherd mailto:darren.s.sheph...@gmail.com>> Date: Thursday, October 31, 2013 11:39 AM To: "dev@cloudstack.apache.org<mailto:dev@cloudstack.apache.org>" mailto:dev@cloudstack.apache.org>>, Min Chen mailto:min.c...@citrix.com>> Subject: race conditions in Volu

race conditions in VolumeServiceImpl.createBaseImageAsync() creates NPE

2013-10-31 Thread Darren Shepherd
The following code results in a NPE in bad situations templatePoolRef = _tmpltPoolDao.acquireInLockTable(templatePoolRefId, storagePoolMaxWaitSeconds); if (templatePoolRef == null) { if (s_logger.isDebugEnabled()) { s_logger.info("Unable to acquire lock