duplicity-backup.sh icon indicating copy to clipboard operation
duplicity-backup.sh copied to clipboard

"/dev/fd/62: Operation not supported" errors on FreeBSD

Open tagplus5 opened this issue 9 years ago • 6 comments

FreeBSD 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789:

When i make backup or show list or show status, i have errors:

/usr/local/bin/duplicity-backup: line 279: /dev/fd/62: Operation not supported
/usr/local/bin/duplicity-backup: line 281: /dev/fd/62: Operation not supported
/usr/local/bin/duplicity-backup: line 298: 3: Bad file descriptor

(/usr/local/bin/duplicity-backup is the symlink to a duplicity-backup.sh)

tagplus5 avatar Sep 14 '16 12:09 tagplus5

Hum, it looks like redirecting file descriptors to subprocesses isn't supported on FreeBSD... As I never used FreeBSD myself, I'm not sure how to fix this. Maybe you could report here which version of bash your FreeBSD is running.

I'm not really willing to rollback the full rework of logging, however maybe there is a workaround for FreeBSD. In the worse case, it may be possible to disable tee'ing stderr/stdout for FreeBSD only, but that would be the least preferred solution.

zertrin avatar Sep 29 '16 21:09 zertrin

GNU bash, version 4.3.42(1)-release (amd64-portbld-freebsd10.1)

tagplus5 avatar Sep 29 '16 21:09 tagplus5

I don't get this error with the stable branch (obviously) nor with the master branch from a few seconds ago. Logfile output gets printed to stdout (don't know if it's supposed to do that but it's OK for me) and everything works fine. It doesn't even matter whether I have fdescfs mounted or not (a FreeBSD thing one has to do when using bash).

FreeBSD 11.0-RELEASE-p1 duplicity-backup.sh v1.2 duplicity 0.7.10 GNU bash, version 4.4.0(0)-release (armv6-portbld-freebsd11.0)

ghost avatar Oct 09 '16 21:10 ghost

From some searches online I've found this possible solution: (from https://github.com/rbenv/rbenv/issues/401#issuecomment-22333552 )

sudo mount -f fdescfs fdescfs /dev/fd

Could you try and report if it changes anything?

The issue seems that

bash now requires fdescfs(5) mounted on /dev/fd which FreeBSD does not yet do as default.

Other useful pages:

  • https://forums.freenas.org/index.php?threads/process-substitution-in-freenas-bash-shell.41533/
  • https://github.com/andsens/homeshick/issues/124#issuecomment-63984418

zertrin avatar Oct 13 '16 09:10 zertrin

sudo mount -t fdescfs fdesc /dev/fd fix this issue on FreeBSD 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789

tagplus5 avatar Oct 23 '16 12:10 tagplus5

I ran into this issue within a FreeBSD Jail running 10.3 while using ezjail. I set an option in the ezjail specific jail's conf to resolve:

export jail_myjail_fdescfs_enable="YES"

reportguy avatar Oct 23 '16 13:10 reportguy