Red Hat Bugzilla – Bug 143871
system() fails randomly in a threaded environment
Last modified: 2013-03-01 00:14:50 EST
my rpm test app uses threads to spawn off a lot of it's work.
In such threads I use popen() frequently, and system() occasionally.
On the RHEL3 8way machine, about 30 threads are used.
Symptom: system() returns -1 fairly frequently
Does not seem to reproduce on my fc3 dual machine at home
Created attachment 109187 [details]
testcase main program
in addition you need
(which comes from FC3)
the testcase.tar.bz needs to be untarred in /tmp fwiw
This turned out to be a bug (well, lots of bugs) in libmagic.so's compress.c.
Fixed in file-4.12-2.
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.