bugGNU Wget - Bugs: bug #25418, TCP race message in Linux kernel?

 
 

bug #25418: TCP race message in Linux kernel?

Submitted by:  Micah Cowan <micahcowan>
Submitted on:  Tue 27 Jan 2009 05:29:41 AM UTC  
 
Category: Crash/Freeze/InfloopSeverity: 3 - Normal
Priority: 5 - NormalStatus: Invalid
Privacy: PublicAssigned to: None
Originator Name: Open/Closed: Closed
Release: NoneOperating System: None
Reproducibility: NoneFixed Release: None
Planned Release: 1.15Regression: None
Work Required: 1 - DaysPatch Included: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Fri 12 Jun 2009 06:18:38 PM UTC, comment #6:

The last messages I saw on the subject (unfortunately can't find them) suggested this may have been a kernel bug which has since been fixed. Closing until I hear otherwise.

Micah Cowan <micahcowan>
Sun 24 May 2009 09:56:13 PM UTC, comment #5:

Linux-2.6.30-rc7 changes condition when the warning is emitted:

Ilpo Järvinen (1):
tcp: fix MSG_PEEK race check

(http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=775273131810caa41dfc7f9e552ea5d8508caf40)

Maybe it will solve this problem.

FYI, I still get discussed message occasionally on 2.6.29-gentoo-r4 (almost 2.6.29.4).

Petr Pisar <petrp>
Wed 06 May 2009 01:48:26 AM UTC, comment #4:

this happens to me while running jigdo-light

from dmesg:

[ 5255.160842] TCP(wget:11285): Application bug, race in MSG_PEEK.
[ 5621.207702] TCP(wget:11746): Application bug, race in MSG_PEEK.
[ 5673.838217] TCP(wget:11746): Application bug, race in MSG_PEEK.
[ 5780.043410] TCP(wget:12055): Application bug, race in MSG_PEEK.
[ 5912.309538] TCP(wget:12055): Application bug, race in MSG_PEEK.

uname -a
Linux AVA-333782 2.6.28-11-generic #42-Ubuntu SMP Fri Apr 17 01:57:59 UTC 2009 i686 GNU/Linux

wget --version
GNU Wget 1.11.4

http://savannah.gnu.org/bugs/?25418#postcomment

Anonymous
Wed 28 Jan 2009 08:41:46 AM UTC, comment #3:

You are right. Doing strace on simple wget transfer I can see bunch of recv(,MSG_PEEK) followed by recv(,0) reading the same data twice. I think it's only matter of reading HTTP header and FTP control connection.

Basic fix is synchronizing threads around recv() not to read packet at the same time. However I can't see any thread switching in wget. So maybe it's a bogus warning.

Petr Pisar <petrp>
Wed 28 Jan 2009 06:40:36 AM UTC, comment #2:

Well that's... weird. We're not using OOB data.

We do use MSG_PEEK, but I wonder whether we couldn't just work around that or something...

Micah Cowan <micahcowan>
Tue 27 Jan 2009 09:25:54 AM UTC, comment #1:

This message comes from net/ipv4/tcp.c:

if ((flags & MSG_PEEK) && peek_seq != tp->copied_seq) {
if (net_ratelimit())
printk(KERN_DEBUG "TCP(%s:%d): Application bug, race in MSG_PEEK.\n",
current->comm, task_pid_nr(current));
peek_seq = tp->copied_seq;
}

Digging through Linux GIT log (http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git&a=search&h=HEAD&st=commit&s=MSG_PEEK) did not help.

I guess the linux code tests race between recv()ing OOB packet and recv()ing standard packet.

There is explanation at <http://lkml.indiana.edu/hypermail/linux/kernel/0309.2/1347.html>.

Petr Pisar <petrp>
Tue 27 Jan 2009 05:29:41 AM UTC, original submission:

Reported at http://article.gmane.org/gmane.comp.web.wget.general/8547

I have a sinking feeling this could be a pain to reproduce :\

Micah Cowan <micahcowan>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by forest_atq
  • -unavailable- added by dfraga (I'm trying to reproduce it here.)
  • -unavailable- added by petrp (Posted a comment)
  • -unavailable- added by micahcowan (Submitted the item)
  •  

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 23 Dec 2009 03:48:30 PM UTCforest_atqCarbon-Copy-=>Added -unavailable-
    Fri 12 Jun 2009 06:18:38 PM UTCmicahcowanStatusNeeds Investigation=>Invalid
      Open/ClosedOpen=>Closed
    Mon 09 Feb 2009 09:30:21 PM UTCdfragaCarbon-Copy-=>Added dfraga

    Back to the top


    Powered by Savane 3.1-cleanup1