* [PATCH 0/1] runqemu: fix a race issue on lockdir
@ 2016-09-14 9:45 Robert Yang
2016-09-14 9:45 ` [PATCH 1/1] " Robert Yang
0 siblings, 1 reply; 2+ messages in thread
From: Robert Yang @ 2016-09-14 9:45 UTC (permalink / raw)
To: openembedded-core
The following changes since commit 4d268abc2fc892c5d34449f78c8e9f2b1a9d6bac:
oeqa.runtime.smart: work around smart race issues (2016-09-09 12:12:17 +0100)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib rbt/rq
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=rbt/rq
Robert Yang (1):
runqemu: fix a race issue on lockdir
scripts/runqemu | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
--
2.9.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 1/1] runqemu: fix a race issue on lockdir
2016-09-14 9:45 [PATCH 0/1] runqemu: fix a race issue on lockdir Robert Yang
@ 2016-09-14 9:45 ` Robert Yang
0 siblings, 0 replies; 2+ messages in thread
From: Robert Yang @ 2016-09-14 9:45 UTC (permalink / raw)
To: openembedded-core
There might be a race issue when multi runqemu processess are
running at the same time:
| Traceback (most recent call last):
| File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-ipk/build/scripts/runqemu", line 920, in <module>
| ret = main()
| File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-ipk/build/scripts/runqemu", line 911, in main
| config.setup_network()
| File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-ipk/build/scripts/runqemu", line 760, in setup_network
| self.setup_tap()
| File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-ipk/build/scripts/runqemu", line 697, in setup_tap
| os.mkdir(lockdir)
| FileExistsError: [Errno 17] File exists: '/tmp/qemu-tap-locks'
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
scripts/runqemu | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/scripts/runqemu b/scripts/runqemu
index 9af13f3..b6bc0ba 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -694,7 +694,12 @@ class BaseConfig(object):
raise Exception("runqemu-ifup, runqemu-ifdown or ip not found")
if not os.path.exists(lockdir):
- os.mkdir(lockdir)
+ # There might be a race issue when multi runqemu processess are
+ # running at the same time.
+ try:
+ os.mkdir(lockdir)
+ except FileExistsError:
+ pass
cmd = '%s link' % ip
logger.info('Running %s...' % cmd)
--
2.9.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-09-14 9:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-14 9:45 [PATCH 0/1] runqemu: fix a race issue on lockdir Robert Yang
2016-09-14 9:45 ` [PATCH 1/1] " Robert Yang
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.