freebsd / pkg

Package management tool for FreeBSD. Help at #pkg on Libera Chat or pkg@FreeBSD.org
Other
738 stars 277 forks source link

`pkg upgrade -v` segfaults #1842

Open ghost opened 4 years ago

ghost commented 4 years ago

As below:

# pkg upgrade -nv
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
vulnxml file up-to-date
Checking for upgrades (21 candidates):  33%Child process pid=10544 terminated abnormally: Segmentation fault

I didn't know -v is for "vulnerable" as it's not documented and I was hoping it would give me more verbose output, but anyway.

Reading symbols from /usr/local/sbin/pkg...
[New LWP 101416]
Core was generated by `pkg upgrade -nv'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x000000000046e093 in pkg_jobs_process_remote_pkg ()
(gdb) bt
#0  0x000000000046e093 in pkg_jobs_process_remote_pkg ()
#1  0x000000000046dcfa in pkg_jobs_find_upgrade ()
#2  0x000000000046b0e3 in pkg_jobs_solve ()
#3  0x00000000002a1b15 in exec_upgrade ()
#4  0x000000000029b198 in main ()

I was tempted to look into fixing this, but I must admit that I don't understand this option completely -- is it supposed to show/upgrade only vulnerable packages? Something else?

ceri commented 3 years ago

I don't know why yet, but the call to pkg_rdeps on line 771 of libpkg/pkg_jobs.c causes this when the package being evaluated is pkg itself.

ceri commented 3 years ago

I think pull request #1903 fixes this.

igalic commented 3 years ago

I didn't know -v is for "vulnerable" as it's not documented and I was hoping it would give me more verbose output,

this seems should also be a priority

bapt commented 1 week ago

I can't reproduce this one anymore, I would be tempted to mark it as over come by events