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: cygwin64 1.7.25 "locate" core dumps


On Mon, Sep 16, 2013 at 6:45 PM,  <Jeff.Newmiller@dnvkema.com> wrote:
> Could not find reports on core dumps in system programs recently, or problems
> with the locate tool.
>
> What I do:
>
> --------------------------------------------------------------------------
> JNEWM@FSEL7800 ~
> $ locate junk
> /home/JNEWM/.cpan/build/Email-Simple-2.102-AftJAF/t/header-junk.t
> /home/JNEWM/.cpan/build/Email-Simple-2.102-AftJAF/t/test-mails/junk-in-header
> /home/JNEWM/.cpan/build/MIME-tools-5.503-wxTSaY/testmsgs/uu-junk-extracted.ref
> /home/JNEWM/.cpan/build/MIME-tools-5.503-wxTSaY/testmsgs/uu-junk-target.msg
> /home/JNEWM/.cpan/build/MIME-tools-5.503-wxTSaY/testmsgs/uu-junk.msg
> /home/JNEWM/.cpan/build/MIME-tools-5.503-wxTSaY/testmsgs/uu-junk.ref
> Segmentation fault (core dumped)
>
> JNEWM@FSEL7800 ~
> $
> --------------------------------------------------------------------------
>
> The tool works, except that it core dumps so it doesn't seem to feed a pipe
> very well.
>
> I tried running strace, and the end of the trace looks like the following.
> It looks to me like the problem happened during or just after the file close.
>
> --------------------------------------------------------------------------
>    19 84479661 [main] locate 9720 read: 65536 = read(3, 0x60003B2D0, 65536)
> 748393 85228054 [main] locate 9720 read: read(3, 0x60003B2D0, 65536) blocking
>    42 85228096 [main] locate 9720 fhandler_base::read: returning 65536, binary mode
>    13 85228109 [main] locate 9720 read: 65536 = read(3, 0x60003B2D0, 65536)
> 767492 85995601 [main] locate 9720 read: read(3, 0x60003B2D0, 65536) blocking
>    41 85995642 [main] locate 9720 fhandler_base::read: returning 65536, binary mode
>    13 85995655 [main] locate 9720 read: 65536 = read(3, 0x60003B2D0, 65536)
> 1058095 87053750 [main] locate 9720 read: read(3, 0x60003B2D0, 65536) blocking
>    41 87053791 [main] locate 9720 fhandler_base::read: returning 57882, binary mode
>    13 87053804 [main] locate 9720 read: 57882 = read(3, 0x60003B2D0, 65536)
> 1025302 88079106 [main] locate 9720 read: read(3, 0x60003B2D0, 65536) blocking
>    25 88079131 [main] locate 9720 fhandler_base::read: returning 0, binary mode
>    13 88079144 [main] locate 9720 read: 0 = read(3, 0x60003B2D0, 65536)
>   177 88079321 [main] locate 9720 close: close(3)
>    18 88079339 [main] locate 9720 fhandler_base::close: closing '/var/locatedb' handle 0x1DC
>    37 88079376 [main] locate 9720 close: 0 = close(3)
> --- Process 9720, exception c0000005 at 000000010040368B
>   176 88079552 [main] locate 9720 exception::handle: In cygwin_except_handler exception 0xC0000005 at 0x10040368B sp 0x22A800
>    14 88079566 [main] locate 9720 exception::handle: In cygwin_except_handler signal 11 at 0x10040368B
>    12 88079578 [main] locate 9720 try_to_debug: debugger_command ''
>    16 88079594 [main] locate 9720 _cygtls::inside_kernel: pc 0x10040368B, h 0x100400000, inside_kernel 0
>    19 88079613 [main] locate 9720 normalize_posix_path: src /dev/kmsg
>    13 88079626 [main] locate 9720 normalize_posix_path: /dev/kmsg = normalize_posix_path (/dev/kmsg)
>    12 88079638 [main] locate 9720 mount_info::conv_to_win32_path: conv_to_win32_path (/dev/kmsg)
>    15 88079653 [main] locate 9720 mount_info::conv_to_win32_path: src_path /dev/kmsg, dst \Device\MailSlot\cygwin\dev\kmsg, flags 0x2, rc 0
>    24 88079677 [main] locate 9720 build_fh_pc: fh 0x1802DFC70, dev 0001000B
>    62 88079739 [main] locate 9720 seterrno_from_nt_status: /home/corinna/src/cygwin/cygwin-1.7.25/64/cygwin-1.7.25-1/src/src/winsup/cygwin/fhandler_mailslot.cc:134 status 0xC0000034 -> windows error 2
>    15 88079754 [main] locate 9720 geterrno_from_win_error: windows error 2 == errno 2
>    13 88079767 [main] locate 9720 sig_send: sendsig 0x88, pid 9720, signal 11, its_me 1
>    13 88079780 [main] locate 9720 sig_send: wakeup 0xF0
>    16 88079796 [main] locate 9720 sig_send: Waiting for pack.wakeup 0xF0
>    21 88079817 [sig] locate 9720 sigpacket::process: signal 11 processing
>    26 88079843 [sig] locate 9720 sigpacket::process: signal 11, signal handler 0x18006F710
>    14 88079857 [sig] locate 9720 sigpacket::setup_handler: controlled interrupt. stackptr 0x22E028, stack 0x22E028, stackptr[-1] 0x22E028
>    15 88079872 [sig] locate 9720 proc_subproc: args: 5, 1
>    17 88079889 [sig] locate 9720 proc_subproc: clear waiting threads
>    12 88079901 [sig] locate 9720 proc_subproc: finished clearing
>    11 88079912 [sig] locate 9720 proc_subproc: returning 1
>    12 88079924 [sig] locate 9720 _cygtls::interrupt_setup: armed signal_arrived 0xF4, signal 11
>    12 88079936 [sig] locate 9720 sigpacket::setup_handler: signal 11 delivered
>    12 88079948 [sig] locate 9720 sigpacket::process: returning 1
>    12 88079960 [sig] locate 9720 wait_sig: signalling pack.wakeup 0xF0
>    15 88079975 [main] locate 9720 set_process_mask_delta: oldmask 0, newmask 0, deltamask 0
>    16 88079991 [main] locate 9720 signal_exit: exiting due to signal 11
>    13 88080004 [main] locate 9720 try_to_debug: debugger_command ''
> 88082154 [main] locate 9720 open_stackdumpfile: Dumping stack trace to locate.exe.stackdump
>  2150 88082154 [main] locate 9720 open_stackdumpfile: Dumping stack trace to locate.exe.stackdump
> 408716 88490870 [main] locate 9720 signal_exit: about to call do_exit (8B)
>   213 88491083 [main] locate 9720 do_exit: do_exit (139), exit_state 2
>    15 88491098 [main] locate 9720 void: 0x0 = signal (20, 0x1)
>    11 88491109 [main] locate 9720 void: 0x0 = signal (1, 0x1)
>     9 88491118 [main] locate 9720 void: 0x0 = signal (2, 0x1)
>    10 88491128 [main] locate 9720 void: 0x0 = signal (3, 0x1)
>    14 88491142 [main] locate 9720 fhandler_base::close_with_arch: line 1091:  /dev/pty0<0x1802DF470> usecount + -1 = 3
>    11 88491153 [main] locate 9720 fhandler_base::close_with_arch: not closing archetype
>    12 88491165 [main] locate 9720 fhandler_base::close_with_arch: line 1091:  /dev/pty0<0x1802DF470> usecount + -1 = 2
>    10 88491175 [main] locate 9720 fhandler_base::close_with_arch: not closing archetype
>    16 88491191 [main] locate 9720 fhandler_base::close_with_arch: line 1091:  /dev/pty0<0x1802DF470> usecount + -1 = 1
>    10 88491201 [main] locate 9720 fhandler_base::close_with_arch: not closing archetype
>    10 88491211 [main] locate 9720 init_cygheap::close_ctty: closing cygheap->ctty 0x1802DF470
>    10 88491221 [main] locate 9720 fhandler_base::close_with_arch: closing passed in archetype 0x0, usecount 0
>    10 88491231 [main] locate 9720 fhandler_pty_slave::cleanup: /dev/pty0 closed, usecount 0
>    11 88491242 [main] locate 9720 fhandler_pty_slave::close: closing last open /dev/pty0 handle
>    83 88491325 [main] locate 9720 fhandler_console::free_console: freed console, res 1
>    17 88491342 [main] locate 9720 fhandler_pty_common::close: pty0 <0xBC,0xC4> closing
>    13 88491355 [main] locate 9720 dtable::delete_archetype: deleting element 0 for /dev/pty0(136/0)
>    12 88491367 [main] locate 9720 getpid: 9720 = getpid()
>    10 88491377 [main] locate 9720 proc_terminate: nprocs 0
>    10 88491387 [main] locate 9720 proc_terminate: leaving
>    18 88491405 [main] locate 9720 pinfo::exit: Calling ExitProcess n 0x8B, exitcode 0x8B00
> --------------------------------------------------------------------------
>
> ------------------------------------------------------------------------
> Jeff Newmiller, Principal Engineer             DNV KEMA Renewables, Inc.
> jeff.newmiller@dnvkema.com    http://www.dnvkema.com/services/ces/solar/
> ------------------------------------------------------------------------
> Please note: BEW Engineering Inc has merged with DNV KEMA Renewables, Inc.
> My email address is changing (again) to the one you see on this email.
> While emails to my bewengineering.com address and my dnv.com address
> should continue to work for some time, I would appreciate it if you
> would update your address book to reflect the new dnvkema.com domain name.
>
>
> --
> 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

I have the same exact issue and outputs as you do.

I ran:
$ gdb locate.exe
(gdb) run findthis
Starting program: /usr/bin/locate findthis
[New Thread 4616.0x2794]
[New Thread 4616.0x2178]

Program received signal SIGSEGV, Segmentation fault.
splitstring (s=s@entry=0x0, separators=separators@entry=0x10041d87a
":", first=first@entry=false, pos=pos@entry=0x22a928,
    len=len@entry=0x22a930) at
/usr/src/debug/findutils-4.5.11-1/lib/splitstring.c:58
58            if (s[*pos])

Seems like a problem trying to process the next string if it exists...
Here is the relevant function from splitstring.c:58
____
splitstring(const char *s, const char *separators, bool first,
        size_t *pos, size_t *len)
{
  if (first)
    {
      *pos = 0u;
      *len = 0u;
    }
  else
    {
      *pos += *len;        /* advance to the next field. */
      if (s[*pos])
    ++*pos;            /* skip the separator */
      else
    return false;        /* we reached the end. */
    }
  *len = field_length (&s[*pos], separators);
  return true;
}
____

Not sure if this helps at all...

--
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]