Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pkg fetch -d <-u|pkgname> Segmentation fault #955

Closed
ohauer opened this issue Aug 13, 2014 · 8 comments
Closed

pkg fetch -d <-u|pkgname> Segmentation fault #955

ohauer opened this issue Aug 13, 2014 · 8 comments

Comments

@ohauer
Copy link

ohauer commented Aug 13, 2014

$pkg update -f

Updating repository catalogue
Fetching meta.txz: 100% of 584 B
Fetching digests.txz: 100% of 36 kB
Fetching packagesite.txz: 100% of 116 kB

Adding new entries: 100%
Incremental update completed, 416 packages processed:
0 packages updated, 0 removed and 416 added.

$ pkg upgrade

New version of pkg detected; it needs to be installed first.
The following 1 packages will be affected (of 0 checked):

Installed packages to be UPGRADED:
pkg: 1.3.5.1 -> 1.3.6

The process will require 256 kB more space
2 MB to be downloaded

Proceed with this action [y/N]: y
Fetching pkg-1.3.6.txz: 100% of 2 MB
Checking integrity... done (0 conflicting)
[1/1] Upgrading pkg from 1.3.5.1 to 1.3.6: 100%
Checking for upgrades: 100%
The following 2 packages will be affected (of 0 checked):

Installed packages to be UPGRADED:
python27: 2.7.8_2 -> 2.7.8_3
py27-setuptools27: 5.4.1 -> 5.5.1

The process will require 6 kB more space
8 MB to be downloaded

Proceed with this action [y/N]: n

$ pkg fetch -udy

pkg: Repository str has incompatible checksum format, need to re-create database
pkg: subversion has a missing dependency: neon29
pkg: neon29 has a missing dependency: libxml2
pkg: rancid has a missing dependency: perl5
pkg: nagios-plugins has a missing dependency: p5-Net-SNMP
pkg: py27-pycrypto has a missing dependency: python27
pkg: py27-pyzmq has a missing dependency: python27
pkg: postfix has a missing dependency: tinycdb
pkg: php5-pdo_pgsql has a missing dependency: postgresql92-client
pkg: py27-Jinja2 has a missing dependency: py27-MarkupSafe
pkg: py27-salt has a missing dependency: sshpass
pkg: py27-six has a missing dependency: python27
Checking integrity... done (0 conflicting)

$ pkg update -f

Updating repository catalogue
pkg: Repository str has incompatible checksum format, need to re-create database
Fetching meta.txz: 100% of 584 B
Fetching digests.txz: 100% of 36 kB
Fetching packagesite.txz: 100% of 116 kB

Adding new entries: 100%
Incremental update completed, 416 packages processed:
0 packages updated, 0 removed and 416 added.

$ pkg fetch -udy
Child process pid=79796 terminated abnormally: Segmentation fault: 11
@bdrewery
Copy link
Member

I've recreated it here with -ud. Will debug.

@bdrewery
Copy link
Member

A workaround is pkg upgrade -Fy

@bdrewery
Copy link
Member

(gdb) bt
#0  pkg_jobs_add_req (j=0x803436a40, uid=0x803448700 "libX11~x11/libX11", item=0x0) at pkg_jobs.c:263
#1  0x0000000800881fe8 in pkg_jobs_universe_process_deps (universe=0x803446cd0, pkg=0x8034e9600, flags=) at pkg_jobs_universe.c:256
#2  0x0000000800880502 in pkg_jobs_universe_process_item (universe=, pkg=, result=) at pkg_jobs_universe.c:494
#3  0x000000080087bd0f in pkg_jobs_process_remote_pkg (j=, rp=, force=, unit=) at pkg_jobs.c:598
#4  0x000000080087b613 in pkg_jobs_find_upgrade (j=0x803436a40, pattern=0x8034da2d0 "R~math/R", m=) at pkg_jobs.c:737
#5  0x0000000800879355 in pkg_jobs_solve (j=0x803436a40) at pkg_jobs.c:1436
#6  0x000000000040e05f in exec_fetch (argc=, argv=) at fetch.c:199
#7  0x000000000041042d in main (argc=, argv=0x7fffffffe7a8) at main.c:904

@ohauer
Copy link
Author

ohauer commented Aug 13, 2014

Hm good to know, at last for all my DMZ systems.
As bonus it seems the command explains more what will happen during the upgrade and this can be logged remote e.g. via salt before the final upgrade.

@bdrewery
Copy link
Member

pkg fetch -d <pkg already installed> has the same crash/trace:

#0  pkg_jobs_add_req (j=0x803436d40, uid=0x8034d0d80 "ruby~lang/ruby19", item=0x0) at pkg_jobs.c:263
#1  0x0000000800881fe8 in pkg_jobs_universe_process_deps (universe=0x8034edb80, pkg=0x803544300, flags=) at pkg_jobs_universe.c:256
#2  0x0000000800880502 in pkg_jobs_universe_process_item (universe=, pkg=, result=) at pkg_jobs_universe.c:494
#3  0x000000080087bd0f in pkg_jobs_process_remote_pkg (j=, rp=, force=, unit=) at pkg_jobs.c:598
#4  0x000000080087b613 in pkg_jobs_find_upgrade (j=0x803436d40, pattern=0x803527080 "sysutils/zfstools", m=) at pkg_jobs.c:737
#5  0x000000080087958c in pkg_jobs_solve (j=0x803436d40) at pkg_jobs.c:1445
#6  0x000000000040e05f in exec_fetch (argc=, argv=) at fetch.c:199
#7  0x000000000041042d in main (argc=, argv=0x7fffffffe790) at main.c:904

@bdrewery
Copy link
Member

pkg fetch -u is pulling in things that are not updated as well. Likely a separate issue.

@bdrewery bdrewery changed the title pkg fetch -udy Segmentation fault pkg fetch -d [-u] Segmentation fault Aug 13, 2014
@bdrewery bdrewery changed the title pkg fetch -d [-u] Segmentation fault pkg fetch -d <-u|pkgname> Segmentation fault Aug 13, 2014
@bdrewery bdrewery added this to the 1.3 milestone Aug 13, 2014
@ohauer
Copy link
Author

ohauer commented Aug 13, 2014

Hm, -u always pulled the pkg when the checksum has changed, so the fetched files in the cache where always consistent with the information in the $repo-site.sqlite database.
This was a nice feature for short update times and In case someone has not a stable or slow access to the update servers or only limited time to fetch new / changed packages.
I used it also to fetch all files to one remote system, sync /var/cache/pkg /var/db/repo-site.sqlite to all other systems on the remote site and then run pkg upgrade -U.
Similar to the `yum --downloadonly' plugin on RHEL.

@bdrewery
Copy link
Member

From Kris Moore:

# pkg -R /root/pcbsd-build-10.0-EDGE/tmp/repo/ fetch -y -o
/root/pcbsd-build-10.0-EDGE/tmp -d www/firefox
Updating repository catalogue
pcbsd-build repository is up-to-date
All repositories are up-to-date
Child process pid=75269 terminated abnormally: Segmentation fault

bdrewery added a commit that referenced this issue Aug 19, 2014
bdrewery added a commit that referenced this issue Aug 19, 2014
brd pushed a commit to brd/pkg that referenced this issue Aug 20, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants