Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Jul 2011 19:03:18 GMT
From:      Stephen Sanders <ssanders@opnet.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/159214: pcap fd select() vs zero copy issue
Message-ID:  <201107261903.p6QJ3IHN053396@red.freebsd.org>
Resent-Message-ID: <201107261910.p6QJA6nR055381@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         159214
>Category:       ports
>Synopsis:       pcap fd select() vs zero copy issue
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jul 26 19:10:06 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Stephen Sanders
>Release:        8.1-RELEASE
>Organization:
OPNET
>Environment:
FreeBSD acelive86-1.opnet.com 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Thu May 19 12:18:04 PDT 2011     jtoung@focus8.networkphysics.com:/u1/builds/8.6/ALKernel.jt/src/sys/amd64/compile/NPBAB8  amd64
>Description:
We have a packet capture application that is looking for TCP RST via doing a select() on pcap_fileno() and then calling pcap_next().

This has been fine for FreeBSD 6.3 but not FreeBSD 8.x.

The select indicates data ready but the call to pcap_next() does not return immediately but waits.

The application starts at boot time and will wedge in pcap_next() until restarted.  After a restart, the application works fine.

Recompiling libpcap such that zero copy is turned off and re-linking, the capture application works as anticipated. 

It appears that there is some issue with co-ordination of select() and zero copy.

>How-To-Repeat:

>Fix:
Recompile libpcap with zero copy turned off.

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201107261903.p6QJ3IHN053396>