public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* SIGSEGV before main ? and gcc-debuginfo
@ 2015-07-11  7:22 Marco Atzeri
  2015-07-15 13:11 ` Corinna Vinschen
  0 siblings, 1 reply; 3+ messages in thread
From: Marco Atzeri @ 2015-07-11  7:22 UTC (permalink / raw)
  To: cygwin

trying to debug latest release candidate of netcdf
I hit this SIGSEGV before reaching main

$ gdb .libs/ctest.exe
GNU gdb (GDB) Cygwin 7.9.1-1
.....
Reading symbols from .libs/ctest.exe...done.
(gdb) break main
Breakpoint 1 at 0x100401171: file 
/pub/devel/netcdf/prova/netcdf-c-4.4.0-rc2/ncdump/ctest.c, line 32.
(gdb) run
Starting program: 
/cygdrive/e/cyg_pub/devel/netcdf/prova/netcdf-c-4.4.0-rc2_build64/ncdump/.libs/ctest.exe
[New Thread 9476.0x2a88]
[New Thread 9476.0x1fa0]
[New Thread 9476.0x9a8]

Program received signal SIGSEGV, Segmentation fault.
___chkstk_ms () at 
/usr/src/debug/gcc-4.9.3-1/libgcc/config/i386/cygwin.S:146
146             orq     $0x0, (%rcx)            /* probe there */

I thought it was a stack issue and I raised from 2M to 8M

SizeOfStackReserve      0000000000200000

SizeOfStackReserve      00000000007a1200

with no success.

May be it is not a netcdf bug ? Ideas what to look for ?


$ uname -svr
CYGWIN_NT-6.1 2.0.4(0.287/5/3) 2015-06-09 12:22


In addition there is a problem with gcc-debuginfo

  $ cygcheck -l gcc-debuginfo |grep cygwin.S
/usr/src/debug/gcc-4.9.3-1/libgcc/config/i386/cygwin.S

(gdb) break ___chkstk_ms
Breakpoint 2 at 0x100407a60: ___chkstk_ms. (5 locations)
(gdb) run
Starting program: 
/cygdrive/e/cyg_pub/devel/netcdf/prova/netcdf-c-4.4.0-rc2_build64/ncdump/.libs/ctest.exe
[New Thread 6656.0x2980]

Breakpoint 2, ___chkstk_ms () at ../../../libgcc/config/i386/cygwin.S:137
137     ../../../libgcc/config/i386/cygwin.S: No such file or directory.

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: SIGSEGV before main ? and gcc-debuginfo
  2015-07-11  7:22 SIGSEGV before main ? and gcc-debuginfo Marco Atzeri
@ 2015-07-15 13:11 ` Corinna Vinschen
  2015-07-15 13:24   ` Marco Atzeri
  0 siblings, 1 reply; 3+ messages in thread
From: Corinna Vinschen @ 2015-07-15 13:11 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 2304 bytes --]

Hi Marco,


I seem to have missed this...

On Jul 11 09:22, Marco Atzeri wrote:
> trying to debug latest release candidate of netcdf
> I hit this SIGSEGV before reaching main
> 
> $ gdb .libs/ctest.exe
> GNU gdb (GDB) Cygwin 7.9.1-1
> .....
> Reading symbols from .libs/ctest.exe...done.
> (gdb) break main
> Breakpoint 1 at 0x100401171: file
> /pub/devel/netcdf/prova/netcdf-c-4.4.0-rc2/ncdump/ctest.c, line 32.
> (gdb) run
> Starting program: /cygdrive/e/cyg_pub/devel/netcdf/prova/netcdf-c-4.4.0-rc2_build64/ncdump/.libs/ctest.exe
> [New Thread 9476.0x2a88]
> [New Thread 9476.0x1fa0]
> [New Thread 9476.0x9a8]
> 
> Program received signal SIGSEGV, Segmentation fault.
> ___chkstk_ms () at
> /usr/src/debug/gcc-4.9.3-1/libgcc/config/i386/cygwin.S:146
> 146             orq     $0x0, (%rcx)            /* probe there */
> 
> I thought it was a stack issue and I raised from 2M to 8M

It *is* a stack issue of some sort, otherwise it wouldn't have called
___chkstk_ms, which is the guard page handler.

Did you find out in the meantime?

> SizeOfStackReserve      0000000000200000
> 
> SizeOfStackReserve      00000000007a1200
> 
> with no success.
> 
> May be it is not a netcdf bug ? Ideas what to look for ?

If it's prior to main, it must be some constructor.  Other than that,
no idea.

> $ uname -svr
> CYGWIN_NT-6.1 2.0.4(0.287/5/3) 2015-06-09 12:22
> 
> 
> In addition there is a problem with gcc-debuginfo
> 
>  $ cygcheck -l gcc-debuginfo |grep cygwin.S
> /usr/src/debug/gcc-4.9.3-1/libgcc/config/i386/cygwin.S
> 
> (gdb) break ___chkstk_ms
> Breakpoint 2 at 0x100407a60: ___chkstk_ms. (5 locations)
> (gdb) run
> Starting program: /cygdrive/e/cyg_pub/devel/netcdf/prova/netcdf-c-4.4.0-rc2_build64/ncdump/.libs/ctest.exe
> [New Thread 6656.0x2980]
> 
> Breakpoint 2, ___chkstk_ms () at ../../../libgcc/config/i386/cygwin.S:137
> 137     ../../../libgcc/config/i386/cygwin.S: No such file or directory.

Hmm, the relative path might break finding the debuginfo.  You
should be able to help gdb by calling

  (gdb) dir /usr/src/debug/gcc-4.9.3-1/libgcc/config/i386


Corinna

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

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: SIGSEGV before main ? and gcc-debuginfo
  2015-07-15 13:11 ` Corinna Vinschen
