This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: debugging SIGSEV on pclose


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]