Saving debug fails (two pools)

Description

The following error occurs when trying to save a debug file (System → Advanced → Save Debug):

Error Downloading File
Debug could not be downloaded.

It stays at 81.00% (Dump ZFS Configuration) for quite a while and then shows the abovementioned error (see screenshot). When that box is closed, a 2nd error appears after a short while:

Failed
[Errno 32] Broken pipe

Details:

Error: Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/middlewared/job.py", line 361, in run
await self.future
File "/usr/local/lib/python3.8/site-packages/middlewared/job.py", line 399, in __run_body
rv = await self.middleware.run_in_thread(self.method, *([self] + args))
File "/usr/local/lib/python3.8/site-packages/middlewared/utils/run_in_thread.py", line 10, in run_in_thread
return await self.loop.run_in_executor(self.run_in_thread_executor, functools.partial(method, *args, **kwargs))
File "/usr/local/lib/python3.8/site-packages/middlewared/utils/io_thread_pool_executor.py", line 25, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.8/site-packages/middlewared/schema.py", line 977, in nf
return f(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/middlewared/plugins/system.py", line 787, in debug
shutil.copyfileobj(f, job.pipes.output.w)
File "/usr/local/lib/python3.8/shutil.py", line 205, in copyfileobj
fdst_write(buf)
BrokenPipeError: [Errno 32] Broken pipe

To reproduce:

1) set pool to readonly (unsure if it matters)
2) create a recursive snapshot on the pool
3) create a 2nd pool
4) zfs send -R firstpool@snap | zfs receive -Fd secondpool
5) System → Advanced → Save Debug

I went to the command line and ran freenas-debug -a > debug_a and attached the output.

Exporting the 2nd pool and rebooting fixes the first error message. In that case the “Save Debug” works, however the 2nd error still appears (“Broken pipe”).

Problem/Justification

None

Impact

None

SmartDraw Connector

Katalon Manual Tests (BETA)

Activity

Show:

Bug Clerk January 6, 2021 at 1:27 PM

Marco December 21, 2020 at 9:59 PM

I have attached the “ls -lR /var/log” output. However, I have removed the 2nd pool in the mean time because freenas wasn't happy about it and several things broke (I've reported the bugs). Deleting the 2nd pool also made this very issue go away. So I don't know how useful that output is. Let me know if there's anything else I can do.

Marco December 21, 2020 at 9:53 PM

it also takes a while, yes. Maybe 1.5-2min, I'd say. But it seems to succeed in the end.

Bug Clerk December 21, 2020 at 9:21 PM

Vladimir Vinogradenko December 21, 2020 at 8:33 PM

please post here what ls -lR /var/log/ prints

Complete

Details

Assignee

Reporter

Labels

Affects versions

Priority

More fields

Katalon Platform

Created December 20, 2020 at 2:27 PM
Updated July 1, 2022 at 4:59 PM
Resolved January 6, 2021 at 1:27 PM