lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Benoit Germain wrote:
[...]
Just inspecting the code leaves me stumped. This assertion means that
the lane structure 's' thinks itself inside the self-destruct chain,
but when looking for it we don't find it. The strange thing is, all
insertions and removals happen under lock, so there must be something
I do wrong, but I don't know what yet...

I don't know the code so I have no idea whether this is at all relevant, but I ran into a problem like this a few years ago, and it turned out to be a problem with fork() and pthreads; the behaviour of a semaphore or mutex is undefined if it goes through a fork, and the particular Linux variant I was using was silently unlocking all mutexes in the child process.

That took me about nine months to diagnose.

--
┌─── dg@cowlark.com ───── http://www.cowlark.com ─────
│ "I have always wished for my computer to be as easy to use as my
│ telephone; my wish has come true because I can no longer figure out
│ how to use my telephone." --- Bjarne Stroustrup