flux-framework / flux-core

core services for the Flux resource management framework
GNU Lesser General Public License v3.0
159 stars 49 forks source link

sdexec: add stdin buffering #6035

Open garlick opened 3 weeks ago

garlick commented 3 weeks ago

Problem: currently sdexec handles writes to stdin with a blocking write(2) to a socketpair which probably has a buffer of about a page size. If this is exceeded, sdexec could block, stalling the reactor until the subprocess reads data.

chu11 commented 3 weeks ago

I thought https://github.com/flux-framework/flux-core/pull/6013 was going to handle this by "buffering" the stdin RPCs?

garlick commented 3 weeks ago

6013 doesn't handle the case where a single write message can't be fully received by the socketpair. It just handles the case where the process isn't running yet.