FreeBSD Port: cfengine36-3.6.1_3,1

Jurica Borozan jurica.borozan at gmail.com
Wed Nov 19 14:28:48 UTC 2014


Hi,

I am currently in gbd chasing the problems.

Data memory region gets overwritten for some reasons destroying
variables content after certain (but "innocent" function call
ArchiveToRepository - check gdb output bellow) and causes segmentation
fault.


On 19.11.14 15:07, Steven Kreuzer wrote:
> On Wed, Nov 19, 2014 at 5:23 AM, Jurica Borozan
> <jurica.borozan at gmail.com> wrote:
>> Hi Steven,
>>
>> I tested proposed solution which is partially ok.
>>
>> XML processing is there but segmentation fault/core dump is still
>> present due to a problem in backup-ing processed files.
> 
> Can you send me the core file?

I will prepare it with all other test files and instructions in new email.


>> Even more: I tested non-xml functionality to investigate this "backup" issue and it
>> is there too. On linux there is no problem with this issue.
> 
> I am not sure what you mean when you saying backing up processed files?
> Can you send me an example agent that caused this issue and I can take
> a closer look.
> 

It is internal feature from cfengine: if certain file is
processed/changed it can (depending on content of cf script) save backup
first (with extension *.cf-before-edit).


Regards and thanks
jurica


a) <<<<<<<<<<<<<<<

262	        if (ArchiveToRepository(backup, a))
(gdb) p new
$35 =
"/tmp/test.txt.cf-after-edit\000??i(?\000\200(\000\000?(\034\001\200(\034\001\200(
\001\200(\000\000?(\034\001\200(\034\001\200(
\001\200(\000\000?(\034\001\200(\034\001\200(
\001\200(\000\000?(\000\000?(\001\000\000\000
\001\200(,?t(l\r??οi(\000\000\000\000οi(\200\000\000\000G\000\000\000\r\000\000\000\0000?(\024\001\000\000\224*w(?\000\000\000\b:v(?)w(\003\000\000\0000\000\000\000,?t(x\002\200(\002\000\000\000?\000\000\000\f0?(\220=?(!\000\000\000
\000\000\000,?t("...
(gdb) p backup
$36 = "/tmp/test.txt.cf-before-edit", '\0' <repeats 154 times>,
"?(?\000\200(,?t(x????\001j(\000\000\000\000p????\t\000\000\000\000?(?\000\200(?\t?(X\001\200(?\t?(\024\n?(?????\t?(?????\t?(\001\000\000\000X\001\200(",
'\0' <repeats 120 times>,
"?\022j(\000\000\000\000\000\000\000\000?\t\000\000\034\002\200(\000\000?(\030????\t?(\001\000\000\000,\002\200(",
'\0' <repeats 26 times>, "?(?\000\200(,?t(|????\001j(\000\000?(p?"...
(gdb)
(gdb) n
273	    if (rename(new, BufferData(deref_file)) == -1)
(gdb) p new
$37 = '\0' <repeats 820 times>, "οi(", '\0' <repeats 12 times>,
"!\000\000\000'\000\000\000\000??(\204\002\000\000?+w(?\001\000\000\b:v(?)w(\a\000\000\000p\000\000\000,?t(?\003\200(\002\000\000\000?\001\000\000\f??(???(a\000\000\000\231?\024(,?t(PF??\\4j(?\000\200(a",
'\0' <repeats 19 times>, "a", '\0' <repeats 15 times>, "p", '\0'
<repeats 217 times>, "files.create.edit_line.-freebsd-jb01", '\0'
<repeats 114 times>, "?@?(", '\0' <repeats 20 times>...
(gdb) p backup
$38 = '\0' <repeats 1178 times>, "_tmp_test_txt", '\0' <repeats 1577
times>, "insert_value", '\0' <repeats 412 times>, "?\215\t(??\v(??\v(",
'\0' <repeats 12 times>,
"\022\000\000\000\001\000\000\000\034?\v(??\v(\000?\n(\000\000\000\001?;??\b;??\024g\v(?\202\n(?;???u\t(0;???\002",
'\0' <repeats 22 times>, "?\202\n(", '\0' <repeats 16 times>,
"\034?\v(", '\0' <repeats 104 times>,
"??\n(?<???\202\n(\000<???\206\t(?;??\000?\n(?\202\n"...
(gdb)


b) <<<<<<<<<<<<<<<<<<<<<<<<<<<<


262	        if (ArchiveToRepository(backup, a))
(gdb) p *deref_file
$65 = {buffer = 0x28cbd240 "/tmp/test.txt", mode = BUFFER_BEHAVIOR_CSTRING,
  capacity = 16, used = 13, unsafe = 8}
(gdb) p *pretty_file
$66 = {buffer = 0x28cbc000 "'/tmp/test.txt'", mode =
BUFFER_BEHAVIOR_CSTRING,
  capacity = 4096, used = 15, unsafe = 128}
(gdb) n
273	    if (rename(new, BufferData(deref_file)) == -1)
(gdb) p *deref_file
$67 = {buffer = 0xbfbf53f8 "\020\205???b\005\b? ?(", mode = 134566911,
  capacity = 683745456, used = 684411456, unsafe = false}
(gdb) p *pretty_file
$68 = {buffer = 0x28cb3300 "\200.?(PQ?(", mode = 3216976124, capacity = 0,
  used = 0, unsafe = false}
(gdb)




More information about the freebsd-ports mailing list