[sos-devel] [RFC] wrap commands in /usr/bin/timeout when available

Adam Stokes adam.stokes at canonical.com
Tue Mar 20 17:44:25 UTC 2012


On 03/19/2012 01:17 PM, Bryn M. Reeves wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi Folks,
>
> So I thought out a proposal for a "timeout" command to use to address
> our long-standing problem with commands that hang on us during data
> collection.
>
> Turns out (thanks Eric Blake! ;) that coreutils already introduced
> this in 7.0 so it's available in all modern distros and should be an
> easy backport to older stuff.
>
> I think this probably hits 80% of the problems we see with "sosreport
> hangs" reports. The rest is harder but this moves us in the right
> direction (at the expense of some extra fork/exec overhead).
>
> Regards,
> Bryn.
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.12 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAk9najcACgkQ6YSQoMYUY97qvQCgiKV2y8rcVAiVYuSUqHxqwXXg
> aLMAn3Pw282YNf3ffGgvS3/J4T4X0FlJ
> =XbB/
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> Sos-devel mailing list
> Sos-devel at redhat.com
> https://www.redhat.com/mailman/listinfo/sos-devel
>
If timeout is set with this application does it give control back to 
sosreport if sending a TERM fails to stop the process? If not, we would 
need to investigate some asynchronous way to handle those cases in which 
case my proposed solution may resolve that.

Thoughts?

Thanks
Adam




More information about the sos-devel mailing list