Mail Archives: cygwin/2011/09/08/05:50:41
X-Recipient: | archive-cygwin AT delorie DOT com
|
X-SWARE-Spam-Status: | No, hits=-0.9 required=5.0 tests=AWL,BAYES_50,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,TW_FL,T_TO_NO_BRKTS_FREEMAIL
|
X-Spam-Check-By: | sourceware.org
|
Message-ID: | <4E688FF0.7060307@gmail.com>
|
Date: | Thu, 08 Sep 2011 11:50:40 +0200
|
From: | Marco atzeri <marco DOT atzeri AT gmail DOT com>
|
User-Agent: | Mozilla/5.0 (Windows NT 5.1; rv:6.0.1) Gecko/20110830 Thunderbird/6.0.1
|
MIME-Version: | 1.0
|
To: | cygwin AT cygwin DOT com
|
Subject: | Re: debugging SIGSEV on pclose
|
References: | <4E64BE96 DOT 5020107 AT gmail DOT com> <j42imm$ecj$1 AT dough DOT gmane DOT org> <4E64D638 DOT 4030507 AT gmail DOT com> <j4934t$gv9$1 AT dough DOT gmane DOT org>
|
In-Reply-To: | <j4934t$gv9$1@dough.gmane.org>
|
X-IsSubscribed: | yes
|
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm
|
List-Id: | <cygwin.cygwin.com>
|
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com>
|
List-Archive: | <http://sourceware.org/ml/cygwin/>
|
List-Post: | <mailto:cygwin AT cygwin DOT com>
|
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
|
Sender: | cygwin-owner AT cygwin DOT com
|
Mail-Followup-To: | cygwin AT cygwin DOT com
|
Delivered-To: | mailing list cygwin AT cygwin DOT com
|
On 9/8/2011 2:44 AM, jojelino wrote:
> On 2011-09-05 PM 11:01, Marco atzeri wrote:
>> Hi jojelino,
>> gs is unlikely crashing as the fltk.png is correctly produced.
>> From strace I know that octave crashes before gs complete its output.
>>
> i'm sorry. mine was not the case.
> and after some digging, it is found that fd[6] is *closed* before pclose.
correct, I was not precise:
close(6) is before the pclose call, the crash is before any
further trace activity.
>
> i think fltk have bad behavior which use fclose to close pipe fd, but it
> should have used pclose. so closing disposed fd yields sigsegv.
> http://pubs.opengroup.org/onlinepubs/009695399/functions/pclose.html
> we should inspect fltk's glps_renderer::draw(graphics_object const&) for
> this strange behavior.
Octave is using popen to excute gs and during pclose the SIGSEG arises,
fltk is not directly calling gs.
fltk could have some influence in the overall system,
like corrupting common data, or it is just one drop more
than cygwin can not handle.
I am currently using debug version of cygwin-cvs, flkt-1.10 and octave;
but unfortunaltely the gdb backtrace is already corrupted/unclear at the
popen call, and I do not know if is real problem on a GDB issue :
-------------------------------------------------------------------------------
Breakpoint 2, popen (
command=0x207e75cc "/usr/bin/gs -dQUIET -dNOPAUSE -dBATCH -dSAFER
-sDEVICE=png16m -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -r150x150
-dEPSCrop -sOutputFile=fltk.png -", in_type=0x61e199f7 "w")
at /pub/cygwin/cvs/src_new/winsup/cygwin/syscalls.cc:3920
3920 {
(gdb) bt
#0 popen (
command=0x207e75cc "/usr/bin/gs -dQUIET -dNOPAUSE -dBATCH -dSAFER
-sDEVICE=png16m -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -r150x150
-dEPSCrop -sOutputFile=fltk.png -", in_type=0x61e199f7 "w")
at /pub/cygwin/cvs/src_new/winsup/cygwin/syscalls.cc:3920
#1 0x610cf2e5 in _sigfe () from /usr/bin/cygwin1.dll
warning: (Internal error: pc 0x23f in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x23f in read in psymtab, but not in symtab.)
#2 0x00000240 in ?? ()
warning: (Internal error: pc 0x23f in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x1af in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x1af in read in psymtab, but not in symtab.)
#3 0x000001b0 in ?? ()
warning: (Internal error: pc 0x1af in read in psymtab, but not in symtab.)
#4 0x61e193de in Array<double>::nil_rep() const::nr ()
from
E:/cygwin2/pub/hg/octave_build/src/DLD-FUNCTIONS/.libs/__init_fltk__.dll
#5 0x00000000 in ?? ()
----------------------------------------------------------------
Marco
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
- Raw text -