Re: gdb misbehaviour

2017-08-29 Thread Kamil Rytarowski
On 28.08.2017 17:28, Patrick Welche wrote:
> While trying to update pkgsrc glib-networking on -current/amd64,
> I saw that gio-querymodules kept dumping core. I don't understand
> the gdb output:
> 
> quantz# gdb /usr/pkg/bin/gio-querymodules  
> GNU gdb (GDB) 7.12
> ...
> (gdb) break main
> Breakpoint 1 at 0x401438: file gio-querymodules.c, line 132.
> (gdb) run /usr/pkg/lib/gio/modules
> Starting program: /usr/pkg/bin/gio-querymodules /usr/pkg/lib/gio/modules
> 
> Breakpoint 1, main (argc=2, argv=0x7f7fe7a0) at gio-querymodules.c:132
> 132   if (argc == 1)
> (gdb) n
> 139   setlocale (LC_ALL, "");
> (gdb) 
> 142   g_type_ensure (G_TYPE_OBJECT);
> (gdb) 
> 144   for (i = 1; i < argc; i++)
> (gdb) 
> 145 query_dir (argv[i]);
> (gdb) 
> 144   for (i = 1; i < argc; i++)
> (gdb) 
> 147   return 0;
> (gdb) 
> 148 }
> (gdb) 
> 0x0040101b in ___start ()
> (gdb) 
> Single stepping until exit from function ___start,
> which has no line number information.
> 
> Program received signal SIGSEGV, Segmentation fault.
> 0x7f7ff4c0979f in ?? ()
> (gdb) 
> Cannot find bounds of current function
> 
> 
> "return 0;" didn't? (This is a 20 August system)
> 
> Cheers,
> 
> Patrick
> 

It works for me (NetBSD-current from Aug 26).

(gdb) break main
Breakpoint 1 at 0x401141: file gio-querymodules.c, line 132.
(gdb) run /usr/pkg/lib/gio/modules
Starting program: /usr/pkg/bin/gio-querymodules /usr/pkg/lib/gio/modules

Breakpoint 1, main (argc=2, argv=0x7f7fff567eb0) at gio-querymodules.c:132
132   if (argc == 1)
(gdb) n
139   setlocale (LC_ALL, "");
(gdb)
142   g_type_ensure (G_TYPE_OBJECT);
(gdb)
144   for (i = 1; i < argc; i++)
(gdb)
145 query_dir (argv[i]);
(gdb)
144   for (i = 1; i < argc; i++)
(gdb)
148 }
(gdb)
0x0040104b in ___start ()
(gdb)
Single stepping until exit from function ___start,
which has no line number information.
[Inferior 1 (LWP 0) exited normally]
(gdb)
The program is not being run.
(gdb)

My pkgsrc build is with options (mk.conf(5)):
CFLAGS+=-Og -g -ggdb
CXXFLAGS+=  -Og -g -ggdb
INSTALL_UNSTRIPPED= yes
BUILDLINK_TRANSFORM+=   rm:-s



signature.asc
Description: OpenPGP digital signature


Re: gdb misbehaviour

2017-08-29 Thread Patrick Welche
On Mon, Aug 28, 2017 at 01:10:59PM -0500, John D. Baker wrote:
> When did you last build "glib2" and "gobject-introspection"?  Was it with
> a system before this change:
> 
>   http://mail-index.netbsd.org/source-changes/2017/07/19/msg086477.html
> 
> or after?  It has been my observation that packages built before the
> above change will continue to have problems, notably 'gio-querymodules'
> segfaulting during the de-install of a package being updated/replaced.

I knew about this issue, hence mentioning 20 August system HOWEVER two
of the modules installed were from before then. So, new NetBSD, glib2
and gobject-instrospection wasn't enough - I had to replace gio-fam and
dconf as well. (Hadn't guessed as I was working on glib-networking.)

Thanks,

Patrick


Re: gdb misbehaviour

2017-08-28 Thread John D. Baker
On Mon, 28 Aug 2017 16:28:06 +0100, Patrick Welche 
wrote:

> While trying to update pkgsrc glib-networking on -current/amd64, I
> saw that gio-querymodules kept dumping core.

I can't speak to the 'gdb' issue, but your description of the situation
that prompted it sounds like toolchain/51266.

When did you last build "glib2" and "gobject-introspection"?  Was it with
a system before this change:

  http://mail-index.netbsd.org/source-changes/2017/07/19/msg086477.html

or after?  It has been my observation that packages built before the
above change will continue to have problems, notably 'gio-querymodules'
segfaulting during the de-install of a package being updated/replaced.

-- 
|/"\ John D. Baker, KN5UKS   NetBSD Darwin/MacOS X
|\ / jdbaker[snail]mylinuxisp[flyspeck]comOpenBSDFreeBSD
| X  No HTML/proprietary data in email.   BSD just sits there and works!
|/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645