You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafficserver.apache.org by "John Plevyak (JIRA)" <ji...@apache.org> on 2009/12/07 06:32:20 UTC

[jira] Created: (TS-69) memory overwrite error in UDPNetHandler

memory overwrite error in UDPNetHandler
---------------------------------------

                 Key: TS-69
                 URL: https://issues.apache.org/jira/browse/TS-69
             Project: Traffic Server
          Issue Type: Bug
          Components: Core
            Reporter: John Plevyak
            Assignee: John Plevyak


The UDPNetHandler is allocated with sizeof(NetHandler) (a smaller object).

The interesting thing is that it is being overwritten with statistics and is overwriting other things.  This will not get
caught by valgrind because it uses a custom allocator for thread local data.  

This mechanism needs to be rethought.

In any case here are the offending lines are:

The allocattion:

UnixUDPNet.cc:  udpNetHandler_offset = eventProcessor.allocate(sizeof(NetHandler));

The second allocation:

RecProcess.cc:  if ((ethr_stat_offset = eventProcessor.allocate(num_stats * sizeof(RecRawStat))) == -1) {

read.write 1:

#1  0x000000000071e30d in raw_stat_sync_to_global (rsb=0xd2d0a0, id=3) at RecProcess.cc:93
93          total.sum += ink_atomic_swap64(&(tlp->sum), 0);

read.write 2:
    at UnixUDPNet.cc:1261
1261      trigger_event = e;

and

    at UnixUDPNet.cc:1299
1299      ink_assert(trigger_event == e && event == EVENT_POLL);




-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (TS-69) memory overwrite error in UDPNetHandler

Posted by "John Plevyak (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TS-69?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

John Plevyak resolved TS-69.
----------------------------

    Resolution: Duplicate

dup of TS-73 (that issue rolls up several small regression issues)

> memory overwrite error in UDPNetHandler
> ---------------------------------------
>
>                 Key: TS-69
>                 URL: https://issues.apache.org/jira/browse/TS-69
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Core
>            Reporter: John Plevyak
>            Assignee: John Plevyak
>
> The UDPNetHandler is allocated with sizeof(NetHandler) (a smaller object).
> The interesting thing is that it is being overwritten with statistics and is overwriting other things.  This will not get
> caught by valgrind because it uses a custom allocator for thread local data.  
> This mechanism needs to be rethought.
> In any case here are the offending lines are:
> The allocattion:
> UnixUDPNet.cc:  udpNetHandler_offset = eventProcessor.allocate(sizeof(NetHandler));
> The second allocation:
> RecProcess.cc:  if ((ethr_stat_offset = eventProcessor.allocate(num_stats * sizeof(RecRawStat))) == -1) {
> read.write 1:
> #1  0x000000000071e30d in raw_stat_sync_to_global (rsb=0xd2d0a0, id=3) at RecProcess.cc:93
> 93          total.sum += ink_atomic_swap64(&(tlp->sum), 0);
> read.write 2:
>     at UnixUDPNet.cc:1261
> 1261      trigger_event = e;
> and
>     at UnixUDPNet.cc:1299
> 1299      ink_assert(trigger_event == e && event == EVENT_POLL);

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.