patchConcurrent Versions System - Patches: patch #4678, Fix for segfaults/loops on AIX due...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #4678: Fix for segfaults/loops on AIX due to dead clients

Submitted by:  None
Submitted on:  Tue 06 Dec 2005 02:27:52 PM UTC  
 
Category: NonePriority: 5 - Normal
Status: DonePrivacy: Public
Assigned to: Mark D. Baushke <mdb>Originator Email: -unavailable-
Open/Closed: ClosedFixed Release: 1.11.22
Fixed Feature Release: 1.12.14

Wed 07 Dec 2005 09:18:21 AM UTC, comment #5:

My previous comment was not clear.

The buffer-fstat.patch attachment is for 1.11.x sources.
I have applied it to the STABLE branch and it will be
part of 1.11.22.

The buffer-error-1.12.x.patch attachment is for 1.12.x sources.
I have applied it to the FEATURE branch and it will be
part of 1.12.14.

Mark D. Baushke <mdb>
Project AdministratorIn charge of this item.
Wed 07 Dec 2005 04:51:32 AM UTC, comment #4:

The FEATURE patch looks good. We'll test using the 1.12.x code shortly, but I see no reason why this shouldn't work.

Allan L. Bazinet <bazineta>
Tue 06 Dec 2005 09:20:53 PM UTC, comment #3:

I have produced a different patch for your consideration.
The 1.12.x FEATURE branch has an fd_buffer_shutdown()
which is similar to the stdio_buffer_shutdown() function
and it does not assert on a bad fstat(). It will need
to be adjusted to use error (0, ...) instead of
error (1, ...), but otherwise is already close to these
changes.

Mark D. Baushke <mdb>
Project AdministratorIn charge of this item.
Tue 06 Dec 2005 06:28:54 PM UTC, comment #2:

Our CVS server is quite busy, and we have a widely distributed development team. The issue appears to be triggered by network problems between a client and the server, where from the perspective of the server, the client goes away unexpectedly. The longer the network path between the client and the server, the more frequently we see this issue -- our server is located in the US, and while we see this issue occur on US-based clients from time to time, we more frequently see it from clients in Eastern Europe or Japan.

The -1 return is on the server.

In my opinion, after fstat() returns -1, buf_flush should not be called, as the socket is essentially dead and unusable; further attemps to use it are inadvisable. I believe the same would be true on other Unix variants as well.

START_RSH_WITH_POPEN_RW is not being defined on AIX.

Allan L. Bazinet <bazineta>
Tue 06 Dec 2005 05:48:40 PM UTC, comment #1:

Could you please provide a description of how you manage to
get into the state where fstat() is returning -1 so often?

Are you seeing the -1 return on the client or the server?

if the fstat() returns -1, should buf_flush() be called,
or should we just set buf->flush = NULL I have a similar
concern for the SHUTDOWN_SERVER macro calling wnt_shutdown_server
under windows-NT...

Is START_RSH_WITH_POPEN_RW being defined under AIX?
If so, I am not sure that pclose() should be called when
fstat() returned -1.

Mark D. Baushke <mdb>
Project AdministratorIn charge of this item.
Tue 06 Dec 2005 02:27:52 PM UTC, original submission:

This patch corrects two problems observed in the 1.11.21 release of CVS on AIX systems. The routine affected is stdio_buffer_shutdown() in src/buffer.c. Two issues are corrected.

Firstly, the assertion if fstat() fails is removed -- on an AIX system, fstat() will return -1 if the client has gone away unexpectedly. This being an unfortunately common use case, an assertion for this state is undesirable.

Secondly, this routine contained calls to error() using 1 as the first parameter, which instructs the server to shut down. However, this routine is active because the server is shutting down, and thus the 1 parameter causes an infinite recursion. These calls have been changed to use 0 as the first parameter.

Anonymous

 

Attached Files
file #4165:  buffer-error-1.12.x.patch added by mdb (2KiB - text/x-patch - Patch for 1.12.x (FEATURE) to stop infinite loops)
file #4160:  buffer-fstat.patch added by mdb (3KiB - text/x-patch - Revised patch based on code in FEATURE buffer.c::fd_buffer_shutdown)
file #4189:  buffer.c.patch added by None (4KiB - application/octet-stream - Context diff for src/buffer.c)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

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

 

 

Follow 9 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Wed 07 Dec 2005 09:18:21 AM UTCmdbStatusNone=>Done
  Assigned toNone=>mdb
  Open/ClosedOpen=>Closed
  Fixed ReleaseNone=>1.11.22
  Fixed Feature ReleaseNone=>1.12.14
  Attached File-=>Added buffer-error-1.12.x.patch, #5561
Tue 06 Dec 2005 09:20:53 PM UTCmdbAttached File-=>Added buffer-fstat.patch, #5556
Tue 06 Dec 2005 02:27:53 PM UTCNoneAttached File-=>Added buffer.c.patch, #5554
  Carbon-Copy-=>Added allan --DOT-- bazinet --AT-- gmail --DOT-- com

Back to the top


Powered by Savane 3.1-cleanup1