Bug 2186613 - [abrt] mock: rmtree(): file_util.py:68:rmtree:OSError: [Errno 39] Directory not empty: '/var/lib/mock/fedora-rawhide-x86_64/root/builddir/build/BUILD/mesa-f8a8b7708e33ff22dd71c68830c33abe3fb1030a/redhat-linux-build/src/gallium/winsys/sw'
Summary: [abrt] mock: rmtree(): file_util.py:68:rmtree:OSError: [Errno 39] Directory n...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: mock
Version: rawhide
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Suchý
QA Contact: Fedora Extras Quality Assurance
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:b27e28405bf87a8580e9fcaa784...
: 2169055 2176689 2176691 2177680 2181641 2213874 2218922 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-04-13 20:03 UTC by Mikhail
Modified: 2023-08-10 13:19 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-08-10 13:18:47 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: os_info (770 bytes, text/plain)
2023-04-13 20:03 UTC, Mikhail
no flags Details
File: environ (206 bytes, text/plain)
2023-04-13 20:03 UTC, Mikhail
no flags Details
File: mountinfo (3.74 KB, text/plain)
2023-04-13 20:03 UTC, Mikhail
no flags Details
File: open_fds (651 bytes, text/plain)
2023-04-13 20:03 UTC, Mikhail
no flags Details
File: namespaces (163 bytes, text/plain)
2023-04-13 20:03 UTC, Mikhail
no flags Details
File: backtrace (8.41 KB, text/plain)
2023-04-13 20:03 UTC, Mikhail
no flags Details
File: cpuinfo (2.96 KB, text/plain)
2023-04-13 20:03 UTC, Mikhail
no flags Details

Description Mikhail 2023-04-13 20:03:04 UTC
Description of problem:
Break mock build

Version-Release number of selected component:
mock-3.5-2.fc38

Additional info:
reporter:       libreport-2.17.9
kernel:         6.3.0-0.rc6.20230412gite62252bc55b6.51.fc39.x86_64+debug
cmdline:        /usr/bin/python3 -tt /usr/libexec/mock/mock -r fedora-rawhide-x86_64 --resultdir /home/mikhail/packaging-work/mutter/results_mutter/44.0/4.fc39 --rebuild /home/mikhail/packaging-work/mutter/mutter-44.0-4.fc39.src.rpm
cgroup:         0::/user.slice/user-1000.slice/user/app.slice/app-org.gnome.Terminal.slice/vte-spawn-5595c7bd-4438-49b6-9bcd-144c74086b63.scope
uid:            0
reason:         file_util.py:68:rmtree:OSError: [Errno 39] Directory not empty: '/var/lib/mock/fedora-rawhide-x86_64/root/builddir/build/BUILD/mesa-f8a8b7708e33ff22dd71c68830c33abe3fb1030a/redhat-linux-build/src/gallium/winsys/sw'
executable:     /usr/libexec/mock/mock
type:           Python3
package:        mock-3.5-2.fc38
runlevel:       N 5
exception_type: KeyboardInterrupt
crash_function: rmtree
interpreter:    python3-3.11.3-1.fc39.x86_64
comment:        Break mock build

