[Click] runtime error?

Cliff Frey cliff at meraki.com
Tue Aug 18 15:01:18 EDT 2009


Often running with valgrind can help point out where memory-related bugs
are.  You can try running click with
  valgrind click (options)
instead of just
  click (options)

Which will often show you where your code is doing something wrong.

Short of that, you can try auditing your use of pointers, arrays, new, and
delete to see if there are any common C bugs.

Cliff


On Tue, Aug 18, 2009 at 10:34 AM, weirong sun <sunweirong32 at gmail.com>wrote:

> hi! i have written my own element,and i put it into click script to run for
> testing.when click is running ,i get the following code:
> *** glibc detected *** click/userlevel/click: corrupted double-linked list:
> 0x0a1be350 ***
> ======= Backtrace: =========
> /lib/tls/i686/cmov/libc.so.6[0xb7d1a07f]
> /lib/tls/i686/cmov/libc.so.6[0xb7d1bb8d]
> /lib/tls/i686/cmov/libc.so.6(__libc_malloc+0x95)[0xb7d1d9c5]
> /usr/lib/libstdc++.so.6(_Znwj+0x27)[0xb7efcf47]
> /usr/lib/libstdc++.so.6(_Znaj+0x1d)[0xb7efd08d]
> click/userlevel/click(_ZN6Packet10alloc_dataEjjj+0x2f)[0x827484f]
> click/userlevel/click(_ZN6Packet4makeEjPKvjj+0xa8)[0x8274ac8]
> click/userlevel/click(_ZN10FromDevice8selectedEi+0x69)[0x821add9]
> click/userlevel/click(_ZN6Master16run_selects_pollEb+0xd3)[0x829ce43]
> click/userlevel/click(_ZN12RouterThread6driverEv+0x1b3)[0x8290d53]
> click/userlevel/click(main+0x65d)[0x826caad]
> /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe5)[0xb7cc0775]
> click/userlevel/click[0x80d96f1]
> ======= Memory map: ========
> 08048000-0835a000 r-xp 00000000 08:08 163251
> /home/sun/click/userlevel/click
> 0835a000-0835b000 r--p 00311000 08:08 163251
> /home/sun/click/userlevel/click
> 0835b000-0835c000 rw-p 00312000 08:08 163251
> /home/sun/click/userlevel/click
> 0835c000-0835f000 rw-p 0835c000 00:00 0
> 0a186000-0a1c8000 rw-p 0a186000 00:00 0          [heap]
> b7b00000-b7b21000 rw-p b7b00000 00:00 0
> b7b21000-b7c00000 ---p b7b21000 00:00 0
> b7c8f000-b7c91000 rw-p b7c8f000 00:00 0
> b7c91000-b7ca6000 r-xp 00000000 08:08 6203       /lib/tls/i686/cmov/
> libpthread-2.9.so
> b7ca6000-b7ca7000 r--p 00014000 08:08 6203       /lib/tls/i686/cmov/
> libpthread-2.9.so
> b7ca7000-b7ca8000 rw-p 00015000 08:08 6203       /lib/tls/i686/cmov/
> libpthread-2.9.so
> b7ca8000-b7caa000 rw-p b7ca8000 00:00 0
> b7caa000-b7e06000 r-xp 00000000 08:08 6177       /lib/tls/i686/cmov/
> libc-2.9.so
> b7e06000-b7e07000 ---p 0015c000 08:08 6177       /lib/tls/i686/cmov/
> libc-2.9.so
> b7e07000-b7e09000 r--p 0015c000 08:08 6177       /lib/tls/i686/cmov/
> libc-2.9.so
> b7e09000-b7e0a000 rw-p 0015e000 08:08 6177       /lib/tls/i686/cmov/
> libc-2.9.so
> b7e0a000-b7e0d000 rw-p b7e0a000 00:00 0
> b7e0d000-b7e1a000 r-xp 00000000 08:08 2599       /lib/libgcc_s.so.1
> b7e1a000-b7e1b000 r--p 0000c000 08:08 2599       /lib/libgcc_s.so.1
> b7e1b000-b7e1c000 rw-p 0000d000 08:08 2599       /lib/libgcc_s.so.1
> b7e1c000-b7e40000 r-xp 00000000 08:08 6185       /lib/tls/i686/cmov/
> libm-2.9.so
> b7e40000-b7e41000 r--p 00023000 08:08 6185       /lib/tls/i686/cmov/
> libm-2.9.so
> b7e41000-b7e42000 rw-p 00024000 08:08 6185       /lib/tls/i686/cmov/
> libm-2.9.so
> b7e42000-b7f26000 r-xp 00000000 08:08 10246
> /usr/lib/libstdc++.so.6.0.10
> b7f26000-b7f2a000 r--p 000e3000 08:08 10246
> /usr/lib/libstdc++.so.6.0.10
> b7f2a000-b7f2b000 rw-p 000e7000 08:08 10246
> /usr/lib/libstdc++.so.6.0.10
> b7f2b000-b7f32000 rw-p b7f2b000 00:00 0
> b7f32000-b7f39000 r-xp 00000000 08:08 6207       /lib/tls/i686/cmov/
> librt-2.9.so
> b7f39000-b7f3a000 r--p 00006000 08:08 6207       /lib/tls/i686/cmov/
> librt-2.9.so
> b7f3a000-b7f3b000 rw-p 00007000 08:08 6207       /lib/tls/i686/cmov/
> librt-2.9.so
> b7f3b000-b7f3d000 r-xp 00000000 08:08 6183       /lib/tls/i686/cmov/
> libdl-2.9.so
> b7f3d000-b7f3e000 r--p 00001000 08:08 6183       /lib/tls/i686/cmov/
> libdl-2.9.so
> b7f3e000-b7f3f000 rw-p 00002000 08:08 6183       /lib/tls/i686/cmov/
> libdl-2.9.so
> b7f4d000-b7f4f000 rw-p b7f4d000 00:00 0
> b7f4f000-b7f50000 r-xp b7f4f000 00:00 0          [vdso]
> b7f50000-b7f6c000 r-xp 00000000 08:08 2557       /lib/ld-2.9.so
> b7f6c000-b7f6d000 r--p 0001b000 08:08 2557       /lib/ld-2.9.so
> b7f6d000-b7f6e000 rw-p 0001c000 08:08 2557       /lib/ld-2.9.so
> bfb59000-bfb6e000 rw-p bffeb000 00:00 0          [stack]
>
> it happens in random,i don't know what cause it and where are errors in my
> element code,how to resolve this probliem? thanks a lot!
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click
>


More information about the click mailing list