From owner-freebsd-ports@FreeBSD.ORG Wed Nov 19 14:28:48 2014 Return-Path: Delivered-To: ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1706F94C; Wed, 19 Nov 2014 14:28:48 +0000 (UTC) Received: from mail-lb0-x232.google.com (mail-lb0-x232.google.com [IPv6:2a00:1450:4010:c04::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 88FEDE0E; Wed, 19 Nov 2014 14:28:47 +0000 (UTC) Received: by mail-lb0-f178.google.com with SMTP id f15so613439lbj.37 for ; Wed, 19 Nov 2014 06:28:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=39W91M9EYEkg5rPTrj2B/U7wclKyuFRd8VRdYWArqSY=; b=Kls8c5QkWyNJ/br0/S4xAiZyhD0lNeYPy1M5YD8tF+UOFJGNYEXO7jydNzUBDvg8G8 X8vWV+ODHZnr4kFcrmYD/KYryFW9FukVQK276QnodpQVgmLRniSLVEswUnng96dPGbxj 868xOJS6iJ/dZiPu9jBOdK/wWUQ2IoazatlbLopa/GxQ/kOnullRy5AF7mNTg0JghyDu NbbIfMU5suAeXxkToVpKpWD+u9o1wcEwf0+ruqwKVG5ZKR1Oc1OkVBNNF23e96ZbGm5R KDAjioR0KDt8rTyaiaBH5lEgsQGrjE5Ciap+ihgVE0X08+ti4h8wYvn3nIPbo8o5M1Ff xovA== X-Received: by 10.112.141.104 with SMTP id rn8mr2401135lbb.87.1416407325627; Wed, 19 Nov 2014 06:28:45 -0800 (PST) Received: from jurica04.local ([85.114.51.10]) by mx.google.com with ESMTPSA id v4sm469649lav.25.2014.11.19.06.28.44 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 19 Nov 2014 06:28:45 -0800 (PST) Message-ID: <546CA91B.8050202@gmail.com> Date: Wed, 19 Nov 2014 15:28:43 +0100 From: Jurica Borozan User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Steven Kreuzer Subject: Re: FreeBSD Port: cfengine36-3.6.1_3,1 References: <546A2DDB.3010900@gmail.com> <546C6FA5.4080905@gmail.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: ports@freebsd.org, Cy Schubert X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Nov 2014 14:28:48 -0000 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 > 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' , "?(?\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' , "?\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' , "?(?\000\200(,?t(|????\001j(\000\000?(p?"... (gdb) (gdb) n 273 if (rename(new, BufferData(deref_file)) == -1) (gdb) p new $37 = '\0' , "οi(", '\0' , "!\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' , "a", '\0' , "p", '\0' , "files.create.edit_line.-freebsd-jb01", '\0' , "?@?(", '\0' ... (gdb) p backup $38 = '\0' , "_tmp_test_txt", '\0' , "insert_value", '\0' , "?\215\t(??\v(??\v(", '\0' , "\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' , "?\202\n(", '\0' , "\034?\v(", '\0' , "??\n(?