Date: Sun, 22 May 2022 20:43:08 +0000 From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 264158] devel/pkconf: loop forever in Haskell package Message-ID: <bug-264158-7788@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D264158 Bug ID: 264158 Summary: devel/pkconf: loop forever in Haskell package Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: ports-bugs@FreeBSD.org Reporter: alexis.praga@free.fr CC: arrowd@FreeBSD.org Hi, I've discovered running `cabal install` for Haskell programmes takes a very long time, for example `xmonad`. With the help of @arrowd, here is a minimal reproducible example. 1. Run `make` in /usr/ports/devel/hs-ormolu 2. pkg-config takes a lot of CPU PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COMM= AND 19887 root 1 89 0 13M 3156K CPU0 0 0:09 100.23% pkgc= onf 3. Running the command by hand is fast but inside make, it seems to be stuc= k. 4. Enable debug flags of `pkgconf` and get a backtrace: ---- #0 0x00000008003c1985 in memset () from /lib/libc.so.7 #1 0x0000000800385822 in snprintf () from /lib/libc.so.7 #2 0x0000000800258455 in pkgconf_trace (client=3D0x20d488 <pkg_client>, filename=3D0x8002537a9 "libpkgconf/pkg.c", lineno=3D1346,=20 funcname=3D0x800252fed "pkgconf_pkg_t *pkgconf_pkg_verify_dependency(pkgconf_client_t *, pkgconf_dependency_t *, unsigned int *)", format=3D0x8002543ff "trying to verify dependency: %s") at libpkgconf/client.c:379 #3 0x000000080025aa03 in pkgconf_pkg_verify_dependency (client=3D0x20d488 <pkg_client>, pkgdep=3D0x800a37f70, eflags=3D0x7ffffffe7174) at libpkgconf/pkg.c:1346 #4 0x000000080025b24b in pkgconf_pkg_walk_list (client=3D0x20d488 <pkg_cli= ent>, parent=3D0x800a3b580, deplist=3D0x800a3b638, func=3D0x0, data=3D0x0, depth= =3D1986, skip_flags=3D0) at libpkgconf/pkg.c:1455 #5 0x000000080025ae30 in pkgconf_pkg_traverse (client=3D0x20d488 <pkg_clie= nt>, root=3D0x800a3b580, func=3D0x0, data=3D0x0, maxdepth=3D1986, skip_flags=3D0= ) at libpkgconf/pkg.c:1581 #6 0x000000080025b345 in pkgconf_pkg_walk_list (client=3D0x20d488 <pkg_cli= ent>, parent=3D0x800a6e180, deplist=3D0x800a6e238, func=3D0x0, data=3D0x0, depth= =3D1987, skip_flags=3D0) at libpkgconf/pkg.c:1481 #7 0x000000080025ae30 in pkgconf_pkg_traverse (client=3D0x20d488 <pkg_clie= nt>, root=3D0x800a6e180, func=3D0x0, data=3D0x0, maxdepth=3D1987, skip_flags=3D0= ) at libpkgconf/pkg.c:1581 #8 0x000000080025b345 in pkgconf_pkg_walk_list (client=3D0x20d488 <pkg_cli= ent>, parent=3D0x800a6e000, deplist=3D0x800a6e0b8, func=3D0x0, data=3D0x0, depth= =3D1988, skip_flags=3D0) at libpkgconf/pkg.c:1481 #9 0x000000080025ae30 in pkgconf_pkg_traverse (client=3D0x20d488 <pkg_clie= nt>, root=3D0x800a6e000, func=3D0x0, data=3D0x0, maxdepth=3D1988, skip_flags=3D0= ) at libpkgconf/pkg.c:1581 #10 0x000000080025b345 in pkgconf_pkg_walk_list (client=3D0x20d488 <pkg_cli= ent>, parent=3D0x800a70280, deplist=3D0x800a70338, func=3D0x0, data=3D0x0, depth= =3D1989, skip_flags=3D0) at libpkgconf/pkg.c:1481 #11 0x000000080025ae30 in pkgconf_pkg_traverse (client=3D0x20d488 <pkg_clie= nt>, root=3D0x800a70280, func=3D0x0, data=3D0x0, maxdepth=3D1989, skip_flags=3D0= ) at libpkgconf/pkg.c:1581 #12 0x000000080025b345 in pkgconf_pkg_walk_list (client=3D0x20d488 <pkg_cli= ent>, parent=3D0x800a6f500, deplist=3D0x800a6f5b8, func=3D0x0, data=3D0x0, depth= =3D1990, skip_flags=3D0) at libpkgconf/pkg.c:1481 #13 0x000000080025ae30 in pkgconf_pkg_traverse (client=3D0x20d488 <pkg_clie= nt>, root=3D0x800a6f500, func=3D0x0, data=3D0x0, maxdepth=3D1990, skip_flags=3D0= ) at libpkgconf/pkg.c:1581 #14 0x000000080025b345 in pkgconf_pkg_walk_list (client=3D0x20d488 <pkg_cli= ent>, parent=3D0x800a89f00, deplist=3D0x800a89fb8, func=3D0x0, data=3D0x0, depth= =3D1991, skip_flags=3D0) at libpkgconf/pkg.c:1481 #15 0x000000080025ae30 in pkgconf_pkg_traverse (client=3D0x20d488 <pkg_clie= nt>, root=3D0x800a89f00, func=3D0x0, data=3D0x0, maxdepth=3D1991, skip_flags=3D0= ) at libpkgconf/pkg.c:1581 #16 0x000000080025b345 in pkgconf_pkg_walk_list (client=3D0x20d488 <pkg_cli= ent>, parent=3D0x800a89180, deplist=3D0x800a89238, func=3D0x0, data=3D0x0, depth= =3D1992, skip_flags=3D0) at libpkgconf/pkg.c:1481 #17 0x000000080025ae30 in pkgconf_pkg_traverse (client=3D0x20d488 <pkg_clie= nt>, root=3D0x800a89180, func=3D0x0, data=3D0x0, maxdepth=3D1992, skip_flags=3D0= ) at libpkgconf/pkg.c:1581 #18 0x000000080025b345 in pkgconf_pkg_walk_list (client=3D0x20d488 <pkg_cli= ent>, parent=3D0x800aa6680, deplist=3D0x800aa6738, func=3D0x0, data=3D0x0, depth= =3D1993, skip_flags=3D0) at libpkgconf/pkg.c:1481 #19 0x000000080025ae30 in pkgconf_pkg_traverse (client=3D0x20d488 <pkg_clie= nt>, root=3D0x800aa6680, func=3D0x0, data=3D0x0, maxdepth=3D1993, skip_flags=3D0= ) at libpkgconf/pkg.c:1581 #20 0x000000080025b345 in pkgconf_pkg_walk_list (client=3D0x20d488 <pkg_cli= ent>, parent=3D0x800aa6380, deplist=3D0x800aa6438, func=3D0x0, data=3D0x0, depth= =3D1994, skip_flags=3D0) at libpkgconf/pkg.c:1481 #21 0x000000080025ae30 in pkgconf_pkg_traverse (client=3D0x20d488 <pkg_clie= nt>, root=3D0x800aa6380, func=3D0x0, data=3D0x0, maxdepth=3D1994, skip_flags=3D0= ) at libpkgconf/pkg.c:1581 #22 0x000000080025b345 in pkgconf_pkg_walk_list (client=3D0x20d488 <pkg_cli= ent>, parent=3D0x800a70e80, deplist=3D0x800a70f38, func=3D0x0, data=3D0x0, depth= =3D1995, skip_flags=3D0) at libpkgconf/pkg.c:1481 #23 0x000000080025ae30 in pkgconf_pkg_traverse (client=3D0x20d488 <pkg_clie= nt>, root=3D0x800a70e80, func=3D0x0, data=3D0x0, maxdepth=3D1995, skip_flags=3D0= ) at libpkgconf/pkg.c:1581 #24 0x000000080025b345 in pkgconf_pkg_walk_list (client=3D0x20d488 <pkg_cli= ent>, parent=3D0x800a70d00, deplist=3D0x800a70db8, func=3D0x0, data=3D0x0, depth= =3D1996, skip_flags=3D0) at libpkgconf/pkg.c:1481 #25 0x000000080025ae30 in pkgconf_pkg_traverse (client=3D0x20d488 <pkg_clie= nt>, root=3D0x800a70d00, func=3D0x0, data=3D0x0, maxdepth=3D1996, skip_flags=3D0= ) at libpkgconf/pkg.c:1581 #26 0x000000080025b345 in pkgconf_pkg_walk_list (client=3D0x20d488 <pkg_cli= ent>, parent=3D0x800ac9800, deplist=3D0x800ac98b8, func=3D0x0, data=3D0x0, depth= =3D1997, skip_flags=3D0) at libpkgconf/pkg.c:1481 #27 0x000000080025ae30 in pkgconf_pkg_traverse (client=3D0x20d488 <pkg_clie= nt>, root=3D0x800ac9800, func=3D0x0, data=3D0x0, maxdepth=3D1997, skip_flags=3D0= ) at libpkgconf/pkg.c:1581 #28 0x000000080025b345 in pkgconf_pkg_walk_list (client=3D0x20d488 <pkg_cli= ent>, parent=3D0x800aca400, deplist=3D0x800aca4b8, func=3D0x0, data=3D0x0, depth= =3D1998, skip_flags=3D0) at libpkgconf/pkg.c:1481 #29 0x000000080025ae30 in pkgconf_pkg_traverse (client=3D0x20d488 <pkg_clie= nt>, root=3D0x800aca400, func=3D0x0, data=3D0x0, maxdepth=3D1998, skip_flags=3D0= ) at libpkgconf/pkg.c:1581 #30 0x000000080025b345 in pkgconf_pkg_walk_list (client=3D0x20d488 <pkg_cli= ent>, parent=3D0x800ac9380, deplist=3D0x800ac9438, func=3D0x0, data=3D0x0, depth= =3D1999, skip_flags=3D0) at libpkgconf/pkg.c:1481 #31 0x000000080025ae30 in pkgconf_pkg_traverse (client=3D0x20d488 <pkg_clie= nt>, root=3D0x800ac9380, func=3D0x0, data=3D0x0, maxdepth=3D1999, skip_flags=3D0= ) at libpkgconf/pkg.c:1581 #32 0x000000080025b345 in pkgconf_pkg_walk_list (client=3D0x20d488 <pkg_cli= ent>, parent=3D0x7ffffffe7dd8, deplist=3D0x7ffffffe7e90, func=3D0x0, data=3D0x0, = depth=3D2000, skip_flags=3D0) at libpkgconf/pkg.c:1481 #33 0x000000080025ae30 in pkgconf_pkg_traverse (client=3D0x20d488 <pkg_clie= nt>, root=3D0x7ffffffe7dd8, func=3D0x0, data=3D0x0, maxdepth=3D2000, skip_flags= =3D0) at libpkgconf/pkg.c:1581 #34 0x000000080025ac9e in pkgconf_pkg_verify_graph (client=3D0x20d488 <pkg_client>, root=3D0x7ffffffe7dd8, depth=3D2000) at libpkgconf/pkg.c:1399 #35 0x0000000800260b1c in pkgconf_queue_verify (client=3D0x20d488 <pkg_clie= nt>, world=3D0x7ffffffe7dd8, list=3D0x7ffffffe8090, maxdepth=3D2000) at libpkgconf/queue.c:116 #36 0x0000000800260bd6 in pkgconf_queue_validate (client=3D0x20d488 <pkg_cl= ient>, list=3D0x7ffffffe8090, maxdepth=3D2000) at libpkgconf/queue.c:189 #37 0x0000000000206ea2 in main (argc=3D1147, argv=3D0x7fffffff8880) at cli/main.c:1308 --- 5. Continuing the execution and get a backtrace again result in the same th= ing. My configuration: - FreeBSD 13.0-RELEASE-p11 - ghc 8.10.7 and cabal-install 3.6.0.0 (from the ports tree) Thanks ! --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-264158-7788>