Re: debugging a run of poudriere-bulk

2018-10-04 Thread Matthias Apitz
El día Thursday, October 04, 2018 a las 01:14:55PM +0930, Shane Ambler escribió:

> > How can I enter the jail interactively in the moment after the crash to 
> > rerun and
> > debug pkg-static?
> 
> Using
> 
> poudriere testport -j  -p  -i -o 
> 
> will drop you into the jail after the build stops, you then rerun make
> manually, check build logs... Logging out will then continue on and
> clean up the jail. You can also use -I instead of -i and it leaves the
> jail in place so you can manually connect to and stop the jail.
> 
> Note that poudriere uses a clean jail with only deps listed for the
> port, you can add extra BUILD_DEPENDS to get extra ports (gdb valgrind)
> installed with the test build.

Thanks! One should read man pages completely in advance and not only the
part of 'poudriere bulk ...'.

I did so and in nthis case the crash occurs *after* the package is
complete:


...
> Checking for pkg-plist issues (check-plist)
===> Parsing plist
===> Checking for items in STAGEDIR missing from pkg-plist
===> Checking for items in pkg-plist which are not in STAGEDIR
===> No pkg-plist issues found (check-plist)
=>> Checking for staging violations... done
===
===>  Building package for kde-workspace-kde4-4.11.22_26
file sizes/checksums  [2126]: .. done
packing files [2126]: .. done
packing directories  [0]: . done
===
=>> Recording filesystem state for preinst... done
===
===>  Installing for kde-workspace-kde4-4.11.22_26
===>  Checking if kde-workspace-kde4 already installed
===>   Registering installation for kde-workspace-kde4-4.11.22_26
Child process pid=75639 terminated abnormally: Segmentation faul
*** Error code 139

Stop.
make: stopped in /usr/ports/x11/kde-workspace-kde4
===
[00:13:29] Installing packages
[00:13:29] Installing run-depends for x11/kde-workspace-kde4 | 
kde-workspace-kde4-4.11.22_26


# ls -l 
/wrkdirs/usr/ports/x11/kde-workspace-kde4/work/pkg/kde-workspace-kde4-4.11.22_26.txz
-rw-r--r--  1 nobody  wheel  18338720 Oct  4 14:02 
/wrkdirs/usr/ports/x11/kde-workspace-kde4/work/pkg/kde-workspace-kde4-4.11.22_26.txz

Poudriere installs the package 'pkg' into the jail to could make use of
'pkg-static' (and other tools). Maybe it would be an idea to create
outside a special version of this package which have a special version
of 'pkg-static' in this, for example a shellsript with the name
pkg-static which is something like:

#!/bin/sh
echo $0 $* > /tmp/pkg-static-args.$$
truss -o /tmp/pkg-static.$$ /usr/local/sbin/pkgstatic.exec $*

to get more information about the crash.

Other ideas?

matthias

-- 
Matthias Apitz, ✉ g...@unixarea.de, http://www.unixarea.de/ +49-176-38902045
Public GnuPG key: http://www.unixarea.de/key.pub
October, 7 -- The GDR was different: Peace instead of Bundeswehr and wars, 
Druschba
instead of Nazis, to live instead of to survive.
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: debugging a run of poudriere-bulk

2018-10-03 Thread Shane Ambler
On 3/10/18 9:11 pm, Matthias Apitz wrote:
> 
> Hello,
> 
> 
> I'm trying to nail down PR 231532 of a port which fails to build in
> poudriere. In the last phase of the ports build, while creating the pkg
> of the built port with pkg-static, this crashes:
> 
> # tail 
> /usr/local/poudriere/data/logs/bulk/freebsd-r338641-ports-20180920/2018-10-03_11h32m17s/logs/kde-workspace-kde4-4.11.22_26.log
> Child process pid=85086 terminated abnormally: Segmentation fault
> *** Error code 1
> 
> Stop.
> make: stopped in /usr/ports/x11/kde-workspace-kde4
> =>> Cleaning up wrkdir
> 
> # grep 85086 /var/log/messages
> Oct  3 11:44:01 jet kernel: pid 85086 (pkg-static), uid 65534: exited on 
> signal 11
> 
> 
> How can I enter the jail interactively in the moment after the crash to rerun 
> and
> debug pkg-static?

Using

poudriere testport -j  -p  -i -o 

will drop you into the jail after the build stops, you then rerun make
manually, check build logs... Logging out will then continue on and
clean up the jail. You can also use -I instead of -i and it leaves the
jail in place so you can manually connect to and stop the jail.

Note that poudriere uses a clean jail with only deps listed for the
port, you can add extra BUILD_DEPENDS to get extra ports (gdb valgrind)
installed with the test build.

-- 
FreeBSD - the place to B...Software Developing

Shane Ambler

___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: debugging a run of poudriere-bulk

2018-10-03 Thread Matthias Apitz
El día miércoles, octubre 03, 2018 a las 11:06:55p. m. +0200, Tobias C. Berner 
escribió:

> Moin moin
> 
> Unfortunately it is very hard to help here when not being able to reproduce
> the issue :/
> Have you tried wiping all the packages in poudriere's repo? -- i.e. -c --
> maybe you're pkg package is just hosed.

Tobias,

The problem *is* reproducible, even in the build clusters of freebsd.org
(see pkg-fallout messages). It is only (until now) not debug-able.

matthias


-- 
Matthias Apitz, ✉ g...@unixarea.de, http://www.unixarea.de/ +49-176-38902045
Public GnuPG key: http://www.unixarea.de/key.pub
October 3: Day of German Unity? No! Day of taking over the GDR.
3. Oktober: Tag der Deutschen Einheit? Nein! DDR-Anschlusstag.


signature.asc
Description: PGP signature


Re: debugging a run of poudriere-bulk

2018-10-03 Thread Tobias C. Berner
Moin moin

Unfortunately it is very hard to help here when not being able to reproduce
the issue :/
Have you tried wiping all the packages in poudriere's repo? -- i.e. -c --
maybe you're pkg package is just hosed.


mfg Tobias

On Wed, 3 Oct 2018 at 22:30, Matthias Apitz  wrote:

>
> I added the following lines to /usr/local/share/poudriere/bulk.sh to get
> the env vars into the environment of pkg(8):
>
> export DEBUG_LEVEL=4
> export DEBUG_SCRIPTS=TRUE
> export DEVELOPER_MODE=TRUE
> export PKG_CREATE_VERBOSE=TRUE
>
> With these the port builds fine:
>
> # tail -f
> /usr/local/poudriere/data/logs/bulk/freebsd-r338641-ports-20180920/2018-10-03_22h03m46s/logs/kde-workspace-kde4-4.11.22_26.log
> ...
>
> DBG(1)[94432]> PkgConfig: loading repositories in /etc/pkg/
> DBG(1)[94432]> PKgConfig: loading /etc/pkg//FreeBSD.conf
> DBG(1)[94432]> PkgConfig: parsing key 'FreeBSD'
> DBG(1)[94432]> PkgConfig: parsing repository object FreeBSD
> DBG(1)[94432]> PkgConfig: loading repositories in /usr/local/etc/pkg/repos/
> DBG(1)[94432]> Creating package from stage directory:
> '/wrkdirs/usr/ports/x11/kde-workspace-kde4/wor
> k/stage'
> DBG(1)[94432]> Parsing manifest from '+MANIFEST'
> DBG(3)[94432]> Manifest: found key: 'name'
>
> ...
>
> DBG(2)[94432]> Packing file
> '/wrkdirs/usr/ports/x11/kde-workspace-kde4/work/stage/usr/local/share/wallpapers/stripes.png.desktop'
> DBG(2)[94432]> Packing file
> '/wrkdirs/usr/ports/x11/kde-workspace-kde4/work/stage/usr/local/share/xsessions/kde4.desktop'
> DBG(2)[94432]> Packing file
> '/wrkdirs/usr/ports/x11/kde-workspace-kde4/work/stage/usr/local/etc/rc.d/kdm4'
> packing files [2126]... done
> packing directories  [0]: . done
> ===
> =>> Cleaning up wrkdir
> ===>  Cleaning for kde-workspace-kde4-4.11.22_26
> build of x11/kde-workspace-kde4 | kde-workspace-kde4-4.11.22_26 ended at
> Wed Oct  3 22:15:54 CEST 2018
> build time: 00:11:21
>
> i.e. the pkg-static does not crash.
>
> And now?
>
> matthias
>
> --
> Matthias Apitz, ✉ g...@unixarea.de, http://www.unixarea.de/
> +49-176-38902045
> Public GnuPG key: http://www.unixarea.de/key.pub
> October 3: Day of German Unity? No! Day of taking over the GDR.
> 3. Oktober: Tag der Deutschen Einheit? Nein! DDR-Anschlusstag.
>
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: debugging a run of poudriere-bulk

