Hi Luca,
Comments below.
(gdb) r -l -s -i eth3 -d/var/tmp -w 3000 -n 0 -m
172.16.0.0/12,10.0.0.0/8,192.168.0.0/16
Starting program: /var/lib/pgsql/ntopng/ntopng -l -s -i eth3 -d/var/tmp -w 3000
-n 0 -m 172.16.0.0/12,10.0.0.0/8,192.168.0.0/16
...
[New Thread 0xae5fab70 (LWP 21347)]
28/Aug/2013 10:34:14 [NetworkInterface.cpp:507] Started packet polling on
interface eth3...
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb25ffb70 (LWP 21341)]
lh_table_free (t=0x0) at linkhash.c:114
114 for(c = t->head; c != NULL; c = c->next) {
Missing separate debuginfos, use: debuginfo-install
GeoIP-1.4.8-1.1.el6.art.i686 glibc-2.12-1.47.el6_2.12.i686
libgcc-4.4.7-3.el6.i686 libpcap-1.0.0-6.20091201git117cb5.el6.i686
libstdc++-4.4.7-3.el6.i686 libxml2-2.7.6-12.el6_4.1.i686 zlib-1.2.3-27.el6.i686
(gdb) bt
#0 lh_table_free (t=0x0) at linkhash.c:114
#1 0x08140545 in json_object_object_delete (jso=0xb18107d0) at
json_object.c:356
#2 0x0813f394 in json_object_put (jso=0xb18107d0) at json_object.c:161
#3 0x08142b64 in lh_table_free (t=0xb18145f0) at linkhash.c:116
#4 0x08140545 in json_object_object_delete (jso=0xb1810888) at
json_object.c:356
#5 0x0813f394 in json_object_put (jso=0xb1810888) at json_object.c:161
#6 0x0805c723 in Host::serialize (this=0x882dcb8) at Host.cpp:465
#7 0x0805b7e4 in Host::lua (this=0x882dcb8, vm=0xad7991c0, host_details=true,
verbose=true, returnHost=true)
at Host.cpp:247
#8 0x08071f96 in NetworkInterface::getHostInfo (this=0x81767b8, vm=0xad7991c0,
host_ip=0xad7a1558 "10.30.40.212",
vlan_id=0) at NetworkInterface.cpp:703
#9 0x0806b38d in ntop_get_interface_host_info (vm=0xad7991c0) at Lua.cpp:459
#10 0x080d076f in lj_BC_FUNCC ()
#11 0x080bf0ad in lua_pcall ()
#12 0xad7991c0 in ?? ()
#13 0x0806952a in handle_lua_request (conn=0xb1800468) at HTTPserver.cpp:254
#14 0x08065df7 in handle_request (conn=0xb1800468) at
./third-party/mongoose/mongoose.c:4277
#15 0x08067ca9 in process_new_connection (conn=0xb1800468) at
./third-party/mongoose/mongoose.c:4890
#16 0x0806817a in worker_thread (thread_func_param=0x875d178) at
./third-party/mongoose/mongoose.c:4984
#17 0x007cda09 in start_thread () from /lib/libpthread.so.0
#18 0x006df43e in clone () from /lib/libc.so.6
(gdb)
Not sure I understand how t could be 0x0
when lh_table_free (jso->o.c_object)
has
p *jso->o.c_object
$2 = {size = 16, count = 2, collisions = 0, resizes = 0, lookups = 2, inserts =
2, deletes = 0, name = 0x0,
head = 0xb1812e10, tail = 0xb1812eb0, table = 0xb1812df0, free_fn = 0x813f7e0
<json_object_lh_entry_free>,
hash_fn = 0x81428a0 <lh_char_hash>, equal_fn = 0x8142b90 <lh_char_equal>}
(gdb) f 0
#0 lh_table_free (t=0x0) at linkhash.c:114
114 for(c = t->head; c != NULL; c = c->next) {
(gdb) info locals
c = <value optimized out>
(gdb) p *t
Cannot access memory at address 0x0
(gdb) f 1
#1 0x08140545 in json_object_object_delete (jso=0xb18107d0) at
json_object.c:356
356 lh_table_free(jso->o.c_object);
(gdb) info locals
No locals.
(gdb) l
351 json_object_put((struct json_object*)ent->v);
352 }
353
354 static void json_object_object_delete(struct json_object* jso)
355 {
356 lh_table_free(jso->o.c_object);
357 json_object_generic_delete(jso);
358 }
359
360 struct json_object* json_object_new_object(void)
(gdb) p *jso
$1 = {o_type = json_type_object, _delete = 0x8140530
<json_object_object_delete>,
_to_json_string = 0x813fe20 <json_object_object_to_json_string>, _ref_count =
0, _pb = 0x0, o = {
c_boolean = -1316927952, c_double = 1.4713469318340022e-314, c_int64 =
2978039344, c_object = 0xb1814630,
c_array = 0xb1814630, c_string = {str = 0xb1814630 "\020", len = 0}},
_user_delete = 0, _userdata = 0x0}
(gdb) p *jso->o.c_object
$2 = {size = 16, count = 2, collisions = 0, resizes = 0, lookups = 2, inserts =
2, deletes = 0, name = 0x0,
head = 0xb1812e10, tail = 0xb1812eb0, table = 0xb1812df0, free_fn = 0x813f7e0
<json_object_lh_entry_free>,
hash_fn = 0x81428a0 <lh_char_hash>, equal_fn = 0x8142b90 <lh_char_equal>}
(gdb) p *jso->o.c_object->head
$3 = {k = 0xb18118b8, v = 0xb1814ed8, next = 0xb1812eb0, prev = 0x0}
(gdb) f 0
#0 lh_table_free (t=0x0) at linkhash.c:114
114 for(c = t->head; c != NULL; c = c->next) {
(gdb) l
109 }
110
111 void lh_table_free(struct lh_table *t)
112 {
113 struct lh_entry *c;
114 for(c = t->head; c != NULL; c = c->next) {
115 if(t->free_fn) {
116 t->free_fn(c);
117 }
118 }
(gdb) l 100
95
96 new_t = lh_table_new(new_size, t->name, NULL, t->hash_fn,
t->equal_fn);
97 ent = t->head;
98 while(ent) {
99 lh_table_insert(new_t, ent->k, ent->v);
100 ent = ent->next;
101 }
102 free(t->table);
103 t->table = new_t->table;
104 t->size = new_size;
(gdb) l
105 t->head = new_t->head;
106 t->tail = new_t->tail;
107 t->resizes++;
108 free(new_t);
109 }
110
111 void lh_table_free(struct lh_table *t)
112 {
113 struct lh_entry *c;
114 for(c = t->head; c != NULL; c = c->next) {
(gdb) l
115 if(t->free_fn) {
116 t->free_fn(c);
117 }
118 }
119 free(t->table);
120 free(t);
121 }
122
123
124 int lh_table_insert(struct lh_table *t, void *k, const void *v)
(gdb)
--
Stephen Clark
*NetWolves*
Director of Technology
Phone: 813-579-3200
Fax: 813-882-0209
Email: [email protected]
http://www.netwolves.com
_______________________________________________
Ntop-dev mailing list
[email protected]
http://listgateway.unipi.it/mailman/listinfo/ntop-dev