Assertion 'pkg->_refcnt < INT16_MAX - 1' failed, pkg.c:1461

Bug #317130 reported by Elan Ruusamäe
2
Affects Status Importance Assigned to Milestone
poldek
Confirmed
Undecided
Unassigned

Bug Description

: 0xf64d098c won2-0.11.2-3 (pdir won2, na->refcnt=220), refcnt=20530 (0xf64d0a0c)
: 0xf650065e won2-0.11.16-3.1 (pdir won2, na->refcnt=220), refcnt=22889 (0xf65006de)
: 0xf64d098c won2-0.11.2-3 (pdir won2, na->refcnt=220), refcnt=20531 (0xf64d0a0c)
: 0xf64f621a won2-0.11.16-1 (pdir won2, na->refcnt=220), refcnt=21034 (0xf64f629a)
: 0xf6382341 won2-0.12.1-1.6 (pdir won2, na->refcnt=220), refcnt=32761 (0xf63823c1)
: 0xf647020a won2-0.11.16-4.5 (pdir won2, na->refcnt=220), refcnt=23395 (0xf647028a)
: 0xf6382341 won2-0.12.1-1.6 (pdir won2, na->refcnt=220), refcnt=32762 (0xf63823c1)
: 0xf64763e6 won2-0.11.16-4.6 (pdir won2, na->refcnt=220), refcnt=23394 (0xf6476466)
: 0xf6382341 won2-0.12.1-1.6 (pdir won2, na->refcnt=220), refcnt=32763 (0xf63823c1)
: 0xf6202f6d won2-0.12.1-3 (pdir won2, na->refcnt=220), refcnt=31908 (0xf6202fed)
: 0xf6382341 won2-0.12.1-1.6 (pdir won2, na->refcnt=220), refcnt=32764 (0xf63823c1)
: 0xf62492fe won2-0.12.1-1.17 (pdir won2, na->refcnt=220), refcnt=32264 (0xf624937e)
: 0xf6382341 won2-0.12.1-1.6 (pdir won2, na->refcnt=220), refcnt=32765 (0xf63823c1)
: 0xf648172f won2-0.11.16-4.7 (pdir won2, na->refcnt=220), refcnt=23647 (0xf64817af)
: 0xf6382341 won2-0.12.1-1.6 (pdir won2, na->refcnt=220), refcnt=32766 (0xf63823c1)
Something wrong, something not quite right with 0.30 (snap20080820.23)
Assertion 'pkg->_refcnt < INT16_MAX - 1' failed, pkg.c:1461
Please report this bug to <email address hidden>.

Aborted

produced with such debug code in pkg.c:

1452 struct pkg *pkg_link(struct pkg *pkg)
1453 {
1454 if (pkg->_refcnt >= 10) {
1455 trace(1, "%p %s (pdir %s, na->refcnt=%d), refcnt=%d (%p)\n",
1456 pkg, pkg_snprintf_s(pkg),
1457 pkg->pkgdir ? pkgdir_idstr(pkg->pkgdir) : "<none>",
1458 pkg->na ? pkg->na->_refcnt : -1,
1459 pkg->_refcnt, &pkg->_refcnt);
1460 }
1461 n_assert(pkg->_refcnt < INT16_MAX - 1);
1462 pkg->_refcnt++;
1463 return pkg;
1464 }
1465

Revision history for this message
Elan Ruusamäe (glen666) wrote :

/* private, don't touch */
    int16_t _refcnt;

Revision history for this message
Elan Ruusamäe (glen666) wrote :
Download full text (7.5 KiB)

with this debug patch applied:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/poldek-317130.patch

17:42:12 root[pts/22]@w2 ~# POLDEK_TRACE=1 poldek -u won2 --sn won2 -t
Loading [dir]won2...
200..220
220 packages read
: 0xf71c5341 won2-0.12.1-1.6 (pdir won2, na->refcnt=220), refcnt=32766 (0xf71c53c1)
Something wrong, something not quite right with 0.30 (snap20080820.23)
Assertion 'pkg->_refcnt < INT16_MAX - 1' failed, pkg.c:1461
Please report this bug to <email address hidden>.

Aborted

