Subject: Re: bug#42538: 28.0.50; tramp-test35-remote-path test timing out on macOS

From: Michael Albinus <[email-masked]>
Date: Mon, 27 Jul 2020 17:28:19 +0200

Philipp Stephani <[email-masked]> writes:

Hi Philipp,

>> Indeed. So I've modified the patch; the test case commits suicide after
>> 30 seconds. You can call it simply by
>>
>> $ rm test/lisp/net/tramp-tests.log
>> $ make -C test lisp/net/tramp-tests.log SELECTOR=tramp-test35-remote-path
>
>
> OK, I've attached the log file now. (It's not that large.)

And it tells us The Truth (TM).

Under macOS, PIPE_BUF is very short:

--8<---------------cut here---------------start------------->8---
23:33:50.197963 tramp-send-command (6) # getconf PIPE_BUF / 2>/dev/null || echo 4096 2>/dev/null; echo tramp_exit_status $?
23:33:50.200794 tramp-wait-for-regexp (6) # 
512
tramp_exit_status 0
///ec22873252400ed5da2786d09e65ca05#$
--8<---------------cut here---------------end--------------->8---

Tramp tries to set a very long PATH variable (this is the essence of the
test), creating a temp file via a heredoc command. With other OSes, this
trick works. But it refuses to work for you:

