#592 MockModuleBuilder: distgit-clone-wrapper is not thread safe
Closed 6 years ago Opened 6 years ago by otaylor.

Every thread writes the same config/distgit-clone-wrapper. I saw:

DEBUG: Executing command: ['/home/otaylor/modulebuild/builds/module-flatpak-runtime-f26-20170614213810/config/distgit-clone-wrapper', 'wayland-protocols', 'c6322da4c64b33dba51ab1570b2b1c8d8d5d32c6'] with env environ({'DISPLAY': ':0', 'LANG': 'en_US.UTF-8', 'SHELL': '/bin/bash', 'TERM': 'xterm-256color', 'PATH': '/usr/sbin:/usr/bin:/sbin:/bin:/root/bin', 'LOGNAME': 'root', 'USER': 'root', 'SSH_AUTH_SOCK': '/run/user/1000/keyring/ssh', 'USERHELPER_UID': '1000', 'HOME': '/home/otaylor'}) and shell False
Traceback (most recent call last):
File "/usr/libexec/mock/mock", line 920, in <module>
main()
File "/usr/lib/python3.6/site-packages/mockbuild/trace_decorator.py", line 96, in trace
result = func(args, kw)
File "/usr/libexec/mock/mock", line 733, in main
run_command(options, args, config_opts, commands, buildroot, state)
File "/usr/lib/python3.6/site-packages/mockbuild/trace_decorator.py", line 96, in trace
result = func(*args,
kw)
File "/usr/libexec/mock/mock", line 754, in run_command
scmWorker.get_sources()
File "/usr/lib/python3.6/site-packages/mockbuild/trace_decorator.py", line 96, in trace
result = func(
args, kw)
File "/usr/lib/python3.6/site-packages/mockbuild/scm.py", line 94, in get_sources
util.do(shlex.split(self.get), shell=False, cwd=self.wrk_dir, env=os.environ)
File "/usr/lib/python3.6/site-packages/mockbuild/trace_decorator.py", line 96, in trace
result = func(*args,
kw)
File "/usr/lib/python3.6/site-packages/mockbuild/util.py", line 543, in do
preexec_fn=preexec,
File "/usr/lib64/python3.6/subprocess.py", line 707, in init
restore_signals, start_new_session)
File "/usr/lib64/python3.6/subprocess.py", line 1326, in _execute_child
raise child_exception_type(errno_num, err_msg)
OSError: [Errno 26] Text file busy

What this reflects is we tried to execute the wrapper while some other process/thread had it open for writing. Using a per-thread name would work, or I think the approach I took in PR #590 to avoid the wrapper script is fine.


@otaylor, is this fixed now by #587 ?

OK - Closing. If the issue comes up again, please file a new bug and link to this one.

Metadata Update from @ralph:
- Issue status updated to: Closed (was: Open)

6 years ago

Login to comment on this ticket.

Metadata