| delorie.com/archives/browse.cgi | search |
| X-Recipient: | archive-cygwin AT delorie DOT com |
| X-SWARE-Spam-Status: | No, hits=-0.3 required=5.0 tests=AWL,BAYES_00,DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,RCVD_NUMERIC_HELO,RP_MATCHES_RCVD,SPF_HELO_PASS,TW_DB,TW_YG,T_TO_NO_BRKTS_FREEMAIL |
| X-Spam-Check-By: | sourceware.org |
| To: | cygwin AT cygwin DOT com |
| From: | jojelino <jojelino AT gmail DOT com> |
| Subject: | Re: debugging SIGSEV on pclose |
| Date: | Thu, 08 Sep 2011 09:44:28 +0900 |
| Lines: | 63 |
| Message-ID: | <j4934t$gv9$1@dough.gmane.org> |
| References: | <4E64BE96 DOT 5020107 AT gmail DOT com> <j42imm$ecj$1 AT dough DOT gmane DOT org> <4E64D638 DOT 4030507 AT gmail DOT com> |
| Mime-Version: | 1.0 |
| User-Agent: | Mozilla/5.0 (Windows NT 5.2; rv:8.0a2) Gecko/20110907 Thunderbird/8.0a2 |
| In-Reply-To: | <4E64D638.4030507@gmail.com> |
| X-IsSubscribed: | yes |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Id: | <cygwin.cygwin.com> |
| List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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 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.
warning: print.m: epstool binary is not available.
Some output formats are not available.
Hardware watchpoint 3: cygheap->fdtab.fds[6]
Old value = (fhandler_base *) 0x0
New value = (fhandler_pipe *) 0x612dbb8c
_pipe (filedes=0x22b370, psize=0x10000, mode=0x10000)
at /tmp/winsup/winsup/cygwin/pipe.cc:382
382 filedes[0] = fdin;
(gdb) b _sigfe_fclose
Breakpoint 6 at 0x610f080b
(gdb) c
Continuing.
[New Thread 1684.0xf98]
Breakpoint 6, 0x610f080b in _sigfe_fclose ()
from /cygdrive/d/cygwin/bin/cygwin1.dll
(gdb) bt
#0 0x610f080b in _sigfe_fclose () from /cygdrive/d/cygwin/bin/cygwin1.dll
#1 0x66f6a41f in
cygoctinterp-0!_ZN13glps_renderer4drawERK15graphics_object ()
from /cygdrive/d/cygwin/bin/cygoctinterp-0.dll
#2 0x6ec0ff2f in _init_fltk__-0!_ZN11OpenGL_fltk4drawEv ()
from D:/cygwin/lib/octave/3.4.2/oct/i686-pc-cygwin/__init_fltk__.oct
#3 0x6dab19ef in cygfltk_gl-1!_ZN12Fl_Gl_Window5flushEv ()
from /cygdrive/d/cygwin/bin/cygfltk_gl-1.1.dll
#4 0x6dae2a0f in cygfltk-1!_ZN2Fl5flushEv ()
from /cygdrive/d/cygwin/bin/cygfltk-1.1.dll
#5 0x6dae2c28 in cygfltk-1!_ZN2Fl4waitEd ()
from /cygdrive/d/cygwin/bin/cygfltk-1.1.dll
#6 0x6ec21272 in
_init_fltk__-0!_ZNK21fltk_graphics_toolkit12print_figureERK15graphics_objectRKSsS4_bS4_
()
from D:/cygwin/lib/octave/3.4.2/oct/i686-pc-cygwin/__init_fltk__.oct
#7 0x66ffc52b in cygoctinterp-0!_Z8FdrawnowRK17octave_value_listi ()
from /cygdrive/d/cygwin/bin/cygoctinterp-0.dll
#8 0x67159266 in
cygoctinterp-0!_ZN14octave_builtin17do_multi_index_opEiRK17octave_value_listPKSt4listI13octave_lvalueSaIS4_EE
()
from /cygdrive/d/cygwin/bin/cygoctinterp-0.dll
#9 0x67158397 in
cygoctinterp-0!_ZN14octave_builtin7subsrefERKSsRKSt4listI17octave_value_listSaIS3_EEiPKS2_I13octave_lvalueSaIS8_EE
()
from /cygdrive/d/cygwin/bin/cygoctinterp-0.dll
#10 0x67159066 in
cygoctinterp-0!_ZN14octave_builtin7subsrefERKSsRKSt4listI17oct---Type
<return> to continue, or q <return> to quit---q
Quit
(gdb)
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.
--
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
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |