This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1299197 - dnf segfaults in libsolv during resolution
dnf segfaults in libsolv during resolution
Status: CLOSED WORKSFORME
Product: Fedora
Classification: Fedora
Component: libsolv (Show other bugs)
23
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: packaging-team-maint
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-01-17 03:49 EST by cornel panceac
Modified: 2016-05-17 08:04 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-05-17 08:04:58 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
backtrace 20160120 (51.48 KB, text/plain)
2016-01-20 03:05 EST, cornel panceac
no flags Details

  None (edit)
Description cornel panceac 2016-01-17 03:49:16 EST
Description of problem:
`dnf upgrade` ends in Segmentation fault.
`dnf check-update` works fine.

Tried both setenforce 1 and 0.

See end of this message for details.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

...
Jan 17 10:19:32 localhost.localdomain gnome-shell.desktop[2561]: (gnome-shell:2561): mutter-WARNING **: STACK_OP_RAISE_ABOVE: window 0x6e00c00015 not in stack
Jan 17 10:19:39 localhost.localdomain audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=fprintd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Jan 17 10:20:15 localhost.localdomain kernel: show_signal_msg: 207 callbacks suppressed


Jan 17 10:20:15 localhost.localdomain kernel: dnf[4203]: segfault at b2d95535 ip b58c6d44 sp bfc4b764 error 4 in libsolv.so.0[b587d000+8c000]


Jan 17 10:20:15 localhost.localdomain audit[4203]: ANOM_ABEND auid=1000 uid=0 gid=0 ses=1 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 pid=4203 comm="dnf" exe="/usr/bin/python3.4" sig=11
Jan 17 10:20:16 localhost.localdomain dbus[869]: [system] Activating service name='org.freedesktop.problems' (using servicehelper)
Jan 17 10:20:16 localhost.localdomain dbus[869]: [system] Successfully activated service 'org.freedesktop.problems'
Jan 17 10:20:16 localhost.localdomain audit[4279]: AVC avc:  denied  { read } for  pid=4279 comm="find" name="repodata" dev="dm-1" ino=1315468 scontext=system_u:system_r:abrt_t:s0-s0:c0.c1023 tcontext=system_u:object_r:rpm_tmp_t:s0 tclass=dir permissive=0
Jan 17 10:20:16 localhost.localdomain audit[4279]: SYSCALL arch=40000003 syscall=295 success=no exit=-13 a0=a a1=80db61e4 a2=38900 a3=0 items=0 ppid=4278 pid=4279 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="find" exe="/usr/bin/find" subj=system_u:system_r:abrt_t:s0-s0:c0.c1023 key=(null)
Jan 17 10:20:16 localhost.localdomain abrt-server[4233]: find: ‘/var/cache/dnf/rpmfusion-free-fa9670311f4ed2bf/repodata’: Permission denied
...
Comment 1 Igor Gnatenko 2016-01-17 03:58:37 EST
could you install debuginfo for libsolv/hawkey and run under gdb and provide backtrace?

https://fedoraproject.org/wiki/StackTraces


or report this bug via ABRT (it will collect backtrace for you)

but this:
Jan 17 10:20:16 localhost.localdomain abrt-server[4233]: find: ‘/var/cache/dnf/rpmfusion-free-fa9670311f4ed2bf/repodata’: Permission denied

looks very strange. Can you also paste "ls -lZr /var/cache/dnf/rpmfusion-free*"

And anyway you have problem with SELinux, run "sudo restorecon -Rv /var/cache/dnf" or do full relabeling "sudo touch /.autorelabel"

Probably relabeling (problem with SELinux) will fix problem.
Comment 2 cornel panceac 2016-01-20 01:27:41 EST
gdb says:

"/usr/bin/dnf": not in executable format: File format not recognized
(gdb) 


Indeed:
# file /usr/bin/dnf
/usr/bin/dnf: symbolic link to dnf-3
# file /usr/bin/dnf-3
/usr/bin/dnf-3: Python script, ASCII text executable

How to proceed further?

Note:
relabeling did not fix this.
Comment 3 Igor Gnatenko 2016-01-20 01:39:56 EST
gdb --args python /usr/bin/dnf update

For example.
Comment 4 cornel panceac 2016-01-20 02:54:11 EST
Program received signal SIGSEGV, Segmentation fault.
unchecked_decompress_buf (in=0xbfff6a58 "R\002\215d$܋t$0e\241\024", in@entry=0xbfff623c "ator.svg", in_len=in_len@entry=7780, out=0x80a24dcb "dable.html", 
    out@entry=0x80a1c8e0 "ator.svg", out_len=32768) at /usr/src/debug/python3-libsolv-0.6.14-7.fc23/src/repopage.c:539
539			    case  6: *out = *(out + o); out++;
Missing separate debuginfos, use: dnf debuginfo-install  ....

Please wait for next message.
Comment 5 cornel panceac 2016-01-20 02:59:38 EST
A similar error:

Program received signal SIGSEGV, Segmentation fault.
unchecked_decompress_buf (in=0xbfff6a58 "R\002\215d$܋t$0e\241\024", in@entry=0xbfff623c "ator.svg", in_len=in_len@entry=7780, out=0x80a2c483 "dable.html", 
    out@entry=0x80a23f98 "ator.svg", out_len=32768) at /usr/src/debug/python3-libsolv-0.6.14-7.fc23/src/repopage.c:539
539			    case  6: *out = *(out + o); out++;
Missing separate debuginfos, use: dnf debuginfo-install bzip2-libs-1.0.6-19.fc23.i686

Unfortunately debuginfo for bzip2-libs can not be found.

I'll create a ticket for bzip2.
Comment 6 Igor Gnatenko 2016-01-20 03:01:26 EST
Looks like bug in dnf-plugins-core (for debuginfo stuff)

Can you run there (in gdb) "t a a bt full"?

This will help us to see chain of functions..
Comment 7 cornel panceac 2016-01-20 03:05 EST
Created attachment 1116544 [details]
backtrace 20160120

This is what i can get out of that crash.
Comment 8 Igor Gnatenko 2016-01-20 03:08:56 EST
And last request to complete data.

Run dnf update with --debugsolver and attach archive which will be created (or create it yourself from directory debugdata which will be created for sure.)

So this is bug in hawkey or in libsolv (most probably last one.
Comment 9 cornel panceac 2016-01-20 13:51:44 EST
I'm afraid i do not understand. 

# dnf update --debugsolver
Last metadata expiration check performed 1:18:50 ago on Wed Jan 20 19:31:39 2016.
Segmentation fault (core dumped)

I am to run this in some other way?
Comment 10 Jaroslav Mracek 2016-01-25 07:45:00 EST
Please could you try --refresh option to refresh all metadata. Probably it can help.
Comment 11 cornel panceac 2016-01-26 01:33:07 EST
Indeed. After:

# dnf --refresh clean metadata

# dnf upgrade 

works fine. What was the problem here?
Comment 12 Igor Gnatenko 2016-05-17 08:04:58 EDT
Closing as it works.

Note You need to log in before you can comment on or make changes to this bug.