[Pvfs2-developers] pointer aliasing and interface->set_info semantics

Troy Benjegerdes troy at scl.ameslab.gov
Tue Mar 4 18:35:00 EST 2008


It looks like the IB BMI layer is ending up double-freeing the 
method_addr structure on the BMI_ib_set_info function, but it only 
happens when the Metadata server is also a data server.

If you look at the following GDB output, the last two entries have the 
same method_addr, and I can't figure out a good way to tell in 
BMI_set_info if the method_address has already been freed. It also looks 
like the id_string has been mangled or freed somewhere earlier as well.


Breakpoint 2, dealloc_ref_st (deadref=0x100ec110) at 
../src/io/bmi/reference-list.c:239
239         free(deadref);
2: *deadref = {bmi_addr = 269402384, id_string = 0x100ec138 "", 
method_addr = 0x100ed1d8,
  interface = 0x1008dcbc, list_link = {next = 0x100ec0c4, prev = 
0x100af198}, ref_count = 0}
1: deadref = (ref_st_p) 0x100ec110
(gdb) c
Continuing.

Breakpoint 2, dealloc_ref_st (deadref=0x100ec0b0) at 
../src/io/bmi/reference-list.c:239
239         free(deadref);
2: *deadref = {bmi_addr = 269402288, id_string = 0x100ec0d8 
"\020\016Á\b/da1:3339,tcp://da1.ib:3338",
  method_addr = 0x100b7f98, interface = 0x1008dcbc, list_link = {next = 
0x100ec074, prev = 0x100ec124},
  ref_count = 0}
1: deadref = (ref_st_p) 0x100ec0b0
(gdb) c
Continuing.

Breakpoint 2, dealloc_ref_st (deadref=0x100ec060) at 
../src/io/bmi/reference-list.c:239
239         free(deadref);
2: *deadref = {bmi_addr = 269402208, id_string = 0x100ec088 
"\020\016ˬ/da2:3339,tcp://da2.ib:3338",
  method_addr = 0x100b7d18, interface = 0x1008dcbc, list_link = {next = 
0x100b7d44, prev = 0x100ec0c4},
  ref_count = 0}
1: deadref = (ref_st_p) 0x100ec060
(gdb) c
Continuing.

Breakpoint 2, dealloc_ref_st (deadref=0x100b7d30) at 
../src/io/bmi/reference-list.c:239
239         free(deadref);
2: *deadref = {bmi_addr = 269188400, id_string = 0x100b7d58 
"\020\v}\020/da2:3339",
  method_addr = 0x100b7d18, interface = 0x1008dcbc, list_link = {next = 
0x100af198, prev = 0x100ec074},
  ref_count = 0}
1: deadref = (ref_st_p) 0x100b7d30
(gdb) c
Continuing.



More information about the Pvfs2-developers mailing list