Re: A few questions and notes....

Linus Torvalds (torvalds@cs.helsinki.fi)
Wed, 15 May 1996 14:30:00 +0300 (EET DST)


On Wed, 15 May 1996, Dan Merillat wrote:
>
> Ok, I'm still running 1.3.99 (I know, obselete...:-) but I'm still
> getting double-lock on socket at 00149b33 (tcp_sendmsg)
>
> Grr. Well, a judicious #if 0 in the source nuked that one for now. It
> happens when I have a telnet session open that I havn't used in a while.
> (Virtual consoles do that... :-) As soon as I type, I get a few of
> those, then it stops.

The "double lock on socket" message is harmless - I'll take it out for
2.0. It happens when there is swapping activity and the same socket is
used concurrently by two programs - this was why I rewrote the socket
locking code in the first place. That's why you see it on telnet sessions
that have been idle - they've been swapped out.

The reason the message is there at all is that I wanted to make sure I
hadn't forgotten to unlock the socket anywhere. So the kernel prints it
out even when it's valid, just in case... I think we can sleep safely
knowing that the locking works correctly (it ahsn't been causing any
probles for a _long_ time).

So don't worry if you get this one - it's going away.

(Note: the "double lock on device queue" message that sounds similar _is_
a real bug, so if people see that one then tell the world)

Linus