Bug 2221890 - [abrt] tmt: _copytree(): shutil.py:515:_copytree:shutil.Error: [('/home/lnie/.cache/ibus/dbus-Nd61plLi', '/var/tmp/tmt/run-003/plans/basic/discover/default-0/tests/.cache/ibus/dbus-Nd61plLi', "[Errno 6] No such device or address: '/home/lnie/.cache/ibus/d
Summary: [abrt] tmt: _copytree(): shutil.py:515:_copytree:shutil.Error: [('/home/lnie/...
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: tmt
Version: 38
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Petr Šplíchal
QA Contact: Fedora Extras Quality Assurance
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:9e3f606e11f0306db047173bd1b...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-07-11 07:40 UTC by lnie
Modified: 2023-07-21 09:36 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:


Attachments (Terms of Use)
File: os_info (734 bytes, text/plain)
2023-07-11 07:40 UTC, lnie
no flags Details
File: environ (2.97 KB, text/plain)
2023-07-11 07:40 UTC, lnie
no flags Details
File: mountinfo (3.71 KB, text/plain)
2023-07-11 07:40 UTC, lnie
no flags Details
File: open_fds (390 bytes, text/plain)
2023-07-11 07:40 UTC, lnie
no flags Details
File: namespaces (171 bytes, text/plain)
2023-07-11 07:40 UTC, lnie
no flags Details
File: backtrace (4.23 KB, text/plain)
2023-07-11 07:40 UTC, lnie
no flags Details
File: cpuinfo (2.66 KB, text/plain)
2023-07-11 07:40 UTC, lnie
no flags Details

Description lnie 2023-07-11 07:40:30 UTC
Description of problem:
[lnie@localhost-live ~]$ tmt run
/var/tmp/tmt/run-004

/plans/basic
    discover
        how: fmf
        directory: /home/lnie
    finish
    
        summary: 0 tasks completed
Traceback (most recent call last):
  File "/usr/bin/tmt", line 14, in <module>
.....

File "/usr/lib/python3.11/site-packages/tmt/steps/discover/fmf.py", line 364, in go
    shutil.copytree(directory, self.testdir, symlinks=True)
  File "/usr/lib64/python3.11/shutil.py", line 561, in copytree
    return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/shutil.py", line 515, in _copytree
    raise Error(errors)
shutil.Error: [('/home/lnie/.cache/ibus/dbus-Nd61plLi', '/var/tmp/tmt/run-004/plans/basic/discover/default-0/tests/.cache/ibus/dbus-Nd61plLi', "[Errno 6] No such device or address: '/home/lnie/.cache/ibus/dbus-Nd61plLi'"), ('/home/lnie/.cache/ibus/dbus-8r8yL72x', '/var/tmp/tmt/run-004/plans/basic/discover/default-0/tests/.cache/ibus/dbus-8r8yL72x', "[Errno 6] No such device or address: '/home/lnie/.cache/ibus/dbus-8r8yL72x'")]

Version-Release number of selected component:
tmt-1.24.1-2.fc38

Additional info:
reporter:       libreport-2.17.9
kernel:         6.2.9-300.fc38.x86_64
cmdline:        /usr/bin/python3 -sP /usr/bin/tmt run --all provision --how local
cgroup:         0::/user.slice/user-1000.slice/user/app.slice/app-org.gnome.Terminal.slice/vte-spawn-b4957049-a562-4649-b5c9-d19209e0d42e.scope
uid:            1000
reason:         shutil.py:515:_copytree:shutil.Error: [('/home/lnie/.cache/ibus/dbus-Nd61plLi', '/var/tmp/tmt/run-003/plans/basic/discover/default-0/tests/.cache/ibus/dbus-Nd61plLi', "[Errno 6] No such device or address: '/home/lnie/.cache/ibus/dbus-Nd61plLi'"), ('/home/lnie/.cache/ibus/dbus-8r8yL72x', '/var/tmp/tmt/run-003/plans/basic/discover/default-0/tests/.cache/ibus/dbus-8r8yL72x', "[Errno 6] No such device or address: '/home/lnie/.cache/ibus/dbus-8r8yL72x'")]
executable:     /usr/bin/tmt
type:           Python3
package:        tmt-1.24.1-2.fc38
runlevel:       N 5
exception_type: shutil.Error
crash_function: _copytree
interpreter:    python3-3.11.2-1.fc38.x86_64

Truncated backtrace:
#1 [/usr/lib64/python3.11/shutil.py:515] _copytree
#2 [/usr/lib64/python3.11/shutil.py:561] copytree
#3 [/usr/lib/python3.11/site-packages/tmt/steps/discover/fmf.py:364] go
#4 [/usr/lib/python3.11/site-packages/tmt/steps/discover/__init__.py:288] go
#5 [/usr/lib/python3.11/site-packages/tmt/base.py:1934] go
#6 [/usr/lib/python3.11/site-packages/tmt/base.py:3003] go
#7 [/usr/lib/python3.11/site-packages/tmt/cli.py:360] finito
#8 [/usr/lib/python3.11/site-packages/click/decorators.py:26] new_func
#9 [/usr/lib/python3.11/site-packages/click/core.py:760] invoke
#10 [/usr/lib/python3.11/site-packages/click/core.py:1626] _process_result
#11 [/usr/lib/python3.11/site-packages/click/core.py:1689] invoke
#12 [/usr/lib/python3.11/site-packages/click/core.py:1657] invoke
#13 [/usr/lib/python3.11/site-packages/click/core.py:1055] main
#14 [/usr/lib/python3.11/site-packages/click/core.py:1130] __call__
#15 [/usr/bin/tmt:14] <module>

Comment 1 lnie 2023-07-11 07:40:36 UTC
Created attachment 1975093 [details]
File: os_info

Comment 2 lnie 2023-07-11 07:40:39 UTC
Created attachment 1975094 [details]
File: environ

Comment 3 lnie 2023-07-11 07:40:42 UTC
Created attachment 1975095 [details]
File: mountinfo

Comment 4 lnie 2023-07-11 07:40:45 UTC
Created attachment 1975096 [details]
File: open_fds

Comment 5 lnie 2023-07-11 07:40:47 UTC
Created attachment 1975097 [details]
File: namespaces

Comment 6 lnie 2023-07-11 07:40:50 UTC
Created attachment 1975098 [details]
File: backtrace

Comment 7 lnie 2023-07-11 07:40:54 UTC
Created attachment 1975099 [details]
File: cpuinfo

Comment 8 Petr Šplíchal 2023-07-14 08:53:25 UTC
@

Comment 9 Petr Šplíchal 2023-07-14 09:01:41 UTC
@lnie, thanks for reporting this. Looks like the directory from which tests should be copied just disappeared in the middle of the tmt run execution. Does this appear every time? Can you reliable reproduce it? Do you run the command under the cache directory such as "/home/lnie/.cache/ibus/dbus-Nd61plLi"? Why? Could you also try with the latest tmt from the updates testing repo? The exception handling has been improved there.

Comment 10 lnie 2023-07-18 08:22:44 UTC
> Can you reliable reproduce it? 
yes,100% reproducible,I was following this page:https://docs.fedoraproject.org/en-US/ci/tmt/
1)tmt init
2)tmt plan create /plans/basic -t base
3)tmt test create /tests/smoke
4)tmt run

