Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 May 2016 18:46:04 +1000
From:      andrew clarke <mail@ozzmosis.com>
To:        freebsd-ports@FreeBSD.org
Cc:        pkg@FreeBSD.org
Subject:   pkg updating crash in pkg-1.8.0
Message-ID:  <20160523084604.GA33081@ozzmosis.com>

next in thread | raw e-mail | index | archive | help
Hi,

The command "pkg updating" crashes since pkg-1.8.0.

Out of curiosity I rebuilt it from source, then single-stepped
pkg-static using gdb:

$ uname -a
FreeBSD blizzard.phoenix 10.3-RELEASE FreeBSD 10.3-RELEASE #0 r297264:
Fri Mar 25 02:10:02 UTC 2016
root@releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64

$ gdb --args pkg-static updating
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "amd64-marcel-freebsd"...
(gdb) break main
Breakpoint 1 at 0x40980e: file main.c, line 570.
(gdb) r
Starting program: /usr/home/ozzmosis/src/pkg/pkg-1.8.0/src/pkg-static updating

Breakpoint 1, main (argc=2, argv=0x7fffffffe4c8) at main.c:570
570             int64_t           debug = 0;
Current language:  auto; currently minimal
(gdb) n
584             struct option longopts[] = {
(gdb)
602             setvbuf(stdout, NULL, _IONBF, 0);
(gdb)
605             signal(SIGPIPE, SIG_IGN);
(gdb)
607             if (argc < 2)
(gdb)
616             if (setenv("POSIXLY_CORRECT", "1",  1) == -1)
(gdb)
626             while ((ch = getopt_long(argc, argv, "+d"JAIL_OPT"c:C:R:r:lNvo:46", longopts, NULL)) != -1) {
(gdb)
671             argv += optind;
(gdb)
673             pkg_set_debug_level(debug);
(gdb)
675             if (version == 1)
(gdb)
678             if (show_commands && version == 0) {
(gdb)
686             umask(022);
(gdb)
687             pkg_event_register(&event_callback, &debug);
(gdb)
690             optreset = 1;
(gdb)
691             optind = 1;
(gdb)
693             if (debug == 0 && version == 0)
(gdb)
462                     child_pid = fork();
(gdb)
464                     if (child_pid == 0) {
(gdb)
473                             while (waitpid(child_pid, &status, 0) == -1) {
(gdb)
478                             ret = WEXITSTATUS(status);
(gdb)
480                             if (WIFEXITED(status) && ret != EX_NEEDRESTART)
(gdb)
482                             if (WIFSIGNALED(status)) {
(gdb) 
484                                     fprintf(stderr, "Child process pid=%d terminated abnormally: %s\n",
(gdb) 
485                                                     (int)child_pid, strsignal (WTERMSIG(status)));
(gdb) 
484                                     fprintf(stderr, "Child process pid=%d terminated abnormally: %s\n",
(gdb) 
Child process pid=33151 terminated abnormally: Trace/BPT trap
486                                     ret = 128 + WTERMSIG(status);
(gdb) 
492             exit(ret);
(gdb) 
Program exited with code 0205.
(gdb) 

I'm not really sure what's going on here but it might be obvious to
the devs.

Thanks,

Regards
Andrew



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160523084604.GA33081>