VirtualBox

Opened 10 years ago

Closed 9 years ago

#13038 closed defect (fixed)

Assertion RT_SUCCESS_RP(rc) failed when Geant4 program runs -> fixed in 4.3 and later releases after 22 Oct 2014

Reported by: itsjareds Owned by:
Component: VMM/HWACCM Version: VirtualBox 4.3.10
Keywords: RT_SUCCESS_NP, thread, memory Cc:
Guest type: other Host type: other

Description

I compiled Geant4 with parallelism support enabled and tried compiling one of the prepackaged example programs. When I run the compiled program, I get the following output in my terminal in the guest environment:

!!Assertion Failed!!
Expression: RT_SUCCESS_NP(rc)
Location  : /mnt/tinderbox/add-4.3/src/VBox/Runtime/common/misc/thread.cpp(227) void rtThreadLockRW()
VERR_INVALID_HANDLE (-4) - Invalid loader handle.

Neither the host VirtualBox application nor the guest VM crash. I simply get that output in the guest's terminal and the program I attempted to run crashes.

Host: Arch Linux (64-bit) Guest: Scientific Linux 6.5 (64-bit)

Attachments (5)

output.assert.log (47.0 KB ) - added by itsjareds 10 years ago.
Geant4 program run output
VBox.log (122.5 KB ) - added by itsjareds 10 years ago.
VirtualBox log file
log.txt (20.7 KB ) - added by itsjareds 10 years ago.
gdb-output-with-symbols.txt (58.5 KB ) - added by itsjareds 10 years ago.
GDB output with an additional symbol table loaded from vbox_dri.so
gdb-output-symbols-fixed.txt (54.3 KB ) - added by itsjareds 10 years ago.

Download all attachments as: .zip

Change History (27)

by itsjareds, 10 years ago

Attachment: output.assert.log added

Geant4 program run output

by itsjareds, 10 years ago

Attachment: VBox.log added

VirtualBox log file

comment:1 by Frank Mehnert, 10 years ago

Which pre-packaged application are you talking about? Do I understand it right that the "precompiled package" is linked against the VirtualBox Runtime?

comment:2 by itsjareds, 10 years ago

Sorry for the ambiguity. I mean that I have compiled a C++ application (Geant4 modeling application) myself, and when I run the program, I receive the RT_ASSERT_NP(rc) failed message. I believe the bug occurs when the Qt4 window attempts to open. It seems to be related to VirtualBox thread management, so I posted the bug here.

I also have new information that this bug is only occurring with my Arch Linux host. I have an Mac OS X host running the same Scientific Linux 6.5 version, and I am not experiencing issues with the OS X host. My Geant4 program runs successfully on Scientific Linux 6.5 when running under an OS X host, but not with an Arch Linux host.

Arch Linux (buggy host) VirtualBox version: 4.3.10_OSE r93012

Mac OS X (working host) VirtualBox version: 4.3.10 r93012

Last edited 10 years ago by itsjareds (previous) (diff)

comment:3 by Frank Mehnert, 10 years ago

Sorry, it's still not 100% clear. Which application aborts with a triggered release assertion? The Geant4 application or VirtualBox?

comment:4 by Michael Thayer, 10 years ago

I would guess that this is a crash in the guest OpenGL libraries. Would it be possible to run the application in a debugger and get a back-trace?

comment:5 by itsjareds, 10 years ago

My apologies for the late reply.

