<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<body>
<div dir="auto">
<div dir="auto">What would be the reason of running that command without redirecting its output somewhere?</div><div dir="auto"><br></div><div dir='auto'><br></div>
<div id="aqm-original" style="color: black;">
<div dir="auto">Madison Kelly <mkelly@alteeve.com> 12 января 2023 г. 07:21:44 написал:</div>
<div><br></div>
<blockquote type="cite" class="gmail_quote" style="margin: 0 0 0 0.75ex; border-left: 1px solid #808080; padding-left: 0.75ex;">
<div dir="auto">On 2023-01-12 01:12, Reid Wahl wrote:</div>
<blockquote type="cite" class="gmail_quote" style="margin: 0 0 0 0.75ex; border-left: 1px solid #0099CC; padding-left: 0.75ex;">
<div dir="auto">On Wed, Jan 11, 2023 at 8:11 PM Madison Kelly <mkelly@alteeve.com> wrote:</div>
<blockquote type="cite" class="gmail_quote" style="margin: 0 0 0 0.75ex; border-left: 1px solid #9933CC; padding-left: 0.75ex;">
<div dir="auto"><br></div>
<div dir="auto">Hi all,</div>
<div dir="auto"><br></div>
<div dir="auto">There was a lot of sub-threads, so I figured it's helpful to start a</div>
<div dir="auto">new thread with a summary so far. For context; I have a super simple</div>
<div dir="auto">perl script that pretends to be an RA for the sake of debugging.</div>
<div dir="auto"><br></div>
<div dir="auto">https://pastebin.com/9z314TaB</div>
<div dir="auto"><br></div>
<div dir="auto">I've had variations log environment variables and confirmed that all</div>
<div dir="auto">the variables in the direct call that work are in the crm_resource</div>
<div dir="auto">triggered call. There are no selinux issues logged in audit.log and</div>
<div dir="auto">selinux is permissive. The script logs the real and effective UID and</div>
<div dir="auto">GID and it's the same in both instances. Calling other shell programs</div>
<div dir="auto">(tested with 'hostname') run fine, this is specifically crm_resource -></div>
<div dir="auto">test RA -> virsh call.</div>
<div dir="auto"><br></div>
<div dir="auto">I ran strace on the virsh call from inside my test script (changing</div>
<div dir="auto">'virsh.good' to 'virsh.bad' between running directly and via</div>
<div dir="auto">crm_resource. The strace runs made six files each time. Below are</div>
<div dir="auto">pastebin links with the outputs of the six runs in one paste, but each</div>
<div dir="auto">file's output is in it's own block (search for file: to see the</div>
<div dir="auto">different file outputs)</div>
<div dir="auto"><br></div>
<div dir="auto">Good/direct run of the test RA:</div>
<div dir="auto">- https://pastebin.com/xtqe9NSG</div>
<div dir="auto"><br></div>
<div dir="auto">Bad/crm_resource triggered run of the test RA:</div>
<div dir="auto">- https://pastebin.com/vBiLVejW</div>
<div dir="auto"><br></div>
<div dir="auto">Still absolutely stumped.</div>
</blockquote>
<div dir="auto"><br></div>
<div dir="auto">The strace outputs show that your bad runs are all getting stopped</div>
<div dir="auto">with SIGTTOU. If you've never heard of that, me either.</div>
</blockquote>
<div dir="auto"><br></div>
<div dir="auto">The hell?! This is new to me also.</div>
<div dir="auto"><br></div>
<blockquote type="cite" class="gmail_quote" style="margin: 0 0 0 0.75ex; border-left: 1px solid #0099CC; padding-left: 0.75ex;">
<div dir="auto">https://www.gnu.org/software/libc/manual/html_node/Job-Control-Signals.html</div>
<div dir="auto"><br></div>
<div dir="auto">Macro: int SIGTTOU</div>
<div dir="auto"><br></div>
<div dir="auto">This is similar to SIGTTIN, but is generated when a process in a</div>
<div dir="auto">background job attempts to write to the terminal or set its modes.</div>
<div dir="auto">Again, the default action is to stop the process. SIGTTOU is only</div>
<div dir="auto">generated for an attempt to write to the terminal if the TOSTOP output</div>
<div dir="auto">mode is set; see Output Modes.</div>
<div dir="auto"><br></div>
<div dir="auto"><br></div>
<div dir="auto">Maybe this has something to do with the buffer settings in the perl</div>
<div dir="auto">script(?). It might be worth trying a version that doesn't fiddle with</div>
<div dir="auto">the outputs and buffer settings.</div>
</blockquote>
<div dir="auto"><br></div>
<div dir="auto">I tried removing the $|, and then I changed the script to be entirely a </div>
<div dir="auto">bash script, still hanging. I tried 'virsh --connect <method> list </div>
<div dir="auto">--all' where method was qemu:///system, qemu:///session, and </div>
<div dir="auto">ssh+qemu:///root@localhost/system, all hang. In bash or perl.</div>
<div dir="auto"><br></div>
<blockquote type="cite" class="gmail_quote" style="margin: 0 0 0 0.75ex; border-left: 1px solid #0099CC; padding-left: 0.75ex;">
<div dir="auto">I don't know which difference between your environment and mine is</div>
<div dir="auto">relevant here, such that I can't reproduce the issue using your test</div>
<div dir="auto">script. It works perfectly fine for me.</div>
<div dir="auto"><br></div>
<div dir="auto">Can you run `stty -a | grep tostop`? If there's a minus sign</div>
<div dir="auto">("-tostop"), it's disabled; if it's present without a minus sign</div>
<div dir="auto">("tostop"), it's enabled, as best I can tell.</div>
</blockquote>
<div dir="auto"><br></div>
<div dir="auto">-tostop is there</div>
<div dir="auto"><br></div>
<div dir="auto">====</div>
<div dir="auto">[root@mk-a07n02 ~]# stty -a | grep tostop</div>
<div dir="auto">isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt</div>
<div dir="auto">[root@mk-a07n02 ~]#</div>
<div dir="auto">====</div>
<div dir="auto"><br></div>
<blockquote type="cite" class="gmail_quote" style="margin: 0 0 0 0.75ex; border-left: 1px solid #0099CC; padding-left: 0.75ex;">
<div dir="auto">I'm just spitballing here. It's disabled by default on my machine...</div>
<div dir="auto">but even when I enable it, crm_resource --validate works fine. It may</div>
<div dir="auto">be set differently when running under crm_resource.</div>
</blockquote>
<div dir="auto"><br></div>
<div dir="auto">How do you enable it?</div>
<div dir="auto"><br></div>
<div dir="auto">-- </div>
<div dir="auto">Madison Kelly</div>
<div dir="auto">Alteeve's Niche!</div>
<div dir="auto">Chief Technical Officer</div>
<div dir="auto">c: +1-647-471-0951</div>
<div dir="auto">https://alteeve.com/</div>
<div dir="auto"><br></div>
<div dir="auto">_______________________________________________</div>
<div dir="auto">Manage your subscription:</div>
<div dir="auto">https://lists.clusterlabs.org/mailman/listinfo/users</div>
<div dir="auto"><br></div>
<div dir="auto">ClusterLabs home: https://www.clusterlabs.org/</div>
</blockquote>
</div><div dir="auto"><br></div>
</div></body>
</html>