public inbox for ecos-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug 1001629] New: bsd stack uses wrong timeout values if hz != 100
@ 2012-07-25  7:54 bugzilla-daemon
  2012-07-25  8:08 ` [Bug 1001629] " bugzilla-daemon
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: bugzilla-daemon @ 2012-07-25  7:54 UTC (permalink / raw)
  To: unassigned

Please do not reply to this email. Use the web interface provided at:
http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001629

           Summary: bsd stack uses wrong timeout values if hz != 100
           Product: eCos
           Version: CVS
          Platform: All
        OS/Version: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: normal
         Component: TCP/IP
        AssignedTo: unassigned@bugs.ecos.sourceware.org
        ReportedBy: bernd.edlinger@hotmail.de
                CC: ecos-bugs@ecos.sourceware.org
             Class: Advice Request


Created an attachment (id=1842)
 --> (http://bugs.ecos.sourceware.org/attachment.cgi?id=1842)
proposed patch to solve this defect

if the eCos kernel is configured to 1000 IRQ/s all timeouts in the bsd_tcpip
stack expire in 1/10th of the expected time.

For instance all timeouts given with setsockopt(SOL_SOCKET, SO_RCVTIMEO),
which has a potential to break existing TCP/IP applications.

The reason is the wrong assumption that hz is always 100 in the file
"ecos/packages/net/bsd_tcpip/current/src/ecos/support.c".

Attached is a proposed patch to fix this issue
and a similar problem in show_ticks_in_us(),
where it is taken for granted, that the NOMINATOR in
CYGNUM_KERNEL_COUNTERS_RTC_RESOLUTION is always 1000000000 (1E9)
which is also not true in general.

-- 
Configure bugmail: http://bugs.ecos.sourceware.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug 1001629] bsd stack uses wrong timeout values if hz != 100
  2012-07-25  7:54 [Bug 1001629] New: bsd stack uses wrong timeout values if hz != 100 bugzilla-daemon
@ 2012-07-25  8:08 ` bugzilla-daemon
  2014-01-19 18:58 ` bugzilla-daemon
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 10+ messages in thread
From: bugzilla-daemon @ 2012-07-25  8:08 UTC (permalink / raw)
  To: unassigned

Please do not reply to this email. Use the web interface provided at:
http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001629

Bernd Edlinger <bernd.edlinger@hotmail.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
               Flag|                            |Patch_or_Contribution+

-- 
Configure bugmail: http://bugs.ecos.sourceware.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug 1001629] bsd stack uses wrong timeout values if hz != 100
  2012-07-25  7:54 [Bug 1001629] New: bsd stack uses wrong timeout values if hz != 100 bugzilla-daemon
  2012-07-25  8:08 ` [Bug 1001629] " bugzilla-daemon
@ 2014-01-19 18:58 ` bugzilla-daemon
  2014-01-20 15:57 ` bugzilla-daemon
  2014-01-21 15:59 ` bugzilla-daemon
  3 siblings, 0 replies; 10+ messages in thread
From: bugzilla-daemon @ 2014-01-19 18:58 UTC (permalink / raw)
  To: unassigned

Please do not reply to this email, use the link below.

http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001629

Grant Edwards <grant.b.edwards@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |grant.b.edwards@gmail.com

--- Comment #1 from Grant Edwards <grant.b.edwards@gmail.com> ---
I just ran into this exact same problem (though I noticed it when IPv6
addresses were timing out at 10% of the DHCP lease time).

The fix I'm currently using is almost identical to the proposed patch, except I
neglected to fix the show_ticks_in_us() function.

Is there some reason this fix hasn't been comitted?

What would it take to get it committed?

-- 
You are receiving this mail because:
You are the assignee for the bug.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug 1001629] bsd stack uses wrong timeout values if hz != 100
  2012-07-25  7:54 [Bug 1001629] New: bsd stack uses wrong timeout values if hz != 100 bugzilla-daemon
  2012-07-25  8:08 ` [Bug 1001629] " bugzilla-daemon
  2014-01-19 18:58 ` bugzilla-daemon
@ 2014-01-20 15:57 ` bugzilla-daemon
  2014-01-21 15:59 ` bugzilla-daemon
  3 siblings, 0 replies; 10+ messages in thread
From: bugzilla-daemon @ 2014-01-20 15:57 UTC (permalink / raw)
  To: unassigned

Please do not reply to this email, use the link below.

http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001629

Grant Edwards <grant.b.edwards@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Attachment #1842|0                           |1
        is obsolete|                            |

--- Comment #2 from Grant Edwards <grant.b.edwards@gmail.com> ---
Created attachment 2395
  --> http://bugs.ecos.sourceware.org/attachment.cgi?id=2395&action=edit
Add changelog entry to previous patch.

Same as previous patch, but with a Changelog entry added.

-- 
You are receiving this mail because:
You are the assignee for the bug.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug 1001629] bsd stack uses wrong timeout values if hz != 100
  2012-07-25  7:54 [Bug 1001629] New: bsd stack uses wrong timeout values if hz != 100 bugzilla-daemon
                   ` (2 preceding siblings ...)
  2014-01-20 15:57 ` bugzilla-daemon
@ 2014-01-21 15:59 ` bugzilla-daemon
  3 siblings, 0 replies; 10+ messages in thread
From: bugzilla-daemon @ 2014-01-21 15:59 UTC (permalink / raw)
  To: unassigned

Please do not reply to this email, use the link below.

http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001629

Grant Edwards <grant.b.edwards@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
           Assignee|unassigned@bugs.ecos.source |grant.b.edwards@gmail.com
                   |ware.org                    |
     Ever confirmed|0                           |1

-- 
You are receiving this mail because:
You are the assignee for the bug.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug 1001629] bsd stack uses wrong timeout values if hz != 100
  2012-07-25  7:54 [Bug 1001629] New: " bugzilla-daemon
                   ` (3 preceding siblings ...)
  2014-01-21 15:59 ` bugzilla-daemon
@ 2014-01-21 17:03 ` bugzilla-daemon
  4 siblings, 0 replies; 10+ messages in thread
From: bugzilla-daemon @ 2014-01-21 17:03 UTC (permalink / raw)
  To: ecos-bugs

Please do not reply to this email, use the link below.

http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001629

--- Comment #3 from Grant Edwards <grant.b.edwards@gmail.com> ---

I'd like to commit this patch.

I independently discovered this problem when the IPv6 stack was
prematurely timing out interface address assignments that had
non-infinite lifetimes.  I traced the problem to the exact same spot
and arrived at a nearly identical solution before I found this
bug/patch in Bugzilla.

I've tested the patch with both 10ms and 1ms system ticks, and I'm
satisfied that it's good (it's going into my production code).

Comments?

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug 1001629] bsd stack uses wrong timeout values if hz != 100
  2012-07-25  7:54 [Bug 1001629] New: " bugzilla-daemon
                   ` (2 preceding siblings ...)
  2014-01-20 15:57 ` bugzilla-daemon
@ 2014-01-21 15:59 ` bugzilla-daemon
  2014-01-21 17:03 ` bugzilla-daemon
  4 siblings, 0 replies; 10+ messages in thread
From: bugzilla-daemon @ 2014-01-21 15:59 UTC (permalink / raw)
  To: ecos-bugs

Please do not reply to this email, use the link below.

http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001629

Grant Edwards <grant.b.edwards@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
           Assignee|unassigned@bugs.ecos.source |grant.b.edwards@gmail.com
                   |ware.org                    |
     Ever confirmed|0                           |1

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug 1001629] bsd stack uses wrong timeout values if hz != 100
  2012-07-25  7:54 [Bug 1001629] New: " bugzilla-daemon
  2012-07-25  8:08 ` [Bug 1001629] " bugzilla-daemon
  2014-01-19 18:58 ` bugzilla-daemon
@ 2014-01-20 15:57 ` bugzilla-daemon
  2014-01-21 15:59 ` bugzilla-daemon
  2014-01-21 17:03 ` bugzilla-daemon
  4 siblings, 0 replies; 10+ messages in thread
From: bugzilla-daemon @ 2014-01-20 15:57 UTC (permalink / raw)
  To: ecos-bugs

Please do not reply to this email, use the link below.

http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001629

Grant Edwards <grant.b.edwards@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Attachment #1842|0                           |1
        is obsolete|                            |

--- Comment #2 from Grant Edwards <grant.b.edwards@gmail.com> ---
Created attachment 2395
  --> http://bugs.ecos.sourceware.org/attachment.cgi?id=2395&action=edit
Add changelog entry to previous patch.

Same as previous patch, but with a Changelog entry added.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug 1001629] bsd stack uses wrong timeout values if hz != 100
  2012-07-25  7:54 [Bug 1001629] New: " bugzilla-daemon
  2012-07-25  8:08 ` [Bug 1001629] " bugzilla-daemon
@ 2014-01-19 18:58 ` bugzilla-daemon
  2014-01-20 15:57 ` bugzilla-daemon
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 10+ messages in thread
From: bugzilla-daemon @ 2014-01-19 18:58 UTC (permalink / raw)
  To: ecos-bugs

Please do not reply to this email, use the link below.

http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001629

Grant Edwards <grant.b.edwards@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |grant.b.edwards@gmail.com

--- Comment #1 from Grant Edwards <grant.b.edwards@gmail.com> ---
I just ran into this exact same problem (though I noticed it when IPv6
addresses were timing out at 10% of the DHCP lease time).

The fix I'm currently using is almost identical to the proposed patch, except I
neglected to fix the show_ticks_in_us() function.

Is there some reason this fix hasn't been comitted?

What would it take to get it committed?

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug 1001629] bsd stack uses wrong timeout values if hz != 100
  2012-07-25  7:54 [Bug 1001629] New: " bugzilla-daemon
@ 2012-07-25  8:08 ` bugzilla-daemon
  2014-01-19 18:58 ` bugzilla-daemon
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 10+ messages in thread
From: bugzilla-daemon @ 2012-07-25  8:08 UTC (permalink / raw)
  To: ecos-bugs

Please do not reply to this email. Use the web interface provided at:
http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001629

Bernd Edlinger <bernd.edlinger@hotmail.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
               Flag|                            |Patch_or_Contribution+

-- 
Configure bugmail: http://bugs.ecos.sourceware.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2014-01-21 17:03 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-25  7:54 [Bug 1001629] New: bsd stack uses wrong timeout values if hz != 100 bugzilla-daemon
2012-07-25  8:08 ` [Bug 1001629] " bugzilla-daemon
2014-01-19 18:58 ` bugzilla-daemon
2014-01-20 15:57 ` bugzilla-daemon
2014-01-21 15:59 ` bugzilla-daemon
2012-07-25  7:54 [Bug 1001629] New: " bugzilla-daemon
2012-07-25  8:08 ` [Bug 1001629] " bugzilla-daemon
2014-01-19 18:58 ` bugzilla-daemon
2014-01-20 15:57 ` bugzilla-daemon
2014-01-21 15:59 ` bugzilla-daemon
2014-01-21 17:03 ` bugzilla-daemon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).