Control: tags 635711 + unreproducible help

I'm trying to get my head around the problem reported in #635711, which
i continue to be unable to reproduce by hand.

So far, reading the logs provided, it seems that we're getting an error
141 returned from within the transition scripts for
"monkeysphere-authentication setup".

The proposed edits thus far have been to remove or avoid invoking the
transition scripts during the postinst.

However, after invoking the transition scripts, the postinst itself
calls "monkeysphere-authentication setup" directly.

So removing the transition scripts seems unlikely to resolve the issue.

Looking further, shell return codes when aborting on a signal are are
usually 128 + the signal.  141 is 128 + 13, and 13 is SIGPIPE.

The error happens in line 96 of src/share/ma/setup:

    printf "%s:6:\n" "$CORE_FPR" | gpg_sphere --import-ownertrust 2>&1 | log 
verbose

looking at the logs posted by Andreas [0], it looks like of these three,
log verbose has been invoked (and already completed), and of course
printf is a bash builtin.

gpg_sphere is a shell function but according to the set -x it isn't even
getting invoked before the SIGPIPE hits.

So maybe this is some sort of race condition in file descriptor closing
when log is called expecting to take input from stdin?

I haven't succeeded in getting this to happen manually outside of
monkeysphere though.

I've tried to replicate this the following way:

 * start a new bash shell (within another bash shell so we can see what
   its return value will be).  In this sub-shell:
 * set -o pipefail; set -e
 * import the log() function definition from src/share/common
 * try to replicate a similar pipeline, like:
 
    export GNUPGHOME=$(pwd)
    for x in 5 6 5 6 5 6 5 6 5 6 5 6; do
      printf "%s:$x:\n" "$FPR" | gpg --import-ownertrust 2>&1 | log verbose
    done
   
But it still doesn't fail with the sigpipe.

I'm not sure how to get this to trigger repeatably.  Help would be
welcome!

    --dkg

[0] https://bugs.debian.org/635711#66

Attachment: signature.asc
Description: PGP signature

Reply via email to