Andrea Cosentino created CAMEL-23124:
----------------------------------------

             Summary: camel-docling - Fix CLI mode ProcessBuilder deadlock with 
sequential stream reading
                 Key: CAMEL-23124
                 URL: https://issues.apache.org/jira/browse/CAMEL-23124
             Project: Camel
          Issue Type: Bug
            Reporter: Andrea Cosentino
            Assignee: Andrea Cosentino
             Fix For: 4.18.1, 4.19.0


In DoclingProducer.executeDoclingCommand(), stdout and stderr of the CLI child 
process are read sequentially, first all of stdout to EOF, then all of stderr. 
This creates a deadlock scenario: if the child process writes enough data to 
stderr to fill the OS pipe buffer (~64KB on Linux), the child blocks waiting to 
write more to stderr, while the Java side blocks reading stdout waiting for an 
EOF that never arrives because the child is stuck. Both processes hang 
indefinitely.




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to