Truncated backtrace:
#1 [/usr/lib/python3.11/site-packages/mockbuild/file_util.py:68] rmtree
#2 [/usr/lib/python3.11/site-packages/mockbuild/trace_decorator.py:93] trace
#3 [/usr/lib/python3.11/site-packages/mockbuild/file_util.py:59] rmtree
#4 [/usr/lib/python3.11/site-packages/mockbuild/trace_decorator.py:93] trace
#5 [/usr/lib/python3.11/site-packages/mockbuild/file_util.py:59] rmtree
#6 [/usr/lib/python3.11/site-packages/mockbuild/trace_decorator.py:93] trace
#7 [/usr/lib/python3.11/site-packages/mockbuild/file_util.py:59] rmtree
#8 [/usr/lib/python3.11/site-packages/mockbuild/trace_decorator.py:93] trace
#9 [/usr/lib/python3.11/site-packages/mockbuild/file_util.py:59] rmtree
#10 [/usr/lib/python3.11/site-packages/mockbuild/trace_decorator.py:93] trace
#11 [/usr/lib/python3.11/site-packages/mockbuild/file_util.py:59] rmtree
#12 [/usr/lib/python3.11/site-packages/mockbuild/trace_decorator.py:93] trace
#13 [/usr/lib/python3.11/site-packages/mockbuild/buildroot.py:884] delete
#14 [/usr/lib/python3.11/site-packages/mockbuild/trace_decorator.py:93] trace
#15 [/usr/lib/python3.11/site-packages/mockbuild/backend.py:97] clean
#16 [/usr/lib/python3.11/site-packages/mockbuild/trace_decorator.py:93] trace
#17 [/usr/lib/python3.11/site-packages/mockbuild/rebuild.py:23] rebuild_generic

Comment 1 Mikhail 2023-04-13 20:03:08 UTC
Created attachment 1957379 [details]
File: os_info

Comment 2 Mikhail 2023-04-13 20:03:10 UTC
Created attachment 1957380 [details]
File: environ

Comment 3 Mikhail 2023-04-13 20:03:11 UTC
Created attachment 1957381 [details]
File: mountinfo

Comment 4 Mikhail 2023-04-13 20:03:13 UTC
Created attachment 1957382 [details]
File: open_fds

Comment 5 Mikhail 2023-04-13 20:03:15 UTC
Created attachment 1957383 [details]
File: namespaces

Comment 6 Mikhail 2023-04-13 20:03:17 UTC
Created attachment 1957384 [details]
File: backtrace

Comment 7 Mikhail 2023-04-13 20:03:19 UTC
Created attachment 1957385 [details]
File: cpuinfo

Comment 8 Miroslav Suchý 2023-04-14 06:25:19 UTC
Proposed fix:
https://github.com/rpm-software-management/mock/pull/1058

Comment 9 Pavel Raiskup 2023-08-10 13:05:17 UTC
*** Bug 2176689 has been marked as a duplicate of this bug. ***

Comment 10 Pavel Raiskup 2023-08-10 13:05:42 UTC
*** Bug 2177680 has been marked as a duplicate of this bug. ***

Comment 11 Pavel Raiskup 2023-08-10 13:06:06 UTC
*** Bug 2218922 has been marked as a duplicate of this bug. ***

Comment 12 Pavel Raiskup 2023-08-10 13:07:42 UTC
*** Bug 2169055 has been marked as a duplicate of this bug. ***

Comment 13 Pavel Raiskup 2023-08-10 13:08:15 UTC
*** Bug 2181641 has been marked as a duplicate of this bug. ***

Comment 14 Pavel Raiskup 2023-08-10 13:08:43 UTC
*** Bug 2213874 has been marked as a duplicate of this bug. ***

Comment 15 Pavel Raiskup 2023-08-10 13:18:47 UTC
(In reply to Miroslav Suchý from comment #8)
> Proposed fix:
> https://github.com/rpm-software-management/mock/pull/1058

The patch is merged now.  And I believe the following patch is actually going
to resolve all such problems in the future itself:
https://github.com/rpm-software-management/mock/pull/1133/files

Simply put, if any exception (including KeyboardInterrupt) was raised at
the same time Mock was installing something using a package manager, we
did not properly kill the orphaned in-chroot process, which blocked the
subsequent cleanup && umount.  This should be fixed in Mock 5.0+.

The exception (signal) handler is not immune against subsequent
KeyboardInterrupts - so users shouldn't press CTRL+C twice in a row.

Comment 16 Pavel Raiskup 2023-08-10 13:19:54 UTC
*** Bug 2176691 has been marked as a duplicate of this bug. ***


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