Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1228584

Summary: mono: pedump fails with segmentation fault
Product: [Fedora] Fedora Reporter: Timotheus Pokorra <pokorra.mailinglists>
Component: monoAssignee: Xavier Lamien <lxtnow>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 28CC: chkr, claudiorodrigo, htl10, itamar, lxtnow, moceap, paul, pokorra.mailinglists
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-05-28 20:09:14 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1222984    
Attachments:
Description Flags
output when running pedump with Xamarin Mono packages on Rawhide none

Description Timotheus Pokorra 2015-06-05 09:12:50 UTC
With the latest mono-devel-4.0.1-8.fc23.x86_64, pedump fails.

for example:

pedump --verify code /usr/lib/mono/4.5/System.dll
Segmentation fault

It should not show any error.

Any idea what is causing this?

Comment 1 Timotheus Pokorra 2015-06-08 09:24:58 UTC
I have investigated this some more...

I tried first if it was related to the hardening, and added
%undefine _hardened_build
to the top of my spec file.
But this did not make a difference.

Then I ran:

gdb pedump

(gdb) run --verify code /usr/lib/mono/4.5/System.dll
Starting program: /usr/bin/pedump --verify code /usr/lib/mono/4.5/System.dll
Missing separate debuginfos, use: dnf debuginfo-install glibc-2.21.90-15.fc23.x86_64
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7ffff6ac2700 (LWP 2315)]
[New Thread 0x7ffff62c1700 (LWP 2316)]
[New Thread 0x7ffff5ac0700 (LWP 2317)]

Program received signal SIGSEGV, Segmentation fault.
GC_push_all_eager (bottom=<error reading variable: value has been optimized out>, 
    top=<error reading variable: value has been optimized out>) at mark.c:1468
1468		q = *p;

This refers to https://github.com/mono/mono/blob/mono-4.0.0-branch/libgc/mark.c#L1468

Does that ring any bell for anyone?

Comment 2 Timotheus Pokorra 2015-06-08 09:27:49 UTC
Created attachment 1036265 [details]
output when running pedump with Xamarin Mono packages on Rawhide

When I install the packages built by Xamarin on Fedora Rawhide, and run 
 pedump --verify code /usr/lib/mono/4.5/System.dll

I get the attached output. There is no segmentation fault.

Comment 3 Timotheus Pokorra 2015-06-08 09:43:22 UTC
If I build mono 4.0.1.44 with the spec file from http://pkgs.fedoraproject.org/cgit/mono.git/ on F21, pedump also returns the same output as the Xamarin packages.

So it must be something about Rawhide?

Comment 4 Hin-Tak Leung 2015-07-08 23:20:35 UTC
Just signing into cc', as I am seeing the same segfault with

pedump --verify metadata code ...

or

pedump --verify metadata,code ...

which is in turn run by peverify.

Well, I was trying to run peverify without options on some assembly,
and it in turn calls pedump with those options.

This is with rpm --rebuild'ing 4.0.2-2 (or mono 4.0.2.5 release) from koji onto f22.

Comment 5 Hin-Tak Leung 2015-07-08 23:44:52 UTC
The code in question is the garbage collector code, which I had some past experience with, and know there are options and ways of modifying the behavior of.
So I went and read the man page and revise my knowledge, and I just managed to do 

GC_DONT_GC= ...

or 'export GC_DONT_GC=' disables the garbage collector code, and allow the command
to run to completion.

Obviously, doing so for general mono bits is asking for trouble, but pedump/peverify is short-lived and resource-efficient enough that, if the purpose
is merely running pedump or peverify to completion without segfault, this is a good enough work-around.

There are other ways of experimenting with the garbage collector with MONO_GC_PARAMS, etc. see the doc. Please report any interesting findings.

Comment 6 Jan Kurik 2015-07-15 14:03:18 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 23 development cycle.
Changing version to '23'.

(As we did not run this process for some time, it could affect also pre-Fedora 23 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 23 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora23

Comment 7 Timotheus Pokorra 2016-08-05 19:39:07 UTC
the error still happens with Mono 4.4.2.11 on Rawhide:

pedump --verify code /usr/lib/mono/4.5/System.dll
Segmentation fault

Comment 8 Fedora End Of Life 2017-02-28 09:44:56 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 26 development cycle.
Changing version to '26'.

Comment 9 Fedora End Of Life 2018-05-03 08:50:26 UTC
This message is a reminder that Fedora 26 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 26. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '26'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 26 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 10 Hin-Tak Leung 2018-05-03 09:35:22 UTC
Please bump to fc27

Comment 11 Ben Cotton 2019-05-02 19:16:41 UTC
This message is a reminder that Fedora 28 is nearing its end of life.
On 2019-May-28 Fedora will stop maintaining and issuing updates for
Fedora 28. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora 'version' of '28'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 28 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 12 Ben Cotton 2019-05-02 21:49:24 UTC
This message is a reminder that Fedora 28 is nearing its end of life.
On 2019-May-28 Fedora will stop maintaining and issuing updates for
Fedora 28. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora 'version' of '28'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 28 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 13 Ben Cotton 2019-05-28 20:09:14 UTC
Fedora 28 changed to end-of-life (EOL) status on 2019-05-28. Fedora 28 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.