On Tue, Oct 27, 2015 at 01:06:46PM +0300, Maxim Uvarov wrote:
> Hi Stuart,
> 
> make check under root says that you deference null pointer.
> 
> 
> [Thread debugging using libthread_db enabled]
> Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
> Core was generated by
> `/opt/Linaro/odp2.git/test/performance/.libs/lt-odp_l2fwd -i
> pktiop1p0,pktiop2p3'.
> Program terminated with signal SIGSEGV, Segmentation fault.
> #0  0x00002ba318e13453 in pkt_mmap_v2_tx (sock=4,
> ring=0x2ba318aae700, pkt_table=0x2ba31e9ecdc0, len=16) at
> pktio/socket_mmap.c:221
> 221            if (odp_likely(hdr->tp_status == TP_STATUS_AVAILABLE)) {
> (gdb) bt
> #0  0x00002ba318e13453 in pkt_mmap_v2_tx (sock=4,
> ring=0x2ba318aae700, pkt_table=0x2ba31e9ecdc0, len=16) at
> pktio/socket_mmap.c:221
> #1  0x00002ba318e13fee in sock_mmap_send
> (pktio_entry=0x2ba318aae640, pkt_table=0x2ba31e9ecdc0, len=16) at
> pktio/socket_mmap.c:489
> #2  0x00002ba318e1075d in odp_pktio_send (id=0x2,
> pkt_table=0x2ba31e9ecdc0, len=16) at odp_packet_io.c:420
> #3  0x0000000000401f26 in pktio_direct_recv_thread
> (arg=0x2ba318ad3030) at odp_l2fwd.c:270
> #4  0x00002ba318bf9a07 in odp_run_start_routine (arg=0x1376950) at
> linux.c:35
> #5  0x00002ba319035182 in start_thread (arg=0x2ba31e9ed700) at
> pthread_create.c:312
> #6  0x00002ba31934547d in clone () at
> ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
> (gdb) p hdr
> $1 = (struct tpacket2_hdr *) 0x0
> (gdb) l
> 216         * after some of the packets in the ring have already
> been sent, so we
> 217         * need to inspect the packet status to determine which
> were sent. */
> 218        for (n = first_frame_num; n < first_frame_num + i; ++n) {
> 219            struct tpacket2_hdr *hdr = ring->rd[n].iov_base;
> 220
> 221            if (odp_likely(hdr->tp_status == TP_STATUS_AVAILABLE)) {
> 222                nb_tx++;
> 223            } else if (hdr->tp_status & TP_STATUS_WRONG_FORMAT) {
> 224                /* status will be cleared on the next send request */
> 225                break;
> (gdb)

Argh. Obviously this doesn't happen when I run the test, but I can now
see the problem. I'll fix and send an updated series.

-- 
Stuart.
_______________________________________________
lng-odp mailing list
[email protected]
https://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to