Bug 112152 - Valgrind + Openanno -> error: "LibVEX called failure_exit()"
Summary: Valgrind + Openanno -> error: "LibVEX called failure_exit()"
Status: RESOLVED FIXED
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR crash
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
: 112167 112789 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-09-07 12:06 UTC by Bill Spam
Modified: 2005-10-03 04:16 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bill Spam 2005-09-07 12:06:10 UTC
Version:           valgrind-3.0.1 (using KDE KDE 3.3.0)
Installed from:    Debian testing/unstable Packages
Compiler:          gcc (GCC) 4.0.2 20050821 (prerelease) (Debian 4.0.1-6) i didn't compile valgrind itself (=debian unstable package) , just the program i want to check with valgrind.
OS:                Linux

I'm having some troubles with Valgrind and the code of
the recently started game OpenAnno [1].

I already searched the FAQ and the mailing list for an
answer to this, but i didn't find anything that seems
to be related to my problem.

I posted in the mailing list and was being told to file
it here, so i did. (i also added an entry in the sourceforge bug-tracker [2], but it seems to be unused)

I attached the error below, if you need more info i
will try to provide it.

This output is what i get when i run
# valgrind -v --tool=none ./openanno
(It really doesn't depend on the tool i use, the error
is displayed anyway)

BEGIN error-------------------------------------
...
... Skipped some parts that care related to other
errors (i think).
... I can post them as well if needed.
...

vex: priv/host-x86/hdefs.c:2315 (emit_X86Instr):
Assertion `0' failed.
vex storage: P 512, T total 411183672 (13013711), T
curr 20960 (702)

valgrind: the 'impossible' happened:
LibVEX called failure_exit().
==7591== at 0xB0016A22: vgPlain_core_panic_at
(m_libcassert.c:181)
==7591== by 0xB0016A21: panic (m_libcassert.c:177)
==7591== by 0xB0016A3F: vgPlain_core_panic_at
(m_libcassert.c:182)
==7591== by 0xB0016A50: vgPlain_core_panic
(m_libcassert.c:187)
==7591== by 0xB002394C: failure_exit (m_translate.c:360)
==7591== by 0xB00573FA: vex_assert_fail (vex_util.c:163)
==7591== by 0xB005B8F1: emit_X86Instr (hdefs.c:2315)
==7591== by 0xB0057039: LibVEX_Translate
(vex_main.c:574)
==7591== by 0xB0023ED1: vgPlain_translate
(m_translate.c:585)
==7591== by 0xB0038F2E: handle_tt_miss (scheduler.c:566)
==7591== by 0xB003925A: vgPlain_scheduler
(scheduler.c:680)
==7591== by 0xB004F475: vgModuleLocal_thread_wrapper
(syswrap-linux.c:80)
==7591== by 0xB004B9E2: run_a_thread_NORETURN
(syswrap-x86-linux.c:150)

sched status:
running_tid=1

Thread 1: status = VgTs_Runnable
==7591== at 0x1B97EAF9: (within
/usr/lib/libSDL-1.2.so.0.7.1)
==7591== by 0x1B97EDE7: SDL_HasMMX (in
/usr/lib/libSDL-1.2.so.0.7.1)
==7591== by 0x1B94ECF5: SDL_CalculateBlitN (in
/usr/lib/libSDL-1.2.so.0.7.1)
==7591== by 0x1B938CB4: SDL_CalculateBlit (in
/usr/lib/libSDL-1.2.so.0.7.1)
==7591== by 0x1B952653: SDL_MapSurface (in
/usr/lib/libSDL-1.2.so.0.7.1)
==7591== by 0x1B952E3C: SDL_LowerBlit (in
/usr/lib/libSDL-1.2.so.0.7.1)
==7591== by 0x1B955113: SDL_Flip (in
/usr/lib/libSDL-1.2.so.0.7.1)
==7591== by 0x804DFB3: clientstart (client.c:220)
==7591== by 0x804A004: main (openanno.c:57)

Thread 2: status = VgTs_Runnable
==7591== at 0x1BC84F87: select (in
/lib/tls/libc-2.3.5.so)
==7591== by 0x1B97E1A6: SDL_Delay (in
/usr/lib/libSDL-1.2.so.0.7.1)
==7591== by 0x1B97E1F9: (within
/usr/lib/libSDL-1.2.so.0.7.1)
==7591== by 0x1B97CDC6: SDL_RunThread (in
/usr/lib/libSDL-1.2.so.0.7.1)
==7591== by 0x1B97D0FB: (within
/usr/lib/libSDL-1.2.so.0.7.1)
==7591== by 0x1B9D9CCC: start_thread (in
/lib/tls/libpthread-2.3.5.so)
==7591== by 0x1BC8CB0D: clone (in
/lib/tls/libc-2.3.5.so)


Note: see also the FAQ.txt in the source distribution.
It contains workarounds to several common problems.

If that doesn't help, please report this bug to:
www.valgrind.org

In the bug report, send all the above text, the valgrind
version, and what Linux distro you are using. Thanks.
END error-------------------------------------

My system:
* valgrind-3.0.1
* debian (testing/unstable)
* kernel 2.6.11-1-k7
* gcc (GCC) 4.0.2 20050821 (prerelease) (Debian 4.0.1-6)

Thanks for your help,
Werner Höhrer (bill.spam [at] myrealbox.com)


[1] http://www.lanadminsystem.de/cgi-bin/Lanas.pl?OPENANNO
[2] http://sourceforge.net/tracker/index.php?func=detail&aid=1283279&group_id=46268&atid=445586

A similar bug seem to be: #110102
Comment 1 Bill Spam 2005-09-07 12:21:17 UTC
I want to add that i'm using the Debian package and not the CVS version of Valgrind since i'm not one who compiles _everything_ from CVS.

Werner
Comment 2 Tom Hughes 2005-09-07 15:44:53 UTC
*** Bug 112167 has been marked as a duplicate of this bug. ***
Comment 3 Bill Spam 2005-09-09 17:03:56 UTC
Ok, i got the source for 3.0.1 and commented out the line

// vassert(0); /* awaiting test case */

It seem to work now (as also mentioned in Bug 112167 

Werner
Comment 4 Bill Spam 2005-09-09 17:35:51 UTC
Ok, the previous message was posted too fast....now valgrind crashes with the following message.

valgrind --tool=cachegrind ./oa

END error------------------------------------- 
...
...
...
Cachegrind: cg_main.c:486 (handleOneStatement): Assertion 'NULL == *storeAddrExpr' failed.
==15370==    at 0xB001693E: panic (m_libcassert.c:175)
==15370==    by 0xB001693D: vgPlain_assert_fail (m_libcassert.c:169)
==15370==    by 0xB7DA4CFF: ???
==15370==    by 0xB7DA53BF: ???
==15370==    by 0xB0056D06: LibVEX_Translate (vex_main.c:468)
==15370==    by 0xB0023E11: vgPlain_translate (m_translate.c:585)
==15370==    by 0xB0038E6E: handle_tt_miss (scheduler.c:566)
==15370==    by 0xB003919A: vgPlain_scheduler (scheduler.c:680)
==15370==    by 0xB004F3B5: vgModuleLocal_thread_wrapper (syswrap-linux.c:80)
==15370==    by 0xB004B922: run_a_thread_NORETURN (syswrap-x86-linux.c:150)

sched status:
  running_tid=1

Thread 1: status = VgTs_Runnable
==15370==    at 0x3A9F9E00: (within /usr/lib/libSDL-1.2.so.0.7.1)
==15370==    by 0x3A9CDE68: SDL_LowerBlit (in /usr/lib/libSDL-1.2.so.0.7.1)
==15370==    by 0x3A9CE0FA: SDL_UpperBlit (in /usr/lib/libSDL-1.2.so.0.7.1)
==15370==    by 0x804EC6F: clientstart (client.c:446)
==15370==    by 0x8049FE4: main (openanno.c:57)

Thread 2: status = VgTs_Runnable
==15370==    at 0x3AD07F87: select (in /lib/tls/libc-2.3.5.so)
==15370==    by 0x3A9F91A6: SDL_Delay (in /usr/lib/libSDL-1.2.so.0.7.1)
==15370==    by 0x3A9F921B: (within /usr/lib/libSDL-1.2.so.0.7.1)
==15370==    by 0x3A9F7DC6: SDL_RunThread (in /usr/lib/libSDL-1.2.so.0.7.1)
==15370==    by 0x3A9F80FB: (within /usr/lib/libSDL-1.2.so.0.7.1)
==15370==    by 0x3AA54CCC: start_thread (in /lib/tls/libpthread-2.3.5.so)
==15370==    by 0x3AD0FB0D: clone (in /lib/tls/libc-2.3.5.so)

Thread 3: status = VgTs_Runnable
==15370==    at 0x3AD07F87: select (in /lib/tls/libc-2.3.5.so)
==15370==    by 0x3A9A90DE: (within /usr/lib/libSDL-1.2.so.0.7.1)
==15370==    by 0x3A9A412C: SDL_RunAudio (in /usr/lib/libSDL-1.2.so.0.7.1)
==15370==    by 0x3A9F7DC6: SDL_RunThread (in /usr/lib/libSDL-1.2.so.0.7.1)
==15370==    by 0x3A9F80FB: (within /usr/lib/libSDL-1.2.so.0.7.1)
==15370==    by 0x3AA54CCC: start_thread (in /lib/tls/libpthread-2.3.5.so)
==15370==    by 0x3AD0FB0D: clone (in /lib/tls/libc-2.3.5.so)


Note: see also the FAQ.txt in the source distribution.
It contains workarounds to several common problems.

If that doesn't help, please report this bug to: www.valgrind.org

In the bug report, send all the above text, the valgrind
version, and what Linux distro you are using.  Thanks.
END error------------------------------------- 

I don't know if this is realted to the previous error though.

Werner
Comment 5 Tom Hughes 2005-09-13 10:34:51 UTC
That is a problem in cachegrind and is completely separate - it would probably be a good idea to raise a separate bug for that.
Comment 6 Maurice van der Pot 2005-09-14 19:58:38 UTC
What is the status of this bug? Is more information required before it can be
solved? 

I've gotten a report from someone who ran into this. If I can help by providing
more information, please say so.
Comment 7 Tom Hughes 2005-09-14 20:25:53 UTC
Which bug? The original one? or the later cachegrind assertion?The fix for the first one is just to remove the assert as detailed in one of the comment - that fix should be applied for the next release I expect.
Comment 8 Maurice van der Pot 2005-09-14 20:36:34 UTC
Yes, the original one. Alright, thanks for clarifying.
Comment 9 Bill Spam 2005-09-15 18:59:48 UTC
Ok, made a new bug report #112670

Werner
Comment 10 Tom Hughes 2005-09-19 13:57:58 UTC
*** Bug 112789 has been marked as a duplicate of this bug. ***
Comment 11 Julian Seward 2005-10-03 04:16:47 UTC
Fixed (vex r1407), although I don't have an easy way to verify
the fix.