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: [BUG] Nasty bug persists on x86-64

On Sep  1 18:14, Pavel Fedin wrote:
>  Hello! Another update has been published and i still experience random
> crashes on x86-64.
>  At this point i managed to go a little bit farther in my research. The
> problem reproduces best with 'sh --version' command. At first glance it
> seems to work OK most of the time, but take a look at strace's output:
> --- cut ---
>     1       1 [main] sh (3292)
> **********************************************
>   102     103 [main] sh (3292) Program name: C:\cygwin64\bin\sh.exe (windows
> pid 3292)
>    41     144 [main] sh (3292) OS version:   Windows NT-6.1
>    37     181 [main] sh (3292)
> **********************************************
>   110     291 [main] sh (3292) sigprocmask: 0 = sigprocmask (0, 0x0,
> 0x1802BED88)
>   400     691 [main] sh 3292 open_shared: name shared.5, n 5, shared
> 0x180030000 (wanted 0x180030000), h 0x70, *m 6
>    86     777 [main] sh 3292 user_heap_info::init: heap base 0x600000000,
> heap top 0x600000000, heap size 0x20000000 (536870912)
>    58     835 [main] sh 3292 open_shared: name
> S-1-5-21-1454471165-515967899-839522115-3227.1, n 1, shared 0x180020000
> (wanted 0x180020000), h 0x6C, *m 6
>    41     876 [main] sh 3292 user_info::create: opening user shared for
> 'S-1-5-21-1454471165-515967899-839522115-3227' at 0x180020000
>    41     917 [main] sh 3292 user_info::create: user shared version AB1FCCE8
>    70     987 [main] sh 3292 fhandler_pipe::create: name
> \\.\pipe\cygwin-e022582115c10879-3292-sigwait, size 11440, mode
>    88    1075 [main] sh 3292 fhandler_pipe::create: pipe read handle 0x84
>    39    1114 [main] sh 3292 fhandler_pipe::create: CreateFile: name
> \\.\pipe\cygwin-e022582115c10879-3292-sigwait
>    65    1179 [main] sh 3292 fhandler_pipe::create: pipe write handle 0x88
>    47    1226 [main] sh 3292 dll_crt0_0: finished dll_crt0_0 initialization
> --- Process 3292, exception c0000005 at 0000000076F3E4E4

I don't get this with 64 bit Cygwin 1.7.32 (tried on W7 and W8.1).  Are
you sure this exception is triggered by Cygwin and not induced by a
BLODA, a virus scanner or whatever?  This early in process initialization
it could even be the Windows Loader itself.

But even then, not all exceptions are fatal.  This one is an exception
in a Windows DLL, which is probably supposed to be catched by SEH.  The
OS certainly shouldn't crash due to a NULL pointer or handle, but it's
less hassle to catch an exception than to test pointers or handles for
validity every time a function is entered.

> $ gdb --args sh --version
> GNU gdb (GDB) 7.8
> Copyright (C) 2014 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later
> <>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
> and "show warranty" for details.
> This GDB was configured as "x86_64-unknown-cygwin".
> Type "show configuration" for configuration details.
> For bug reporting instructions, please see:
> <>.
> Find the GDB manual and other documentation resources online at:
> <>.
> For help, type "help".
> Type "apropos word" to search for commands related to "word"...
> Reading symbols from sh...(no debugging symbols found)...done.
> (gdb) run
> Starting program: /usr/bin/sh --version
> [New Thread 2716.0x650]
> Program received signal SIGSEGV, Segmentation fault.
> 0x0000000076f3e4e4 in ntdll!RtlDeNormalizeProcessParams () from
> /cygdrive/c/Windows/SYSTEM32/ntdll.dll

Try `bt' at this point.  Maybe the backtrace shows something of
interest.  Apart from that, try the latest snapshot from  I converted the internal exception
handling avoiding crashes from system functions to SEH.  Perhaps the
above doesn't show up with it.


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

Attachment: pgp_H2g2V5whd.pgp
Description: PGP signature

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