[Bug 588378] [NEW] recvfrom() fails with EINVAL on 2.6.32-22-generic

Victor Leschuk vleschuk at gmail.com
Tue Jun 1 16:52:51 UTC 2010


Public bug reported:

recvfrom() returns -1 on Ubuntu 10.04 with linux-
image-2.6.32-22-generic, native gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3

The same code(attached) works fine on Ubuntu 10.04 with  2.6.32-22-386
and Ubuntu 9.04 with 2.6.28-18-generic

Also found the following:

 * Binary compiled on Ubuntu 10.04 with linux-image-2.6.32-22-generic, native gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3 works fine on Fedora 12 (2.6.32.12-115.fc12.i686, gcc (GCC) 4.4.3 20100127 (Red Hat 4.4.3-4))
* Binary compiled on Ubuntu 10.04 with linux-image-2.6.32-22-generic, native gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3 fails with EINVAL on Arch linux (2.6.33-ARCH,gcc (GCC) 4.5.0 20100520 (prerelease)), BUT binary recompiled from source works fine.

Attachment is archive with client and server test binaries compiled on
Ubuntu 10.04 with linux-image-2.6.32-22-generic, native gcc (Ubuntu
4.4.3-4ubuntu5) 4.4.3, and the source code.

Steps to reproduce: 
 - place compiled binaries to one directory
 - change location to this directory
 - run ./fsserver command 
 - run ./fsclient command in another terminal

fsserver will print the following: recvfrom failed: Invalid argument

This corresponds to the following code:

  bytes = recvfrom(sock, (void * )&buf, BUF_SIZE-1, 0, &rcvr_name, &namelen);
  if (bytes < 0) 
  {
    perror("recvfrom failed");
    return EXIT_FAILURE;
  }

NOTE: to reproduce the error once again one will need to run the
following command in working directory: rm socket.soc. That's because
the program doesn't delete socket file on errors.

NOTE2: The issue was stably reproduced on 9 physical machines with
Ubuntu 10.04 and one virtualbox VM.

** Affects: linux (Ubuntu)
     Importance: Undecided
         Status: New

-- 
recvfrom() fails with EINVAL on 2.6.32-22-generic
https://bugs.launchpad.net/bugs/588378
You received this bug notification because you are a member of Kernel
Bugs, which is subscribed to linux in ubuntu.




More information about the kernel-bugs mailing list