bugGNU Parallel - Bugs: bug #64993, parallel: Error: Command line too...

 
 

bug #64993: parallel: Error: Command line too long (14 >= -2203) at input 0: 1

Submitter:  None
Submitted:  Thu 07 Dec 2023 07:13:00 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 20 Sep 2024 10:27:13 AM UTC, comment #2: 

Hi, with macOS Ventura 13.6.7 and GNU parallel 20240822
same problem and the proposed fix works.

comment #1:

> Please also give output of:
>
> perl src/parallel -Dall --tmux echo ::: 1
>



the output is:


$ perl /usr/local/bin/parallel  -Dall --tmux echo ::: 1
Parent of 50251
which bash => /usr/local/bin/bash in /Users/userX/bin:/usr/local/Cellar/pyenv-virtualenv/1.2.4/shims:/Users/userX/.pyenv/shims:/usr/local/opt/ruby/bin:/usr/local/lib/ruby/gems/3.1.0/bin:/usr/local/bin:/Users/userX/bin:/userXadded/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/opt/X11/bin:/Library/Apple/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Applications/iTerm.app/Contents/Resources/utilities
shell path /usr/local/bin/bash
Global::shell /usr/local/bin/bash
/usr/local/bin/tmux in /Users/userX/bin:/usr/local/Cellar/pyenv-virtualenv/1.2.4/shims:/Users/userX/.pyenv/shims:/usr/local/opt/ruby/bin:/usr/local/lib/ruby/gems/3.1.0/bin:/usr/local/bin:/Users/userX/bin:/userXadded/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/opt/X11/bin:/Library/Apple/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Applications/iTerm.app/Contents/Resources/utilities
command too long
command too long
tmux-out 1
2020
16320
tmux-length 4047Open file descriptors: 2 1
echo Context:  Non: 4 Ctxgrp:  NonCtxGrp: 1
echo <> Context:  Non: 4 Ctxgrp: 1 NonCtxGrp: 1
Wanted procs: 8
Time to fork 1 procs: 0  (processes so far: 1)
Time to fork 2 procs: 0  (processes so far: 2)
Time to fork 3 procs: 0  (processes so far: 3)
Time to fork 4 procs: 0  (processes so far: 4)
Time to fork 5 procs: 0  (processes so far: 5)
Time to fork 6 procs: 0  (processes so far: 6)
Time to fork 7 procs: 0  (processes so far: 7)
Time to fork 8 procs: 0  (processes so far: 8)
RecordQueue-unget
MultifileQueue->empty  RecordQueue->empty CommandLineQueue->empty JobQueue->empty  Limited to procs: 8
Reaper MultifileQueue->empty  RecordQueue->empty CommandLineQueue->empty JobQueue->empty  Running jobs before on ::
: has  out of 8 jobs running. Start another.
MultifileQueue->empty  RecordQueue->empty CommandLineQueue->empty JobQueue->empty  length: -2348 3+(523 - 574 - 1641)/5 - 51*2MultifileQueue->empty  RecordQueue->empty eval  1
noncontext + command: 5
context+noncontext + command: 5
noncontext + command: 5
context+noncontext + command: 5
parallel: Error: Command line too long (14 >= -2348) at input 0: 1
RecordQueue-unget
kill_sleep TERM
kill_sleep TERM
kill_sleep TERM
kill_sleep KILL


karlacio <karlacio>
Mon 11 Dec 2023 10:44:25 AM UTC, comment #1: 

Please also give output of:

perl src/parallel -Dall --tmux echo ::: 1

Anonymous
Thu 07 Dec 2023 07:13:00 PM UTC, original submission:  

MCVE



$ perl src/parallel --tmux echo ::: 1
parallel: Error: Command line too long (14 >= -2203) at input 0: 1
$ perl src/parallel --version
GNU parallel 20231122
$ tmux -V
tmux 3.3a


  • Works in Linux
  • Does not work in macOS Ventura


My hunch is that it is related to this line of code:
https://git.savannah.gnu.org/cgit/parallel.git/tree/src/parallel#n13649


        # The arguments is given 3 times on the command line
        # and the tmux wrapping is around 30 chars
        # (29 for tmux1.9, 33 for tmux1.8)
        my $tmux_len = ::max(@out);
        $len = ::min($len,int($tmux_len/4-33));


I don't have the context to follow what's in the comment, but if I change it to the line below, it works:


        my $tmux_len = ::max(@out);
        $len = ::min($len,$tmux_len-33);


If given some more context, I can try to contribute with the fix.

Thanks!!

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by karlacio (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-5884.
    Corresponding source code