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

 
 

bug #25418: TCP race message in Linux kernel?

Submitter:  Micah Cowan <micahcowan>
Submitted:  Tue 27 Jan 2009 05:29:41 AM UTC
   
 
Category:  Crash/Freeze/Infloop Severity:  3 - Normal
Priority:  5 - Normal Status:  Invalid
Privacy:  Public Assigned to:  None
Originator Name:  Open/Closed:  Closed
Release:  None Operating System:  None
Reproducibility:  None Fixed Release:  None
Planned Release:  1.15 Regression:  None
Work Required:  1 - Days Patch Included:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

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


# wget --version
GNU Wget 1.11.4

# uname -r
2.6.28.1

[493192.461454] TCP(wget:28098): Application bug, race in MSG_PEEK.

During wget of the 2.6.28.2 kernel @ ftp.kernel.org.


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 Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2009-12-23 forest_atq Carbon-Copy- Added -email is unavailable-
    2009-06-12 micahcowan StatusNeeds Investigation Invalid
        Open/ClosedOpen Closed
    2009-02-09 dfraga Carbon-Copy- Added dfraga

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code