Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Nov 2014 18:35:03 -0800
From:      Cy Schubert <Cy.Schubert@komquats.com>
To:        Jurica Borozan <jurica.borozan@gmail.com>
Cc:        Steven Kreuzer <skreuzer@freebsd.org>, ports@freebsd.org, Cy Schubert <cy@freebsd.org>
Subject:   Re: FreeBSD Port: cfengine36-3.6.1_3,1
Message-ID:  <201411200235.sAK2Z3W0017193@slippy.cwsent.com>
In-Reply-To: Message from Jurica Borozan <jurica.borozan@gmail.com> of "Wed, 19 Nov 2014 15:28:43 %2B0100." <546CA91B.8050202@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
The segfault needs to be brought up with our upline. I'm currently workin=
g=20
on a couple of ipfilter issues and should get to this after completing th=
at=20
work.


--=20
Cheers,
Cy Schubert <Cy.Schubert=40komquats.com>
FreeBSD UNIX:  <cy=40FreeBSD.org>   Web:  http://www.FreeBSD.org

	The need of the many outweighs the greed of the few.



In message <546CA91B.8050202=40gmail.com>, Jurica Borozan writes:
>=20
>=20
> Hi,
>=20
> I am currently in gbd chasing the problems.
>=20
> Data memory region gets overwritten for some reasons destroying
> variables content after certain (but =22innocent=22 function call
> ArchiveToRepository - check gdb output bellow) and causes segmentation
> fault.
>=20
>=20
> On 19.11.14 15:07, Steven Kreuzer wrote:
> > On Wed, Nov 19, 2014 at 5:23 AM, Jurica Borozan
> > <jurica.borozan=40gmail.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.
> >=20
> > Can you send me the core file?
>=20
> I will prepare it with all other test files and instructions in new ema=
il.
>=20
>=20
> >> Even more: I tested non-xml functionality to investigate this =22bac=
kup=22 iss
> ue and it
> >> is there too. On linux there is no problem with this issue.
> >=20
> > I am not sure what you mean when you saying backing up processed file=
s?
> > Can you send me an example agent that caused this issue and I can tak=
e
> > a closer look.
> >=20
>=20
> It is internal feature from cfengine: if certain file is
> processed/changed it can (depending on content of cf script) save backu=
p
> first (with extension *.cf-before-edit).
>=20
>=20
> Regards and thanks
> jurica
>=20
>=20
> a) <<<<<<<<<<<<<<<
>=20
> 262	        if (ArchiveToRepository(backup, a))
> (gdb) p new
> =2435 =3D
> =22/tmp/test.txt.cf-after-edit=5C000??i(?=5C000=5C200(=5C000=5C000?(=5C=
034=5C001=5C200(=5C034=5C001
> =5C200(
> =5C001=5C200(=5C000=5C000?(=5C034=5C001=5C200(=5C034=5C001=5C200(
> =5C001=5C200(=5C000=5C000?(=5C034=5C001=5C200(=5C034=5C001=5C200(
> =5C001=5C200(=5C000=5C000?(=5C000=5C000?(=5C001=5C000=5C000=5C000
> =5C001=5C200(,?t(l=5Cr??=CE=BFi(=5C000=5C000=5C000=5C000=CE=BFi(=5C200=
=5C000=5C000=5C000G=5C000=5C000=5C000=5Cr=5C000=5C000
> =5C000=5C0000?(=5C024=5C001=5C000=5C000=5C224*w(?=5C000=5C000=5C000=5Cb=
:v(?)w(=5C003=5C000=5C000=5C0000=5C000
> =5C000=5C000,?t(x=5C002=5C200(=5C002=5C000=5C000=5C000?=5C000=5C000=5C0=
00=5Cf0?(=5C220=3D?(=21=5C000=5C000=5C000
> =5C000=5C000=5C000,?t(=22...
> (gdb) p backup
> =2436 =3D =22/tmp/test.txt.cf-before-edit=22, '=5C0' <repeats 154 times=
>,
> =22?(?=5C000=5C200(,?t(x????=5C001j(=5C000=5C000=5C000=5C000p????=5Ct=
=5C000=5C000=5C000=5C000?(?=5C000=5C20
> 0(?=5Ct?(X=5C001=5C200(?=5Ct?(=5C024=5Cn?(?????=5Ct?(?????=5Ct?(=5C001=
=5C000=5C000=5C000X=5C001=5C200(=22,
> '=5C0' <repeats 120 times>,
> =22?=5C022j(=5C000=5C000=5C000=5C000=5C000=5C000=5C000=5C000?=5Ct=5C000=
=5C000=5C034=5C002=5C200(=5C000=5C000?(=5C03
> 0????=5Ct?(=5C001=5C000=5C000=5C000,=5C002=5C200(=22,
> '=5C0' <repeats 26 times>, =22?(?=5C000=5C200(,?t(=7C????=5C001j(=5C000=
=5C000?(p?=22...
> (gdb)
> (gdb) n
> 273	    if (rename(new, BufferData(deref_file)) =3D=3D -1)
> (gdb) p new
> =2437 =3D '=5C0' <repeats 820 times>, =22=CE=BFi(=22, '=5C0' <repeats 1=
2 times>,
> =22=21=5C000=5C000=5C000'=5C000=5C000=5C000=5C000??(=5C204=5C002=5C000=
=5C000?+w(?=5C001=5C000=5C000=5Cb:v(?)w(=5C
> a=5C000=5C000=5C000p=5C000=5C000=5C000,?t(?=5C003=5C200(=5C002=5C000=5C=
000=5C000?=5C001=5C000=5C000=5Cf??(???
> (a=5C000=5C000=5C000=5C231?=5C024(,?t(PF??=5C=5C4j(?=5C000=5C200(a=22,
> '=5C0' <repeats 19 times>, =22a=22, '=5C0' <repeats 15 times>, =22p=22,=
 '=5C0'
> <repeats 217 times>, =22files.create.edit_line.-freebsd-jb01=22, '=5C0'=

> <repeats 114 times>, =22?=40?(=22, '=5C0' <repeats 20 times>...
> (gdb) p backup
> =2438 =3D '=5C0' <repeats 1178 times>, =22_tmp_test_txt=22, '=5C0' <rep=
eats 1577
> times>, =22insert_value=22, '=5C0' <repeats 412 times>, =22?=5C215=5Ct(=
??=5Cv(??=5Cv(=22,
> '=5C0' <repeats 12 times>,
> =22=5C022=5C000=5C000=5C000=5C001=5C000=5C000=5C000=5C034?=5Cv(??=5Cv(=
=5C000?=5Cn(=5C000=5C000=5C000=5C001?;??=5Cb;
> ??=5C024g=5Cv(?=5C202=5Cn(?;???u=5Ct(0;???=5C002=22,
> '=5C0' <repeats 22 times>, =22?=5C202=5Cn(=22, '=5C0' <repeats 16 times=
>,
> =22=5C034?=5Cv(=22, '=5C0' <repeats 104 times>,
> =22??=5Cn(?<???=5C202=5Cn(=5C000<???=5C206=5Ct(?;??=5C000?=5Cn(?=5C202=
=5Cn=22...
> (gdb)
>=20
>=20
> b) <<<<<<<<<<<<<<<<<<<<<<<<<<<<
>=20
>=20
> 262	        if (ArchiveToRepository(backup, a))
> (gdb) p *deref_file
> =2465 =3D =7Bbuffer =3D 0x28cbd240 =22/tmp/test.txt=22, mode =3D BUFFER=
_BEHAVIOR_CSTRING,
>   capacity =3D 16, used =3D 13, unsafe =3D 8=7D
> (gdb) p *pretty_file
> =2466 =3D =7Bbuffer =3D 0x28cbc000 =22'/tmp/test.txt'=22, mode =3D
> BUFFER_BEHAVIOR_CSTRING,
>   capacity =3D 4096, used =3D 15, unsafe =3D 128=7D
> (gdb) n
> 273	    if (rename(new, BufferData(deref_file)) =3D=3D -1)
> (gdb) p *deref_file
> =2467 =3D =7Bbuffer =3D 0xbfbf53f8 =22=5C020=5C205???b=5C005=5Cb? ?(=22=
, mode =3D 134566911,
>   capacity =3D 683745456, used =3D 684411456, unsafe =3D false=7D
> (gdb) p *pretty_file
> =2468 =3D =7Bbuffer =3D 0x28cb3300 =22=5C200.?(PQ?(=22, mode =3D 321697=
6124, capacity =3D 0,
>   used =3D 0, unsafe =3D false=7D
> (gdb)
>=20
>=20





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201411200235.sAK2Z3W0017193>