NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: misc/54856: makefs/walk.c assertion building images





On Mon, Jan 20, 2020 at 16:20 Christos Zoulas <christos%zoulas.com@localhost> wrote:
Since you have a core file, can you go in gdb and print a stack trace?


Hi Christos.

It looked poor (no debug symbols??) at the frame I was most interested in, but:

gdb -c ./nbmakefs.core /usr/obj/tooldir.NetBSD-9.99.39-amd64/bin/nbmakefs

(gdb) bt full
#0  0x00007961e778609a in _lwp_kill () from /usr/lib/libc.so.12
No symbol table info available.
#1  0x00007961e778643a in abort () at /usr/src/lib/libc/stdlib/abort.c:74
        mask = {__bits = {4294967263, 4294967295, 4294967295, 4294967295}}
#2  0x00007961e77859db in __assert13 (file=<optimized out>, line=<optimized out>,
    function=<optimized out>, failedexpr=<optimized out>) at /usr/src/lib/libc/gen/assert.c:72
        buf = "assertion \"curnode->slink != NULL\" failed: file \"/usr/src/tools/makefs/../../usr.sbin/makefs/walk.c\", line 480, function \"apply_specdir\"\n\000\027\377\177\177\000\000 \360\027\377\177\177\000\000\222\240u\347ay\000\000\310\355\027\377\177\177\000\000\f\000\000\000\000\000\000\000\063\360\027\377\177\177\000\000*\022\t\020\355\003\000\000\b\002\377\377\000\000\000\000"...
        l = <optimized out>
#3  0x0000000000411e8e in apply_specdir ()
No symbol table info available.
#4  0x0000000000411ebc in apply_specdir ()
No symbol table info available.
#5  0x00000000004121b3 in apply_specfile ()
No symbol table info available.
#6  0x000000000040e55a in main ()
No symbol table info available.



** function start .../makefs/walk.c **
--------------------------------------
    361 static void
    362 apply_specdir(const char *dir, NODE *specnode, fsnode *dirnode, int speconly)
    363 {
    364         char     path[MAXPATHLEN + 1];
    365         NODE    *curnode;
    366         fsnode  *curfsnode;
    367
    368         assert(specnode != NULL);
    369         assert(dirnode != NULL);
    370
    371         if (debug & DEBUG_APPLY_SPECFILE)
    372                 printf("apply_specdir: %s %p %p\n", dir, specnode, dirnode);
    373
    374         if (specnode->type != F_DIR)
    375                 errx(1, "Specfile node `%s/%s' is not a directory",
    376                     dir, specnode->name);


** line 480 context .../makefs/walk.c **
----------------------------------------
    460                         stbuf.st_mtime = stbuf.st_atime =
    461                             stbuf.st_ctime = start_time.tv_sec;
    462 #if HAVE_STRUCT_STAT_ST_MTIMENSEC
    463                         stbuf.st_mtimensec = stbuf.st_atimensec =
    464                             stbuf.st_ctimensec = start_time.tv_nsec;
    465 #endif
    466                         curfsnode = create_fsnode(".", ".", curnode->name,
    467                             &stbuf);
    468                         curfsnode->parent = dirnode->parent;
    469                         curfsnode->first = dirnode;
    470                         curfsnode->next = dirnode->next;
    471                         dirnode->next = curfsnode;
    472                         if (curfsnode->type == S_IFDIR) {
    473                                         /* for dirs, make "." entry as well */
    474                                 curfsnode->child = create_fsnode(".", ".", ".",
    475                                     &stbuf);
    476                                 curfsnode->child->parent = curfsnode;
    477                                 curfsnode->child->first = curfsnode->child;
    478                         }
    479                         if (curfsnode->type == S_IFLNK) {
    480                                 assert(curnode->slink != NULL);
    481                                         /* for symlinks, copy the target */
    482                                 curfsnode->symlink = estrdup(curnode->slink);
    483                         }
    484                 }
 






christos

On Jan 20, 2020, at 7:16 PM, bch <brad.harder%gmail.com@localhost> wrote:



On Sat, Jan 18, 2020 at 11:45 Martin Husemann <martin%duskware.de@localhost> wrote:

The following reply was made to PR misc/54856; it has been noted by GNATS.

From: Martin Husemann <martin%duskware.de@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc:
Subject: Re: misc/54856: makefs/walk.c assertion  building images
Date: Sat, 18 Jan 2020 20:42:17 +0100

 I can not reproduce it:



Hrm - I can still successfully reproduce the error. I’ve done a clean (no “-u”) (re)build of kernel, modules and tools in case some flaw was “leaking” into the build env. The tail of my latest effort has some (undocumented) makefs debugging turned on, though it’s not immediately illuminating to me:


# env CDMAKEFSEXTRAOPTS="-d 536870911" nice ./build.sh -j1 -u -U -x -V CDMAKEFSEXTRAOPTS="-d 536870911" -N2 release


[...]


apply_specdir:  spec ethers

apply_specdir:  spec exports

apply_specdir:  spec fstab

apply_specdir: adding fstab

apply_specentry: cdrom/etc/fstab

                        changing gid from 0 to 0

                        changing mode from 0 to 0644

                        changing uid from 0 to 0

apply_specdir:  spec ftpd.conf

apply_specdir:  spec ftpwelcome

apply_specdir:  spec gateways

apply_specdir:  spec hesiod.conf

apply_specdir:  spec hosts.allow

apply_specdir:  spec hosts.deny

apply_specdir:  spec ifaliases

apply_specdir:  spec ipf.conf

apply_specdir:  spec ipf6.conf

apply_specdir:  spec ipnat.conf

apply_specdir:  spec ipsec.conf

apply_specdir:  spec ld.so.conf

apply_specdir:  spec localtime

apply_specdir: adding localtime

[1]   Abort trap (core dumped) /usr/src/obj/tooldir.NetBSD-9.99.39-amd64/bin/...

*** [image] Error code 134

nbmake[5]: stopped in /usr/src/distrib/amd64/cdroms/bootcd

1 error

nbmake[5]: stopped in /usr/src/distrib/amd64/cdroms/bootcd

*** [release-bootcd] Error code 2


nbmake[4]: stopped in /usr/src/distrib/amd64/cdroms

1 error


nbmake[4]: stopped in /usr/src/distrib/amd64/cdroms

*** [release-cdroms] Error code 2


nbmake[3]: stopped in /usr/src/distrib/amd64

1 error


nbmake[3]: stopped in /usr/src/distrib/amd64

*** [release-amd64] Error code 2


nbmake[2]: stopped in /usr/src/distrib

1 error


nbmake[2]: stopped in /usr/src/distrib

*** [snap_post] Error code 2


nbmake[1]: stopped in /usr/src/etc

1 error


nbmake[1]: stopped in /usr/src/etc

*** [release] Error code 2


nbmake: stopped in /usr/src

1 error


nbmake: stopped in /usr/src


ERROR: Failed to make release

*** BUILD ABORTED ***







 ===> Successful make install-image
 ===> build.sh ended:      Sat Jan 18 20:39:08 CET 2020
 ===> Summary of results:
          build.sh command:    /usr/src/build.sh -O /tmp/obj -D /tmp/dest -T /tmp/tools -j24 -u -U -x release install-image
          build.sh started:    Sat Jan 18 19:58:34 CET 2020
          NetBSD version:      9.99.39
          MACHINE:             amd64
          MACHINE_ARCH:        x86_64
          Build platform:      NetBSD 9.99.38 amd64
          HOST_SH:             /bin/sh
          No $TOOLDIR/bin/nbmake, needs building.
          Bootstrapping nbmake
          MAKECONF file:       /etc/mk.conf
          TOOLDIR path:        /tmp/tools
          DESTDIR path:        /tmp/dest
          RELEASEDIR path:     /tmp/obj/releasedir
          Created /tmp/tools/bin/nbmake
          Updated makewrapper: /tmp/tools/bin/nbmake-amd64
          Successful make release
          Successful make install-image
          build.sh ended:      Sat Jan 18 20:39:08 CET 2020
 ===> .


 Martin



<sanitizer.log>



Home | Main Index | Thread Index | Old Index