Bug 600654 - [abrt] crash in par2cmdline-0.4.tbb.20100203-1.fc13: __TBB_rel_acq_fence: Process /usr/bin/par2 was killed by signal 4 (SIGILL)
Summary: [abrt] crash in par2cmdline-0.4.tbb.20100203-1.fc13: __TBB_rel_acq_fence: Pro...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: tbb
Version: 13
Hardware: i686
OS: Linux
low
medium
Target Milestone: ---
Assignee: Petr Machata
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:f18de417506a3374a7d940909a9...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-06-05 13:02 UTC by David Wald
Modified: 2015-05-05 01:35 UTC (History)
4 users (show)

Fixed In Version: tbb-2.2-2.20090809.fc13
Clone Of:
Environment:
Last Closed: 2010-06-30 15:10:43 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: backtrace (50.24 KB, text/plain)
2010-06-05 13:02 UTC, David Wald
no flags Details
Fix (881 bytes, patch)
2010-06-10 15:57 UTC, Petr Machata
no flags Details | Diff

Description David Wald 2010-06-05 13:02:45 UTC
abrt 1.1.1 detected a crash.

architecture: i686
Attached file: backtrace
cmdline: par2 v -- /capture/shaolintemple.par2
component: par2cmdline
crash_function: __TBB_rel_acq_fence
executable: /usr/bin/par2
global_uuid: f18de417506a3374a7d940909a972894b55cd2f0
kernel: 2.6.33.5-112.fc13.i686
package: par2cmdline-0.4.tbb.20100203-1.fc13
rating: 4
reason: Process /usr/bin/par2 was killed by signal 4 (SIGILL)
release: Fedora release 13 (Goddard)

How to reproduce
-----
1. Invoked from PyPar2
2. Request to verify files
3. New terminal window opens for cmd line, then aborts

Comment 1 David Wald 2010-06-05 13:02:46 UTC
Created attachment 421425 [details]
File: backtrace

Comment 2 Erik van Pienbroek 2010-06-05 13:13:34 UTC
There's quite a lot of frames in that backtrace which contain functions from tbb. Re-assiging to the tbb maintainer. Perhaps he has a clue about what goes wrong here.

Comment 3 Mathieu Chouquet-Stringer 2010-06-06 19:44:06 UTC
I've been experiencing the same issue.  The problem is due to this:
Program terminated with signal 4, Illegal instruction.
#0  __TBB_rel_acq_fence (this=<value optimized out>, parent=<value optimized out>, 
    child=<value optimized out>) at ../../include/tbb/machine/linux_ia32.h:42
42      inline void __TBB_rel_acq_fence() { __asm__ __volatile__("mfence": : :"memory"); }


Note the mfence instruction.  I'm running this on a Pentium III which doesn't support this instruction hence SIGILL:
#UD If CPUID.01H:EDX.SSE2[bit 26] = 0 (says Intel Arch. Soft. Dev.'s Manual)

Not sure if it's a compiler bug or a tbb bug...  I will look into the code to know more...

Comment 4 Petr Machata 2010-06-10 15:07:06 UTC
Hmm, seems like TBB assumes that all i686 machines have the mfence instruction:
inline void __TBB_rel_acq_fence() { __asm__ __volatile__("mfence": : :"memory"); }

I found this thread where this problem is discussed for windows:
  http://software.intel.com/en-us/forums/showthread.php?t=73293

I'll look into porting the last ("green") advice to GCC.

Comment 5 Petr Machata 2010-06-10 15:07:41 UTC
... or actually all ia32 machines, as the line that I quoted is from include/tbb/machine/linux_ia32.h.

Comment 6 Petr Machata 2010-06-10 15:57:44 UTC
Created attachment 422957 [details]
Fix

Replace mfence with xchg of a local variable, as described in the link that I posted.

I'm afraid there might be more problems of the same kind.  The project's FAQ says that "the project is dedicated to supporting [...] all processors," but I'm not sure whether that doesn't mean "all SSE2 processors".

Comment 7 Fedora Update System 2010-06-10 16:15:03 UTC
tbb-2.2-2.20090809.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/tbb-2.2-2.20090809.fc13

Comment 8 Petr Machata 2010-06-10 16:20:28 UTC
In this instance of the bug the code is called via TBB function and it should be enough to update from testing.  But if the code gets exposed somewhere in header files, it may be also necessary to rebuild par2cmdline.  You'll have to try and see.

Comment 9 Mathieu Chouquet-Stringer 2010-06-13 15:24:47 UTC
FYI I had opened a bug upstream too (http://www.threadingbuildingblocks.org/bug_desc.php?id=171) but the resolution was set to "LATER" and was directed to the same forum thread: http://software.intel.com/en-us/forums/showthread.php?t=73293.

In the long run, I guess they should implement CPU feature discovery at runtime...

FYI your new TBB build fixes the problem.  I guess you can resolve this bug!

Thanks much!

Comment 10 Fedora Update System 2010-06-14 17:06:31 UTC
tbb-2.2-2.20090809.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update tbb'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/tbb-2.2-2.20090809.fc13

Comment 11 David Wald 2010-06-14 19:54:55 UTC
Updated from updates-testing - working fine now.

Comment 12 Fedora Update System 2010-06-30 15:10:37 UTC
tbb-2.2-2.20090809.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.


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