All of lore.kernel.org
 help / color / mirror / Atom feed
* Kernel Oops in __inet_twsk_kill()
@ 2014-11-04 23:47 Charley (Hao Chuan) Chu
  2014-11-05 16:00 ` Fwd: " Daniel Borkmann
  0 siblings, 1 reply; 8+ messages in thread
From: Charley (Hao Chuan) Chu @ 2014-11-04 23:47 UTC (permalink / raw)
  To: linux-kernel@vger.kernel.org

We have situation on our system. It brings the network interface up and down every a few seconds. Eventually, it brings down the system - the kernel crashed due to BUG on in __inet_twsk_kill(). The debug message show following call flow. 


1) time-wait socket is created by tcp_time_wait() when the socket gets into "TIME_WAIT" state. 
    inet_twsk_alloc()               - refcnt= 0
    inet_twsk_hashdance()  - refcnt = 3
    inet_twsk_schedule()      - refcnt = 4
    inet_twsk_put()                 - refcnt = 3
2) tcp_v4_timewait_ack() is called when sync is received 
    inet_twsk_put()                  - refcnt= 2      <== where we thing the problem is
    occasionally, second sync is received, so the inet_twsk_put is called twice - refcnt = 1 
3) twdr_do_twkill_work() is called when timed out
    call __inet_twsk_kill - BUG_ON!!! as refcnt=2 (supposed to be 3).
    call inet_twsk_put()

In a normal case, the callflow only has step 1 and step 3.  Our understanding is the time-wait socket has three references - ehash, bhash and timer death row. In step 2, none of them are touched. Can anyone here explain to us why the inet_twsk_put() is called in tcp_v4_timewait_ack()?

our system has 3.14 kernel.

Any help would be highly appreciated.

Charley Chu


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-08-03  2:25 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-04 23:47 Kernel Oops in __inet_twsk_kill() Charley (Hao Chuan) Chu
2014-11-05 16:00 ` Fwd: " Daniel Borkmann
2014-11-05 18:00   ` Cong Wang
2014-11-05 19:16     ` Charley (Hao Chuan) Chu
2014-11-05 19:39       ` David Miller
2014-11-05 20:35         ` Charley (Hao Chuan) Chu
2015-07-10 16:36           ` Phani
2015-08-03  2:19             ` charley

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.