Race condition in run.c?

10 views
Skip to first unread message

Bruno Dutertre

unread,
Aug 25, 2009, 3:11:34 PM8/25/09
to SMT Tools
Thanks to Robert for setting up this group and distributing the
debugging tools. They find a lot of bugs!.

Here is a problem I've had on some tests: the 'run' sometimes
fails with the following error:

run: run.c:422: read_proc: Assertion `atoi (token) == pid' failed.

By looking at the run.c source, this could be a race condition in
function read_proc. The code opens file /proc/<process-id>/stat
to get data about a process but the process could die between
the call to fopen and the call to getc (or between successive calls
to getc?).

This happened when I tried votesmtmp QF_LRA -t 120 -s 1400 -i -u -a

I'm using Ubuntu 8.04 (kernel 2.6.24) on an x86_64 machine.


Another small issue: votesmtmp does not correcly parse the
command-line flag "-a" (this can be fixed by changing line 114)

< while getopts "t:s:o:m:uipc" o
---
> while getopts "t:s:o:m:uiac" o


Bruno

Robert Brummayer

unread,
Aug 26, 2009, 1:51:31 AM8/26/09
to SMT Tools
Thanks for your bug report Bruno. The race condition problem has
already been fixed and a new version of the run tool should be
available soon. Moreover, the minor option parsing bug in votesmtsp
will be fixed in the next release.

Robert

Robert Brummayer

unread,
Sep 2, 2009, 9:24:05 AM9/2/09
to SMT Tools
A new version of the run tool is now available. The race condition
problem should have been fixed.

Best,
Robert

On 26 Aug., 07:51, Robert Brummayer <robert.brumma...@gmail.com>
wrote:
Reply all
Reply to author
Forward
0 new messages