develooper Front page | perl.perl5.porters | Postings from June 2019

Re: [perl #122112] refcnt: fd -1 < 0 with MIME::Lite

Thread Previous | Thread Next
From:
Tony Cook
Date:
June 4, 2019 01:17
Subject:
Re: [perl #122112] refcnt: fd -1 < 0 with MIME::Lite
Message ID:
20190604011658.tvzr4fibyrz477kz@mars.tony.develop-help.com
On Mon, Jun 03, 2019 at 10:36:56PM +0100, Richard Leach wrote:
> On Mon, Jun 3, 2019 at 6:43 PM Richard Leach
> <rich@hyphen-dash-hyphen.info> wrote:
> > It was definitely fb5e77103dd443cc2112ba14dc665aa5ec072ce6 wot broke it.
> 
> That commit broke the test from a smoker's perspective, but it was
> heisenbroken on some platforms before that. Prior to that commit,
> t/io/pipe.t tests all passed under "make test" or "make test_harness",
> but do not if t/ harness or t/TEST are invoked manually. (Many "WTFs"
> have been uttered.)
> 
> https://help-bash.gnu.narkive.com/la0zjaBe/when-pipes-fail-and-when-not
> - suggests that GNUroot and Termux have a problem where the parent
> process ignores SIGPIPE.
> 
> The Termux SSH shell indeed cannot catch SIGPIPE:
> 
>   $ trap '' pipe; bash -c 'trap - pipe; for i in {0..9}; do
>   > /bin/echo $i; sleep 1; done | dd bs=1 count=10'
>   0
>   1
>   2
>   3
>   4
>   10+0 records in
>   10+0 records out
>   10 bytes copied, 4.20389 s, 0.0 kB/s
>   /bin/echo: write error: Broken pipe
>   /bin/echo: write error: Broken pipe
>   /bin/echo: write error: Broken pipe
>   /bin/echo: write error: Broken pipe
>   /bin/echo: write error: Broken pipe
> 
> I'm not sufficiently familiar with the process model to know how
> running the tests via 'make' seems to work. Should there be something
> we can try to get the SIGPIPE tests working here?
> 
> I've run out of time this evening, but options otherwise seem to be:
> (1) skip some tests if ($^O eq 'android'), although that wouldn't help
> anyone building under GNUroot
> (2) run a check like the above for SIGPIPE behaviour, then skip tests
> if necessary

The io/pipe.t test that's failing is setting up a signal handler for
SIGPIPE, which should override the ignore done (or inherited) by the
shell.

I'm setting up an Android VM, maybe that will let me track it down.

Tony

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About