Uploaded image for project: 'FreeNAS / TrueNAS'
  1. FreeNAS / TrueNAS
  2. NAS-107160

Apparent crash on delete of share to invalid directory

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done (View Workflow)
    • Priority: Low
    • Resolution: Complete
    • Affects Version/s: None
    • Fix Version/s: 11.3-U5
    • Component/s: None
    • Labels:
      None
    • Impact:
      Low

      JEditor

        Description

        Here's how I got to this crash:

        * I disenabled the share BigDataShare.

        * I deleted the Dataset BigDataShare pointed to, so that /mnt/ScarVol/BigDataSet was no longer valid. (The two shares below it show valid paths.)

        * Then I tried to delete the BigDataShare. This gives the "unshare" dialog seen below (although the share was already disenabled - I did that first.)

        * Crash:

        Error: Traceback (most recent call last):
          File "/usr/local/lib/python3.7/site-packages/middlewared/plugins/smb.py", line 1089, in _delete
            await self._sharesec(action='--delete', share=share)
          File "/usr/local/lib/python3.7/site-packages/middlewared/plugins/smb.py", line 1076, in _sharesec
            raise CallError(f'sharesec {action} failed with error: {sharesec.stderr.decode()}')
        middlewared.service_exception.CallError: [EFAULT] sharesec --delete failed with error: Invalid sharename: BigDataShare


        During handling of the above exception, another exception occurred:

        Traceback (most recent call last):
          File "/usr/local/lib/python3.7/site-packages/middlewared/main.py", line 130, in call_method
            io_thread=False)
          File "/usr/local/lib/python3.7/site-packages/middlewared/main.py", line 1084, in _call
            return await methodobj(*args)
          File "/usr/local/lib/python3.7/site-packages/middlewared/service.py", line 409, in delete
            f'{self._config.namespace}.delete', self, self.do_delete, [id] + list(args)
          File "/usr/local/lib/python3.7/site-packages/middlewared/main.py", line 1084, in _call
            return await methodobj(*args)
          File "/usr/local/lib/python3.7/site-packages/middlewared/schema.py", line 961, in nf
            return await f(*args, **kwargs)
          File "/usr/local/lib/python3.7/site-packages/middlewared/plugins/smb.py", line 847, in do_delete
            await self.middleware.call('smb.sharesec._delete', share['name'] if not share['home'] else 'homes')
          File "/usr/local/lib/python3.7/site-packages/middlewared/main.py", line 1141, in call
            app=app, pipes=pipes, job_on_progress_cb=job_on_progress_cb, io_thread=True,
          File "/usr/local/lib/python3.7/site-packages/middlewared/main.py", line 1084, in _call
            return await methodobj(*args)
          File "/usr/local/lib/python3.7/site-packages/middlewared/plugins/smb.py", line 1092, in _delete
            raise CallError(e)
        middlewared.service_exception.CallError: [EFAULT] [EFAULT] sharesec --delete failed with error: Invalid sharename: BigDataShare

        * The reason I think this bug is low impact is that the operation does actually succeed - see final screenshot.

         

          Attachments

          1. Crash Dump.txt
            2 kB
            Stewart Loving-Gibbard
          2. DeletingInvalidSharePath_1.png
            64 kB
            Stewart Loving-Gibbard
          3. DeletingInvalidSharePath_2.png
            84 kB
            Stewart Loving-Gibbard
          4. DeletingInvalidSharePath_3.png
            162 kB
            Stewart Loving-Gibbard
          5. DeletingInvalidSharePath_4.png
            66 kB
            Stewart Loving-Gibbard

            Attachments

              Activity

                People

                Assignee:
                releng Release Council
                Reporter:
                stewlg Stewart Loving-Gibbard
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: