public inbox for ecos-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug 1001586] New: BSD nc_test_slave chrashes
@ 2012-05-13 22:31 bugzilla-daemon
  2012-05-13 22:58 ` [Bug 1001586] " bugzilla-daemon
                   ` (6 more replies)
  0 siblings, 7 replies; 15+ messages in thread
From: bugzilla-daemon @ 2012-05-13 22:31 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=1001586

           Summary: BSD nc_test_slave chrashes
           Product: eCos
           Version: CVS
          Platform: All
        OS/Version: Other
            Status: NEW
          Severity: enhancement
          Priority: low
         Component: TCP/IP
        AssignedTo: unassigned@bugs.ecos.sourceware.org
        ReportedBy: ilijak@siva.com.mk
                CC: ecos-bugs@ecos.sourceware.org
             Class: Advice Request


Created an attachment (id=1755)
 --> (http://bugs.ecos.sourceware.org/attachment.cgi?id=1755)
nc_test_slave patch

nc_test_slave of BSD stack crashes. The reason is small buffer 8KiB while
messages are up to 10KiB long. Provided patch fixes this problem by enlargenf
the buffers to 12KiB.

-- 
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] 15+ messages in thread

* [Bug 1001586] BSD nc_test_slave chrashes
  2012-05-13 22:31 [Bug 1001586] New: BSD nc_test_slave chrashes bugzilla-daemon
@ 2012-05-13 22:58 ` bugzilla-daemon
  2012-05-15  9:50 ` bugzilla-daemon
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 15+ messages in thread
From: bugzilla-daemon @ 2012-05-13 22:58 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=1001586

Jonathan Larmour <jifl@ecoscentric.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jifl@ecoscentric.com

--- Comment #1 from Jonathan Larmour <jifl@ecoscentric.com> 2012-05-13 23:58:36 BST ---
That doesn't sound right. Surely we should be fixing something so that it
doesn't crash!

-- 
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] 15+ messages in thread

* [Bug 1001586] BSD nc_test_slave chrashes
  2012-05-13 22:31 [Bug 1001586] New: BSD nc_test_slave chrashes bugzilla-daemon
  2012-05-13 22:58 ` [Bug 1001586] " bugzilla-daemon
@ 2012-05-15  9:50 ` bugzilla-daemon
  2012-05-15 12:11 ` bugzilla-daemon
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 15+ messages in thread
From: bugzilla-daemon @ 2012-05-15  9:50 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=1001586

--- Comment #2 from Ilija Kocho <ilijak@siva.com.mk> 2012-05-15 10:50:19 BST ---
(In reply to comment #1)
> That doesn't sound right. [snip]

Sorry Jifl, FAOD, I couldn't find out whether this refers to my comment or is
just a pretext for your next sentence (here snipped out)? Pse. clarify.

Ilija

-- 
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] 15+ messages in thread

* [Bug 1001586] BSD nc_test_slave chrashes
  2012-05-13 22:31 [Bug 1001586] New: BSD nc_test_slave chrashes bugzilla-daemon
  2012-05-13 22:58 ` [Bug 1001586] " bugzilla-daemon
  2012-05-15  9:50 ` bugzilla-daemon
@ 2012-05-15 12:11 ` bugzilla-daemon
  2012-05-15 17:54 ` bugzilla-daemon
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 15+ messages in thread
From: bugzilla-daemon @ 2012-05-15 12:11 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=1001586

--- Comment #3 from Jonathan Larmour <jifl@ecoscentric.com> 2012-05-15 13:11:42 BST ---
(In reply to comment #2)
> (In reply to comment #1)
> > That doesn't sound right. [snip]
> 
> Sorry Jifl, FAOD, I couldn't find out whether this refers to my comment or is
> just a pretext for your next sentence (here snipped out)? Pse. clarify.

I mean that if the BSD stack can crash due to a particular buffer size in
nc_test_slave, then there is a problem in the BSD stack that needs fixing, not
a problem in the test.

But then, it does depend on exactly what you mean by "crashing".

Jifl

-- 
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] 15+ messages in thread

* [Bug 1001586] BSD nc_test_slave chrashes
  2012-05-13 22:31 [Bug 1001586] New: BSD nc_test_slave chrashes bugzilla-daemon
                   ` (2 preceding siblings ...)
  2012-05-15 12:11 ` bugzilla-daemon
@ 2012-05-15 17:54 ` bugzilla-daemon
  2012-05-16  0:15 ` bugzilla-daemon
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 15+ messages in thread
From: bugzilla-daemon @ 2012-05-15 17:54 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=1001586

--- Comment #4 from Ilija Kocho <ilijak@siva.com.mk> 2012-05-15 18:53:49 BST ---
(In reply to comment #3)
> (In reply to comment #2)
> > (In reply to comment #1)
> > > That doesn't sound right. [snip]
> > 
> > Sorry Jifl, FAOD, I couldn't find out whether this refers to my comment or is
> > just a pretext for your next sentence (here snipped out)? Pse. clarify.
> 
> I mean that if the BSD stack can crash due to a particular buffer size in
> nc_test_slave, then there is a problem in the BSD stack that needs fixing, not
> a problem in the test.
> 
> But then, it does depend on exactly what you mean by "crashing".

I wanted to say that the test crashes not BSD stack./in_buf[]/ (/out_buf[]/) is
not a buffer under control of the stack but a store for incoming (outgoing)
messages. Since buffer size is 8 KiB and some tests involve messages of 10240
bytes my conclusion is that overflow occurs. Dependent on what gets corrupted
program may crash, stale or... sometimes it seems that program works fine - the
test reaches the end.

I have experienced the same _instability_ (originally) with lwIP (Bug 1001344)

The proposed buffer enlargement _stabilizes_ both BSD and lwIP instances of
nc_test_slave.

Ilija

-- 
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] 15+ messages in thread

* [Bug 1001586] BSD nc_test_slave chrashes
  2012-05-13 22:31 [Bug 1001586] New: BSD nc_test_slave chrashes bugzilla-daemon
                   ` (3 preceding siblings ...)
  2012-05-15 17:54 ` bugzilla-daemon
@ 2012-05-16  0:15 ` bugzilla-daemon
  2012-08-16  6:59 ` bugzilla-daemon
  2012-08-16 14:10 ` bugzilla-daemon
  6 siblings, 0 replies; 15+ messages in thread
From: bugzilla-daemon @ 2012-05-16  0:15 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=1001586

--- Comment #5 from Jonathan Larmour <jifl@ecoscentric.com> 2012-05-16 01:15:31 BST ---
I see, that makes more sense :-).

I'm just curious, but why do you set it to 8192+4096 (==12288) rather than
10240+16? (The 16 being sizeof(struct nc_test_data)). A bit of padding is fair
enough, just in case, but this seems more. This is probably more relevant for
bug 1001344 since lwIP is more the case where we probably have to be careful
with RAM use. Shame you can't cross-post bugzilla entries :-). I will make a
comment there too, answer wherever you prefer.

Jifl

-- 
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] 15+ messages in thread

* [Bug 1001586] BSD nc_test_slave chrashes
  2012-05-13 22:31 [Bug 1001586] New: BSD nc_test_slave chrashes bugzilla-daemon
                   ` (4 preceding siblings ...)
  2012-05-16  0:15 ` bugzilla-daemon
@ 2012-08-16  6:59 ` bugzilla-daemon
  2012-08-16 14:10 ` bugzilla-daemon
  6 siblings, 0 replies; 15+ messages in thread
From: bugzilla-daemon @ 2012-08-16  6:59 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=1001586

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bernd.edlinger@hotmail.de

--- Comment #6 from Bernd Edlinger <bernd.edlinger@hotmail.de> 2012-08-16 07:58:53 BST ---
Hi Ilija,

and how about the nc6_test_slave.c,

sould'nt it have the same buffer overrun bug?

Bernd.

-- 
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] 15+ messages in thread

* [Bug 1001586] BSD nc_test_slave chrashes
  2012-05-13 22:31 [Bug 1001586] New: BSD nc_test_slave chrashes bugzilla-daemon
                   ` (5 preceding siblings ...)
  2012-08-16  6:59 ` bugzilla-daemon
@ 2012-08-16 14:10 ` bugzilla-daemon
  6 siblings, 0 replies; 15+ messages in thread
From: bugzilla-daemon @ 2012-08-16 14:10 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=1001586

--- Comment #7 from Ilija Kocho <ilijak@siva.com.mk> 2012-08-16 15:10:32 BST ---
Hi Bernd

Thank you for pointing this out. I thought that this patch had been applied,
now i see that it isn't. FAOD, actually the patch should resemble the
Attachment 1760 from Bug 1001344.

(In reply to comment #6)
> Hi Ilija,
> 
> and how about the nc6_test_slave.c,
> 
> sould'nt it have the same buffer overrun bug?

Probably you are right, only I haven't used IPv6 yet...

At present I am out of my office till end of next week so my ability for
testing is limited. I'll see what I can do remotely.

Ilija

-- 
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] 15+ messages in thread

* [Bug 1001586] BSD nc_test_slave chrashes
  2012-05-13 22:31 [Bug 1001586] New: " bugzilla-daemon
                   ` (5 preceding siblings ...)
  2012-08-16  6:59 ` bugzilla-daemon
@ 2012-08-16 14:11 ` bugzilla-daemon
  6 siblings, 0 replies; 15+ messages in thread
From: bugzilla-daemon @ 2012-08-16 14:11 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=1001586

--- Comment #7 from Ilija Kocho <ilijak@siva.com.mk> 2012-08-16 15:10:32 BST ---
Hi Bernd

Thank you for pointing this out. I thought that this patch had been applied,
now i see that it isn't. FAOD, actually the patch should resemble the
Attachment 1760 from Bug 1001344.

(In reply to comment #6)
> Hi Ilija,
> 
> and how about the nc6_test_slave.c,
> 
> sould'nt it have the same buffer overrun bug?

Probably you are right, only I haven't used IPv6 yet...

At present I am out of my office till end of next week so my ability for
testing is limited. I'll see what I can do remotely.

Ilija

-- 
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] 15+ messages in thread

* [Bug 1001586] BSD nc_test_slave chrashes
  2012-05-13 22:31 [Bug 1001586] New: " bugzilla-daemon
                   ` (4 preceding siblings ...)
  2012-05-16  0:15 ` bugzilla-daemon
@ 2012-08-16  6:59 ` bugzilla-daemon
  2012-08-16 14:11 ` bugzilla-daemon
  6 siblings, 0 replies; 15+ messages in thread
From: bugzilla-daemon @ 2012-08-16  6:59 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=1001586

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bernd.edlinger@hotmail.de

--- Comment #6 from Bernd Edlinger <bernd.edlinger@hotmail.de> 2012-08-16 07:58:53 BST ---
Hi Ilija,

and how about the nc6_test_slave.c,

sould'nt it have the same buffer overrun bug?

Bernd.

-- 
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] 15+ messages in thread

* [Bug 1001586] BSD nc_test_slave chrashes
  2012-05-13 22:31 [Bug 1001586] New: " bugzilla-daemon
                   ` (3 preceding siblings ...)
  2012-05-15 17:54 ` bugzilla-daemon
@ 2012-05-16  0:15 ` bugzilla-daemon
  2012-08-16  6:59 ` bugzilla-daemon
  2012-08-16 14:11 ` bugzilla-daemon
  6 siblings, 0 replies; 15+ messages in thread
From: bugzilla-daemon @ 2012-05-16  0:15 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=1001586

--- Comment #5 from Jonathan Larmour <jifl@ecoscentric.com> 2012-05-16 01:15:31 BST ---
I see, that makes more sense :-).

I'm just curious, but why do you set it to 8192+4096 (==12288) rather than
10240+16? (The 16 being sizeof(struct nc_test_data)). A bit of padding is fair
enough, just in case, but this seems more. This is probably more relevant for
bug 1001344 since lwIP is more the case where we probably have to be careful
with RAM use. Shame you can't cross-post bugzilla entries :-). I will make a
comment there too, answer wherever you prefer.

Jifl

-- 
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] 15+ messages in thread

* [Bug 1001586] BSD nc_test_slave chrashes
  2012-05-13 22:31 [Bug 1001586] New: " bugzilla-daemon
                   ` (2 preceding siblings ...)
  2012-05-15 12:11 ` bugzilla-daemon
@ 2012-05-15 17:54 ` bugzilla-daemon
  2012-05-16  0:15 ` bugzilla-daemon
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 15+ messages in thread
From: bugzilla-daemon @ 2012-05-15 17: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=1001586

--- Comment #4 from Ilija Kocho <ilijak@siva.com.mk> 2012-05-15 18:53:49 BST ---
(In reply to comment #3)
> (In reply to comment #2)
> > (In reply to comment #1)
> > > That doesn't sound right. [snip]
> > 
> > Sorry Jifl, FAOD, I couldn't find out whether this refers to my comment or is
> > just a pretext for your next sentence (here snipped out)? Pse. clarify.
> 
> I mean that if the BSD stack can crash due to a particular buffer size in
> nc_test_slave, then there is a problem in the BSD stack that needs fixing, not
> a problem in the test.
> 
> But then, it does depend on exactly what you mean by "crashing".

I wanted to say that the test crashes not BSD stack./in_buf[]/ (/out_buf[]/) is
not a buffer under control of the stack but a store for incoming (outgoing)
messages. Since buffer size is 8 KiB and some tests involve messages of 10240
bytes my conclusion is that overflow occurs. Dependent on what gets corrupted
program may crash, stale or... sometimes it seems that program works fine - the
test reaches the end.

I have experienced the same _instability_ (originally) with lwIP (Bug 1001344)

The proposed buffer enlargement _stabilizes_ both BSD and lwIP instances of
nc_test_slave.

Ilija

-- 
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] 15+ messages in thread

* [Bug 1001586] BSD nc_test_slave chrashes
  2012-05-13 22:31 [Bug 1001586] New: " bugzilla-daemon
  2012-05-13 22:58 ` [Bug 1001586] " bugzilla-daemon
  2012-05-15  9:50 ` bugzilla-daemon
@ 2012-05-15 12:11 ` bugzilla-daemon
  2012-05-15 17:54 ` bugzilla-daemon
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 15+ messages in thread
From: bugzilla-daemon @ 2012-05-15 12:11 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=1001586

--- Comment #3 from Jonathan Larmour <jifl@ecoscentric.com> 2012-05-15 13:11:42 BST ---
(In reply to comment #2)
> (In reply to comment #1)
> > That doesn't sound right. [snip]
> 
> Sorry Jifl, FAOD, I couldn't find out whether this refers to my comment or is
> just a pretext for your next sentence (here snipped out)? Pse. clarify.

I mean that if the BSD stack can crash due to a particular buffer size in
nc_test_slave, then there is a problem in the BSD stack that needs fixing, not
a problem in the test.

But then, it does depend on exactly what you mean by "crashing".

Jifl

-- 
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] 15+ messages in thread

* [Bug 1001586] BSD nc_test_slave chrashes
  2012-05-13 22:31 [Bug 1001586] New: " bugzilla-daemon
  2012-05-13 22:58 ` [Bug 1001586] " bugzilla-daemon
@ 2012-05-15  9:50 ` bugzilla-daemon
  2012-05-15 12:11 ` bugzilla-daemon
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 15+ messages in thread
From: bugzilla-daemon @ 2012-05-15  9:50 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=1001586

--- Comment #2 from Ilija Kocho <ilijak@siva.com.mk> 2012-05-15 10:50:19 BST ---
(In reply to comment #1)
> That doesn't sound right. [snip]

Sorry Jifl, FAOD, I couldn't find out whether this refers to my comment or is
just a pretext for your next sentence (here snipped out)? Pse. clarify.

Ilija

-- 
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] 15+ messages in thread

* [Bug 1001586] BSD nc_test_slave chrashes
  2012-05-13 22:31 [Bug 1001586] New: " bugzilla-daemon
@ 2012-05-13 22:58 ` bugzilla-daemon
  2012-05-15  9:50 ` bugzilla-daemon
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 15+ messages in thread
From: bugzilla-daemon @ 2012-05-13 22:58 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=1001586

Jonathan Larmour <jifl@ecoscentric.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jifl@ecoscentric.com

--- Comment #1 from Jonathan Larmour <jifl@ecoscentric.com> 2012-05-13 23:58:36 BST ---
That doesn't sound right. Surely we should be fixing something so that it
doesn't crash!

-- 
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] 15+ messages in thread

end of thread, other threads:[~2012-08-16 14:11 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-13 22:31 [Bug 1001586] New: BSD nc_test_slave chrashes bugzilla-daemon
2012-05-13 22:58 ` [Bug 1001586] " bugzilla-daemon
2012-05-15  9:50 ` bugzilla-daemon
2012-05-15 12:11 ` bugzilla-daemon
2012-05-15 17:54 ` bugzilla-daemon
2012-05-16  0:15 ` bugzilla-daemon
2012-08-16  6:59 ` bugzilla-daemon
2012-08-16 14:10 ` bugzilla-daemon
2012-05-13 22:31 [Bug 1001586] New: " bugzilla-daemon
2012-05-13 22:58 ` [Bug 1001586] " bugzilla-daemon
2012-05-15  9:50 ` bugzilla-daemon
2012-05-15 12:11 ` bugzilla-daemon
2012-05-15 17:54 ` bugzilla-daemon
2012-05-16  0:15 ` bugzilla-daemon
2012-08-16  6:59 ` bugzilla-daemon
2012-08-16 14:11 ` 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).