From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: Segmentation fault on Downlink data transfer
Date: Thu, 13 Jan 2011 11:00:38 -0600 [thread overview]
Message-ID: <4D2F2FB6.5060204@gmail.com> (raw)
In-Reply-To: <2A84145621092446B6659B8A0F28E26F470064499D@irsmsx501.ger.corp.intel.com>
[-- Attachment #1: Type: text/plain, Size: 2111 bytes --]
Hi Carlos,
> Root cause of this issue is a ring buffer overflow (in gatio received
> data function). The overflow is detected and the DLC3 source context is
> destroyed in dispatch source function. After that the disconnect handler
> is called and try to destroyed the same context.
In general a ring_buffer overflow indicates that the sender is sending
garbage or the consumer is doing something wrong. Buffer overflows on
GAtIO should not happen.
>
>
>
> So on this issue there is 2 points:
>
> 1- Management of the buffer overflow
>
> 2- Buffer overflow cause
>
>
>
> For the 1^st point, I’m not sure that disconnect DLC channel is the
> solution in case of buffer overflow. I believe that is better to discard
> ongoing packet in the buffer. TCP could survived to packet loss and
> retransmit the packets. Throughput go down but the data pipe is not
> broken for the application.
>
>
Perhaps, but I think it is too early to speculate what we should do with
buffer overflows until we know the cause.
What is the exact setup that you're using? Are you using GAtMux or the
kernel mux?
>
> For the 2^nd point, ring buffer overflow happened because data is not
> consume in this buffer. This is a flow control problem. I suspect that
> for some reason the consumer is blocked (not schedule) during some time.
>
The consumer is synchronous with GAtIO. The receive_data function is
acting something like this:
- non-blocking reads until the buffer is full or nothing more to read
- Call the read handler
- Check for buffer overflow and kill the channel if it is.
> Ring buffer size is set to 4096 bytes. I realize some test with a ring
> buffer increase to 131072 bytes and I can get long file downlink
> transfer. Probably this size is too much high and this size buffer
> need to be tune.
>
So to me this is sounding like a problem in GAtRawIP implementation.
Can you check whether using synchronous writes to the TUN device fix
your problem? E.g. in new_bytes of gatrawip.c.
Regards,
-Denis
next prev parent reply other threads:[~2011-01-13 17:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-13 8:58 Segmentation fault on Downlink data transfer Pargada, Carlos
2011-01-13 17:00 ` Denis Kenzior [this message]
2011-01-13 19:55 ` Bastian, Waldo
-- strict thread matches above, loose matches on Subject: below --
2011-01-17 15:32 Pargada, Carlos
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D2F2FB6.5060204@gmail.com \
--to=denkenz@gmail.com \
--cc=ofono@ofono.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.