2018-10-03 Thread Matthias Apitz

I added the following lines to /usr/local/share/poudriere/bulk.sh to get
the env vars into the environment of pkg(8):

export DEBUG_LEVEL=4
export DEBUG_SCRIPTS=TRUE
export DEVELOPER_MODE=TRUE
export PKG_CREATE_VERBOSE=TRUE

With these the port builds fine:

# tail -f 
/usr/local/poudriere/data/logs/bulk/freebsd-r338641-ports-20180920/2018-10-03_22h03m46s/logs/kde-workspace-kde4-4.11.22_26.log
...

DBG(1)[94432]> PkgConfig: loading repositories in /etc/pkg/
DBG(1)[94432]> PKgConfig: loading /etc/pkg//FreeBSD.conf
DBG(1)[94432]> PkgConfig: parsing key 'FreeBSD'
DBG(1)[94432]> PkgConfig: parsing repository object FreeBSD
DBG(1)[94432]> PkgConfig: loading repositories in /usr/local/etc/pkg/repos/
DBG(1)[94432]> Creating package from stage directory: 
'/wrkdirs/usr/ports/x11/kde-workspace-kde4/wor
k/stage'
DBG(1)[94432]> Parsing manifest from '+MANIFEST'
DBG(3)[94432]> Manifest: found key: 'name'

...

DBG(2)[94432]> Packing file 
'/wrkdirs/usr/ports/x11/kde-workspace-kde4/work/stage/usr/local/share/wallpapers/stripes.png.desktop'
DBG(2)[94432]> Packing file 
'/wrkdirs/usr/ports/x11/kde-workspace-kde4/work/stage/usr/local/share/xsessions/kde4.desktop'
DBG(2)[94432]> Packing file 
'/wrkdirs/usr/ports/x11/kde-workspace-kde4/work/stage/usr/local/etc/rc.d/kdm4'
packing files [2126]... done
packing directories  [0]: . done
===
=>> Cleaning up wrkdir
===>  Cleaning for kde-workspace-kde4-4.11.22_26
build of x11/kde-workspace-kde4 | kde-workspace-kde4-4.11.22_26 ended at Wed 
Oct  3 22:15:54 CEST 2018
build time: 00:11:21

i.e. the pkg-static does not crash.

And now?

matthias

-- 
Matthias Apitz, ✉ g...@unixarea.de, http://www.unixarea.de/ +49-176-38902045
Public GnuPG key: http://www.unixarea.de/key.pub
October 3: Day of German Unity? No! Day of taking over the GDR.
3. Oktober: Tag der Deutschen Einheit? Nein! DDR-Anschlusstag.


signature.asc
Description: PGP signature


Re: debugging a run of poudriere-bulk

2018-10-03 Thread Matthias Apitz
El día miércoles, octubre 03, 2018 a las 01:41:14p. m. +0200, Matthias Apitz 
escribió:

> 
> Hello,
> 
> 
> I'm trying to nail down PR 231532 of a port which fails to build in
> poudriere. In the last phase of the ports build, while creating the pkg
> of the built port with pkg-static, this crashes:

When I do run pudriere bulk with -vv options, it says only:

[00:02:40] [01] [00:01:51] Status   x11/kde-workspace-kde4 | 
kde-workspace-kde4-4.11.22_26: build
[00:10:41] [01] [00:09:52] Status   x11/kde-workspace-kde4 | 
kde-workspace-kde4-4.11.22_26: run-depends
[00:10:46] [01] [00:09:57] Status   x11/kde-workspace-kde4 | 
kde-workspace-kde4-4.11.22_26: stage
[00:11:42] [01] [00:10:53] Status   x11/kde-workspace-kde4 | 
kde-workspace-kde4-4.11.22_26: package
[00:11:46] [01] [00:10:57] Finished x11/kde-workspace-kde4 | 
kde-workspace-kde4-4.11.22_26: Failed: package
[00:11:46] Stopping 1 builders

