Closed Bug 198158 Opened 21 years ago Closed 21 years ago

Backport Large file and Sendfile fixes to NSPR 4.1 branch

Categories

(NSPR :: NSPR, defect)

Sun
SunOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: kirk.erickson, Assigned: kirk.erickson)

Details

Attachments

(1 file, 3 obsolete files)

There are a collection of bugs Michael Hein has tasked me with
backporting to NSPRPUB_RELEASE_4_1_BRANCH.  These are from a
list of bugs identified by the SunOne webserver team.

84361 large file support
http://bugzilla.mozilla.org/show_bug.cgi?id=84361

132812 Need to handle the EINTR error from the sendfilev() system call
http://bugzilla.mozilla.org/show_bug.cgi?id=132812

132208 Implement PR_SendFile() with sendfile() and TCP_CORK
http://bugzilla.mozilla.org/show_bug.cgi?id=132208

132940 The various SendFile functions in ptio.c should use pt_MapError
http://bugzilla.mozilla.org/show_bug.cgi?id=132940
Summary: Backport Large file and Sendfile fixes to NSPR 4.1.5 → Backport Large file and Sendfile fixes to NSPR 4.1 branch
Backports fix for 84361 (large file support).
http://bugzilla.mozilla.org/attachment.cgi?id=40213&action=view

The hunk for configure.in failed:
Hunktching file mozilla/nsprpub/configure.in using Plan A...
Hunk #1 failed at 1036.
but this version of NSPR doesn't yet use autoconf.
The patch adds a single line:
+    AC_DEFINE(_LARGEFILE64_SOURCE)
I added the line manually fine there, but realize we need to update
the coreconf linux build for the intended effect, since at
we're not using autoconf.

Saw AIX, HPUX, and UNIXWARE setting OS_CFLAGS; we need OS_CFLAGS
to include: -D_LARGEFILE64_SOURCE=1 

OS_CFLAGS   = $(DSO_CFLAGS) $(PLATFORM_FLAGS) $(PORT_FLAGS)

Added to PORT_FLAGS in mozilla/nsprpub/config/Linux.mk:
PORT_FLAGS  = -D_POSIX_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE
  -DHAVE_STRERROR -DHAVE_FCNTL_FILE_LOCKING -D_LARGEFILE64_SOURCE=1
  
After applying the patch to SunOS in a noimport build of
NSS_3_3_BRANCH/NSPRPUB_RELEASE_4_1_BRANCH the NSS QA suite (all.sh)
passed.  I was able to do a classic build with the fix under Linux
too.
Added Pallab to the cc-list.
Pallab, could you verify that this patch does indeed add large file support
as expected?
Status: NEW → ASSIGNED
Proposed patch for NSPRPUB_RELEASE_4_1_BRANCH.	Backports fixes for:

132208 Implement PR_SendFile() with sendfile() and TCP_CORK
http://bugzilla.mozilla.org/show_bug.cgi?id=132208
    http://bugzilla.mozilla.org/attachment.cgi?id=76402&action=view
    mozilla/nsprpub/pr/src/pthreads/ptio.c.rej
    (Hunk #3 failed at 1064.)
    Needed to manually insert new func: pt_linux_sendfile_cont()
    Needed to add extern for _MD_aix_map_sendfile_error to:
	./mozilla/nsprpub/pr/src/md/unix/unix_errors.c
    and ./mozilla/nsprpub/pr/include/md/_linux.h
132812 Need to handle the EINTR error from the sendfilev() system call
http://bugzilla.mozilla.org/show_bug.cgi?id=132812
    http://bugzilla.mozilla.org/attachment.cgi?id=75588&action=view
132940 The various SendFile functions in ptio.c should use pt_MapError
http://bugzilla.mozilla.org/show_bug.cgi?id=132940
    http://bugzilla.mozilla.org/attachment.cgi?id=76404&action=view
    http://bugzilla.mozilla.org/attachment.cgi?id=76850&action=view

I did noimport builds of NSS_3_3_BRANCH with
NSPRPUB_RELEASE_4_1_BRANCH after applying this patch and stressed
selfserv under Linux and SunOS.
Proposed patch for NSPRPUB_RELEASE_4_1_BRANCH.	Backports fixes for:

132208 Implement PR_SendFile() with sendfile() and TCP_CORK
http://bugzilla.mozilla.org/show_bug.cgi?id=132208
    http://bugzilla.mozilla.org/attachment.cgi?id=76402&action=view
    mozilla/nsprpub/pr/src/pthreads/ptio.c.rej
    (Hunk #3 failed at 1064.)
    Needed to manually insert new func: pt_linux_sendfile_cont()
    Needed to add extern for _MD_aix_map_sendfile_error to:
	./mozilla/nsprpub/pr/src/md/unix/unix_errors.c
    and ./mozilla/nsprpub/pr/include/md/_linux.h
132812 Need to handle the EINTR error from the sendfilev() system call
http://bugzilla.mozilla.org/show_bug.cgi?id=132812
    http://bugzilla.mozilla.org/attachment.cgi?id=75588&action=view
132940 The various SendFile functions in ptio.c should use pt_MapError
http://bugzilla.mozilla.org/show_bug.cgi?id=132940
    http://bugzilla.mozilla.org/attachment.cgi?id=76404&action=view
    http://bugzilla.mozilla.org/attachment.cgi?id=76850&action=view

I did noimport builds of NSS_3_3_BRANCH with
NSPRPUB_RELEASE_4_1_BRANCH after applying this patch and stressed
selfserv under Linux and SunOS.
Attachment #118311 - Attachment is obsolete: true
Comment on attachment 118152 [details] [diff] [review]
Proposed patch for NSPRPUB_RELEASE_4_1_BRANCH (84361 large file support)

Omit the change to mozilla/nsprpub/configure.in because
we are not using autoconf on the NSPR 4.1 branch.
Everything else is good.  r=wtc.
Attachment #118152 - Flags: review+
Comment on attachment 118312 [details] [diff] [review]
Proposed patch for NSPRPUB_RELEASE_4_1_BRANCH (sendfile fixes)

Add the HPUX patch in bug 132208, and you are done.
r=wtc.
Attachment #118312 - Flags: review+
Checked this combined patch into NSPRPUB_RELEASE_4_1_BRANCH.
It backports changes that addressed the following bugs:

84361 large file support
http://bugzilla.mozilla.org/show_bug.cgi?id=84361

132812 Need to handle the EINTR error from the sendfilev() system call
http://bugzilla.mozilla.org/show_bug.cgi?id=132812

13220 Implement PR_SendFile() with sendfile() and TCP_CORK
http://bugzilla.mozilla.org/show_bug.cgi?id=132208

132940 The various SendFile functions in ptio.c should use pt_MapError
http://bugzilla.mozilla.org/show_bug.cgi?id=132940

and the issues Wan-Teh raised:

1. Omitted mozilla/nsprpub/configure.in because
    we are not using autoconf on the NSPR 4.1 branch.

2. Added HPUX patch from 132208.
    Unrelated patch for pt_HPUXSendFile. Call fstat only when necessary.
    http://bugzilla.mozilla.org/attachment.cgi?id=75228&action=view

Built Solaris packages, and ran selfserv stress with noimport build of
NSS_3_3_BRANCH.
Attachment #118152 - Attachment is obsolete: true
Attachment #118312 - Attachment is obsolete: true
Closing.  The original collection of fixes have been
backported and checked in.  There have been no reports
of regressions in testing.
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: