Date: Sun, 16 Feb 2014 08:49:22 -0800 From: Alfred Perlstein <alfred@freebsd.org> To: pkg@freebsd.org, ports@freebsd.org Subject: Re: pkg-static segfaults when a port makes a package in chroot/nanobsd. Message-ID: <5300EC12.80609@freebsd.org> In-Reply-To: <5300463F.9090301@freebsd.org> References: <5300463F.9090301@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
I have a ticket open in github for this, but I wanted to mail in and let people know that I figured the problem out somewhat: https://github.com/freebsd/pkg/issues/729 > OK I sort of figured it out. > > Basically the build script that I have issues the following command: > TARGET=amd64 TARGET_ARCH=amd64 NAS_PORTS_DIRECT=1 make > __MAKE_CONF=/vol/data/alfred/freenas/os-base/amd64/make.conf.build > SRC_BASE=/usr/src WRKDIRPREFIX=/usr/workdir -C > /usr/ports_dir/textproc/libxml2 clean all install package BATCH=yes > -DUSE_PACKAGE_DEPENDS -DFORCE_PACKAGE -DFORCE_PKG_REGISTER > > The after adding "-d lx" to the command for make(1) I saw that it > looks like the "install" target will "rm -rf" the stage dir! > > By switching around the order of targets from: > clean all install package > TO: > clean all package install > > It stopped deleting the .metadir which in turn stopped it from > segfaulting. > > It looks like there's a bug in the port's Mk system as well as pkgng. > > For now I think I may have a workaround. > Thanks everyone! For what it's worth my ports tree's latest commit is this: commit e6fcb0faa8aeb5905bad5c295f319917aafd21ff Author: makc <makc@FreeBSD.org> Date: Thu Feb 13 14:25:26 2014 +0000 misc/py-qt4-demo: - Use plist instead of PORTEXAMPLES, otherwise the package is bogus when NOPORTEXAMPLES is set - Use compileall.py to byte-compile installed examples - Use options helpers On 2/15/14, 9:01 PM, Alfred Perlstein wrote: > Hey folks, I'm doing a build of nanobsd derivative and trying to get > it to work on 10-stable with the tip of freebsd ports as of a couple > of days ago. > > I'm getting a segfault in pkg-static when trying to "make package". > > The stack trace is this: > (gdb) bt > #0 0x00000000005a0bcc in ucl_obj_ref (obj=0x0) at ucl.h:743 > #1 0x00000000005a0b99 in ucl_parser_get_object (parser=0x801027880) > at > /usr/workdir/usr/ports/ports-mgmt/pkg/work/pkg-1.2.6/libpkg/../external/libucl/src/ucl_util.c:230 > #2 0x0000000000564795 in pkg_parse_manifest_file (pkg=0x80104e1c0, > file=0x7fffffffb010 > "/usr/workdir/usr/ports_dir/textproc/libxml2/work/.metadir/+MANIFEST", > keys=0x8010282e0) at pkg_manifest.c:748 > #3 0x000000000043d83d in pkg_create_staged ( > outdir=0x7fffffffbc5d "/usr/ports/packages/All", format=TXZ, > rootdir=0x7fffffffbba5 > "/usr/workdir/usr/ports_dir/textproc/libxml2/work/stage", > md_dir=0x7fffffffbbdf > "/usr/workdir/usr/ports_dir/textproc/libxml2/work/.metadir", > plist=0x7fffffffbc1c > "/usr/workdir/usr/ports_dir/textproc/libxml2/work/.PLIST.mktmp", > old=false) at pkg_create.c:248 > #4 0x0000000000407e93 in exec_create (argc=1, argv=0x7fffffffb720) > at create.c:262 > #5 0x000000000040bd47 in main (argc=10, argv=0x7fffffffb6d8) at > main.c:774 > (gdb) > > The file > /usr/workdir/usr/ports_dir/textproc/libxml2/work/.metadir/+MANIFEST > doesn't seem to exist. > > > The command being run is this: > env TARGET=amd64 TARGET_ARCH=amd64 NAS_PORTS_DIRECT=1 make > __MAKE_CONF=/vol/data/alfred/freenas/os-base/amd64/make.conf.build > SRC_BASE=/usr/src WRKDIRPREFIX=/usr/workdir -C > /usr/ports_dir/textproc/libxml2 clean all install package BATCH=yes > -DUSE_PACKAGE_DEPENDS -DFORCE_PACKAGE -DFORCE_PKG_REGISTER > > > Any ideas? There is a large env being set: > > The environment looks like this, you can probably grep -v out the > ^NANO stuff to make this readable: > NANO_PYTHON_DEFAULT_VERSION=python2.7 > SUDO_COMMAND=/usr/local/bin/zsh > NANO_SRC=/vol/data/alfred/freenas/FreeBSD/src > NANO_MODULES= cc/cc_cdg cc/cc_chd cc/cc_cubic cc/cc_hd cc/cc_htcp > cc/cc_vegas cxgb cxgbe cyclic dtrace ext2fs fdescfs geom ipmi krpc > libiconv libmchain lindev linprocfs linsysfs linux nfs_common > nfsclient nfslock ispfw/ispfw opensolaris pf pflog smbfs tmpfs udf > usb/xhci zfs ctl cxgbe/t4_firmware cxgbe/t5_firmware iscsi syscons > NANO_LABEL=DarkShield > NANO_MEDIASIZE=14450688 > NANO_NEWFS=-b 4096 -f 512 -i 8192 -O1 -U > LOGNAME=root > NANO_TOOLS=/vol/data/alfred/freenas/build/nanobsd > NANO_MAKE_CONF_BUILD=/vol/data/alfred/freenas/os-base/amd64/make.conf.build > NAS_PORTS_DIRECT=1 > NANO_BOOTLOADER=boot/boot0 > MAKELEVEL=1 > AVATAR_ROOT=/vol/data/alfred/freenas > NANO_XZ=pxz > MAKEOBJDIRPREFIX=/vol/data/alfred/freenas/os-base/amd64 > FREEBSD_PACKAGE_MIRROR_32=http://mirror.exonetric.net/pub/pkgng/freebsd:9:x86:32/latest > NANO_PMAKE=make -j 9 > SCRIPT=typescript > NANO_ARCH=amd64 > FREEBSD_PKGCACHE_32=/freenas-build/freebsd-packages-32 > MASTER_SITE_OVERRIDE=http://build/distcache/${DIST_SUBDIR}/ > MAIL=/var/mail/root > NANO_LOCAL_DIRS= pbi-wrapper extract-tarball > NANO_CONFSIZE=2048 > MAKEFLAGS= .MAKE.LEVEL.ENV=MAKELEVEL > NANO_HEADS=16 > DISTCACHE= > MAKE_JOBS=9 > PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/home/alfred/bin > FREEBSD_DISTCACHE=/freenas-build/freebsd-distfiles > NANO_IMAGES=2 > NANO_CFG_BASE=/vol/data/alfred/freenas/nanobsd > NANO_MAKE_CONF_INSTALL=/vol/data/alfred/freenas/os-base/amd64/make.conf.install > SUDO_GID=1001 > OLDPWD=/vol/data/alfred/freenas/FreeBSD/ports/devel/py-fake-factory > .MAKE.LEVEL.ENV=MAKELEVEL > NANO_DATASIZE=4096000 > FREEBSD_FTP_MIRROR=ftp://ftp.freebsd.org > PWD=/vol/data/alfred/freenas/FreeBSD/ports/www/py-django-bootstrap-form > _=/usr/bin/make > REVISION=b28fa34 > FREEBSD_PACKAGE_MIRROR=http://pkg.cdn.pcbsd.org/freenas > NANO_WORLDDIR=/vol/data/alfred/freenas/os-base/amd64/_.w > FREENAS_ARCH=amd64 > NANO_ARCH_HUMANIZED=x64 > TERM=screen > NANO_NAME=DarkShield-9.2.0-RELEASE-b28fa34-x64 > NANO_IMGNAME=DarkShield-9.2.0-RELEASE-b28fa34-x64 > NANO_MAKEFS=makefs -B big -o > bsize=4096,fsize=512,density=8192,optimization=space > FREEBSD_PKGCACHE=/freenas-build/freebsd-packages > NANO_CODESIZE=0 > HOME=/root > USER=root > NANO_DRIVE=ufs/DarkShield > NANO_ARGS= > NANO_KERNEL=/vol/data/alfred/freenas/nanobsd/FREENAS.amd64 > NANO_BOOT0CFG=-o packet -s 1 -m 3 -t 18 > DEFAULT_VERSIONS=python=2.7 > SHELL=/usr/local/bin/zsh > SVNREVISION=b28fa34 > NANO_SECTS=63 > SUDO_USER=alfred > SUDO_UID=1001 > USERNAME=root > AVATAR_COMPONENT=os-base > FREEBSD_RELEASE_VERSION=9.1-RELEASE > VERSION=9.2.0-RELEASE > NANO_OBJ=/vol/data/alfred/freenas/os-base/amd64 > GIT_LOCATION=INTERNAL > SHLVL=2 > FREENAS_PLUGINCACHE=/freenas-build/freenas-plugins > > > -Alfred
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5300EC12.80609>