Re: calcsize locks /dev/null? Why?

"Dustin J. Mitchell" <[email protected]> Sun, 24 Mar 2019 09:24:40 -0400
Newsgroups gmane.comp.archivers.amanda.devel
Message-ID <CAJtE5vTAk4w9141jN6bjgToNwju_ifRO73-djvdt1huJu5pHiQ@mail.gmail.com>
It looks like that was changed recently in client-src/calcsize.c
  https://github.com/zmanda/amanda/commit/2d5dcfecda760c08f9bff8d812fb45d9d0655fb1#diff-f89593c4478a9846176d4cdcb6b7e43a

But that commit message is, sadly, totally useless.  The amflock(1,
..) call comes from ancient, pre-git history.  So, I have no idea.
One thought might be to look in the users mailing list archives to see
if the commit mentioned above was fixing an error reported there.

Dustin

On Sun, Mar 24, 2019 at 8:13 AM Heiko Schlittermann <[email protected]> wrote:
>
> Hi,
>
> we run into trouble with the amanda-client on a host running dockerd.
> Dockerd has a shared lock on /dev/null. (Do not ask why.)
>
> The calcsize program of the amanda-client suite tries to get an
> exclusive lock on its FD 1 (which is opened to /dev/null).
>
> Because of dockerd holding the shared lock already, the estimater gets
> stuck.
>
> See client-src/calsize.c ~ line 360 (Amanda 3.3.9)
>
> What's the purpose of this lock? Just for serializing the estimater
> runs? If so, we should not make us dependend on some other software by
> conflicting with their locks.
>
>     Best regards from Dresden/Germany
>     Viele Grüße aus Dresden
>     Heiko Schlittermann
> --
>  SCHLITTERMANN.de ---------------------------- internet & unix support -
>  Heiko Schlittermann, Dipl.-Ing. (TU) - {fon,fax}: +49.351.802998{1,3} -
>  gnupg encrypted messages are welcome --------------- key ID: F69376CE -
>  ! key id 7CBF764A and 972EAC9F are revoked since 2015-01 ------------ -