If I use mini or all template in step 2) this crash will Not happen.

> Do you run the command under the cache directory such as "/home/lnie/.cache/ibus/dbus-Nd61plLi"?
Nope

> Could you also try with the latest tmt from the updates testing repo? The exception handling has been improved there.
I tried with tmt-1.25.0-1.fc38, and here is output:
[lnie@localhost-live ~]$ tmt run
/var/tmp/tmt/run-008

/plans/basic
    discover
        how: fmf
        directory: /home/lnie
    finish
    
        summary: 0 tasks completed

plan failed

The exception was caused by 1 earlier exceptions

Cause number 1:

    [('/home/lnie/.cache/ibus/dbus-Hi1Qw66v', '/var/tmp/tmt/run-008/plans/basic/discover/default-0/tests/.cache/ibus/dbus-Hi1Qw66v', "[Errno 6] No such device or address: '/home/lnie/.cache/ibus/dbus-Hi1Qw66v'")]
[lnie@localhost-live ~]$

Comment 11 Petr Šplíchal 2023-07-20 13:06:13 UTC
I tried with a freshly installed Fedora 38 and a clean user in its
home directory but unfortunately I was not able to reproduce the
problem. However, I guess it will be related to the fact that you
have the fmf tree directly in your home directory.

Could you please try to run the command with debug output enabled?

    tmt run -vvvddd

Also could you try just quickly explore available fmf metadata in
your home directory?

    dnf install -y fmf
    fmf show

Finally, could you please create a new subdirectory, let's say
'tests', and perform all the tmt steps there? Just to confirm the
problem is related to having the fmf tree stored in your home:

    mkdir tests
    cd tests
    tmt init
    ...

Comment 12 lnie 2023-07-21 01:17:41 UTC
>  I guess it will be related to the fact that you have the fmf tree directly in your home directory
That seems to be the problem,after I "create a new sub directory and perform all the tmt steps there",
the crash is gone.

Comment 13 Petr Šplíchal 2023-07-21 09:36:21 UTC
Good that it works for you now! Could you possibly still try to
run the `tmt run -vvvddd` command in your home directory? It could
help us to identify where the problem is. It would be nice to get
rid of that ugly traceback but unfortunately I cannot reproduce it
myself. Thanks.


Note You need to log in before you can comment on or make changes to this bug.