[Simgrid-user] segfault in MSG_clean()

Martin Quinson martin.quinson at loria.fr
Mon Jan 9 16:56:05 CET 2012


On Mon, Jan 09, 2012 at 01:08:29PM +0100, Matthieu Imbert wrote:
> On 12/23/2011 03:46 PM, Martin Quinson wrote:
> >Adding an extra call on the critical path to avoid a rare situation
> >does not seem wise to me. I'd prefer to make sure that this situation
> >does not occures. Where is the exception raised, and in which condition?
> >
> >I'd be interested in an example code that reproduces the problem, even
> >if it's not a reduced one. All what I need is a way to produce the bug
> >with 100% chance.
> >
> >With that, I'd try to avoid falling in the faulty situation instead of
> >trying to fixing when it occures.
> >
> >Thanks for your feedback anyway,
> >Mt.
> 
> Attached is test which reproduces the segfault, with a README
> showing how to reproduce.

Thanks, that was very helpful.

Actually, the problem is that you were surviving an error in the
parsed file with a TRY/CATCH in your code. Actually, this error is not
something that should be survived. If there is a parse error, we will
fail verbosely. I just commited something to ensure that if the file
is syntaxically correct but semantically incorrect, we fail equally
verbosly.

If we really wanted to survive this kind of error, the solution is not
what you proposed initially. We'd have to ensure that even in case of
invalid files, we don't produce an invalid status. So, we'd have to
add some TRY/CATCH all around the parsing process, canceling the
creations of each level in case of error and rethrowing the exception
to inform higher levels.

That would be a tremendous amount of work, just to survive invalid
user files. If you want to do it, be my guest, but I'd say that this
is a waste of time.


Sorry if I took a decision that goes against your feeling (feel free
to argument if so), and many thanks for your detailed bug report. It
was really helpful to me.

Bye, Mt.

-- 
Let's call it an accidental feature.  -- Larry Wall



More information about the Simgrid-user mailing list