--8<---------------cut here---------------start------------->8---
23:34:00.273274 tramp-send-command (6) # cat >/tmp/tramp.21cf9w <<'ee34a56d9cb9cbd177c29dcaca509be9'
PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/sbin:/var/folders/ks/sxl3n3w51td0ry21j3tjs1wh0000gn/T/tramp-test16h5Wh/XBjC1b:/var/folders/ks/sxl3n3w51td0ry21j3tjs1wh0000gn/T/tramp-test16h5Wh/C2Xb3Q:/var/folders/ks/sxl3n3w51td0ry21j3tjs1wh0000gn/T/tramp-test16h5Wh/oUW8Hk:/var/folders/ks/sxl3n3w51td0ry21j3tjs1wh0000gn/T/tramp-test16h5Wh/nmtc9J:/var/folders/ks/sxl3n3w51td0ry21j3tjs1wh0000gn/T/tramp-test16h5Wh/H6S488:/var/folders/ks/sxl3n3w51td0ry21j3tjs1wh0000gn/T/tramp-test16h5Wh/BMJQL7:/var/folders/ks/sxl3n3w51td0ry21j3tjs1wh0000gn/T/tramp-test16h5Wh/4mZhx7:/var/folders/ks/sxl3n3w51td0ry21j3tjs1wh0000gn/T/tramp-test16h5Wh/1HY100:/var/folders/ks/sxl3n3w51td0ry21j3tjs1wh0000gn/T/tramp-test16h5Wh/Nu1cnQ:/var/folders/ks/sxl3n3w51td0ry21j3tjs1wh0000gn/T/tramp-test16h5Wh/r17vPP:/var/folders/ks/sxl3n3w51td0ry21j3tjs1wh0000gn/T/tramp-test16h5Wh/AuhHIQ:/var/folders/ks/sxl3n3w51td0ry21j3tjs1wh0000gn/T/tramp-test16h5Wh/0o1mE1:/var/folders/ks/sxl3n3w51td0ry21j3tjs1wh0000gn/T/tramp-test16h5Wh/Z4O5Sx:/var/folders/ks/sxl3n3w51td0ry21j3tjs1wh0000gn/T/tramp-test16h5Wh/46Q1L2:/var/folders/ks/sxl3n3w51td0ry21j3tjs1wh0000gn/T/tramp-test16h5Wh/WjjoRH:/var/folders/ks/sxl3n3w51td0ry21j3tjs1wh0000gn/T/tramp-test16h5Wh/CBgDaw:/var/folders/ks/sxl3n3w51td0ry21j3tjs1wh0000gn/T/tramp-test16h5Wh/j1IF30:/var/folders/ks/sxl3n3w51td0ry21j3tjs1wh0000gn/T/tramp-test16h5Wh/o3WfTs:/var/folders/ks/sxl3n3w51td0ry21j3tjs1wh0000gn/T/tramp-test16h5Wh/EsFexA:/var/folders/ks/sxl3n3w51td0ry21j3tjs1wh0000gn/T/tramp-test16h5Wh/SUmpMi:/var/folders/ks/sxl3n3w51td0ry21j3tjs1wh0000gn/T/tramp-test16h5Wh/vEA9uL:/var/folders/ks/sxl3n3w51td0ry21j3tjs1wh0000gn/T/tramp-test16h5Wh/A3Z06C:/var/folders/ks/sxl3n3w51td0ry21j3tjs1wh0000gn/T/tramp-test16h5Wh/j3TEeY:/var/folders/ks/sxl3n3w51td0ry21j3tjs1wh0000gn/T/tramp-test16h5Wh/1Zm9fA:/var/folders/ks/sxl3n3w51td0ry21j3tjs1wh0000gn/T/tramp-test16h5Wh/eLdpLh:/var/folders/ks/sxl3n3w51td0ry21j3tjs1wh0000gn/T/tramp-test16h5Wh/rF4Bxu:/var/folders/ks/sxl3n3w51td0ry21j3tjs1wh0000gn/T/tramp-test16h5Wh/5xWpeg:/var/folders/ks/sxl3n3w51td0ry21j3tjs1wh0000gn/T/tramp-test16h5Wh/nbZeG4:/var/folders/ks/sxl3n3w51td0ry21j3tjs1wh0000gn/T/tramp-test16h5Wh/77cnPb:/var/folders/ks/sxl3n3w51td0ry21j3tjs1wh0000gn/T/tramp-test16h5Wh/up7DIK:/var/folders/ks/sxl3n3w51td0ry21j3tjs1wh0000gn/T/tramp-test16h5Wh/lLTfv4:/var/folders/ks/sxl3n3w51td0ry21j3tjs1wh0000gn/T/tramp-test16h5Wh/0NUphe:/var/folders/ks/sxl3n3w51td0ry21j3tjs1wh0000gn/T/tramp-test16h5Wh/g2GVE8:/var/folders/ks/sxl3n3w51td0ry21j3tjs1wh0000gn/T/tramp-test16h5Wh/ha6g1W:/var/folders/ks/sxl3n3w51td0ry21j3tjs1wh0000gn/T/tramp-test16h5Wh/uZMI15:/var/folders/ks/sxl3n3w51td0ry21j3tjs1wh0000gn/T/tramp-test16h5Wh/n7F9Zr:/var/folders/ks/sxl3n3w51td0ry21j3tjs1wh0000gn/T/tramp-test16h5Wh/iRvb2d:/var/folders/ks/sxl3n3w51td0ry21j3tjs1wh0000gn/T/tramp-test16h5Wh/7NpjgT:/var/folders/ks/sxl3n3w51td0ry21j3tjs1wh0000gn/T/tramp-test16h5Wh/GLF9LB:/var/folders/ks/sxl3n3w51td0ry21j3tjs1wh0000gn/T/tramp-test16h5Wh/0vY43M:/var/folders/ks/sxl3n3w51td0ry21j3tjs1wh0000gn/T/tramp-test16h5Wh/Jz1jEI:/var/folders/ks/sxl3n3w51td0ry21j3tjs1wh0000gn/T/tramp-test16h5Wh/4SqFP3:/var/folders/ks/sxl3n3w51td0ry21j3tjs1wh0000gn/T/tramp-test16h5Wh/wlgvgt:/var/folders/ks/sxl3n3w51td0ry21j3tjs1wh0000gn/T/tramp-test16h5Wh/68tScv:/var/folders/ks/sxl3n3w51td0ry21j3tjs1wh0000gn/T/tramp-test16h5Wh/LmWqYP:/var/folders/ks/sxl3n3w51td0ry21j3tjs1wh0000gn/T/tramp-test16h5Wh/2UbEme:/var/folders/ks/sxl3n3w51td0ry21j3tjs1wh0000gn/T/tramp-test16h5Wh/29SifB:/var/folders/ks/sxl3n3w51td0ry21j3tjs1wh0000gn/T/tramp-test16h5Wh/8388Ha:/var/folders/ks/sxl3n3w51td0ry21j3tjs1wh0000gn/T/tramp-test16h5Wh/sEve50:/var/folders/ks/sxl3n3w51td0ry21j3tjs1wh0000gn/T/tramp-test16h5Wh/ofutHX:/var/folders/ks/sxl3n3w51td0ry21j3tjs1wh0000gn/T/tramp-test16h5Wh/jOEMm0:/var/folders/ks/sxl3n3w51td0ry21j3tjs1wh0000gn/T/tramp-test16h5Wh/0laQB5:/var/folders/ks/sxl3n3w51td0ry21j3tjs1wh0000gn/T/tramp-test16h5Wh/UWDANC:/var/folders/ks/sxl3n3w51td0ry21j3tjs1wh0000gn/T/tramp-test16h5Wh/gke4IJ:/var/folders/ks/sxl3n3w51td0ry21j3tjs1wh0000gn/T/tramp-test16h5Wh/GBuhLz:/var/folders/ks/sxl3n3w51td0ry21j3tjs1wh0000gn/T/tramp-test16h5Wh/gWiUYZ:/var/folders/ks/sxl3n3w51td0ry21j3tjs1wh0000gn/T/tramp-test16h5Wh/DxLjh8:/var/folders/ks/sxl3n3w51td0ry21j3tjs1wh0000gn/T/tramp-test16h5Wh/EeeqZI:/var/folders/ks/sxl3n3w51td0ry21j3tjs1wh0000gn/T/tramp-test16h5Wh/rF99jV:/var/folders/ks/sxl3n3w51td0ry21j3tjs1wh0000gn/T/tramp-test16h5Wh/e0OVZR:/var/folders/ks/sxl3n3w51td0ry21j3tjs1wh0000gn/T/tramp-test16h5Wh/aDrXdX:/var/folders/ks/sxl3n3w51td0ry21j3tjs1wh0000gn/T/tramp-test16h5Wh/m0a6et:/var/folders/ks/sxl3n3w51td0ry21j3tjs1wh0000gn/T/tramp-test16h5Wh/po8aFp:/var/folders/ks/sxl3n3w51td0ry21j3tjs1wh0000gn/T/tramp-test16h5Wh/RFMSih:/var/folders/ks/sxl3n3w51td0ry21j3tjs1wh0000gn/T/tramp-test16h5Wh/W01RNs:/var/folders/ks/sxl3n3w51td0ry21j3tjs1wh0000gn/T/tramp-test16h5Wh/hVC19w:/var/folders/ks/sxl3n3w51td0ry21j3tjs1wh0000gn/T/tramp-test16h5Wh/muGaOz; export PATH
ee34a56d9cb9cbd177c29dcaca509be9
23:34:19.714146 tramp-process-sentinel (5) # Sentinel called: `#<process *tramp/mock p*>' `killed: 9
'
--8<---------------cut here---------------end--------------->8---

As you see, Tramp is stalled for 19 seconds, and then the timeout kills
it. I will see whether I could rearrange the command sequence. Maybe
writing the temp file just in shorter chunks, or so.

Best regards, Michael.