17:42:45 root[pts/22]@w2 ~# ls /won2/dist/
CVS/ won2-0.12.1-1.14.noarch.rpm won2-1.0-10.noarch.rpm won2-public-0.9.5-3.7.noarch.rpm
packages.i/ won2-0.12.1-1.15.noarch.rpm won2-1.0-11.noarch.rpm won2-public-0.9.5-30.noarch.rpm
packages.ndir.dscr.gz won2-0.12.1-1.16.noarch.rpm won2-1.0-12.noarch.rpm won2-public-0.9.5-31.noarch.rpm
packages.ndir.dscr.gz.md5 won2-0.12.1-1.17.noarch.rpm won2-1.0-13.noarch.rpm won2-public-0.9.5-32.noarch.rpm
packages.ndir.gz won2-0.12.1-1.18.noarch.rpm won2-1.0-14.noarch.rpm won2-public-0.9.5-33.noarch.rpm
packages.ndir.gz.md5 won2-0.12.1-1.19.noarch.rpm won2-1.0-15.noarch.rpm won2-public-0.9.5-34.noarch.rpm
packages.ndir.md won2-0.12.1-1.2.noarch.rpm won2-1.0-16.noarch.rpm won2-public-0.9.5-35.noarch.rpm
won2-0.11.10-1.noarch.rpm won2-0.12.1-1.20.noarch.rpm won2-1.0-2.noarch.rpm won2-public-0.9.5-36.noarch.rpm
won2-0.11.11-1.noarch.rpm won2-0.12.1-1.21.noarch.rpm won2-1.0-3.noarch.rpm won2-public-0.9.5-37.noarch.rpm
won2-0.11.12-1.noarch.rpm won2-0.12.1-1.22.noarch.rpm won2-1.0-4.noarch.rpm won2-public-0.9.5-38.noarch.rpm
won2-0.11.13-1.noarch.rpm won2-0.12.1-1.23.noarch.rpm won2-1.0-5.noarch.rpm won2-public-0.9.5-39.noarch.rpm
won2-0.11.14-1.noarch.rpm won2-0.12.1-1.3.noarch.rpm won2-1.0-6.noarch.rpm won2-public-0.9.5-4.noarch.rpm
won2-0.11.15-1.noarch.rpm won2-0.12.1-1.4.noarch.rpm won2-1.0-7.noarch.rpm won2-public-0.9.5-40.noarch.rpm
won2-0.11.16-1.noarch.rpm won2-0.12.1-1.5.noarch.rpm won2-1.0-8.noarch.rpm won2-public-0.9.5-41.noarch.rpm
won2-0.11.16-2.noarch.rpm won2-0.12.1-1.6.noarch.rpm won2-1.0-9.noarch.rpm won2-public-0.9.5-42.noarch.rpm
won2-0.11.16-3.1.noarch.rpm won2-0.12.1-1.7.noarch.rpm won2-public-0.9.1-2.noarch.rpm won2-public-0.9.5-43.noarch.rpm
won2-0.11.16-3.2.noarch.rpm won2-0.12.1-1.8.noarch.rpm won2-public-0.9.2-1.noarch.rpm won2-public-0.9.5-44.noarch.rpm
won2-0.11.16-3.3.noarch.rpm won2-0.12.1-1.9.noarch.rpm won2-public-0.9.2-10.noarch.rpm won2-public-0.9.5-45.noarch.rpm
won2-0.11.16-3.4.noarch.rpm won2-0.12.1-10.noarch.rpm won2-public-0.9.2-11.noarch.rpm won2-public-0.9.5-46.noarch.rpm
won2-0.11.16-3.5.noarch.rpm won2-0.12.1-11.noarch.rpm won2-public-0.9.2-2.noarch.rpm won2-public-0.9.5-47.noarch.rpm
won2-0.11.16-3.6.noarch.rpm won2-0.12.1-12.noarch.rpm won2-public-0.9.2-3.noarch.rpm won2-public-0.9.5-5.1.noarch.rpm
won2-0.11.16-3.7.noarch.rpm won2-...

Read more...

Revision history for this message
Elan Ruusamäe (glen666) wrote :

cleaning up souce with packages workarounds the problem:

17:46:44 root[pts/22]@w2 ~# POLDEK_TRACE=1 poldek -u won2 --sn won2 -t
Loading [dir]won2...
37 packages read
warn: won2: ambiguous name
:i3_pre_ts_install() start
won2-1.0-16.noarch: newer version installed, skipped
: - omitted won2-1.0-16.noarch
Nothing to do

17:46:50 root[pts/22]@w2 ~# ls /won2/dist/
CVS/ won2-1.0-10.noarch.rpm won2-1.0-4.noarch.rpm won2-search-1.0-0.11.noarch.rpm won2-search-1.0-0.2.noarch.rpm
bug-317130/ won2-1.0-11.noarch.rpm won2-1.0-5.noarch.rpm won2-search-1.0-0.12.noarch.rpm won2-search-1.0-0.20.noarch.rpm
packages.i/ won2-1.0-12.noarch.rpm won2-1.0-6.noarch.rpm won2-search-1.0-0.13.noarch.rpm won2-search-1.0-0.3.noarch.rpm
packages.ndir.dscr.gz won2-1.0-13.noarch.rpm won2-1.0-7.noarch.rpm won2-search-1.0-0.14.noarch.rpm won2-search-1.0-0.4.noarch.rpm
packages.ndir.dscr.gz.md5 won2-1.0-14.noarch.rpm won2-1.0-8.noarch.rpm won2-search-1.0-0.15.noarch.rpm won2-search-1.0-0.5.noarch.rpm
packages.ndir.gz won2-1.0-15.noarch.rpm won2-1.0-9.noarch.rpm won2-search-1.0-0.16.noarch.rpm won2-search-1.0-0.6.noarch.rpm
packages.ndir.gz.md5 won2-1.0-16.noarch.rpm won2-public-0.9.5-47.noarch.rpm won2-search-1.0-0.17.noarch.rpm won2-search-1.0-0.7.noarch.rpm
packages.ndir.md won2-1.0-2.noarch.rpm won2-search-1.0-0.1.noarch.rpm won2-search-1.0-0.18.noarch.rpm won2-search-1.0-0.8.noarch.rpm
won2-1.0-1.noarch.rpm won2-1.0-3.noarch.rpm won2-search-1.0-0.10.noarch.rpm won2-search-1.0-0.19.noarch.rpm won2-search-1.0-0.9.noarch.rpm
17:46:56 root[pts/22]@w2 ~#

Revision history for this message
Elan Ruusamäe (glen666) wrote :

220 is the number of pkgs under source=won2:

17:49:31 root[pts/22]@w2 ~# ls /won2/dist/*.rpm /won2/dist/bug-317130/*.rpm|wc -w
220

Elan Ruusamäe (glen666)
Changed in poldek:
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.