@ 2015-07-15 13:24   ` Marco Atzeri
  0 siblings, 0 replies; 3+ messages in thread
From: Marco Atzeri @ 2015-07-15 13:24 UTC (permalink / raw)
  To: cygwin

On 7/15/2015 3:11 PM, Corinna Vinschen wrote:
> Hi Marco,
>
>
> I seem to have missed this...
>
> On Jul 11 09:22, Marco Atzeri wrote:
>> trying to debug latest release candidate of netcdf
>> I hit this SIGSEGV before reaching main
>>
>> $ gdb .libs/ctest.exe
>> GNU gdb (GDB) Cygwin 7.9.1-1
>> .....
>> Reading symbols from .libs/ctest.exe...done.
>> (gdb) break main
>> Breakpoint 1 at 0x100401171: file
>> /pub/devel/netcdf/prova/netcdf-c-4.4.0-rc2/ncdump/ctest.c, line 32.
>> (gdb) run
>> Starting program: /cygdrive/e/cyg_pub/devel/netcdf/prova/netcdf-c-4.4.0-rc2_build64/ncdump/.libs/ctest.exe
>> [New Thread 9476.0x2a88]
>> [New Thread 9476.0x1fa0]
>> [New Thread 9476.0x9a8]
>>
>> Program received signal SIGSEGV, Segmentation fault.
>> ___chkstk_ms () at
>> /usr/src/debug/gcc-4.9.3-1/libgcc/config/i386/cygwin.S:146
>> 146             orq     $0x0, (%rcx)            /* probe there */
>>
>> I thought it was a stack issue and I raised from 2M to 8M
>
> It *is* a stack issue of some sort, otherwise it wouldn't have called
> ___chkstk_ms, which is the guard page handler.
>
> Did you find out in the meantime?

No. I put at side the issue and reported as upstream regression
http://www.unidata.ucar.edu/mailing_lists/archives/netcdfgroup/2015/msg00192.html

As the crash is on initialization of a test program
is not too high on my TODO.

>> SizeOfStackReserve      0000000000200000
>>
>> SizeOfStackReserve      00000000007a1200
>>
>> with no success.
>>
>> May be it is not a netcdf bug ? Ideas what to look for ?
>
> If it's prior to main, it must be some constructor.  Other than that,
> no idea.
>

>
> Hmm, the relative path might break finding the debuginfo.  You
> should be able to help gdb by calling
>
>    (gdb) dir /usr/src/debug/gcc-4.9.3-1/libgcc/config/i386
>
>

thanks. I will try



> Corinna
>

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-07-15 13:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-11  7:22 SIGSEGV before main ? and gcc-debuginfo Marco Atzeri
2015-07-15 13:11 ` Corinna Vinschen
2015-07-15 13:24   ` Marco Atzeri

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).