On 08.11.2010 00:43, Oscar Soriano Riera wrote:
... 5) I use Valgrid to see a problem, but valgrid fails, i think that is a problem with the malloc when it get memory for the stack:
root@DECT:/usr/src/dectmon# valgrind src/dectmon ==10731== Memcheck, a memory error detector ==10731== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al. ==10731== Using Valgrind-3.6.0 and LibVEX; rerun with -h for copyright info ==10731== Command: src/dectmon ==10731== ==10731== Invalid write of size 2 ==10731== at 0x408E568: event_set (in /usr/lib/libev.so.3.0.0) ==10731== by 0x804940E: register_fd (event_ops.c:35) ==10731== by 0x4078361: dect_fd_register (io.c:103) ==10731== by 0x4077C14: dect_netlink_init (netlink.c:358) ==10731== by 0x405FE5C: dect_open_handle (libdect.c:66) ==10731== by 0x804CBEB: main (main.c:108) ==10731== Address 0x41ff7d8 is not stack'd, malloc'd or (recently) free'd
Thanks, that helps, I'll try to figure out what's wrong.
Cheers, Patrick
==10731== ==10731== Invalid write of size 4 ==10731== at 0x408E57C: event_set (in /usr/lib/libev.so.3.0.0) ==10731== by 0x804940E: register_fd (event_ops.c:35) ==10731== by 0x4078361: dect_fd_register (io.c:103) ==10731== by 0x4077C14: dect_netlink_init (netlink.c:358) ==10731== by 0x405FE5C: dect_open_handle (libdect.c:66) ==10731== by 0x804CBEB: main (main.c:108) ==10731== Address 0x41ff7c0 is 0 bytes after a block of size 88 alloc'd ==10731== at 0x4023FE0: malloc (vg_replace_malloc.c:236) ==10731== by 0x407897D: dect_malloc (utils.c:21) ==10731== by 0x4078486: dect_fd_alloc (io.c:56) ==10731== by 0x4077BBF: dect_netlink_init (netlink.c:352) ==10731== by 0x405FE5C: dect_open_handle (libdect.c:66) ==10731== by 0x804CBEB: main (main.c:108) ==10731==
==10731== Invalid write of size 4 ==10731== at 0x408E582: event_set (in /usr/lib/libev.so.3.0.0) ==10731== by 0x804940E: register_fd (event_ops.c:35) ==10731== by 0x4078361: dect_fd_register (io.c:103) ==10731== by 0x4077C14: dect_netlink_init (netlink.c:358) ==10731== by 0x405FE5C: dect_open_handle (libdect.c:66) ==10731== by 0x804CBEB: main (main.c:108) ==10731== Address 0x41ff7cc is 12 bytes after a block of size 88 alloc'd ==10731== at 0x4023FE0: malloc (vg_replace_malloc.c:236) ==10731== by 0x407897D: dect_malloc (utils.c:21) ==10731== by 0x4078486: dect_fd_alloc (io.c:56) ==10731== by 0x4077BBF: dect_netlink_init (netlink.c:352) ==10731== by 0x405FE5C: dect_open_handle (libdect.c:66) ==10731== by 0x804CBEB: main (main.c:108) ==10731==
==10731== Invalid write of size 4 ==10731== at 0x408E589: event_set (in /usr/lib/libev.so.3.0.0) ==10731== by 0x804940E: register_fd (event_ops.c:35) ==10731== by 0x4078361: dect_fd_register (io.c:103) ==10731== by 0x4077C14: dect_netlink_init (netlink.c:358) ==10731== by 0x405FE5C: dect_open_handle (libdect.c:66) ==10731== by 0x804CBEB: main (main.c:108) ==10731== Address 0x41ff7d0 is not stack'd, malloc'd or (recently) free'd ==10731== ==10731== Invalid write of size 4 ==10731== at 0x408E590: event_set (in /usr/lib/libev.so.3.0.0) ==10731== by 0x804940E: register_fd (event_ops.c:35) ==10731== by 0x4078361: dect_fd_register (io.c:103) ==10731== by 0x4077C14: dect_netlink_init (netlink.c:358) ==10731== by 0x405FE5C: dect_open_handle (libdect.c:66) ==10731== by 0x804CBEB: main (main.c:108) ==10731== Address 0x41ff7c8 is 8 bytes after a block of size 88 alloc'd ==10731== at 0x4023FE0: malloc (vg_replace_malloc.c:236) ==10731== by 0x407897D: dect_malloc (utils.c:21) ==10731== by 0x4078486: dect_fd_alloc (io.c:56) ==10731== by 0x4077BBF: dect_netlink_init (netlink.c:352) ==10731== by 0x405FE5C: dect_open_handle (libdect.c:66) ==10731== by 0x804CBEB: main (main.c:108) ==10731==
==10731== Invalid write of size 4 ==10731== at 0x408E593: event_set (in /usr/lib/libev.so.3.0.0) ==10731== by 0x804940E: register_fd (event_ops.c:35) ==10731== by 0x4078361: dect_fd_register (io.c:103) ==10731== by 0x4077C14: dect_netlink_init (netlink.c:358) ==10731== by 0x405FE5C: dect_open_handle (libdect.c:66) ==10731== by 0x804CBEB: main (main.c:108) ==10731== Address 0x41ff7c4 is 4 bytes after a block of size 88 alloc'd ==10731== at 0x4023FE0: malloc (vg_replace_malloc.c:236) ==10731== by 0x407897D: dect_malloc (utils.c:21) ==10731== by 0x4078486: dect_fd_alloc (io.c:56) ==10731== by 0x4077BBF: dect_netlink_init (netlink.c:352) ==10731== by 0x405FE5C: dect_open_handle (libdect.c:66) ==10731== by 0x804CBEB: main (main.c:108) ==10731==
==10731== Invalid write of size 4 ==10731== at 0x408E596: event_set (in /usr/lib/libev.so.3.0.0) ==10731== by 0x804940E: register_fd (event_ops.c:35) ==10731== by 0x4078361: dect_fd_register (io.c:103) ==10731== by 0x4077C14: dect_netlink_init (netlink.c:358) ==10731== by 0x405FE5C: dect_open_handle (libdect.c:66) ==10731== by 0x804CBEB: main (main.c:108) ==10731== Address 0x41ff7d4 is not stack'd, malloc'd or (recently) free'd ==10731== ==10731== Invalid read of size 2 ==10731== at 0x408EC70: event_add (in /usr/lib/libev.so.3.0.0) ==10731== by 0x804941E: register_fd (event_ops.c:36) ==10731== by 0x4078361: dect_fd_register (io.c:103) ==10731== by 0x4077C14: dect_netlink_init (netlink.c:358) ==10731== by 0x405FE5C: dect_open_handle (libdect.c:66) ==10731== by 0x804CBEB: main (main.c:108) ==10731== Address 0x41ff7d8 is not stack'd, malloc'd or (recently) free'd ==10731== ==10731== Invalid read of size 4 ==10731== at 0x408ECD3: event_add (in /usr/lib/libev.so.3.0.0) ==10731== by 0x804941E: register_fd (event_ops.c:36) ==10731== by 0x4078361: dect_fd_register (io.c:103) ==10731== by 0x4077C14: dect_netlink_init (netlink.c:358) ==10731== by 0x405FE5C: dect_open_handle (libdect.c:66) ==10731== by 0x804CBEB: main (main.c:108) ==10731== Address 0x41ff7c8 is 8 bytes after a block of size 88 alloc'd ==10731== at 0x4023FE0: malloc (vg_replace_malloc.c:236) ==10731== by 0x407897D: dect_malloc (utils.c:21) ==10731== by 0x4078486: dect_fd_alloc (io.c:56) ==10731== by 0x4077BBF: dect_netlink_init (netlink.c:352) ==10731== by 0x405FE5C: dect_open_handle (libdect.c:66) ==10731== by 0x804CBEB: main (main.c:108) ==10731==
==10731== Invalid read of size 4 ==10731== at 0x408ECF0: event_add (in /usr/lib/libev.so.3.0.0) ==10731== by 0x804941E: register_fd (event_ops.c:36) ==10731== by 0x4078361: dect_fd_register (io.c:103) ==10731== by 0x4077C14: dect_netlink_init (netlink.c:358) ==10731== by 0x405FE5C: dect_open_handle (libdect.c:66) ==10731== by 0x804CBEB: main (main.c:108) ==10731== Address 0x41ff7d4 is not stack'd, malloc'd or (recently) free'd ==10731== ==10731== Invalid read of size 4 ==10731== at 0x408ED2F: event_add (in /usr/lib/libev.so.3.0.0) ==10731== by 0x804941E: register_fd (event_ops.c:36) ==10731== by 0x4078361: dect_fd_register (io.c:103) ==10731== by 0x4077C14: dect_netlink_init (netlink.c:358) ==10731== by 0x405FE5C: dect_open_handle (libdect.c:66) ==10731== by 0x804CBEB: main (main.c:108) ==10731== Address 0x41ff7d4 is not stack'd, malloc'd or (recently) free'd ==10731== ==10731== Invalid write of size 4 ==10731== at 0x408ED35: event_add (in /usr/lib/libev.so.3.0.0) ==10731== by 0x804941E: register_fd (event_ops.c:36) ==10731== by 0x4078361: dect_fd_register (io.c:103) ==10731== by 0x4077C14: dect_netlink_init (netlink.c:358) ==10731== by 0x405FE5C: dect_open_handle (libdect.c:66) ==10731== by 0x804CBEB: main (main.c:108) ==10731== Address 0x41ff7d4 is not stack'd, malloc'd or (recently) free'd ==10731== ==10731== Invalid write of size 4 ==10731== at 0x408ECB5: event_add (in /usr/lib/libev.so.3.0.0) ==10731== by 0x804941E: register_fd (event_ops.c:36) ==10731== by 0x4078361: dect_fd_register (io.c:103) ==10731== by 0x4077C14: dect_netlink_init (netlink.c:358) ==10731== by 0x405FE5C: dect_open_handle (libdect.c:66) ==10731== by 0x804CBEB: main (main.c:108) ==10731== Address 0x41ff7d4 is not stack'd, malloc'd or (recently) free'd ==10731== --10731-- VALGRIND INTERNAL ERROR: Valgrind received a signal 11 (SIGSEGV) - exiting --10731-- si_code=1; Faulting address: 0x74616874; sp: 0x62bdea58
valgrind: the 'impossible' happened: Killed by fatal signal ==10731== at 0x3809F551: myvprintf_str (m_debuglog.c:530) ==10731== by 0x3809FD32: vgPlain_debugLog_vprintf (m_debuglog.c:877) ==10731== by 0x3802A555: vprintf_WRK (m_libcprint.c:111) ==10731== by 0x3802A617: vgPlain_printf (m_libcprint.c:143) ==10731== by 0x380286C6: vgPlain_assert_fail (m_libcassert.c:261) ==10731== by 0x656C501F: ???
sched status:
running_tid=1
Thread 1: status = VgTs_Runnable ==10731== at 0x402331F: calloc (vg_replace_malloc.c:467) ==10731== by 0x4055394: nl_object_alloc (object.c:49) ==10731== by 0x404284F: nl_dect_cluster_alloc (cluster_obj.c:64) ==10731== by 0x4077C34: dect_netlink_init (netlink.c:148) ==10731== by 0x405FE5C: dect_open_handle (libdect.c:66) ==10731== by 0x804CBEB: main (main.c:108)
Thanks for help me