@frank: The Geant4 application crashes. It is a C++ program I compiled using g++ in the guest environment. As far as I can tell, it crashes when it attempts to use Qt libraries to open a window. (Still pretty new to Geant4 so I don't know for sure.) In the guest environment, I am using the terminal and type "./exampleB1" to run the program. The program prints out the "Assertion RT_SUCCESS_NP(rc) failed" message and returns control to the terminal. Neither the guest VM nor the host machine crash in any sense; just the program. I have the VirtualBox guest additions installed.

@michael: I will try this when I have access to the right computer and report back.

comment:6 by itsjareds, 10 years ago

I managed to run the program in gdb. (Had to install 2 Gb of debuginfo packages!) I will attach the gdb output including the backtrace.

by itsjareds, 10 years ago

Attachment: log.txt added

comment:7 by itsjareds, 10 years ago

The problem may instead have to do with threading. I am experiencing the problem when Geant4 tries to create a worker thread in multithreaded mode. The problem does not occur in sequential mode.

comment:8 by niklasson, 10 years ago

I have the same issue, and I've tried running Geant4 in sequential mode, and this does help. However, looking through the stacktrace itsjared posted, it seems this is an issue in the visualization feature - more specifically Geant4's opengl driver is calling some function in the virtualbox video driver which causes this error. itsjared - seeing the lack of replies - have you found a fix?

comment:9 by galitsyn, 10 years ago

Could you please "add-symbol-file" below into gdb and re-attach "threads apply all bt"? Please note, symbol file is for VBox Additions r93012.

comment:10 by galitsyn, 10 years ago

Oh, symbols file is a bit large to be attached here.. Will upload it shortly.

comment:11 by galitsyn, 10 years ago

Here is the link to the file.

comment:12 by itsjareds, 10 years ago

Thank you for contributing that you are encountering the same problem, niklasson. I was unsure if it was something I was doing wrong or if I discovered a bug. I have not found a fix, but instead just physically installed Xubuntu on my drive and recompiled Geant4 with multithreading support. The problem does not occur in this native solution, only when virtualized in VirtualBox.

Galitsyn, thanks for supplying a symbol file to use. I followed your instructions the best I could, and I will attach the output below.

by itsjareds, 10 years ago

Attachment: gdb-output-with-symbols.txt added

GDB output with an additional symbol table loaded from vbox_dri.so

comment:13 by galitsyn, 10 years ago

Unfortunately, the backtrace items for the interesting thread (Thread 1) were not resolved. Could you please load symbols file after assertion occurred? Please also make sure you are loading symbols into the correct address (use "info sharedlibrary" to get correct one).

If there will be an issue, you could simply replace /usr/lib64/dri/vboxvideo_dri.so with the file above (do not forget to make a backup of the original one) and the backtrace items should be resolved by default.

comment:14 by itsjareds, 10 years ago

Ah, I thought it may have been loaded incorrectly. I ended up just replacing /usr/lib64/dri/vboxvideo_dri.so with your version and got some useful output.

by itsjareds, 10 years ago

in reply to:  11 comment:15 by matkara, 9 years ago

Replying to galitsyn:

Here is the link to the file.

Hello,

I have exactly the same problem as the one described in this topic.

Host : XP SP3
Guest : Ubuntu 14.04 LTS
Geant4 : 10.01 beta - Multithreaded mode - qt/opengl activated

The link of the library is dead. Could you send it back please ?

Thank you so much

Last edited 9 years ago by matkara (previous) (diff)

comment:16 by galitsyn, 9 years ago

Please specify VBox Guest Additions revision number and I will re-generate this file for you. Please also note that this is issue is still not reproducible here.

comment:17 by matkara, 9 years ago

Thank you for your quick answer and your proposal of building the file. This is very kind. I am using : VBOXADDITIONS_4.3.18_96516

To reproduce this issue, you would probably need to compile a recent version of Geant4. This is rather long to do ... if one day, you would like to try, here some information

http://geant4.web.cern.ch/geant4/support/download_beta.shtml

It would be something like this:

wget http://geant4.cern.ch/support/source/geant4.10.01.b01.tar.gz
tar xvzf geant4.10.01.b01.tar.gz
mkdir build
cd build
cmake ../geant4.10.01.b01 -DGEANT4_USE_QT=ON -DGEANT4_USE_OPENGL_X11=ON -DGEANT4_BUILD_MULTITHREADED=ON

These are the options I am using. At this point, you will need to setup the options for Qt5:

ccmake .

check everything is ok - configure/generate

make

Once Geant4 is compiled, you may test an example:

cd ../geant4.10.01.b01/examples/basic/B1
mkdir build
cd build 
cmake .. -DGeant4_DIR=../../../../build
make
./exampleB1

EDIT: the paths were corrected

Version 2, edited 9 years ago by matkara (previous) (next) (diff)

comment:18 by Michael Thayer, 9 years ago

So far we have been unable to reproduce this. I build this most recently on a (single VCPU, 64-bit) Ubuntu 14.04 guest with Qt4. Do you always see this assertion? If so, can you also trigger it on a freshly installed guest like I described?

Do you change any options when you run ccmake?

comment:19 by Michael Thayer, 9 years ago

Actually I think I may have reproduced this.

comment:20 by Michael Thayer, 9 years ago

Please give this Additions build a try:

https://www.virtualbox.org/download/testcase/VBoxGuestAdditions_4.3.19-96597.iso

It seems that this was due to an unfortunate combination of Geant4 using an incredibly large amount of thread local storage, glibc putting thread local storage on the thread stack and our 3D code creating a thread with a fixed-size stack.

comment:21 by Michael Thayer, 9 years ago

Summary: Assertion RT_SUCCESS_RP(rc) failed when Geant4 program runsAssertion RT_SUCCESS_RP(rc) failed when Geant4 program runs -> fixed in 4.3 and later releases after 22 Oct 2014

I will assume this is fixed.

comment:22 by Frank Mehnert, 9 years ago

Resolution: fixed
Status: newclosed

Fixed in VBox 4.3.20. Please don't forget to update the Guest Additions.

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use