matthias


-- 
Matthias Apitz, ✉ g...@unixarea.de, http://www.unixarea.de/ +49-176-38902045
Public GnuPG key: http://www.unixarea.de/key.pub
October 3: Day of German Unity? No! Day of taking over the GDR.
3. Oktober: Tag der Deutschen Einheit? Nein! DDR-Anschlusstag.


signature.asc
Description: PGP signature


debugging a run of poudriere-bulk

2018-10-03 Thread Matthias Apitz

Hello,


I'm trying to nail down PR 231532 of a port which fails to build in
poudriere. In the last phase of the ports build, while creating the pkg
of the built port with pkg-static, this crashes:

# tail 
/usr/local/poudriere/data/logs/bulk/freebsd-r338641-ports-20180920/2018-10-03_11h32m17s/logs/kde-workspace-kde4-4.11.22_26.log
Child process pid=85086 terminated abnormally: Segmentation fault
*** Error code 1

Stop.
make: stopped in /usr/ports/x11/kde-workspace-kde4
=>> Cleaning up wrkdir

# grep 85086 /var/log/messages
Oct  3 11:44:01 jet kernel: pid 85086 (pkg-static), uid 65534: exited on signal 
11


How can I enter the jail interactively in the moment after the crash to rerun 
and
debug pkg-static?

When I run 'poudriere bulk -i ...' the port builds fine:

# poudriere bulk -i -J 1 -j freebsd-r338641 -p ports-20180920 
x11/kde-workspace-kde4


# cd /usr/ports/x11/kde-workspace-kde4
# make package
gmake[1]: Leaving directory 
'/wrkdirs/usr/ports/x11/kde-workspace-kde4/work/.build'
install -l rs 
/wrkdirs/usr/ports/x11/kde-workspace-kde4/work/stage/usr/local/bin/startkde 
/wrkdirs/usr/ports/x11/kde-workspace-kde4/work/stage/usr/local/bin/startkde4
/bin/mkdir -p 
/wrkdirs/usr/ports/x11/kde-workspace-kde4/work/stage/usr/local/share/xsessions
install  -m 0644 /usr/ports/x11/kde-workspace-kde4/files/kde4.desktop 
/wrkdirs/usr/ports/x11/kde-workspace-kde4/work/stage/usr/local/share/xsessions
> Compressing man pages (compress-man)
===> Staging rc.d startup script(s)
===>  Building package for kde-workspace-kde4-4.11.22_26
cp: /packages/All/kde-workspace-kde4-4.11.22_26.txz: Read-only file system
*** Error code 1

Stop.
make: stopped in /usr/ports/x11/kde-workspace-kde4

# cd /usr/ports/x11/kde-workspace-kde4
# ls -l
total 42
-rw-r--r--  1 root  wheel5480 Sep 20 05:16 Makefile
-rw-r--r--  1 root  wheel 225 Sep 20 05:16 distinfo
drwxr-xr-x  2 root  wheel  30 Sep 20 05:16 files
-rw-r--r--  1 root  wheel 219 Sep 20 05:16 pkg-descr
-rw-r--r--  1 root  wheel  100336 Sep 20 05:16 pkg-plist
# ls -la /wrkdirs/usr/ports/x11/kde-workspace-kde4/work/pkg
total 17921
drwxr-xr-x  2 root  wheel64 Oct  3 09:13 .
drwxr-xr-x  7 root  wheel   960 Oct  3 09:13 ..
-rw-r--r--  1 root  wheel  18346688 Oct  3 09:13 
kde-workspace-kde4-4.11.22_26.txz

# scp -p 
/wrkdirs/usr/ports/x11/kde-workspace-kde4/work/pkg/kde-workspace-kde4-4.11.22_26.txz
 guru@192.168.2.35:/tmp

-- 
Matthias Apitz, ✉ g...@unixarea.de, http://www.unixarea.de/ +49-176-38902045
Public GnuPG key: http://www.unixarea.de/key.pub
13. August 2018: Ich würde gern einen AUSREISEANTRAG stellen.
August 13, 2018: I'd like to ask for an exit permit of this country.


signature.asc
Description: PGP signature