Bug 56635 - [PATCH] fatal error causes pppd to not log link stats
[PATCH] fatal error causes pppd to not log link stats
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: ppp (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Nalin Dahyabhai
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-11-22 16:32 EST by Michael Schwendt
Modified: 2007-11-30 17:10 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-05-18 17:32:54 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
untested patch #8 to be used in ppp.spec (2.05 KB, patch)
2001-11-22 16:34 EST, Michael Schwendt
no flags Details | Diff
revised patch (1.94 KB, patch)
2001-11-23 11:25 EST, Michael Schwendt
no flags Details | Diff
revised patch - no duplicate logging :) (1.86 KB, patch)
2001-12-02 17:21 EST, Michael Schwendt
no flags Details | Diff

  None (edit)
Description Michael Schwendt 2001-11-22 16:32:58 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.6) Gecko/20011120

Description of problem:
Summary says it already. In the pppd code, a fatal() error calls the die()
function directly which bypasses useful termination-related code in main()
such as the link stats printing code.


Version-Release number of selected component (if applicable):
2.4.1-2

How reproducible:
Always

Steps to Reproduce:
1. run a PPP connection until something causes pppd to exit with a "fatal"
error
2. See logs and observe the missing link stats in comparison with other
connections that exited less abnormally.

Actual Results:  gateway pppd[.]: LCP terminated by peer
gateway pppoe[.]: Session terminated -- received PADT from peer
gateway pppd[.]: ioctl(PPPIOCSASYNCMAP): Inappropriate ioctl for device(25)
gateway pppd[.]: tcflush failed: Input/output error
gateway pppd[.]: Exit.


Expected Results:  gateway pppd[.]: LCP terminated by peer
gateway pppoe[.]: Session terminated -- received PADT from peer
gateway pppd[.]: ioctl(PPPIOCSASYNCMAP): Inappropriate ioctl for device(25)
gateway pppd[.]: tcflush failed: Input/output error
gateway pppd[.]: Connect time xy.z minutes.
gateway pppd[.]: Sent X bytes, received Y bytes.
gateway pppd[.]: Exit.


Additional info:

This bug causes pppd to not log important information such as required by
traffic summary Perl/PHP scripts.
Comment 1 Michael Schwendt 2001-11-22 16:34:14 EST
Created attachment 38363 [details]
untested patch #8 to be used in ppp.spec
Comment 2 Michael Schwendt 2001-11-23 11:25:39 EST
Created attachment 38443 [details]
revised patch
Comment 3 Michael Schwendt 2001-11-23 11:29:11 EST
Here's a revised patch and confirmation that it works as expected. I've had to
move initialization of a guard to the very beginning of main() to not introduce
any side-effects.
Comment 4 Michael Schwendt 2001-12-02 17:21:57 EST
Created attachment 39347 [details]
revised patch - no duplicate logging :)
Comment 5 Michael Schwendt 2002-05-07 12:53:44 EDT
*sigh*  Errata package 2.4.1-3 is without this patch. Had to downgrade to my own
ppp package to avoid losing link statistics on a gateway again.

Please apply my patch from 2001-12-02 05:21:57. I had shipped it upstream to the
pppd maintainer and it has been included there.
Comment 6 Michael Schwendt 2002-11-28 08:13:56 EST
Bug unfixed in Red Hat Linux 7.2, 7.3 and 8.0.
Comment 8 Michael Schwendt 2004-02-10 01:04:53 EST
triage->easyfix : see attachment (id=39347)
Comment 9 Nerijus Baliūnas 2004-02-10 07:43:31 EST
Could you please check if it is fixed in ppp 2.4.2, which was recently
released?
Comment 10 Michael Schwendt 2004-02-10 14:56:06 EST
Yes. Reading the diff between ppp 2.4.1 and ppp 2.4.2, the fix is
still included, and it doesn't look as if later CVS comits had messed
it up in any way.
Comment 11 Michael Schwendt 2004-05-18 17:32:54 EDT
Fixed with ppp-2.4.2-2.

Note You need to log in before you can comment on or make changes to this bug.